--- cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/09/08 16:22:14 1.28 +++ cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/12/12 16:59:34 1.33 @@ -7,13 +7,13 @@ my $portal = cf::object::new "exit"; - $portal->slaying ($map); - $portal->hp ($x); - $portal->sp ($y); + $portal->slaying ($map); + $portal->stats->hp ($x); + $portal->stats->sp ($y); $portal->apply ($pl); - $portal->free; + $portal->destroy; } sub find_target_player { @@ -53,12 +53,12 @@ # so heal her my $spell = cf::object::new "spell_heal"; - $spell->sp (0); # makes casting work - $spell->gp (0); # on unholy/nomagic ground + $spell->stats->sp (0); # makes casting work + $spell->stats->grace (0); # on unholy/nomagic ground - $spell->hp (0); - $spell->dam (($pl->maxhp - $pl->hp) * 0.5); # normal hp heal - $spell->food (50); # fill food + $spell->stats->hp (0); + $spell->stats->dam (($pl->stats->maxhp - $pl->stats->hp) * 0.5); # normal hp heal + $spell->stats->food (50); # fill food $spell->last_sp (100); # fill sp $spell->last_grace (100); # fill gr $spell->attacktype (cf::AT_CONFUSION | cf::AT_POISON | cf::AT_BLIND | cf::AT_DISEASE); @@ -66,12 +66,12 @@ $pl->message ("(Neko-san makes strange noises)"); $pl->cast_spell ($self, $dir, $spell); - $spell->free; + $spell->destroy; } } else { # check for fish in his inv and steal it - if (my $fish = (grep $_->archetype->name eq "fishfood", $pl->inv)[0]) { + if (my $fish = (grep $_->arch->name eq "fishfood", $pl->inv)[0]) { # add force my $gave_fish = cf::object::new "force"; $gave_fish->slaying ("schmorp-neko-gave-fish"); @@ -79,8 +79,7 @@ $gave_fish->insert_ob_in_ob ($pl); # remove fish - $fish->remove; - $fish->free; + $fish->destroy; # be nice $pl->message ("Meoww! (Thank you)"); @@ -127,8 +126,8 @@ $hitter->message ("You feel dumb."); } } else { - $hitter->hp (-1); - $hitter->kill_object; +# $hitter->stats->hp (-1); +# $hitter->kill_object; } cf::override;