--- cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/08/30 05:15:05 1.24 +++ cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/08/30 06:41:20 1.25 @@ -107,23 +107,28 @@ sub on_attack { my ($self, $hitter) = @_; - if ($hitter->{neko_last_attack} < time - 300) { - $hitter->{neko_attack} = 0; - } + if ($hitter->type == cf::PLAYER) { + if ($hitter->{neko_last_attack} < time - 300) { + $hitter->{neko_attack} = 0; + } - $hitter->{neko_last_attack} = time; - $hitter->{neko_attack}++ - or ext::schmorp_irc::do_notice "Neko-san was attacked by ". $hitter->name . "!\n"; + $hitter->{neko_last_attack} = time; + $hitter->{neko_attack}++ + or ext::schmorp_irc::do_notice "Neko-san was attacked by ". $hitter->name . "!\n"; - $hitter->message ("Meoow! (Please do not hurt me)") - if !($hitter->{neko_attack} & 15); + $hitter->message ("Meoow! (Please do not hurt me)") + if !($hitter->{neko_attack} & 15); - if ($hitter->{neko_attack} > 512) { - $hitter->{neko_attack} -= 128; - $hitter->message ("Neko-san is suddenly gone!"); - teleport $hitter, "/scorn/misc/scorn_illusions", 15, 7; - $hitter->message ("You hear strange noises all around you..."); - $hitter->message ("You feel dumb."); + if ($hitter->{neko_attack} > 512) { + $hitter->{neko_attack} -= 128; + $hitter->message ("Neko-san is suddenly gone!"); + teleport $hitter, "/scorn/misc/scorn_illusions", 15, 7; + $hitter->message ("You hear strange noises all around you..."); + $hitter->message ("You feel dumb."); + } + } else { + $hitter->hp (-1); + $hitter->kill_object; } cf::override;