A dump of #8816 (Generic Missile Weapon) @create #10898 named generic missile weapon:generic missile weapon,weapon "#8816.("load_slowness") => E_PERM (Permission denied) "#8816.("loaded") => E_PERM (Permission denied) "#8816.("clip_size") => E_PERM (Permission denied) @prop #8816."missile_exits" {} r ;;#8816.("missile_exits") = {#16049, #16050} "#8816.("dodgable_mis") => E_PERM (Permission denied) "#8816.("dodgable_mel") => E_PERM (Permission denied) "#8816.("parryable_mis") => E_PERM (Permission denied) "#8816.("parryable_mel") => E_PERM (Permission denied) ;;#8816.("oswing_mis") = "fires" ;;#8816.("oswing_mel") = "swings" ;;#8816.("swing_mis") = "fire" "#8816.("slowness_mis") => E_PERM (Permission denied) "#8816.("slowness_mel") => E_PERM (Permission denied) "#8816.("attack_mis") => E_PERM (Permission denied) "#8816.("attack_mel") => E_PERM (Permission denied) "#8816.("pen_mis") => E_PERM (Permission denied) "#8816.("pen_mel") => E_PERM (Permission denied) "#8816.("dam_mis") => E_PERM (Permission denied) "#8816.("dam_mel") => E_PERM (Permission denied) "#8816.("skill_mis") => E_PERM (Permission denied) "#8816.("skill_mel") => E_PERM (Permission denied) "#8816.("hands_mis") => E_PERM (Permission denied) "#8816.("hands_mel") => E_PERM (Permission denied) ;;#8816.("pierce_mis") = 0 ;;#8816.("pierce_mel") = 0 ;;#8816.("missile") = 0 "#8816.("dodgable") => E_PERM (Permission denied) "#8816.("parryable") => E_PERM (Permission denied) "#8816.("slowness") => E_PERM (Permission denied) "#8816.("parry") => E_PERM (Permission denied) "#8816.("attack") => E_PERM (Permission denied) "#8816.("pen") => E_PERM (Permission denied) "#8816.("dam") => E_PERM (Permission denied) "#8816.("skill") => E_PERM (Permission denied) ;;#8816.("hands") = 2 ;;#8816.("pierce") = 0 "#8816.("max_str_bonus") => E_PERM (Permission denied) "#8816.("can_degrade") => E_PERM (Permission denied) "#8816.("track_usage") => E_PERM (Permission denied) ;;#8816.("encumbrance") = 5 ;;#8816.("worth") = -1 ;;#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") => E_PERM (Permission denied) ;;#8816.("aliases") = {"generic missile weapon", "weapon"} ;;#8816.("description") = "A generic implement of destruction." ;;#8816.("object_size") = {6510, 1141286558} @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 = (rpg = $local.rpg):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 (rpg.object_db:is_rpg_room(player.location)) out = which = {}; e = player.location:exits(); d = player.location:dests(); for k in [1..length(e)] if ($object_utils:isoneof(e[k], this.missile_exits) && valid(d[k])) out = {@out, @d[k].contents}; which = {@which, @$list_utils:make(length(d[k].contents), e[k])}; endif endfor iobj = $match_utils: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 this:set_value("missile", 1); doll:attack(iobj, dobj, -which[iobj in out].cover); endif else this:set_value("missile", 1); doll:attack(iobj, dobj); 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:"used" this none this @program #8816:used $local.rpg:secure(); r = pass(@args); if ((m = this:get_value("missile")) > 0) this:set_value("missile", -1); 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 elseif (m) this:set_value("missile", 0); this:become_melee(); endif return r; "Mooshie (#106469) - Sun Jan 4, 1998 - New version that's a lot faster."; . "***finished***