Generic Thrown Weapon #10898

Parent #82Owner Flags Source rpg_march_2006/Dependencies/10898.txt

Aliases: Generic Thrown Weapon

4 verbs · 52 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
become_melee become_missilethis none this#108988
th*rowthis to anyrxd#1089818
usedthis none this#1089818
maybe_retrievethis none this#1089828

Properties

PropertyDefinerFlagsOwnerValue
dodgable_mis#10898not readable (E_PERM)
dodgable_mel#10898not readable (E_PERM)
parryable_mis#10898not readable (E_PERM)
parryable_mel#10898not readable (E_PERM)
oswing_mis#10898r"throws"
oswing_mel#10898not readable (E_PERM)
swing_mis#10898r"throw"
swing_mel#10898r"swing"
slowness_mis#10898not readable (E_PERM)
slowness_mel#10898not readable (E_PERM)
attack_mis#10898not readable (E_PERM)
attack_mel#10898not readable (E_PERM)
pen_mis#10898not readable (E_PERM)
pen_mel#10898not readable (E_PERM)
dam_mis#10898not readable (E_PERM)
dam_mel#10898not readable (E_PERM)
skill_mis#10898not readable (E_PERM)
skill_mel#10898not readable (E_PERM)
hands_mis#10898not readable (E_PERM)
hands_mel#10898not readable (E_PERM)
pierce_mis#10898not readable (E_PERM)
pierce_mel#10898not readable (E_PERM)
missile#10898not readable (E_PERM)
retrieve_msg#10898rc"%N %<dives> to the ground and deftly %<retrieves> %p %t."
retrievable#10898rc0
failed_retrieve_msg#10898rc"%N %<dives> to the ground, but %<fumbles> and %<is> unable to retrieve %p %t before getting to %p feet."
mounted_failed_retrieve_msg#10898rc"%N %<is> too far from the ground to retrieve %p %t."
dodgable#10898not readable (E_PERM)
parryable#10898not readable (E_PERM)
oswing#10898"fires"
swing#10898"fire"
slowness#10898not readable (E_PERM)
parry#10898not readable (E_PERM)
attack#10898not readable (E_PERM)
pen#10898not readable (E_PERM)
dam#10898not readable (E_PERM)
skill#10898not readable (E_PERM)
hands#108982
pierce#108980
max_str_bonus#10898not readable (E_PERM)
can_degrade#10898not readable (E_PERM)
track_usage#10898not readable (E_PERM)
encumbrance#108985
worth#10898-1
condition#10898100
odrop_failed_msg#10898"%<tries> to drop %t but fails!"
odrop_succeeded_msg#10898"%<drops> %t."
otake_succeeded_msg#10898"%<picks> up %t."
key#10898not readable (E_PERM)
aliases#10898{"Generic Thrown Weapon"}
description#10898"A generic implement of destruction."
object_size#10898{5738, 1141286561}

Ancestry

Ancestors (nearest first): #82 generic weapon#517 Generic LRPG Thing

Children: #8816 generic missile weapon

Call graph

calls n10898_1 #10898:th*row n517_5 #517:set_value n10898_1->n517_5 n10898_2 #10898:used n10898_2->n517_5 n82_4 #82:used n10898_2->n82_4 n517_3 #517:get_value n10898_2->n517_3 n10898_0 #10898:become_melee n10898_2->n10898_0 n517_30 #517:moveto n10898_2->n517_30 n10898_3 #10898:maybe_retrieve n10898_2->n10898_3 n82_5 #82:title n10898_2->n82_5 n10898_3->n517_5 n10898_3->n10898_0 n10898_3->n517_30 n82_0 #82:wield n10898_3->n82_0

Source

become_melee become_missile

Spec this none thisDefiner #10898

Referenced by

Source

1$local.rpg:secure();
2flag = verb[y = index(verb, "_")..y + 3];
3for prop in ($object_utils:findable_properties(this))
4  if (pos = rindex(prop, flag))
5    newprop = prop[1..pos - 1];
6    this.(newprop) = this.(prop);
7  endif
8endfor

th*row

Spec this to anyFlags rxdDefiner #10898

Referenced by

none

Source

1if (!valid(doll = (rpg = $local.rpg):get_doll(player)))
2  player:tell("You don't know how. The Bovine Illuminati may be able to help you.");
3  return;
4elseif (!(this in doll.wielding))
5  player:tell("You're not wielding your ", this.name, ".");
6  return;
7elseif (iobj == $nothing)
8  player:tell("You have to throw <weapon> at <target>.");
9  return;
10elseif (iobj == $ambiguous_match)
11  player:tell("Which ", iobjstr, " do you want to throw ", this.name, " at?");
12  return;
13elseif (iobj == $failed_match)
14  player:tell("Who do you want to throw ", this.name, " at?");
15  return;
16endif
17this:set_value("missile", 1);
18doll:attack(iobj, dobj);

used

Spec this none thisDefiner #10898

Referenced by

Source

1(rpg = $local.rpg):secure();
2r = pass(@args);
3if ((m = this:get_value("missile")) > 0)
4  this:set_value("missile", -1);
5  this:become_missile();
6  `this:moveto(new = (old = this.location).location) ! ANY';
7  if (this.location == new)
8    this:maybe_retrieve(old);
9  else
10    `this:moveto(rpg.cemetery) ! ANY => move(this, rpg.cemetery)';
11    old:tell("Your ", this:title(), " breaks.");
12  endif
13elseif (m)
14  this:set_value("missile", 0);
15  this:become_melee();
16endif
17return r;
18"Mooshie (#106469) - Sun Jan  4, 1998 - New version that's a lot faster.";

maybe_retrieve

Spec this none thisDefiner #10898

Referenced by

Source

1{who} = args;
2(rpg = $local.rpg):secure();
3if ((((valid(doll = rpg:get_doll(who)) && this.retrievable) && (this.location == who.location)) && (rpg:resolve(who, "retrieve", -33) > 0)) && (!valid(doll.mounted)))
4  fork (0)
5    if (this.location != who.location)
6      return;
7    elseif (valid(this) && (parent(this) != $garbage))
8      `this:moveto(who) ! ANY => move(this, who)';
9      if (this.location == who)
10        rpg:say_action(this.retrieve_msg, who, this);
11        this:set_value("missile", 0);
12        this:become_melee();
13        this:wield();
14      endif
15    endif
16  endfork
17elseif (valid(this) && (parent(this) != $garbage))
18  fork (0)
19    if (!valid(doll.mounted))
20      rpg:say_action(this.failed_retrieve_msg, who, this);
21    else
22      rpg:say_action(this.mounted_failed_retrieve_msg, who, this);
23    endif
24  endfork
25endif
26"Mooshie (#106469) - Mon Jan  5, 1998 - Added";
27"THX (#105941) - Tue Feb 15, 2000 - Added Hydros' failed_retrieve_msg announcement and double-checked thrown object location before retrieval.";
28"Hannibal (#104762) - Sat Oct 28, 2000 - Added checks and message for mounted players.";