fix B08001 - stone-to-flesh undoes cancellation

Prevent succubi from being fully restored via cycles of petrifying
and reviving.  It wasn't just a matter of saving traits; cancellation is
one of the monster traits which is explicitly reset when a monster gets
revived.  I think that probably makes sense, but this will override it
for succubi and incubi to prevent abuse; if they were cancelled at time
of petrification they'll remain cancelled when reanimated.  Likewise for
nymphs; even though the abuse facter isn't present, the cancel effect is
pretty similar for them so keep revivals similar too.

     This saves monster traits for every monster that gets turned into a
statue.  Unlike with corpses there's no stacking involved to make players
notice that each has become unique, so all such statues might as well all
reanimate just like they were instead of as new replacment monsters.
This commit is contained in:
nethack.rankin
2003-08-24 18:32:58 +00:00
parent bc4a07d9b3
commit acc58a75b2
3 changed files with 12 additions and 6 deletions

View File

@@ -136,6 +136,7 @@ wishing for quest guardian corpse now gives a generic corpse of the species
prevent quest guardians from other classes from talking to you as if they
were your quest guardian
wake up shopkeeper if a shop transaction is attempted while he's immobilized
statues created from monsters remember more monster attributes
Platform- and/or Interface-Specific Fixes

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)mon.c 3.4 2003/05/09 */
/* SCCS Id: @(#)mon.c 3.4 2003/08/24 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1627,8 +1627,7 @@ register struct monst *mdef;
/* defer statue creation until after inventory removal
so that saved monster traits won't retain any stale
item-conferred attributes */
otmp = mkcorpstat(STATUE, KEEPTRAITS(mdef) ? mdef : 0,
mdef->data, x, y, FALSE);
otmp = mkcorpstat(STATUE, mdef, mdef->data, x, y, FALSE);
if (mdef->mnamelth) otmp = oname(otmp, NAME(mdef));
while ((obj = oldminvent) != 0) {
oldminvent = obj->nobj;

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)zap.c 3.4 2003/02/08 */
/* SCCS Id: @(#)zap.c 3.4 2003/08/24 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -507,10 +507,16 @@ coord *cc;
mtmp2->mtrapped = 0;
mtmp2->msleeping = 0;
mtmp2->mfrozen = 0;
mtmp2->mcan = 0;
mtmp2->mcanmove = 1;
/* most cancelled monsters return to normal,
but some need to stay cancelled */
if (!dmgtype(mtmp2->data, AD_SEDU)
#ifdef SEDUCE
&& !dmgtype(mtmp2->data, AD_SSEX)
#endif
) mtmp2->mcan = 0;
mtmp2->mcansee = 1; /* set like in makemon */
mtmp2->mblinded = 0;
mtmp2->mcanmove = 1; /* set like in makemon */
mtmp2->mstun = 0;
mtmp2->mconf = 0;
replmon(mtmp,mtmp2);