generic missile weapon #8816

Parent #10898Owner Flags Source rpg_march_2006/missile.txt

Aliases: generic missile weapon, weapon

8 verbs · 49 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
load reloadthis none nonerxd#881611
unloadthis none nonerxd#88160
fire shootthis to anyrxd#881635
do_loadthis none this#881611
titlethis none this#88161
descriptionthis none this#88168
th*rowthis to anyrxd#88161
usedthis none this#881615

Properties

PropertyDefinerFlagsOwnerValue
load_slowness#8816not readable (E_PERM)
loaded#8816not readable (E_PERM)
clip_size#8816not readable (E_PERM)
missile_exits#8816r{#16049, #16050}
dodgable_mis#8816not readable (E_PERM)
dodgable_mel#8816not readable (E_PERM)
parryable_mis#8816not readable (E_PERM)
parryable_mel#8816not readable (E_PERM)
oswing_mis#8816"fires"
oswing_mel#8816"swings"
swing_mis#8816"fire"
slowness_mis#8816not readable (E_PERM)
slowness_mel#8816not readable (E_PERM)
attack_mis#8816not readable (E_PERM)
attack_mel#8816not readable (E_PERM)
pen_mis#8816not readable (E_PERM)
pen_mel#8816not readable (E_PERM)
dam_mis#8816not readable (E_PERM)
dam_mel#8816not readable (E_PERM)
skill_mis#8816not readable (E_PERM)
skill_mel#8816not readable (E_PERM)
hands_mis#8816not readable (E_PERM)
hands_mel#8816not readable (E_PERM)
pierce_mis#88160
pierce_mel#88160
missile#88160
dodgable#8816not readable (E_PERM)
parryable#8816not readable (E_PERM)
slowness#8816not readable (E_PERM)
parry#8816not readable (E_PERM)
attack#8816not readable (E_PERM)
pen#8816not readable (E_PERM)
dam#8816not readable (E_PERM)
skill#8816not readable (E_PERM)
hands#88162
pierce#88160
max_str_bonus#8816not readable (E_PERM)
can_degrade#8816not readable (E_PERM)
track_usage#8816not readable (E_PERM)
encumbrance#88165
worth#8816-1
condition#8816100
odrop_failed_msg#8816"%<tries> to drop %t but fails!"
odrop_succeeded_msg#8816"%<drops> %t."
otake_succeeded_msg#8816"%<picks> up %t."
key#8816not readable (E_PERM)
aliases#8816{"generic missile weapon", "weapon"}
description#8816"A generic implement of destruction."
object_size#8816{6510, 1141286558}

Ancestry

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

Children: none

Call graph

calls n8816_0 #8816:load n8816_3 #8816:do_load n8816_0->n8816_3 n10898_0 #10898:become_melee n8816_3->n10898_0 n8816_2 #8816:fire n517_5 #517:set_value n8816_2->n517_5 n8816_4 #8816:title n82_5 #82:title n8816_4->n82_5 n8816_5 #8816:description n517_35 #517:description n8816_5->n517_35 n8816_7 #8816:used n8816_7->n517_5 n8816_7->n10898_0 n10898_2 #10898:used n8816_7->n10898_2 n517_3 #517:get_value n8816_7->n517_3

Source

load reload

Spec this none noneFlags rxdDefiner #8816

Referenced by

none

Source

1if ((doll = #46:get_doll(player)) == $nothing)
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 the ", this.name, ".");
6  return;
7elseif ((this.loaded > 0) && (verb == "load"))
8  player:tell("The ", this.name, " is already loaded. Perhaps you meant to _reload_ ?");
9  return;
10endif
11this:do_load(player, doll);

unload

Spec this none noneFlags rxdDefiner #8816

Referenced by

none

Source

No program (verb defined but unprogrammed).

fire shoot

Spec this to anyFlags rxdDefiner #8816

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.");
3elseif (!(this in doll.wielding))
4  player:tell("You're not wielding your ", this.name, ".");
5elseif (this.loaded <= 0)
6  player:tell("The ", this.name, " is not loaded.");
7elseif (iobj == $nothing)
8  player:tell("You have to fire <weapon> at <target>.");
9elseif (iobj == $ambiguous_match)
10  player:tell("Which ", iobjstr, " do you want to shoot?");
11elseif (iobj == $failed_match)
12  if (rpg.object_db:is_rpg_room(player.location))
13    out = which = {};
14    e = player.location:exits();
15    d = player.location:dests();
16    for k in [1..length(e)]
17      if ($object_utils:isoneof(e[k], this.missile_exits) && valid(d[k]))
18        out = {@out, @d[k].contents};
19        which = {@which, @$list_utils:make(length(d[k].contents), e[k])};
20      endif
21    endfor
22    iobj = $match_utils:match(iobjstr, out);
23  endif
24  if (iobj == $ambiguous_match)
25    player:tell("Which ", iobjstr, " do you want to shoot?");
26  elseif (iobj == $failed_match)
27    player:tell("Who do you want to shoot?");
28  else
29    this:set_value("missile", 1);
30    doll:attack(iobj, dobj, -which[iobj in out].cover);
31  endif
32else
33  this:set_value("missile", 1);
34  doll:attack(iobj, dobj);
35endif

do_load

Spec this none thisDefiner #8816

Referenced by

Source

1if (#46:trust())
2  me = args[1];
3  doll = args[2];
4  me:tell("You load your ", this.name, ".");
5  me.location:announce_all_but({me}, $string_utils:pronoun_sub("%n loads %p %t.", me));
6  this.loaded = this.clip_size;
7  this:become_missile();
8  doll:invite(doll.slowness + this.load_slowness);
9else
10  player:tell("Permission denied by Role-playing system.");
11endif

title

Spec this none thisDefiner #8816

Referenced by

none

Source

1return pass(@args) + (((this.loaded > 0) && (this.clip_size == 1)) ? " (loaded)" | "");

description

Spec this none thisDefiner #8816

Referenced by

none

Source

1if (this.loaded <= 0)
2  msg = "empty";
3elseif (this.clip_size == 1)
4  msg = "loaded";
5else
6  msg = (("loaded with " + tostr(this.loaded)) + " shot") + ((this.loaded == 1) ? "" | "s");
7endif
8return ((pass(@args) + " It is ") + msg) + ".";

th*row

Spec this to anyFlags rxdDefiner #8816

Referenced by

none

Source

1player:tell("You won't find that manoeuvre in the training manual. Surely things aren't that desperate?");

used

Spec this none thisDefiner #8816

Referenced by

none

Source

1$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.loaded = this.loaded - 1;
7  if ((this.loaded <= 0) && (this.clip_size > 1))
8    player:tell("That was your last shot. Better reload.");
9  endif
10elseif (m)
11  this:set_value("missile", 0);
12  this:become_melee();
13endif
14return r;
15"Mooshie (#106469) - Sun Jan  4, 1998 - New version that's a lot faster.";