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:
@@ -1246,6 +1246,16 @@ postmov:
|
||||
boolean btrapped = (here->doormask & D_TRAPPED) != 0,
|
||||
observeit = canseeit && canspotmon(mtmp);
|
||||
|
||||
/* if mon has MKoT, disarm door trap; no message given */
|
||||
if (btrapped && has_magic_key(mtmp)) {
|
||||
/* BUG: this lets a vampire or blob or a doorbuster
|
||||
holding the Key disarm the trap even though it isn't
|
||||
using that Key when squeezing under or smashing the
|
||||
door. Not significant enough to worry about; perhaps
|
||||
the Key's magic is more powerful for monsters? */
|
||||
here->doormask &= ~D_TRAPPED;
|
||||
btrapped = FALSE;
|
||||
}
|
||||
if ((here->doormask & (D_LOCKED | D_CLOSED)) != 0
|
||||
&& (amorphous(ptr)
|
||||
|| (can_fog(mtmp)
|
||||
|
||||
Reference in New Issue
Block a user