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.
This commit is contained in:
PatR
2022-07-31 16:12:40 -07:00
parent 2e983f354d
commit 8a9dc00cde
4 changed files with 28 additions and 17 deletions

View 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 greased saddle makes it impossible to mount the steed
if an item-using monster zaps a wand of digging downward on a level that 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 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 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -1114,7 +1114,6 @@ extern void delobj_core(struct obj *, boolean);
extern struct obj *sobj_at(int, coordxy, coordxy); extern struct obj *sobj_at(int, coordxy, coordxy);
extern struct obj *nxtobj(struct obj *, int, boolean); extern struct obj *nxtobj(struct obj *, int, boolean);
extern struct obj *carrying(int); extern struct obj *carrying(int);
extern boolean have_lizard(void);
extern struct obj *u_carried_gloves(void); extern struct obj *u_carried_gloves(void);
extern struct obj *u_have_novel(void); extern struct obj *u_have_novel(void);
extern struct obj *o_on(unsigned int, struct obj *); extern struct obj *o_on(unsigned int, struct obj *);

View File

@@ -1334,17 +1334,6 @@ currency(long amount)
return res; 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 * struct obj *
u_carried_gloves(void) { u_carried_gloves(void) {
struct obj *otmp, *gloves = (struct obj *) 0; struct obj *otmp, *gloves = (struct obj *) 0;

View File

@@ -3607,8 +3607,9 @@ mhitm_ad_phys(struct monst *magr, struct attack *mattk, struct monst *mdef,
} }
void void
mhitm_ad_ston(struct monst *magr, struct attack *mattk, struct monst *mdef, mhitm_ad_ston(
struct mhitm_data *mhm) struct monst *magr, struct attack *mattk,
struct monst *mdef, struct mhitm_data *mhm)
{ {
if (magr == &g.youmonst) { if (magr == &g.youmonst) {
/* uhitm */ /* uhitm */
@@ -3623,10 +3624,31 @@ mhitm_ad_ston(struct monst *magr, struct attack *mattk, struct monst *mdef,
if (!Deaf) if (!Deaf)
You_hear("a cough from %s!", mon_nam(magr)); You_hear("a cough from %s!", mon_nam(magr));
} else { } 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))); You_hear("%s hissing!", s_suffix(mon_nam(magr)));
if (!rn2(10) } else if (!Blind) {
|| (flags.moonphase == NEW_MOON && !have_lizard())) { 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)) { if (do_stone_u(magr)) {
mhm->hitflags = MM_HIT; mhm->hitflags = MM_HIT;
mhm->done = TRUE; mhm->done = TRUE;