]> granicus.if.org Git - nethack/commitdiff
don't negate new moon with a lizard corpse
authorPatR <rankin@nethack.org>
Sun, 31 Jul 2022 23:12:40 +0000 (16:12 -0700)
committerPatR <rankin@nethack.org>
Sun, 31 Jul 2022 23:12:40 +0000 (16:12 -0700)
The only effect of a new moon was to make hearing a cockatrice's
hissing (whichs happens with 1 in 3 chance) always start the turn to
stone sequence instead just having a 1 in 10 chance to do so, but
that was negated by carrying a lizard corpse.

Keep the hiss-always-starts-petficiation part and remove the
carrying-a-lizard-corpse-negates-that part.  So the effect of a new
moon no longer gets controlled by the contents of hero's inventory.

doc/fixes3-7-0.txt
include/extern.h
src/invent.c
src/uhitm.c

index b091ebe73236ee2fe2efe96eb7bbcd4befe0ef38..769685ca51149d59af4f57f2ed02e16e866896a3 100644 (file)
@@ -986,6 +986,7 @@ when invisible without see invisible you could see your hands glowing red
 greased saddle makes it impossible to mount the steed
 if an item-using monster zaps a wand of digging downward on a level that
        doesn't allow holes but does allow pits, create a pit and trigger it
+no longer override the effect of a new moon by simply carring a lizard corpse
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 2bc42fb699fb3a79ca27571fe6e747218db05863..3ed02577fa6fcc977b5eeb59254da2f8a1b36ad6 100644 (file)
@@ -1114,7 +1114,6 @@ extern void delobj_core(struct obj *, boolean);
 extern struct obj *sobj_at(int, coordxy, coordxy);
 extern struct obj *nxtobj(struct obj *, int, boolean);
 extern struct obj *carrying(int);
-extern boolean have_lizard(void);
 extern struct obj *u_carried_gloves(void);
 extern struct obj *u_have_novel(void);
 extern struct obj *o_on(unsigned int, struct obj *);
index 99ffc93354798ded7e9219c97c06a7458308a41b..20c09bf746f1891c46929262fea8c26c33983096 100644 (file)
@@ -1334,17 +1334,6 @@ currency(long amount)
     return res;
 }
 
-boolean
-have_lizard(void)
-{
-    register struct obj *otmp;
-
-    for (otmp = g.invent; otmp; otmp = otmp->nobj)
-        if (otmp->otyp == CORPSE && otmp->corpsenm == PM_LIZARD)
-            return  TRUE;
-    return FALSE;
-}
-
 struct obj *
 u_carried_gloves(void) {
     struct obj *otmp, *gloves = (struct obj *) 0;
index 927e26e19776a8bfe305abaa650e985efd6ed97a..6f6aecc8162076ffd941d184bbb940d86caad9b1 100644 (file)
@@ -3607,8 +3607,9 @@ mhitm_ad_phys(struct monst *magr, struct attack *mattk, struct monst *mdef,
 }
 
 void
-mhitm_ad_ston(struct monst *magr, struct attack *mattk, struct monst *mdef,
-              struct mhitm_data *mhm)
+mhitm_ad_ston(
+    struct monst *magr, struct attack *mattk,
+    struct monst *mdef, struct mhitm_data *mhm)
 {
     if (magr == &g.youmonst) {
         /* uhitm */
@@ -3623,10 +3624,31 @@ mhitm_ad_ston(struct monst *magr, struct attack *mattk, struct monst *mdef,
                 if (!Deaf)
                     You_hear("a cough from %s!", mon_nam(magr));
             } else {
-                if (!Deaf)
+                if (Hallucination && !Blind) {
+                    You_hear("hissing."); /* You_hear() deals with Deaf */
+                    pline("%s appears to be blowing you a kiss...",
+                          Monnam(magr));
+                } else if (!Deaf) {
                     You_hear("%s hissing!", s_suffix(mon_nam(magr)));
-                if (!rn2(10)
-                    || (flags.moonphase == NEW_MOON && !have_lizard())) {
+                } else if (!Blind) {
+                    pline("%s seems to grimace.", Monnam(magr));
+                }
+                /*
+                 * 3.7:  New moon is no longer overridden by carrying a
+                 * lizard corpse.  Having the moon's impact on terrestrial
+                 * activity be affected by carrying a dead critter felt
+                 * silly.
+                 *
+                 * That behavior dated to when there were no corpse objects
+                 * yet; "dead lizard" was a distinct item.  With a lizard
+                 * corpse, hero can eat it to survive petrification and
+                 * probably retain a partly eaten corpse for future use.
+                 *
+                 * Maintaining foodless conduct during a new moon might
+                 * become a little harder.  Clearing out cockatrice nests
+                 * could become quite a bit harder.
+                 */
+                if (!rn2(10) || flags.moonphase == NEW_MOON) {
                     if (do_stone_u(magr)) {
                         mhm->hitflags = MM_HIT;
                         mhm->done = TRUE;