fix #H2154 - unlocking door blocked by mimic-as-boulder (trunk only)

Reported five months ago by <email deleted>,
the top level of Sokoban has mimics who pose as boulders and if one was
in a doorway (treasure zoo at final destination) you could still unlock
the door there without waking the mimic.  Yesterday's fix for unlocking
a door which was actually a mimic posing as one didn't handle this case.
This commit is contained in:
nethack.rankin
2011-01-02 01:35:14 +00:00
parent 1dcaa1621b
commit e379b245d4
2 changed files with 13 additions and 0 deletions
+2
View File
@@ -342,6 +342,8 @@ when reading an unknown scroll and learning it, discovery of teleporation was
too late if hero happened to land on another scroll of teleportation too late if hero happened to land on another scroll of teleportation
using an unlocking tool on a closed door which was actually a mimic reported using an unlocking tool on a closed door which was actually a mimic reported
that there was no door to unlock instead of exposing the mimic that there was no door to unlock instead of exposing the mimic
using an unlocking tool on a boulder that was a mimic in a Sokoban doorway
successfully unlocked the underlying door without exposing mimic
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+11
View File
@@ -407,6 +407,17 @@ pick_lock(pick)
/* "The door actually was a <mimic>!" */ /* "The door actually was a <mimic>!" */
stumble_onto_mimic(mtmp); stumble_onto_mimic(mtmp);
return PICKLOCK_LEARNED_SOMETHING; return PICKLOCK_LEARNED_SOMETHING;
/* mimic-as-boulder on last Sokoban level */
} else if (mtmp && mtmp->m_ap_type == M_AP_OBJECT &&
mtmp->mappearance == BOULDER) {
if (Blind) /* by touch */
/* "Wait! That's a monster!" */
stumble_onto_mimic(mtmp);
else if (IS_DOOR(door->typ))
pline("That door is blocked.");
else
You("see no door there.");
return PICKLOCK_LEARNED_SOMETHING;
} }
if(!IS_DOOR(door->typ)) { if(!IS_DOOR(door->typ)) {
if (is_drawbridge_wall(cc.x,cc.y) >= 0) if (is_drawbridge_wall(cc.x,cc.y) >= 0)