Skip to content

Commit

Permalink
Buff scroll of confuse monster
Browse files Browse the repository at this point in the history
From NetHack commit 13ad9561f38.
  • Loading branch information
elunna committed Oct 12, 2023
1 parent c873316 commit 6fe8a7d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,10 @@ struct obj *sobj; /* sobj - scroll or fake spellbook for spell */
}
} break;
case SCR_CONFUSE_MONSTER:
case SPE_CONFUSE_MONSTER:
case SPE_CONFUSE_MONSTER: {
/* scroll vs spell */
int incr = (sobj->oclass == SCROLL_CLASS) ? 3 : 0;

/* Unfortunate kludge for vampiric race here
* TODO: Find the root cause of this */
if ((youmonst.data->mlet != S_HUMAN && !Race_if(PM_VAMPIRIC)) || scursed) {
Expand All @@ -1818,7 +1821,7 @@ struct obj *sobj; /* sobj - scroll or fake spellbook for spell */
Blind ? "" : " begin to glow",
Blind ? (const char *) "tingle" : hcolor(NH_RED),
u.umconf ? " even more" : "");
u.umconf++;
incr += rnd(2);
} else {
if (Blind)
Your("%s tingle %s sharply.", makeplural(body_part(HAND)),
Expand All @@ -1827,14 +1830,16 @@ struct obj *sobj; /* sobj - scroll or fake spellbook for spell */
Your("%s glow a%s brilliant %s.",
makeplural(body_part(HAND)),
u.umconf ? "n even more" : "", hcolor(NH_RED));
incr += rn1(8, 2);
/* after a while, repeated uses become less effective */
if (u.umconf >= 40)
u.umconf++;
else
u.umconf += rn1(8, 2);
incr = 1;

}
u.umconf += (unsigned) incr;
}
break;
}
case SCR_SCARE_MONSTER:
case SPE_CAUSE_FEAR: {
register int ct = 0;
Expand Down

0 comments on commit 6fe8a7d

Please sign in to comment.