pull request #465 - explding hero waking monsters
A polymorphed hero who exploded when attacking thin air would use a radius based on experience level rather than the fixed radius that the monster form itself used. When exploding at a monster it didn't wake other monsters at all. Fixes #465
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.488 $ $NHDT-Date: 1617034646 2021/03/29 16:17:26 $
|
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.489 $ $NHDT-Date: 1617035736 2021/03/29 16:35:36 $
|
||||||
|
|
||||||
General Fixes and Modified Features
|
General Fixes and Modified Features
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@@ -423,6 +423,9 @@ if player managed to get multiple $ items, all but the last could be moved to
|
|||||||
when a monster on the far side of a closed door opens it, sometimes the hero
|
when a monster on the far side of a closed door opens it, sometimes the hero
|
||||||
was told about the monster without it being displayed on the map
|
was told about the monster without it being displayed on the map
|
||||||
also show extended command name when showing what a key does in help
|
also show extended command name when showing what a key does in help
|
||||||
|
poly'd hero who exploded when attacking a monster didn't wake up other
|
||||||
|
monsters in the vicinity; when attacking thin air, hero's explosion
|
||||||
|
woke other monsters within different radius than same monster's would
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 hack.c $NHDT-Date: 1609442596 2020/12/31 19:23:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.276 $ */
|
/* NetHack 3.7 hack.c $NHDT-Date: 1617035736 2021/03/29 16:35:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.281 $ */
|
||||||
/* 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. */
|
||||||
@@ -1751,7 +1751,8 @@ domove_core(void)
|
|||||||
|
|
||||||
nomul(0);
|
nomul(0);
|
||||||
if (explo) {
|
if (explo) {
|
||||||
wake_nearby();
|
/* no monster has been attacked so we have bypassed explum() */
|
||||||
|
wake_nearto(u.ux, u.uy, 7 * 7); /* same radius as explum() */
|
||||||
u.mh = -1; /* dead in the current form */
|
u.mh = -1; /* dead in the current form */
|
||||||
rehumanize();
|
rehumanize();
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/uhitm.c
14
src/uhitm.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 uhitm.c $NHDT-Date: 1614811212 2021/03/03 22:40:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.299 $ */
|
/* NetHack 3.7 uhitm.c $NHDT-Date: 1617035737 2021/03/29 16:35:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.300 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -4063,16 +4063,18 @@ damageum(
|
|||||||
mdef->mstrategy &= ~STRAT_WAITFORU; /* in case player is very fast */
|
mdef->mstrategy &= ~STRAT_WAITFORU; /* in case player is very fast */
|
||||||
mdef->mhp -= mhm.damage;
|
mdef->mhp -= mhm.damage;
|
||||||
if (DEADMONSTER(mdef)) {
|
if (DEADMONSTER(mdef)) {
|
||||||
|
/* (DEADMONSTER(mdef) and !mhm.damage => already killed) */
|
||||||
if (mdef->mtame && !cansee(mdef->mx, mdef->my)) {
|
if (mdef->mtame && !cansee(mdef->mx, mdef->my)) {
|
||||||
You_feel("embarrassed for a moment.");
|
You_feel("embarrassed for a moment.");
|
||||||
if (mhm.damage)
|
if (mhm.damage)
|
||||||
xkilled(mdef, XKILL_NOMSG); /* !mhm.damage but hp<1: already killed */
|
xkilled(mdef, XKILL_NOMSG);
|
||||||
} else if (!flags.verbose) {
|
} else if (!flags.verbose) {
|
||||||
You("destroy it!");
|
You("destroy it!");
|
||||||
if (mhm.damage)
|
if (mhm.damage)
|
||||||
xkilled(mdef, XKILL_NOMSG);
|
xkilled(mdef, XKILL_NOMSG);
|
||||||
} else if (mhm.damage)
|
} else if (mhm.damage) {
|
||||||
killed(mdef);
|
killed(mdef); /* regular "you kill <mdef>" message */
|
||||||
|
}
|
||||||
return MM_DEF_DIED;
|
return MM_DEF_DIED;
|
||||||
}
|
}
|
||||||
return MM_HIT;
|
return MM_HIT;
|
||||||
@@ -4126,6 +4128,7 @@ explum(struct monst *mdef, struct attack *mattk)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
wake_nearto(u.ux, u.uy, 7 * 7); /* same radius as exploding monster */
|
||||||
return MM_HIT;
|
return MM_HIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4746,7 +4749,8 @@ hmonas(struct monst *mon)
|
|||||||
(void) passive(mon, weapon, 1, 0, mattk->aatyp, FALSE);
|
(void) passive(mon, weapon, 1, 0, mattk->aatyp, FALSE);
|
||||||
nsum = MM_MISS; /* return value below used to be 'nsum > 0' */
|
nsum = MM_MISS; /* return value below used to be 'nsum > 0' */
|
||||||
} else {
|
} else {
|
||||||
(void) passive(mon, weapon, (sum[i] != MM_MISS), 1, mattk->aatyp, FALSE);
|
(void) passive(mon, weapon, (sum[i] != MM_MISS), 1,
|
||||||
|
mattk->aatyp, FALSE);
|
||||||
nsum |= sum[i];
|
nsum |= sum[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user