1 | #! perl # depends=irc |
1 | #! perl # depends=irc |
2 | |
2 | |
3 | # archetype nekosan |
3 | # archetype nekosan |
4 | |
|
|
5 | sub teleport { |
|
|
6 | my ($pl, $map, $x, $y) = @_; |
|
|
7 | |
|
|
8 | my $portal = cf::object::new "exit"; |
|
|
9 | |
|
|
10 | $portal->slaying ($map); |
|
|
11 | $portal->stats->hp ($x); |
|
|
12 | $portal->stats->sp ($y); |
|
|
13 | |
|
|
14 | $portal->apply ($pl); |
|
|
15 | |
|
|
16 | $portal->destroy; |
|
|
17 | } |
|
|
18 | |
4 | |
19 | sub find_target_player { |
5 | sub find_target_player { |
20 | my ($obj) = @_; |
6 | my ($obj) = @_; |
21 | |
7 | |
22 | my ($time, $pl) = (time + 120, undef); |
8 | my ($time, $pl) = (time + 120, undef); |
… | |
… | |
74 | if (my $fish = (grep $_->arch->archname eq "fishfood", $pl->inv)[0]) { |
60 | if (my $fish = (grep $_->arch->archname eq "fishfood", $pl->inv)[0]) { |
75 | # add force |
61 | # add force |
76 | my $gave_fish = cf::object::new "force"; |
62 | my $gave_fish = cf::object::new "force"; |
77 | $gave_fish->slaying ("schmorp-neko-gave-fish"); |
63 | $gave_fish->slaying ("schmorp-neko-gave-fish"); |
78 | $gave_fish->speed (0); |
64 | $gave_fish->speed (0); |
79 | $gave_fish->insert_ob_in_ob ($pl); |
65 | $pl->insert ($gave_fish); |
80 | |
66 | |
81 | # remove fish |
67 | # remove fish |
82 | $fish->destroy; |
68 | $fish->destroy; |
83 | |
69 | |
84 | # be nice |
70 | # be nice |
… | |
… | |
119 | if !($hitter->{neko_attack} & 15); |
105 | if !($hitter->{neko_attack} & 15); |
120 | |
106 | |
121 | if ($hitter->{neko_attack} > 512) { |
107 | if ($hitter->{neko_attack} > 512) { |
122 | $hitter->{neko_attack} -= 128; |
108 | $hitter->{neko_attack} -= 128; |
123 | $hitter->message ("Neko-san is suddenly gone!"); |
109 | $hitter->message ("Neko-san is suddenly gone!"); |
124 | teleport $hitter, "/scorn/misc/scorn_illusions", 15, 7; |
110 | $hitter->goto ("/scorn/misc/scorn_illusions", 15, 7); |
125 | $hitter->message ("You hear strange noises all around you..."); |
111 | $hitter->message ("You hear strange noises all around you..."); |
126 | $hitter->message ("You feel dumb."); |
112 | $hitter->message ("You feel dumb."); |
127 | } |
113 | } |
128 | } else { |
114 | } else { |
129 | # $hitter->stats->hp (-1); |
115 | # $hitter->stats->hp (-1); |