staff #331

Parent #59933Owner Flags Source rpg_march_2006/staff.txt

Aliases: staff

43 verbs · 61 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
healthis none thisrd#3319
stormthis none thisrd#3313
unwallany with thisrxd#33117
forcewallany with thisrxd#3313
look_selfthis none this#3314
enchantnone with thisrxd#3317
barkskinnone with thisrxd#33115
biting_cloudany with thisrxd#3313
claimany with thisrxd#33116
unbarknone with thisrxd#33114
titlethis none this#3312
mountany on thisrxd#33132
unmountany from thisrxd#33116
exitfuncthis none this#3316
shatterany with thisrxd#33119
hardenany with thisrxd#3319
hailany with thisrxd#3313
iceshellany with thisrxd#3317
waterwhipnone with thisrxd#33119
acceptablethis none this#3311
conjureany with thisrxd#33127
summonany with thisrxd#3317
may_castthis none this#33121
pay_costthis none this#33132
do_enchantthis none this#33110
damthis none this#3311
conthis none this#3312
enchantmentthis none this#33120
attack parrythis none this#3311
set_mountedthis none this#3314
acidrainany with thisrxd#33110
appraiseany with thisrxd#33114
hidden_verbsthis none this#33126
breakthis none this#33118
magicfist magic*_fist punchany with thisrxd#3317
firebolt heatany with thisrxd#3315
viper_bitenone with thisrxd#3318
unvipernone with thisrxd#3319
nicknamethis none this#3317
stonefleshnone with thisrxd#3314
parchany with thisrxd#3313
unstonenone with thisrxd#3313
fortifyany with thisrxd#33114

Properties

PropertyDefinerFlagsOwnerValue
accept_gem_payment#331rc1
gem_spells#331rc{"shatter", "harden", "hail", "summon", "appraise"}
pearl_spells#331rc{"waterwhip", "iceshell", "acidrain", "parch"}
mounted#331r#-1
forcewall_cast_msg#331rc"%N %<intones> words of protection while swinging %p %[focus] about %r in a circle. %S then %<taps> %d lightly with %p %[focus]."
enchant_cast_msg#331rc"%N %<concentrates> on %p %[focus], gently caressing it while muttering odd syllables."
barkskin_cast_msg#331rc"%N %<clasps> %p %[focus] tightly to %o whilst tracing mystic symbols about %p body and chanting words of change."
hail_cast_msg#331rc"%N %<bangs> %p %[focus] forcefully on the ground while shouting words of power to the heavens."
unwall_cast_msg#331rc"%N %<waves> %p hands at %d, intoning words of dispelling."
shatter_cast_msg#331rc"%N %<scowls> fiercely, pointing %p %[focus] at %[target] and barking out a short spell."
unwall_cast_self_msg#331rc"%N %<waves> %p hands about %r, intoning words of dispelling."
forcewall_cast_self_msg#331rc"%N %<intones> words of protection while swinging %p %[focus] about %r in a circle."
harden_cast_msg#331rc"%N %<intones> something like `Huge Blooming Cruft' while pointing %p %[focus] and staring cross-eyed at %[target]."
biting_cloud_cast_msg#331rc"%N %<holds> %p %[focus] aloft, chanting a buzzing, clicking sort of spell."
waterwhip_cast_msg#331rc"%N %<waves> %p %[focus] fluidly, speaking some odd syllables."
conjure_cast_msg#331rc"%N %<traces> a strange diagram on the ground with %p %[focus], then %<steps> back, %<spreads> %p arms wide and %<commences> reciting weird syllables."
summon_cast_msg#331rc"%N %<traces> arcane symbols on the ground, then %<whispers> a single arcane word to the wind."
enchantment#331not readable (E_PERM)
acidrain_cast_msg#331rc"%N %<points> %p %[focus] at the clouds above %d, chanting and cackling evilly."
appraise_cast_msg#331rc"%N %<whispers> under %p breath and %<stares> intently at %[target]."
magic_fist_cast_msg#331rc"%N %<punches> forward forcefully while shouting, \"Yzor!\""
unbark_cast_msg#331rc"%N %<taps> %r on the forehead with %p %[focus] while incanting a short rhyme."
viper_bite_cast_msg#331rc"%N %<speaks> a sibilant spell, ceasing by spitting."
unviper_cast_msg#331rc"%N %<speaks> a sibilant spell, ceasing by sucking in %p spittle."
stoneflesh_cast_msg#331rc"%N %<taps> %p forehead, chest and shoulders, whilst chanting words of change."
fortify_cast_msg#331rc"%N %<runs> %p hands deftly up and down the length of %p %[focus], then %<touches> its head to %p %[target]."
bonus#331not readable (E_PERM)
visible_spells#331not readable (E_PERM)
no_imp#331not readable (E_PERM)
dodgable#331not readable (E_PERM)
parryable#331not readable (E_PERM)
osheathe#331"puts away"
sheathe#331"put away"
slowness#331not readable (E_PERM)
length#33130
parry#331not readable (E_PERM)
attack#331not readable (E_PERM)
pen#331not readable (E_PERM)
dam#331not readable (E_PERM)
skill#331not readable (E_PERM)
hands#3312
wooden#3311
blunt#3311
pierce#331-3
con#3313
max_str_bonus#331not readable (E_PERM)
can_degrade#331not readable (E_PERM)
track_usage#331not readable (E_PERM)
encumbrance#3314
manufactured#331820783482
worth#331-1
condition#331100
last_action#3311129633343
use_spell_msg_db#3311
odrop_failed_msg#331"%<tries> to drop %t but fails!"
odrop_succeeded_msg#331"%<drops> %t."
otake_succeeded_msg#331"%<picks> up %t."
key#331not readable (E_PERM)
aliases#331{"staff"}
description#331"A long, straight branch trimmed from a sapient pear tree."
object_size#331{37132, 1141286558}

Ancestry

Ancestors (nearest first): #59933 Generic Weapon Spell Focus#82 generic weapon#517 Generic LRPG Thing

Children: none

Call graph

calls n331_0 #331:heal n59933_0 #59933:check_casting n331_0->n59933_0 n59933_1 #59933:check_live_target n331_0->n59933_1 n59933_11 #59933:spell n331_0->n59933_11 n331_1 #331:storm n331_1->n59933_0 n331_1->n59933_11 n331_2 #331:unwall n331_2->n59933_0 n331_2->n59933_1 n331_2->n59933_11 n331_3 #331:forcewall n331_3->n59933_0 n331_3->n59933_1 n331_3->n59933_11 n331_4 #331:look_self n82_2 #82:look_self n331_4->n82_2 n331_5 #331:enchant n331_5->n59933_0 n331_5->n59933_11 n331_27 #331:enchantment n331_5->n331_27 n331_10 #331:title n331_27->n331_10 n331_6 #331:barkskin n331_6->n59933_0 n331_6->n59933_11 n331_7 #331:biting_cloud n331_7->n59933_0 n331_7->n59933_1 n331_7->n59933_11 n331_8 #331:claim n331_8->n59933_0 n331_8->n59933_11 n59933_2 #59933:check_object_target n331_8->n59933_2 n331_9 #331:unbark n331_9->n59933_0 n59933_4 #59933:casting_msg n331_9->n59933_4 n82_5 #82:title n331_10->n82_5 n331_14 #331:shatter n331_14->n59933_0 n331_14->n59933_1 n331_14->n59933_11 n331_14->n59933_2 n331_15 #331:harden n331_15->n59933_0 n331_15->n59933_11 n331_15->n59933_2 n331_16 #331:hail n331_16->n59933_0 n331_16->n59933_11 n59933_3 #59933:check_multiple_live_targets n331_16->n59933_3 n331_17 #331:iceshell n331_17->n59933_0 n331_17->n59933_1 n331_17->n59933_11 n331_18 #331:waterwhip n331_18->n59933_0 n331_18->n59933_11 n331_20 #331:conjure n331_20->n59933_0 n331_20->n59933_11 n331_21 #331:summon n331_21->n59933_0 n331_21->n59933_11 n331_23 #331:pay_cost n59933_7 #59933:pay_cost n331_23->n59933_7 n331_25 #331:dam n331_25->n331_27 n82_13 #82:dam n331_25->n82_13 n331_26 #331:con n331_26->n331_27 n82_6 #82:dodgable n331_26->n82_6 n331_28 #331:attack n331_28->n331_27 n82_15 #82:attack n331_28->n82_15 n331_30 #331:acidrain n331_30->n59933_0 n331_30->n59933_1 n331_30->n59933_11 n331_31 #331:appraise n331_31->n59933_0 n331_31->n59933_11 n331_31->n59933_2 n331_32 #331:hidden_verbs n331_32->n331_27 n59933_10 #59933:hidden_verbs n331_32->n59933_10 n331_33 #331:break n82_17 #82:break n331_33->n82_17 n331_34 #331:magicfist n331_34->n59933_0 n331_34->n59933_1 n331_34->n59933_11 n331_34->n331_27 n331_35 #331:firebolt n331_35->n59933_0 n331_35->n59933_1 n331_35->n59933_11 n331_35->n331_27 n331_36 #331:viper_bite n331_36->n59933_0 n331_36->n59933_11 n331_37 #331:unviper n331_37->n59933_0 n331_37->n59933_11 n331_39 #331:stoneflesh n331_39->n59933_0 n331_39->n59933_11 n331_40 #331:parch n331_40->n59933_0 n331_40->n59933_1 n331_40->n59933_11 n331_41 #331:unstone n331_41->n59933_0 n331_41->n59933_11

Showing 48 of 49 verbs; 1 not shown.

Source

heal

Spec this none thisFlags rdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobj, (rpg = $local.rpg).skills.(verb)) && valid(targ = this:check_live_target(player, dobj, rpg.skills.(verb), peaceful = 1)))
2  if (targ.inj <= 0)
3    player:tell(targ.character.name, " is uninjured.");
4  elseif (doll.paralyzed = rpg.magic_db.iceshell_paralyzed_msg)
5    player:tell("You'll have to get rid of that shell of ice around ", target.character.name, " first.");
6  else
7    this:spell(player, targ, rpg.skills.(verb), 0, peaceful);
8  endif
9endif

storm

Spec this none thisFlags rdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, $local.rpg.skills.(verb)))
2  this:spell(player, player.location, $local.rpg.skills.(verb));
3endif

unwall

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobj, skill = $local.rpg.skills.forcewall) && valid(targ = this:check_live_target(player, dobjstr, skill)))
2  if (!(info = targ:read_misc_note("force_wall")))
3    player:tell("There is no wall of force around ", targ.character.po, ".");
4  else
5    mod = 20;
6    if (valid(mage_doll = info[1]) && (parent(mage_doll) == $local.rpg.doll))
7      if (mage_doll.character != player)
8        player:tell("You didn't cast that wall around ", targ.character.name, ";  this might be a little difficult. . .");
9        mod = -info[2];
10      endif
11    else
12      player:tell("The original caster of that wall is no more, allowing you to easily dispel the magick.");
13      mod = 200;
14    endif
15    this:spell(player, targ, "unwall", mod, 0, skill);
16  endif
17endif

forcewall

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, skill = $local.rpg.skills.(verb)) && valid(targ = this:check_live_target(player, dobjstr, skill, peaceful = 1)))
2  this:spell(player, targ, skill, 0, peaceful, skill);
3endif

look_self

Spec this none thisDefiner #331

Referenced by

none

Source

1pass(@args);
2if (valid(this.mounted))
3  player:tell("Mounted at the tip of the ", this.name, " is a ", this.mounted.name, ".");
4endif

enchant

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, skill = $local.rpg.skills.(verb)))
2  if (this:enchantment())
3    player:tell(this:titlec(), " is already enchanted.");
4  else
5    this:spell(player, this, skill, 0, 1);
6  endif
7endif

barkskin

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1rpg = $local.rpg;
2if (this:check_casting(player, dobjstr, $local.rpg.skills.(verb)))
3  "if ($math_utils:sum($list_utils:map_arg($math_utils, \"sum\", $list_utils:map_prop(rpg:get_doll(player).wearing, \"cover\"))))";
4  "  player:tell(\"You'll have to remove what you're wearing first.\");";
5  "else";
6  for item in ($local.rpg:get_doll(player).schedule)
7    if (item[2] in {"unslow", "unspeed"})
8      player:tell("Your altered metabolism prevents the spell from affecting you.");
9      return;
10    endif
11  endfor
12  this:spell(player, player, $local.rpg.skills.(verb), 0, 1);
13endif
14"endif";
15"Hydros (#106189) - Fri May 27, 2005 - Removed the armour check.  This is already done in $local.rpg.magic_db:barkskin.";

biting_cloud

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, $local.rpg.skills.(verb)) && valid(targ = this:check_live_target(player, dobjstr, $local.rpg.skills.(verb))))
2  this:spell(player, targ, $local.rpg.skills.(verb));
3endif

claim

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, (rpg = $local.rpg).skills.(verb)) && valid(targ = this:check_object_target(player, dobjstr)))
2  if (rpg.object_db:is_monster(targ))
3    rpg:playertell(player, "Sorry, but the LRPG prohibits slavery.");
4  else
5    doll = rpg:get_doll(player);
6    claimed_by = targ:claimed_by();
7    claimed_objs = doll:claimed_objects();
8    if (((!valid(claimed_by)) && (length(claimed_objs) < doll.max_claims)) || (targ in claimed_objs))
9      rpg:playertell(player, "You don't need a spell to accomplish that.");
10    elseif (is_player(targ.location) && (!$object_utils:connected(targ.location)))
11      rpg:playertell(player, "Hold your magic! By edict of the great wizard, bystanders must not be molested.");
12    else
13      this:spell(player, targ, rpg.skills.(verb), 0, 1);
14    endif
15  endif
16endif

unbark

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1rpg = $local.rpg;
2if (this:check_casting(player, dobjstr, rpg.skills.barkskin))
3  doll = rpg:get_doll(player);
4  if (!(rpg.magic_db.bs_combat_effect in doll.magic_effects))
5    player:tell("While your skin may be tough and gnarly, it is not the result of magick.  Perhaps you should consult a dermatologist.");
6  else
7    player:tell("You try to cast Girdling the Bark.");
8    rpg:say_action(this:casting_msg(player, "unbark", player), player);
9    data = doll.schedule[$list_utils:iassoc("unbark", doll.schedule, 2)];
10    doll:cancel(data);
11    rpg.toady:call_verb(data[1], data[2], {doll, @data[4]});
12    doll:check_ins(15);
13  endif
14endif

title

Spec this none thisDefiner #331

Referenced by

Source

1name = valid(this.mounted) ? this.mounted.name + "-tipped " | "";
2return name + pass(@args);

mount

Spec any on thisFlags rxdDefiner #331

Referenced by

none

Source

1rpg = $local.rpg;
2if ($command_utils:object_match_failed(what = player:my_match_object(dobjstr), dobjstr))
3elseif (what.location != player)
4  rpg:playertell(player, "You have to be holding the ", what.name, " in order to mount it into ", this.name, ".");
5elseif (this.location != player)
6  rpg:playertell(player, "Hard to do that without holding ", this.name, ".");
7elseif (!rpg.object_db:is_gem(what))
8  rpg:playertell(player, "That doesn't seem to be a likely candidate for mounting.");
9elseif (!valid(doll = rpg:get_doll(player)))
10  rpg:playertell(player, "You haven't the foggiest notion how to accomplish that. Perhaps you should go play with the cows.");
11elseif (doll.paralyzed)
12  if (typeof(doll.paralyzed) == STR)
13    rpg:playertell(player, doll.paralyzed);
14  else
15    rpg:playertell(player, "Your'e paralyzed. Knock it off.");
16  endif
17elseif (is_player(player) && (`idle_seconds(player) ! ANY => 500' > (2 * rpg.idle_threshold)))
18  rpg:playertell(player, "You drop your ", what.name, "and lose it.");
19  what:moveto(rpg.cemetery);
20elseif ($recycler:valid(this.mounted))
21  rpg:playertell(player, "You'll have to unmount the ", this.mounted.name, " first.");
22elseif (!doll:long_enough())
23  rpg:playertell(player, "You're trying to do too many things at once.  Take a deep breath and try again.");
24elseif ((try_ = rpg.skills.gadget:resolve(player, 0)) < 1)
25  rpg:playertell(player, "You fumble around for a bit, but can't seem to manage to get the ", what.name, " mounted on ", this.name, ".");
26else
27  rpg:say_action(("%N deftly %<mounts> " + what.name) + " upon the tip of %p %t.", player);
28  what:moveto(this);
29  this.mounted = what;
30  doll.last_attack = time();
31endif
32"Profane (#30788) - Sun Oct 26 14:11:34 1997 PST - Check for paralysis and idleness";

unmount

Spec any from thisFlags rxdDefiner #331

Referenced by

none

Source

1what = this:match(dobjstr);
2rpg = $local.rpg;
3if (this.location != player)
4  rpg:playertell(player, "Hard to do that while you're not holding ", this.name, ".");
5elseif ($command_utils:object_match_failed(what, dobjstr))
6elseif ((!valid(this.mounted)) || (what != this.mounted))
7  rpg:playertell(player, "That does not seem to be mounted in ", this.name, ".");
8elseif (!$recycler:valid(doll = rpg:get_doll(player)))
9  rpg:playertell(player, "You haven't the slightest idea how to do that. Perhaps you should go play with the cows.");
10else
11  this.mounted:moveto(player);
12  this.mounted = $nothing;
13  rpg:say_action("%N deftly %<unmounts> a %t from %p %i.", player, what);
14  doll.last_attack = time();
15endif
16"Irin Sat Oct 12 15:10:35 1996 PDT -- changed to match this.contents, rather than player.contents.";

exitfunc

Spec this none thisDefiner #331

Referenced by

none

Source

1{what} = args;
2if (!(rpg = $local.rpg):trusted_efunc())
3  return E_PERM;
4elseif (((!$recycler:valid(this.mounted)) || (this.mounted.location != this)) || (this.mounted == what))
5  this.mounted = $nothing;
6endif

shatter

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, (rpg = $local.rpg).skills.(verb)) && valid(target = this:check_object_target(player, dobjstr)))
2  db = rpg.object_db;
3  dude = target.location;
4  doll = rpg:get_doll(dude);
5  "if (is_player(dude) && (!(((!valid(doll)) || (dude in connected_players())) || ((idle_seconds(dude) > 180) && ((time() - doll.last_attack) > 180)))))";
6  if (is_player(dude) && (!valid(this:check_live_target(player, dude, rpg.skills.(verb), 0))))
7    return;
8  elseif (rpg.magic_db.is_combat_effect in `doll:get_att("freeze_effects") ! E_INVIND => {}')
9    player:tell("You'll have to shatter the shell of ice around ", dude.name, " first.");
10  elseif (((!db:is_monster(target)) && ((db:is_money(target) || db:is_gem(target)) || db:is_metallic(target))) && (`typeof(target.condition) ! ANY' == NUM))
11    this:spell(player, target, rpg.skills.(verb));
12  elseif (`target:receive_shatter(target, rpg.skills.(verb)) ! E_VERBNF => 0')
13    "... target handled the attack ...";
14  else
15    player:tell("My God!  ", target:titlec(), " seems to be immune to Terram magic!");
16  endif
17endif
18"Profane 31-MAR-97 1330PST -- no shatter stuff on disconnected players.";
19"Hydros (#106189) - Sun Apr 17, 2005 - Added :check_live_target line to handle new PKProtection effect, and because it should probably have this check anyway.";

harden

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, $local.rpg.skills.(verb)) && valid(target = this:check_object_target(player, dobjstr)))
2  if ((!`target.condition ! ANY => 0') || `target.wooden ! E_PROPNF, E_PERM => `target.leather ! E_PROPNF, E_PERM => 1'')
3    player:tell("My God!  ", target:titlec(), " seems to be immune to Terram magic!");
4  elseif (target.location != player)
5    player:tell("You must hold ", target:title(), " to affect it.");
6  else
7    this:spell(player, target, $local.rpg.skills.(verb), 0, 1);
8  endif
9endif

hail

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, $local.rpg.skills.(verb)) && (targets = this:check_multiple_live_targets(player, dobjstr, $local.rpg.skills.(verb))))
2  this:spell(player, targets, $local.rpg.skills.(verb));
3endif

iceshell

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, skill = $local.rpg.skills.(verb)) && valid(targ = this:check_live_target(player, dobjstr, skill, peaceful = 0)))
2  if ($local.rpg.magic_db.is_combat_effect in targ:get_att("freeze_effects"))
3    player:tell(targ.character.name, " is already encased in ice.");
4  else
5    this:spell(player, targ, verb, 0, peaceful, skill);
6  endif
7endif

waterwhip

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1rpg = $local.rpg;
2if (this:check_casting(player, dobjstr, skill = rpg.skills.(verb)))
3  doll = rpg:get_doll(player);
4  generic = rpg.magic_db.(verb);
5  for t in (generic:get_value("dispellers"))
6    {who, when} = t;
7    if (when < time())
8      generic:set_value("dispellers", setremove(generic:get_value("dispellers"), t));
9    elseif (who == player)
10      return rpg:playertell(player, "You recently dispelled a waterwhip and the dessicating energies still swirl around you.");
11    endif
12  endfor
13  whip = $list_utils:iassoc("unwhip", schedule = doll:get_att("schedule"), 2);
14  if (whip && (schedule[whip][4][1].location == player))
15    player:tell("You already have one.");
16  else
17    this:spell(player, generic, verb, 0, 1, skill);
18  endif
19endif

acceptable

Spec this none thisDefiner #331

Referenced by

none

Source

1return $object_utils:isa(thing = args[1], $local.rpg.gem);

conjure

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1magic = (rpg = $local.rpg).magic_db;
2spell = rpg.skills.(verb);
3if (this:check_casting(player, dobjstr, spell))
4  if ("submerged" in player.location:get_room_flags())
5    player:tell("You cannot conjure animals underwater!");
6  else
7    animal = summoned = 0;
8    for type in (magic.summonable_animals)
9      if (animal)
10      elseif ($sysobj:match(dobjstr, type))
11        animal = type in magic.summonable_animals;
12      endif
13    endfor
14    for critter in (children(magic.summonable_animal))
15      if (critter:master() == player)
16        summoned = summoned + 1;
17      endif
18    endfor
19    if ((!animal) && dobjstr)
20      player:tell("I don't think you can conjure a \"", dobjstr, "\".");
21    else
22      this:spell(player, player.location, spell, -55 * summoned, 1, spell, animal);
23    endif
24  endif
25endif
26"Irin Fri Oct 18 16:41:25 1996 PDT -- One animal per person, _please_.";
27"Profane 2-SEP-97 1706PDT -- no conjure underwater.";

summon

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1"Copied from thin wand (#65144):summon by Griffen (#93228) Sat Sep  7 13:46:25 1996 PDT";
2"...usage: summon <truename> with <foci>...";
3spell = $local.rpg.skills.(verb);
4if (this:check_casting(player, dobjstr, spell))
5  this:spell(player, player.location, spell, 0, 1, spell, dobjstr);
6endif
7"...Griffen (#93228), 6-11-96.  Added...";

may_cast

Spec this none thisDefiner #331

Referenced by

none

Source

1"may_cast(doll, spell) => can we cast the spell?";
2{doll, spell} = args;
3who = doll.character;
4if (is_player(who) && `$perm_utils:caller()[1]:gem_needed(doll, spell) ! ANY => 1')
5  if (spell in this.gem_spells)
6    if (valid(this.mounted) && (!index(this.mounted.name, "pearl")))
7      return 1;
8    else
9      who:tell(("You'll have to mount a gem on your " + this.name) + " to cast that spell.");
10      return 0;
11    endif
12  elseif (spell in this.pearl_spells)
13    if (valid(this.mounted) && index(this.mounted.name, "pearl"))
14      return 1;
15    else
16      who:tell(("You'll have to mount a pearl on your " + this.name) + " to cast that spell.");
17      return 0;
18    endif
19  endif
20endif
21return 1;

pay_cost

Spec this none thisDefiner #331

Referenced by

none

Source

1":pay_cost(doll, spell, skill, div) => pay the cost of the casting.";
2rpg = $local.rpg;
3if ((caller == this) || (caller.owner in rpg.gms))
4  {doll, spell, skillobj, costdiv} = args;
5  if (is_player(doll.character) && ((spell in this.gem_spells) || (spell in this.pearl_spells)))
6    if (!$recycler:valid(mounted = this.mounted))
7      "Hmm, how'd they manage to cast the spell then? Oh well, we'll just skip the gem bit.";
8      return pass(doll, spell, skillobj, costdiv);
9    endif
10    price = (skillobj.diff / (costdiv * 4)) + (length(children(parent(mounted))) / 375);
11    tvalue = mounted:get_true_value();
12    tvalue = (typeof(tvalue) == NUM) ? tvalue | 0;
13    mounted:set_true_value(tvalue - price);
14    avalue = mounted:get_appraised_value();
15    if (avalue)
16      mounted:set_appraised_value(max(((avalue - price) + random(20)) - random(20), 1));
17    endif
18    if (this.mounted:get_true_value() < 1)
19      rpg:say_action(("The " + this.mounted.name) + " mounted on %n's %t shatters into a thousand slivers!", this.location, this);
20      this.mounted = $nothing;
21      fork (rpg.gm_lag)
22        if ($recycler:valid(mounted))
23          mounted:moveto(rpg.gem_dispenser);
24        endif
25      endfork
26    endif
27  endif
28  pass(doll, spell, skillobj, costdiv);
29endif
30"Profane 30-NOV-96 1309PST - move this.mounted=$nothing outside of fork.";
31"Irin Sun Dec  1 18:45:19 1996 PST -- Changed this.mounted to mounted, inside the fork, so that gems _will_ shatter.";
32"Profane 7-DEC-96 1234PST -- removed obsolete reference to gem_focus_dispenser";

do_enchant

Spec this none thisDefiner #331

Referenced by

none

Source

1":do_enchant(power, end time) => Enchant the item.";
2if ($local.rpg:trusted(caller_perms()))
3  {power, dur} = args;
4  if (this.enchantment)
5    this.enchantment[1] = max(power, this.enchantment[1]);
6    this.enchantment[2] = max(this.enchantment[2] + (dur / 2), time() + dur);
7  else
8    this.enchantment = {power, time() + dur};
9  endif
10endif

dam

Spec this none thisDefiner #331

Referenced by

none

Source

1return pass(@args) + (this:enchantment() / 10);

con

Spec this none thisDefiner #331

Referenced by

none

Source

1return max(1, pass(@args) - (this:enchantment() / 50));
2"THX (#105941) - Tue Jan  9, 2001 - Made enchantment subtractive.  It might actually help now.";

enchantment

Spec this none thisDefiner #331

Referenced by

Source

1if (enc = this.enchantment)
2  (rpg = $local.rpg):secure();
3  if (enc[2] < time())
4    if (valid(x = rpg:get_doll(this.location)))
5      if ((x.body_areas == rpg.magic_db.barkskin_body_areas) && (this in x.wielding))
6        return enc[1];
7      endif
8      name = (this.location.name + "'s ") + this:title();
9    else
10      name = this:title();
11    endif
12    rpg:say_action(name + " seems to flicker briefly.", this.location, this, this.location.location);
13    this.enchantment = 0;
14    return 0;
15  else
16    return enc[1];
17  endif
18endif
19return 0;
20"THX (#105941) - Wed Jul 12, 2000 - If the caster is barkskinned, let's let the enchantment stay!";

attack parry

Spec this none thisDefiner #331

Referenced by

none

Source

1return pass(@args) + (this:enchantment() / 15);

set_mounted

Spec this none thisDefiner #331

Referenced by

none

Source

1":set_mounted(OBJ gem) => Sets the .mounted value, allowing non G_M code to change this on G_M owned objects.  It is the coding GM's responsibility to make sure any already mounted gems are removed, and any unmounted gems are moved to the staff.";
2if ($local.rpg:trusted(caller_perms()))
3  this.mounted = args[1];
4endif

acidrain

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, skill = $local.rpg.skills.(verb)) && valid(targ = this:check_live_target(player, dobjstr, skill)))
2  storms = $local.rpg.magic_db:storms_active_in(player.location);
3  if (!(targ.character in $list_utils:slice(storms, 2)))
4    player:tell("There's no storm above ", targ.character.name, " to turn into acid.");
5  elseif (targ.character == player)
6    player:tell("Melting yourself with acid is not very comfortable. I don't advise it.");
7  else
8    this:spell(player, targ, skill, 0);
9  endif
10endif

appraise

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1skill = $local.rpg.skills.(verb);
2if (this:check_casting(player, dobjstr, skill) && valid(target = this:check_object_target(player, dobjstr)))
3  if (target.location != player)
4    player:tell("You have to hold something to use this spell on it.");
5  elseif ($local.rpg.object_db:is_money(target))
6    player:tell("Um, just count it. You don't need a spell.");
7  elseif (parent(target) != $local.rpg.gem)
8    player:tell("The spell only works on gems, pal.");
9  elseif (target:get_appraised_value())
10    player:tell("The ", target.name, " has already been appraised.");
11  else
12    this:spell(player, target, skill, 0, 1);
13  endif
14endif

hidden_verbs

Spec this none thisDefiner #331

Referenced by

none

Source

1"Swiped from Staff:hidden_verbs by Dagard (#49807) Mon Dec  1 12:00:42 1997 PST";
2{who} = args;
3prev = pass(who);
4staff = (rpg = $local.rpg).staff;
5if (valid(this.mounted))
6  prev = {@prev, {staff, "mount", {"any", "on top of/on/onto/upon", "this"}}};
7  pearl = index(this.mounted.name, "pearl");
8  gem = !pearl;
9else
10  prev = {@prev, {staff, "unmount", {"any", "out of/from inside/from", "this"}}};
11  pearl = gem = 0;
12endif
13pearl || (prev = {@prev, {staff, "iceshell", {"any", "with/using", "this"}}});
14pearl || (prev = {@prev, {staff, "waterwhip", {"none", "with/using", "this"}}});
15pearl || (prev = {@prev, {staff, "acidrain", {"any", "with/using", "this"}}});
16gem || (prev = {@prev, {staff, "shatter", {"any", "with/using", "this"}}});
17gem || (prev = {@prev, {staff, "hail", {"any", "with/using", "this"}}});
18gem || (prev = {@prev, {staff, "harden", {"any", "with/using", "this"}}});
19gem || (prev = {@prev, {staff, "summon", {"any", "with/using", "this"}}});
20gem || (prev = {@prev, {staff, "appraise", {"any", "with/using", "this"}}});
21if (!this:enchantment())
22  prev = {@prev, {staff, "magicfist magic*_fist punch", {"any", "with/using", "this"}}};
23  prev = {@prev, {staff, "firebolt heat", {"any", "with/using", "this"}}};
24endif
25return prev;
26"THX (#105941) - Wed Feb 16, 2000 - Added removal of pearl-or-gem requiring verbs if not mounted and added removal of verbs that require enchantment if no enchantment is present.";

break

Spec this none thisDefiner #331

Referenced by

none

Source

1(rpg = $local.rpg):secure();
2mounted = this.mounted;
3loc = this.location;
4if (valid(mounted))
5  mounted:moveto(rpg.cemetery.turf[1]);
6endif
7"Moving to nothing is necessary 'cause otherwise it gets offed when the staff itself gets offed.";
8if ((typeof(pass(@args)) != ERR) && valid(mounted))
9  if (valid(rpg:get_doll(loc)))
10    mounted:moveto(loc.location);
11    rpg:say_action(("The " + mounted.name) + " from %n's %t tumbles to the ground.", loc);
12  else
13    mounted:moveto(loc);
14  endif
15else
16  "Ooops, error. move the gem back!";
17  `mounted:moveto(this) ! E_INVIND';
18endif

magicfist magic*_fist punch

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:enchantment())
2  if (this:check_casting(player, dobjstr, (rpg = $local.rpg).skills.magic_fist) && valid(target = this:check_live_target(player, dobjstr, rpg.skills.magic_fist)))
3    this:spell(player, target, rpg.skills.magic_fist);
4  endif
5else
6  player:tell((random(3) == 1) ? ("The " + this.name) + " that you are holding might be a focus for that spell if you enchanted it first ..." | "You need to be wielding the proper focus.");
7endif

firebolt heat

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:enchantment() < 99)
2  player:tell("You try to cast the ", verb, " spell, but realize you lack the proper focus.");
3elseif (this:check_casting(player, dobjstr, skill = $local.rpg.skills.(verb)) && valid(targ = this:check_live_target(player, dobjstr, skill, peaceful = 0)))
4  this:spell(player, targ, skill, 0);
5endif

viper_bite

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1rpg = $local.rpg;
2if (this:check_casting(player, dobjstr, skill = rpg.skills.(verb)))
3  "if (rpg:get_doll(player).natural_weapons != rpg.doll.natural_weapons)";
4  "  player:tell(\"Hmm, you can't get the spell to work.\");";
5  "else";
6  this:spell(player, player, skill);
7  "endif";
8endif

unviper

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1rpg = $local.rpg;
2if (this:check_casting(player, dobj, rpg.skills.viper_bite))
3  "if (!(rpg.magic_db.viper_bite in (doll = rpg:get_doll(player)).natural_weapons))";
4  if (!(rpg.magic_db.viper_bite in rpg.object_db.natweap_db:get_all_natweaps(doll = rpg:get_doll(player))))
5    player:tell("You don't have any dental problems that can be fixed by magick.");
6  else
7    this:spell(player, doll, "unviper", 0, 0, rpg.skills.viper_bite);
8  endif
9endif

nickname

Spec this none thisDefiner #331

Referenced by

none

Source

1{nickname} = args;
2if (children(this) || this.unique)
3elseif ((this.owner == $local.rpg.owner) && ($code_utils:verb_loc() == parent(this)))
4  $local.rpg:secure();
5  this.name = nickname;
6  this.aliases = setadd(this.aliases, nickname);
7endif

stoneflesh

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1rpg = $local.rpg;
2if (this:check_casting(player, dobjstr, skill = rpg.skills.harden))
3  this:spell(player, player, verb, 0, 1, skill);
4endif

parch

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, dobjstr, skill = $local.rpg.skills.(verb)) && valid(targ = this:check_live_target(player, dobjstr, skill, peaceful = 0)))
2  this:spell(player, targ, verb, 0, peaceful, skill);
3endif

unstone

Spec none with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:check_casting(player, player.location, $local.rpg.skills.harden))
2  this:spell(player, $local.rpg:get_doll(player), "unstone", 0, 1, $local.rpg.skills.harden);
3endif

fortify

Spec any with thisFlags rxdDefiner #331

Referenced by

none

Source

1if (this:enchantment() < 111)
2  player:tell("You try to cast the ", verb, " spell, but realize you lack the proper focus.  Your ", this.name, " may not be magickal enough.");
3elseif (this:check_casting(player, dobjstr, $local.rpg.skills.harden) && valid(target = this:check_object_target(player, dobjstr)))
4  if ((!`target.condition ! ANY => 0') || `!target.wooden ! E_PROPNF, E_PERM => `!target.leather ! E_PROPNF, E_PERM => 1'')
5    player:tell("My God!  ", target:titlec(), " seems to be immune to Herbam magic!");
6  elseif (target.location != player)
7    player:tell("You must hold ", target:title(), " to affect it.");
8  elseif ((doll = (rpg = $local.rpg):get_doll(player)):read_misc_note("Knows_Fortify") == E_PROPNF)
9    player:tell("You lack the knowledge of how to cast this spell.");
10  else
11    this:spell(player, target, verb, doll.herbam, 1, rpg.skills.herbam);
12  endif
13endif
14"dalton (#116601) - Wed Jul  9, 2003 - Copied from Hydros' (#106189) prototype ";