… | |
… | |
11 | $portal->stats->hp ($x); |
11 | $portal->stats->hp ($x); |
12 | $portal->stats->sp ($y); |
12 | $portal->stats->sp ($y); |
13 | |
13 | |
14 | $portal->apply ($pl); |
14 | $portal->apply ($pl); |
15 | |
15 | |
16 | $portal->free; |
16 | $portal->destroy; |
17 | } |
17 | } |
18 | |
18 | |
19 | sub find_target_player { |
19 | sub find_target_player { |
20 | my ($obj) = @_; |
20 | my ($obj) = @_; |
21 | |
21 | |
… | |
… | |
64 | $spell->attacktype (cf::AT_CONFUSION | cf::AT_POISON | cf::AT_BLIND | cf::AT_DISEASE); |
64 | $spell->attacktype (cf::AT_CONFUSION | cf::AT_POISON | cf::AT_BLIND | cf::AT_DISEASE); |
65 | |
65 | |
66 | $pl->message ("(Neko-san makes strange noises)"); |
66 | $pl->message ("(Neko-san makes strange noises)"); |
67 | $pl->cast_spell ($self, $dir, $spell); |
67 | $pl->cast_spell ($self, $dir, $spell); |
68 | |
68 | |
69 | $spell->free; |
69 | $spell->destroy; |
70 | } |
70 | } |
71 | |
71 | |
72 | } else { |
72 | } else { |
73 | # check for fish in his inv and steal it |
73 | # check for fish in his inv and steal it |
74 | if (my $fish = (grep $_->arch->name eq "fishfood", $pl->inv)[0]) { |
74 | if (my $fish = (grep $_->arch->name eq "fishfood", $pl->inv)[0]) { |
… | |
… | |
77 | $gave_fish->slaying ("schmorp-neko-gave-fish"); |
77 | $gave_fish->slaying ("schmorp-neko-gave-fish"); |
78 | $gave_fish->speed (0); |
78 | $gave_fish->speed (0); |
79 | $gave_fish->insert_ob_in_ob ($pl); |
79 | $gave_fish->insert_ob_in_ob ($pl); |
80 | |
80 | |
81 | # remove fish |
81 | # remove fish |
82 | $fish->remove; |
82 | $fish->destroy; |
83 | $fish->free; |
|
|
84 | |
83 | |
85 | # be nice |
84 | # be nice |
86 | $pl->message ("Meoww! (Thank you)"); |
85 | $pl->message ("Meoww! (Thank you)"); |
87 | |
86 | |
88 | } else { |
87 | } else { |