]> granicus.if.org Git - nethack/commitdiff
fix B08001 - stone-to-flesh undoes cancellation
authornethack.rankin <nethack.rankin>
Sun, 24 Aug 2003 18:32:58 +0000 (18:32 +0000)
committernethack.rankin <nethack.rankin>
Sun, 24 Aug 2003 18:32:58 +0000 (18:32 +0000)
     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.

doc/fixes34.2
src/mon.c
src/zap.c

index 4e7a41d502137030643194ba41b5f13d76984808..1af41fb61c7f92f2f7c0fa336d843b34ab60a549 100644 (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
index 7337fe9d31171c73f1b3a88d81e4caca91d43b2f..4e145c04466d3f41733383fd650442b775c04b72 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -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;
index 50f505f6ef731d936484f8cf2517f97ba0fefd8b..23209fec57c7f417797cf6c07d578ffde46f1ed7 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -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);