fix #H7596 - magic trap 'deafening roar' outcome
doesn't wake monsters. Now it does.
This commit is contained in:
@@ -220,6 +220,7 @@ end of game while carrying Schroedinger's Box would reveal cat-or-corpse
|
|||||||
for inventory disclosure or put that info into dumplog, but not both
|
for inventory disclosure or put that info into dumplog, but not both
|
||||||
attempting to untrap an adjacent trap while on the edge of--not in--a pit
|
attempting to untrap an adjacent trap while on the edge of--not in--a pit
|
||||||
failed due to not being able to reach the floor
|
failed due to not being able to reach the floor
|
||||||
|
magic trap's deafening roar effect wasn't waking nearby monsters
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mon.c $NHDT-Date: 1543052701 2018/11/24 09:45:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.270 $ */
|
/* NetHack 3.6 mon.c $NHDT-Date: 1543100460 2018/11/24 23:01:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.271 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2827,40 +2827,34 @@ boolean via_attack;
|
|||||||
void
|
void
|
||||||
wake_nearby()
|
wake_nearby()
|
||||||
{
|
{
|
||||||
register struct monst *mtmp;
|
wake_nearto(u.ux, u.uy, u.ulevel * 20);
|
||||||
|
|
||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
|
||||||
if (DEADMONSTER(mtmp))
|
|
||||||
continue;
|
|
||||||
if (distu(mtmp->mx, mtmp->my) < u.ulevel * 20) {
|
|
||||||
mtmp->msleeping = 0;
|
|
||||||
if (!unique_corpstat(mtmp->data))
|
|
||||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
|
||||||
if (mtmp->mtame) {
|
|
||||||
if (!mtmp->isminion)
|
|
||||||
EDOG(mtmp)->whistletime = moves;
|
|
||||||
/* Clear mtrack. This is to fix up a pet who is
|
|
||||||
stuck "fleeing" its master. */
|
|
||||||
memset(mtmp->mtrack, 0, sizeof(mtmp->mtrack));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wake up monsters near some particular location. */
|
/* Wake up monsters near some particular location. */
|
||||||
void
|
void
|
||||||
wake_nearto(x, y, distance)
|
wake_nearto(x, y, distance)
|
||||||
register int x, y, distance;
|
int x, y, distance;
|
||||||
{
|
{
|
||||||
register struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if (DEADMONSTER(mtmp))
|
if (DEADMONSTER(mtmp))
|
||||||
continue;
|
continue;
|
||||||
if (distance == 0 || dist2(mtmp->mx, mtmp->my, x, y) < distance) {
|
if (distance == 0 || dist2(mtmp->mx, mtmp->my, x, y) < distance) {
|
||||||
mtmp->msleeping = 0;
|
/* sleep for N turns uses mtmp->mfrozen, but so does paralysis
|
||||||
if (!unique_corpstat(mtmp->data))
|
so we leave mfrozen monsters alone */
|
||||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
mtmp->msleeping = 0; /* wake indeterminate sleep */
|
||||||
|
if (!(mtmp->data->geno & G_UNIQ))
|
||||||
|
mtmp->mstrategy &= ~STRAT_WAITMASK; /* wake 'meditation' */
|
||||||
|
if (context.mon_moving)
|
||||||
|
continue;
|
||||||
|
if (mtmp->mtame) {
|
||||||
|
if (!mtmp->isminion)
|
||||||
|
EDOG(mtmp)->whistletime = moves;
|
||||||
|
/* Clear mtrack. This is to fix up a pet who is
|
||||||
|
stuck "fleeing" its master. */
|
||||||
|
memset(mtmp->mtrack, 0, sizeof mtmp->mtrack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 trap.c $NHDT-Date: 1542856572 2018/11/22 03:16:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.304 $ */
|
/* NetHack 3.6 trap.c $NHDT-Date: 1543100476 2018/11/24 23:01:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.311 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -3164,7 +3164,7 @@ domagictrap()
|
|||||||
|
|
||||||
if (fate < 10) {
|
if (fate < 10) {
|
||||||
/* Most of the time, it creates some monsters. */
|
/* Most of the time, it creates some monsters. */
|
||||||
register int cnt = rnd(4);
|
int cnt = rnd(4);
|
||||||
|
|
||||||
/* blindness effects */
|
/* blindness effects */
|
||||||
if (!resists_blnd(&youmonst)) {
|
if (!resists_blnd(&youmonst)) {
|
||||||
@@ -3189,6 +3189,9 @@ domagictrap()
|
|||||||
}
|
}
|
||||||
while (cnt--)
|
while (cnt--)
|
||||||
(void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
|
(void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
|
||||||
|
/* roar: wake monsters in vicinity, after placing trap-created ones */
|
||||||
|
wake_nearto(u.ux, u.uy, 7 * 7);
|
||||||
|
/* [flash: should probably also hit nearby gremlins with light] */
|
||||||
} else
|
} else
|
||||||
switch (fate) {
|
switch (fate) {
|
||||||
case 10:
|
case 10:
|
||||||
|
|||||||
Reference in New Issue
Block a user