"A dump of #873 on Sun Dec 17 14:07:12 1995 PST @create #517 named portable ectoplasmic confinement trap:portable ectoplasmic confinement trap,portable,trap @prop #873."on" 0 r ;;#873.("condition") = 100 ;;#873.("odrop_failed_msg") = "% to drop %t but fails!" ;;#873.("odrop_succeeded_msg") = "% %t." ;;#873.("otake_succeeded_msg") = "% up %t." ;;#873.("key") = 0 ;;#873.("aliases") = {"portable ectoplasmic confinement trap", "portable", "trap"} ;;#873.("description") = "A black metal box with a switch that permits its activation and deactivation." ;;#873.("object_size") = {4258, 819192647} @verb #873:"acceptable" none none none rxd @program #873:acceptable return #472 in $object_utils:ancestors(args[1]); . @verb #873:"acti*vate" this none none rxd @program #873:activate if (this.location != player.location) player:tell("You'd better drop it first!"); elseif (length(this.contents) > 0) player:tell("The trap is full, and won't reactivate."); else this.on = 1; this.key = #67; player:tell("You activate the trap."); this.location:announce(player.name, " activates the trap."); this.location:announce_all("The trap opens up with a click and a whine."); endif . @verb #873:"ca*pture cat*ch" any with this rxd @program #873:capture ghost = dobj; if ((ghost == $failed_match) || (ghost == $nothing)) player:tell("Capture what with the trap?"); return; elseif (ghost == $ambiguous_match) player:tell("Capture which ", dobjstr, " with the trap?"); return; elseif ((ghost.location != this.location) || (player.location != this.location)) player:tell("The trap has to be on the floor in the same room."); return; elseif (!(#474 in $object_utils:ancestors(ghost))) player:tell("The trap only works on ghosts."); return; elseif (!this.on) player:tell("The trap has to be activated first."); return; endif pdoll = #46:get_doll(player); if (pdoll == #-1) player:tell("Sorry, you're not qualified to operate this equipment. The Bovine Illuminati may be able to help you."); return; endif gdoll = #46:get_doll(ghost); if (gdoll == #-1) player:tell("Sorry, this ghost is damaged. Please whinge to Gemba about it."); return; endif player:tell("You try to capture the ", ghost.name, " with your ", this.name, "."); this.location:announce(player.name, " tries to capture the ", ghost.name, " with ", player.pp, " ", this.name, "."); if (!gdoll.paralyzed) this.location:announce_all("The ghost easily evades ", player.name, "'s attempt at capturing it."); pdoll:invite(pdoll.slowness + 20, {1, player, ghost}); return; endif mods = ((40 - pdoll.inj) - pdoll.ins) - gdoll.wil; success = #46:resolve(player, "etrap", mods); if (success > 0) this.location:announce_all("The ", ghost.name, " is sucked screaming into the trap!"); ghost:moveto(this); this.on = 0; this.key = 0; this.location:announce_all("The trap closes up with a whir and a click."); this.location:announce_all("Who ya gonna call???"); this.location:announce_all(player.name, "!!!!!"); else this.location:announce_all("The ", ghost.name, " screeches horribly and manages to avoid the trap."); endif pdoll:invite(pdoll.slowness + 20, {1, player, ghost}); . @verb #873:"deac*tivate" this none none rxd @program #873:deactivate if (player.location != this.location) player:tell("You can't deactivate it from here."); else this.on = 0; player:tell("You deactivate the trap."); this.location:announce(player.name, " deactivates the trap."); this.location:announce_all("The trap closes up with a whir and a click."); this.key = 0; endif . @verb #873:"announce_all_but" none none none rxd @program #873:announce_all_but return; . @verb #873:"look_self" none none none rxd @program #873:look_self pass(@args); if (length(this.contents) > 0) player:tell("Two little red lights on the side of the trap wink on and off."); endif . @verb #873:"announce_all" none none none rxd @program #873:announce_all return; . "***finished***