]> granicus.if.org Git - nethack/commit
still more Master Key of Thievery
authorPatR <rankin@nethack.org>
Sun, 8 Oct 2017 10:29:16 +0000 (03:29 -0700)
committerPatR <rankin@nethack.org>
Sun, 8 Oct 2017 10:29:16 +0000 (03:29 -0700)
commit5c77360023f84a9a709f52fac10cf43fd3167d5f
treea9affc52cfb86983bbe57ac3c920652a89723905
parent6b51f6ce094e88658f3f2054fdaf2ccdce2a8099
still more Master Key of Thievery

Make #untrap while carrying the non-cursed (for rogues) or blessed
(for non-rogues) Key work the same as #invoke has been doing (without
regard to its bless/curse state):  when used on trapped door or chest,
that trap will always be found and disarming it will always succeed.

It should work when carried by monsters too:  if they try to open a
trapped door while carrying the Key (must be blessed since they're
not rogues) the trap will be automatically disarmed.  (Caveat:  that
hasn't been adequately tested.)

TODO (maybe...):  change the #invoke property to detect unseen/secret
door detection instead of #untrap.  The latter isn't completely
redundant; it works when the Key is cursed.  But quest artifacts
strongly resist becoming cursed so that isn't a particularly useful
distinction.

Also, trap hints when wielding the Key without gloves didn't notice
adjacent door and chest traps.  Now it does.  And the behavior is
slightly different:  known traps covered by objects or monsters are
treated like unknown traps as far as the hot/cold hints go.
include/artilist.h
include/extern.h
src/artifact.c
src/lock.c
src/monmove.c
src/trap.c