--- cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/08/30 08:34:21 1.26 +++ cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/09/13 00:29:46 1.31 @@ -7,9 +7,9 @@ my $portal = cf::object::new "exit"; - $portal->set_slaying ($map); - $portal->set_hp ($x); - $portal->set_sp ($y); + $portal->slaying ($map); + $portal->stats->hp ($x); + $portal->stats->sp ($y); $portal->apply ($pl); @@ -53,15 +53,15 @@ # so heal her my $spell = cf::object::new "spell_heal"; - $spell->set_sp (0); # makes casting work - $spell->set_gp (0); # on unholy/nomagic ground + $spell->stats->sp (0); # makes casting work + $spell->stats->grace (0); # on unholy/nomagic ground - $spell->set_hp (0); - $spell->set_dam (($pl->maxhp - $pl->hp) * 0.5); # normal hp heal - $spell->set_food (50); # fill food - $spell->set_last_sp (100); # fill sp - $spell->set_last_grace (100); # fill gr - $spell->set_attacktype (cf::AT_CONFUSION | cf::AT_POISON | cf::AT_BLIND | cf::AT_DISEASE); + $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); $pl->message ("(Neko-san makes strange noises)"); $pl->cast_spell ($self, $dir, $spell); @@ -71,11 +71,11 @@ } 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->set_slaying ("schmorp-neko-gave-fish"); - $gave_fish->set_speed (0); + $gave_fish->slaying ("schmorp-neko-gave-fish"); + $gave_fish->speed (0); $gave_fish->insert_ob_in_ob ($pl); # remove fish @@ -127,7 +127,7 @@ $hitter->message ("You feel dumb."); } } else { - $hitter->hp (-1); + $hitter->stats->hp (-1); $hitter->kill_object; } @@ -137,7 +137,6 @@ sub on_say { my ($self, $pl, $msg) = @_; - cf::LOG cf::llevDebug, sprintf "QBERT [Neko-fon] %s: %s\n", $pl->ob->name, $msg; ext::schmorp_irc::do_notice (sprintf "[Neko-fon] %s: %s\n", $pl->ob->name, $msg); }