]> granicus.if.org Git - nethack/commit
digging land mines & bear traps (trunk only)
authornethack.rankin <nethack.rankin>
Sat, 8 Apr 2006 06:55:15 +0000 (06:55 +0000)
committernethack.rankin <nethack.rankin>
Sat, 8 Apr 2006 06:55:15 +0000 (06:55 +0000)
commit51d60d972149e7c6f20c92a0e391a74e523e7ae9
treebfa60e6e8948fff5446bbad64d0ed41e43f696d5
parent27dcb8e34af0c4d89ebacaf62791fdda2c7fcf14
digging land mines & bear traps (trunk only)

     <Someone> suggested that digging down on a land mine with a pick-axe ought
to set if off.  I agree; this implements that and also for bear traps.  In
the bear trap case, if you dig down once trapped, you will destroy that
trap explicitly rather than replace it with a pit, so it's now possible to
escape from one without leaving another trap in your wake.  Once the bear
trap is gone, further digging there will make a pit as usual.  While stuck
in one, digging down poses a modest risk of harming yourself.

|You now wield a pick-axe.
|You start digging downward.  A bear trap closes on your foot!
|You start digging downward.  You destroy the bear trap with your pick-axe.
|You continue digging downward.  You dig a pit in the floor.
|You start digging downward.  You dig a hole through the floor.
|You fall through...

[It seems a bit strange that finishing a pit discards all digging context,
so that resuming within the pit in order to make a hole "starts" digging
rather than "continues" it.]

     Digging down with a wand or spell will disarm these two types of traps
and then leave the corresponding object (which may or may not fall through
the resulting hole, like any other object there).  Digging to the side via
magic while trapped in a pit will also disarm such traps when it encounters
them.  (When not in a pit, a digging beam which simply passes over an armed
bear trap or land mine won't have any effect on the trap.)  Digging to the
side via tool behaves somewhat oddly ("no room for the rubble"?) and will
probably need some tweaking before eventual release; at present it doesn't
reach adjacent traps so didn't need any land mine or bear trap handling.

     I put the fixes entry in the new features section.
doc/fixes35.0
include/extern.h
include/hack.h
src/dig.c
src/trap.c