Skip to content

Commit

Permalink
don't negate new moon with a lizard corpse
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PatR committed Jul 31, 2022
1 parent 2e983f3 commit 8a9dc00
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 17 deletions.
1 change: 1 addition & 0 deletions doc/fixes3-7-0.txt
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion include/extern.h
Expand Up @@ -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 *);
Expand Down
11 changes: 0 additions & 11 deletions src/invent.c
Expand Up @@ -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;
Expand Down
32 changes: 27 additions & 5 deletions src/uhitm.c
Expand Up @@ -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 */
Expand All @@ -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;
Expand Down

0 comments on commit 8a9dc00

Please sign in to comment.