From 8a9dc00cde2cfe305c156a99a1d83129fe33e76e Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 31 Jul 2022 16:12:40 -0700 Subject: [PATCH] don't negate new moon with a lizard corpse 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 | 1 + include/extern.h | 1 - src/invent.c | 11 ----------- src/uhitm.c | 32 +++++++++++++++++++++++++++----- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index b091ebe73..769685ca5 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/include/extern.h b/include/extern.h index 2bc42fb69..3ed02577f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -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 *); diff --git a/src/invent.c b/src/invent.c index 99ffc9335..20c09bf74 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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; diff --git a/src/uhitm.c b/src/uhitm.c index 927e26e19..6f6aecc81 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -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; -- 2.50.1