]> granicus.if.org Git - nethack/commit
wizard mode wishing for traps (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 21 Aug 2011 00:55:06 +0000 (00:55 +0000)
committernethack.rankin <nethack.rankin>
Sun, 21 Aug 2011 00:55:06 +0000 (00:55 +0000)
commitcebd694c0c6f5a46354fd51f3323f1d3efc936e7
tree841e1225b6dca284fa8bdbaace6950cced636a3a
parent8f07e5ee392e84b410a5227350b2b3dd81986c77
wizard mode wishing for traps (trunk only)

     Change the way wishing for bear traps in wizard mode is handled so
that spelling of "bear trap" vs "beartrap" doesn't affect the result.
Land mine doesn't have a similar spelling variation, so it already had to
be handled differently (if you wanted an armed trap, you needed to append
something--anything--such that it didn't match the object name).  Now
they're consistent with each other.  By default, you'll get an object
regardless of whether you include a space inside the name, and you'll
need to specify a prefix ("trapped") or a suffix ("trap"--actually,
anything other than "object") to get an armed trap placed on the ground.

  "bear trap", "beartrap", "untrapped bear[ ]trap", "bear[ ]trap object"
will yield the disarmed object,

  "trapped bear[ ]trap", "bear[ ]trap trap", "bear[ ]trap<anything else>"
will yield an armed trap.

  "land mine" works the same way, treating the embedded space as optional
even though both object and trap include it.
src/objnam.c