speed of petrified monsters
Someone posted in the newsgroup about using stone-to-flesh
to reanimate a petrified pet and having it come back to life with
boosted speed intact. When the character gets petrified, stripping
speed is one of the first things which happens, so now do that for
monsters too. I decided not to make monsters who have normal speed
become slow; there isn't any analogous case for the player.
Possible bug: while testing this, I zapped a wand of probing
at a hill orc which had just eaten a lizard corpse to save itself
from stoning. The feedback said "eating" but the orc immediately
hit and killed me as if it wasn't affected by any movement delay.
This commit is contained in:
@@ -229,6 +229,7 @@ fix a GOLDOBJ crash/hang in take_gold() that could be triggered by reading a
|
||||
kicking a tree could produce 0 to 4 killer bees but it should have been 1 to 5
|
||||
mounting a steed allowed hero to make moves that would otherwise be disallowed
|
||||
including mounting diagonally in a shop doorway
|
||||
monsters lose intrinsic speed when pertrified
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)muse.c 3.4 2002/02/07 */
|
||||
/* SCCS Id: @(#)muse.c 3.4 2002/08/29 */
|
||||
/* Copyright (C) 1990 by Ken Arromdee */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2123,6 +2123,10 @@ boolean stoning;
|
||||
int nutrit = (obj->otyp == CORPSE) ? dog_nutrition(mon, obj) : 0;
|
||||
/* also sets meating */
|
||||
|
||||
/* give a "<mon> is slowing down" message and also remove
|
||||
intrinsic speed (comparable to similar effect on the hero) */
|
||||
mon_adjust_speed(mon, -3, (struct obj *)0);
|
||||
|
||||
if (canseemon(mon)) {
|
||||
long save_quan = obj->quan;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)trap.c 3.4 2002/08/16 */
|
||||
/* SCCS Id: @(#)trap.c 3.4 2002/08/29 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1989,6 +1989,11 @@ boolean byplayer;
|
||||
mon_to_stone(mon);
|
||||
return;
|
||||
}
|
||||
|
||||
/* give a "<mon> is slowing down" message and also remove
|
||||
intrinsic speed (comparable to similar effect on the hero) */
|
||||
mon_adjust_speed(mon, -3, (struct obj *)0);
|
||||
|
||||
if (cansee(mon->mx, mon->my))
|
||||
pline("%s turns to stone.", Monnam(mon));
|
||||
if (byplayer) {
|
||||
|
||||
17
src/worn.c
17
src/worn.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)worn.c 3.4 2002/02/07 */
|
||||
/* SCCS Id: @(#)worn.c 3.4 2002/08/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -147,7 +147,7 @@ int adjust; /* positive => increase speed, negative => decrease */
|
||||
struct obj *obj; /* item to make known if effect can be seen */
|
||||
{
|
||||
struct obj *otmp;
|
||||
boolean give_msg = !in_mklev;
|
||||
boolean give_msg = !in_mklev, stoned = FALSE;
|
||||
unsigned int oldspeed = mon->mspeed;
|
||||
|
||||
switch (adjust) {
|
||||
@@ -169,6 +169,11 @@ struct obj *obj; /* item to make known if effect can be seen */
|
||||
mon->permspeed = MSLOW;
|
||||
give_msg = FALSE; /* (not currently used) */
|
||||
break;
|
||||
case -3: /* petrification */
|
||||
/* take away intrinsic speed but don't reduce normal speed */
|
||||
if (mon->permspeed == MFAST) mon->permspeed = 0;
|
||||
stoned = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
for (otmp = mon->minvent; otmp; otmp = otmp->nobj)
|
||||
@@ -179,12 +184,16 @@ struct obj *obj; /* item to make known if effect can be seen */
|
||||
else
|
||||
mon->mspeed = mon->permspeed;
|
||||
|
||||
if (give_msg && mon->mspeed != oldspeed && canseemon(mon)) {
|
||||
if (give_msg && (mon->mspeed != oldspeed || stoned) && canseemon(mon)) {
|
||||
/* fast to slow (skipping intermediate state) or vice versa */
|
||||
const char *howmuch = (mon->mspeed + oldspeed == MFAST + MSLOW) ?
|
||||
"much " : "";
|
||||
|
||||
if (adjust > 0 || mon->mspeed == MFAST)
|
||||
if (stoned) {
|
||||
/* mimic the player's petrification countdown; "slowing down"
|
||||
even if fast movement rate retained via worn speed boots */
|
||||
if (flags.verbose) pline("%s is slowing down.", Monnam(mon));
|
||||
} else if (adjust > 0 || mon->mspeed == MFAST)
|
||||
pline("%s is suddenly moving %sfaster.", Monnam(mon), howmuch);
|
||||
else
|
||||
pline("%s seems to be moving %sslower.", Monnam(mon), howmuch);
|
||||
|
||||
Reference in New Issue
Block a user