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.
This commit is contained in:
PatR
2017-10-08 03:29:16 -07:00
parent 6b51f6ce09
commit 5c77360023
6 changed files with 105 additions and 35 deletions

View File

@@ -208,6 +208,9 @@ A("The Palantir of Westernesse", CRYSTAL_BALL,
PHYS(5, 0), NO_DFNS, NO_CARY, CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM,
4000L, NO_COLOR),
/* MKoT has an additional carry property if the Key is not cursed (for
rogues) or blessed (for non-rogues): #untrap of doors and chests
will always find any traps and disarming those will always succeed */
A("The Master Key of Thievery", SKELETON_KEY,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK),
(SPFX_WARN | SPFX_TCTRL | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY,

View File

@@ -78,8 +78,8 @@ E int FDECL(spec_dbon, (struct obj *, struct monst *, int));
E void FDECL(discover_artifact, (XCHAR_P));
E boolean FDECL(undiscovered_artifact, (XCHAR_P));
E int FDECL(disp_artifact_discoveries, (winid));
E boolean FDECL(artifact_hit,
(struct monst *, struct monst *, struct obj *, int *, int));
E boolean FDECL(artifact_hit, (struct monst *, struct monst *, struct obj *,
int *, int));
E int NDECL(doinvoke);
E boolean FDECL(finesse_ahriman, (struct obj *));
E void FDECL(arti_speak, (struct obj *));
@@ -93,6 +93,8 @@ E void FDECL(Sting_effects, (int));
E int FDECL(retouch_object, (struct obj **, BOOLEAN_P));
E void FDECL(retouch_equipment, (int));
E void NDECL(mkot_trap_warn);
E boolean FDECL(is_magic_key, (struct monst *, struct obj *));
E struct obj *FDECL(has_magic_key, (struct monst *));
/* ### attrib.c ### */