"A dump of #8816 on Sun Dec 17 13:42:13 1995 PST @create #10898 named generic missile weapon:generic missile weapon,weapon @prop #8816."load_slowness" 10 "" @prop #8816."loaded" 4 "" @prop #8816."clip_size" 6 "" ;;#8816.("oswing_mis") = "fires" ;;#8816.("swing_mis") = "fire" ;;#8816.("skill_mis") = #32755 ;;#8816.("skill_mel") = #6232 ;;#8816.("hands_mis") = 2 ;;#8816.("hands_mel") = 2 ;;#8816.("pen") = 30 ;;#8816.("dam") = 10 ;;#8816.("skill") = #6232 ;;#8816.("hands") = 2 ;;#8816.("encumbrance") = 5 ;;#8816.("condition") = 100 ;;#8816.("odrop_failed_msg") = "% to drop %t but fails!" ;;#8816.("odrop_succeeded_msg") = "% %t." ;;#8816.("otake_succeeded_msg") = "% up %t." ;;#8816.("key") = 0 ;;#8816.("aliases") = {"generic missile weapon", "weapon"} ;;#8816.("description") = "A generic implement of destruction." ;;#8816.("object_size") = {8182, 819192327} @verb #8816:"load reload" this none none rxd @program #8816:load if ((doll = #46:get_doll(player)) == $nothing) player:tell("You don't know how. The Bovine Illuminati may be able to help you."); return; elseif (!(this in doll.wielding)) player:tell("You're not wielding the ", this.name, "."); return; elseif ((this.loaded > 0) && (verb == "load")) player:tell("The ", this.name, " is already loaded. Perhaps you meant to _reload_ ?"); return; endif this:do_load(player, doll); . @verb #8816:"unload" this none none rxd @verb #8816:"fire shoot" this to any rxd @program #8816:fire if (!valid(doll = #46:get_doll(player))) player:tell("You don't know how. The Bovine Illuminati may be able to help you."); elseif (!(this in doll.wielding)) player:tell("You're not wielding your ", this.name, "."); elseif (this.loaded <= 0) player:tell("The ", this.name, " is not loaded."); elseif (iobj == $nothing) player:tell("You have to fire at ."); elseif (iobj == $ambiguous_match) player:tell("Which ", iobjstr, " do you want to shoot?"); elseif (iobj == $failed_match) if ($object_utils:isa(player.location, #258)) out = which = {}; e = player.location:exits(); d = player.location:dests(); for k in [1..length(e)] if (($object_utils:isa(e[k], #16049) || $object_utils:isa(e[k], #16050)) && valid(d[k])) out = {@out, @d[k].contents}; which = {@which, @$list_utils:make(length(d[k].contents), e[k])}; endif endfor iobj = #2971:match(iobjstr, out); endif if (iobj == $ambiguous_match) player:tell("Which ", iobjstr, " do you want to shoot?"); elseif (iobj == $failed_match) player:tell("Who do you want to shoot?"); else doll:attack(iobj, dobj, -which[iobj in out].cover); endif else doll:attack(iobj, dobj); endif . @verb #8816:"used" this none this @program #8816:used if (#46:trust()) c = $list_utils:compress($list_utils:slice({{this, verb, 0}, @callers()}, {2, 1})); if (args && (args[1] == "pass")) return pass(@listdelete(args, 1)); elseif ((this.loaded <= 0) || (c[2][1] != "attack")) fire = 0; elseif (length(c) != 3) fire = 1; else fire = !index("hit/attack/kill", c[3][1]); endif if (fire) this:become_missile(); this.loaded = this.loaded - 1; if ((this.loaded <= 0) && (this.clip_size > 1)) player:tell("That was your last shot. Better reload."); endif else this:become_melee(); endif return pass("pass", @args); else return E_PERM; endif . @verb #8816:"do_load" this none this @program #8816:do_load if (#46:trust()) me = args[1]; doll = args[2]; me:tell("You load your ", this.name, "."); me.location:announce_all_but({me}, $string_utils:pronoun_sub("%n loads %p %t.", me)); this.loaded = this.clip_size; this:become_missile(); doll:invite(doll.slowness + this.load_slowness); else player:tell("Permission denied by Role-playing system."); endif . @verb #8816:"title" this none this @program #8816:title return pass(@args) + (((this.loaded > 0) && (this.clip_size == 1)) ? " (loaded)" | ""); . @verb #8816:"description" this none this @program #8816:description if (this.loaded <= 0) msg = "empty"; elseif (this.clip_size == 1) msg = "loaded"; else msg = (("loaded with " + tostr(this.loaded)) + " shot") + ((this.loaded == 1) ? "" | "s"); endif return ((pass(@args) + " It is ") + msg) + "."; . @verb #8816:"th*row" this to any rxd @program #8816:throw player:tell("You won't find that manoeuvre in the training manual. Surely things aren't that desperate?"); . @verb #8816:"old_shoot" this to any rxd @program #8816:old_shoot if (!valid(doll = #46:get_doll(player))) player:tell("You don't know how. The Bovine Illuminati may be able to help you."); elseif (!(this in doll.wielding)) player:tell("You're not wielding your ", this.name, "."); elseif (this.loaded <= 0) player:tell("The ", this.name, " is not loaded."); elseif (iobj == $nothing) player:tell("You have to fire at ."); elseif (iobj == $ambiguous_match) player:tell("Which ", iobjstr, " do you want to shoot?"); elseif (iobj == $failed_match) if ($object_utils:isa(player.location, #258)) out = which = {}; e = player.location:exits(); d = player.location:dests(); for k in [1..length(e)] if ($object_utils:isa(e[k], #16049) && valid(d[k])) out = {@out, @d[k].contents}; which = {@which, @$list_utils:make(length(d[k].contents), e[k])}; endif endfor iobj = #2971:match(iobjstr, out); endif if (iobj == $ambiguous_match) player:tell("Which ", iobjstr, " do you want to shoot?"); elseif (iobj == $failed_match) player:tell("Who do you want to shoot?"); else doll:attack(iobj, dobj, -which[iobj in out].cover); endif else doll:attack(iobj, dobj); endif . @verb #8816:"used(old)" this none this @program #8816:used(old) if (#46:trust()) c = $list_utils:compress($list_utils:slice({{this, verb, 0}, @callers()}, {2, 1})); if (args && (args[1] == "pass")) return pass(@listdelete(args, 1)); elseif ((this.loaded <= 0) || (c[2][1] != "attack")) fire = 0; elseif (length(c) != 3) fire = 1; else fire = !index("hit/attack/kill", c[3][1]); endif if (fire) this:become_missile(); this.loaded = this.loaded - 1; if ((this.loaded <= 0) && (this.clip_size > 1)) player:tell("That was your last shot. Better reload."); endif else this:become_melee(); endif return pass("pass", @args); else return E_PERM; endif . @verb #8816:"used_new" this none this @program #8816:used_new if (#46:trust()) c = $list_utils:compress($list_utils:slice({{this, verb, 0}, @callers()}, {2, 1})); player:tell("Used c is: ", $string_utils:print(c)); if (args && (args[1] == "pass")) return pass(@listdelete(args, 1)); elseif ((this.loaded <= 0) || (c[2][1] != "attack_new")) fire = 0; elseif (length(c) != 3) fire = 1; else fire = !index("hit/attack/kill", c[3][1]); endif if (fire) this:become_missile(); this.loaded = this.loaded - 1; if ((this.loaded <= 0) && (this.clip_size > 1)) player:tell("That was your last shot. Better reload."); endif else this:become_melee(); endif " return pass(\"pass\", @args)"; else return E_PERM; endif . "***finished***