… | |
… | |
5 | sub teleport { |
5 | sub teleport { |
6 | my ($pl, $map, $x, $y) = @_; |
6 | my ($pl, $map, $x, $y) = @_; |
7 | |
7 | |
8 | my $portal = cf::object::new "exit"; |
8 | my $portal = cf::object::new "exit"; |
9 | |
9 | |
10 | $portal->slaying ($map); |
10 | $portal->slaying ($map); |
11 | $portal->hp ($x); |
11 | $portal->stats->hp ($x); |
12 | $portal->sp ($y); |
12 | $portal->stats->sp ($y); |
13 | |
13 | |
14 | $portal->apply ($pl); |
14 | $portal->apply ($pl); |
15 | |
15 | |
16 | $portal->free; |
16 | $portal->free; |
17 | } |
17 | } |
… | |
… | |
51 | $pl->{neko_next_cast} = time + 40 + rand 60; |
51 | $pl->{neko_next_cast} = time + 40 + rand 60; |
52 | |
52 | |
53 | # so heal her |
53 | # so heal her |
54 | my $spell = cf::object::new "spell_heal"; |
54 | my $spell = cf::object::new "spell_heal"; |
55 | |
55 | |
56 | $spell->sp (0); # makes casting work |
56 | $spell->stats->sp (0); # makes casting work |
57 | $spell->gp (0); # on unholy/nomagic ground |
57 | $spell->stats->grace (0); # on unholy/nomagic ground |
58 | |
58 | |
59 | $spell->hp (0); |
59 | $spell->stats->hp (0); |
60 | $spell->dam (($pl->maxhp - $pl->hp) * 0.5); # normal hp heal |
60 | $spell->stats->dam (($pl->stats->maxhp - $pl->stats->hp) * 0.5); # normal hp heal |
61 | $spell->food (50); # fill food |
61 | $spell->stats->food (50); # fill food |
62 | $spell->last_sp (100); # fill sp |
62 | $spell->last_sp (100); # fill sp |
63 | $spell->last_grace (100); # fill gr |
63 | $spell->last_grace (100); # fill gr |
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)"); |