ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/maps/perl/schmorp-neko.ext
(Generate patch)

Comparing cf.schmorp.de/maps/perl/schmorp-neko.ext (file contents):
Revision 1.4 by root, Wed Feb 8 06:49:25 2006 UTC vs.
Revision 1.6 by root, Wed Feb 8 21:06:42 2006 UTC

20 20
21sub on_move { 21sub on_move {
22 my ($data) = @_; 22 my ($data) = @_;
23 23
24 if (my $pl = $data->{who}->nearest_player) { 24 if (my $pl = $data->{who}->nearest_player) {
25 if ($pl->exp >= 200000) {
26 my (undef, undef, undef, $dir, undef) = $data->{who}->direction ($pl); 25 my (undef, undef, undef, $dir, undef) = $data->{who}->rangevector ($pl);
27 $data->{who}->move ($data->{who}, $dir); 26 $data->{who}->move ($dir);
28 }
29 } 27 }
30 28
31 1 29 1
32} 30}
33 31
34sub on_attack { 32sub on_attack {
35 my ($data) = @_; 33 my ($data) = @_;
36 34
37 $data->{activator}{neko_attack}++ 35 $data->{activator}{neko_attack}++
38 or cf::LOG cf::llevDebug, sprintf "QBERT Neko-san was attacked by %s!", $data->{activator}->name; 36 or cf::LOG cf::llevDebug, sprintf "QBERT Neko-san was attacked by %s!\n", $data->{activator}->name;
39 37
40 $data->{activator}->message ("Meoow! (You are hurting me)") 38 $data->{activator}->message ("Meoow! (You are hurting me)")
41 if !($data->{activator}{neko_attack} & 15); 39 if !($data->{activator}{neko_attack} & 15);
42 40
43 if ($data->{activator}{neko_attack} > 256) { 41 if ($data->{activator}{neko_attack} > 256) {
51} 49}
52 50
53sub on_say { 51sub on_say {
54 my ($data) = @_; 52 my ($data) = @_;
55 53
56 cf::LOG cf::llevDebug, "QBERT [Neko-fon] $data->{message}"; 54 cf::LOG cf::llevDebug, "QBERT [Neko-fon] $data->{message}\n";
57 55
58 0 56 0
59} 57}
60 58

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines