Prevent unique monsters waking up prematurely
Reported by Stefan: > I just did the valkyrie quest. When I arrived on quest goal, I took only > a few steps away from the upstairs and Lord Surtur jumped me. One of the > monsters in his lair had stepped on one of the guaranteed squeaky boards Squeaky boards (and other noisy things) woke up monsters that were meditating. Unfortunately this also woke up such meditating monsters as the Wiz, or the quest nemesis. Prevent unique monsters with waiting strategy being woken up by the noise.
This commit is contained in:
@@ -2434,7 +2434,8 @@ wake_nearby()
|
||||
continue;
|
||||
if (distu(mtmp->mx, mtmp->my) < u.ulevel * 20) {
|
||||
mtmp->msleeping = 0;
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||
if (!unique_corpstat(mtmp->data))
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||
if (mtmp->mtame && !mtmp->isminion)
|
||||
EDOG(mtmp)->whistletime = moves;
|
||||
}
|
||||
@@ -2453,7 +2454,8 @@ register int x, y, distance;
|
||||
continue;
|
||||
if (distance == 0 || dist2(mtmp->mx, mtmp->my, x, y) < distance) {
|
||||
mtmp->msleeping = 0;
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||
if (!unique_corpstat(mtmp->data))
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ int distance;
|
||||
mtmp->mcanmove = 1;
|
||||
mtmp->mfrozen = 0;
|
||||
/* may scare some monsters -- waiting monsters excluded */
|
||||
if ((mtmp->mstrategy & STRAT_WAITMASK) != 0)
|
||||
if (!unique_corpstat(mtmp->data) && (mtmp->mstrategy & STRAT_WAITMASK) != 0)
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||
else if (distm < distance / 3
|
||||
&& !resist(mtmp, TOOL_CLASS, 0, NOTELL))
|
||||
@@ -195,7 +195,7 @@ struct monst *bugler; /* monster that played instrument */
|
||||
mtmp->mcanmove = 1;
|
||||
mtmp->mfrozen = 0;
|
||||
/* may scare some monsters -- waiting monsters excluded */
|
||||
if ((mtmp->mstrategy & STRAT_WAITMASK) != 0)
|
||||
if (!unique_corpstat(mtmp->data) && (mtmp->mstrategy & STRAT_WAITMASK) != 0)
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||
else if (distm < distance / 3
|
||||
&& !resist(mtmp, TOOL_CLASS, 0, NOTELL))
|
||||
|
||||
Reference in New Issue
Block a user