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:
@@ -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
|
||||
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
|
||||
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
|
||||
|
||||
11
src/lock.c
11
src/lock.c
@@ -407,6 +407,17 @@ pick_lock(pick)
|
||||
/* "The door actually was a <mimic>!" */
|
||||
stumble_onto_mimic(mtmp);
|
||||
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_drawbridge_wall(cc.x,cc.y) >= 0)
|
||||
|
||||
Reference in New Issue
Block a user