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).
This commit is contained in:
PatR
2020-01-05 23:54:11 -08:00
parent 3a8990b8a0
commit bfa0f072f7
4 changed files with 88 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.52 $ $NHDT-Date: 1578258722 2020/01/05 21:12:02 $
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.54 $ $NHDT-Date: 1578297243 2020/01/06 07:54:03 $
General Fixes and Modified Features
-----------------------------------
@@ -44,6 +44,12 @@ after 'w' on split stack patch, wielding '-' would cause an object_lost panic
same patch allowed partial stack from getobj to replace cursed wielded weapon
if the orc-town version of mine town has been loaded, creation of orc zombies
or orc mummies would name them as part of the town raiding orc clan
autounlock of door or chest took no time; chest case depended on whether
anything got looted along with the unlocking
autounlock with artifact unlocking tool didn't do touch check on that tool
autounlock picked Rogue's artifact key over lock-pick or credit card (or
ordinary key depending upon invent order) even for non-rogues who
would be blasted when touching it
Platform- and/or Interface-Specific Fixes