]> granicus.if.org Git - nethack/commit
fix #K125 - autounlock vs touching artifacts
authorPatR <rankin@nethack.org>
Mon, 6 Jan 2020 07:54:11 +0000 (23:54 -0800)
committerPatR <rankin@nethack.org>
Mon, 6 Jan 2020 07:54:11 +0000 (23:54 -0800)
commitbfa0f072f75d79d329d4ae459e269af19d0ccb83
tree07778acd984e20f9537e382328d029aeb37fc705
parent3a8990b8a0e30da9794eb0f51475d18699123e0e
fix #K125 - autounlock vs touching artifacts

Apply makes a touch_artifact check on the tool being applied, but
autounlock would pick an unlocking tool to use without doing that.
Noticed while fixing that:  autounlock took no time.

Since picking an artifact unlocking tool might now blast the hero,
change the tool selection.  First choice: any key except another
role's quest artifact; second: any lock-pick except another role's
quest artifact; third: any credit card except another role's quest
artifact; fourth, fifth, sixth: other roles' quest artifact key,
lock-pick, or credit card.  The fifth category (artifact lock-picks)
is empty.  Rogues will pick non-cursed Master Key over any other
key (special case for first choice).  Tourists will pick a key or
a lock-pick over their PYEC (first and second choices over third).
doc/fixes37.0
include/extern.h
src/lock.c
src/pickup.c