losing a level while polymorphed affects hero's current monster HP as well as
underlying normal HP
mind flayer brain eating is subject to certain fatal targets and to cannibalism
+mind flayer can't eat brains of ghost or shade
corpses of unique monsters in bones behaved incorrectly if revived or eaten
fix pluralization for "this tin smells like mother-in-laws" when hallucinating
try harder to keep pluralization straight when user assigns an already plural
boolean give_nutrit = FALSE;
int result = MM_HIT, xtra_dmg = rnd(10);
- if (magr == &youmonst) {
+ if (noncorporeal(pd)) {
+ if (visflag)
+ pline("%s brain is unharmed.",
+ (mdef == &youmonst) ? "Your" : s_suffix(mon_nam(mdef)));
+ return MM_MISS; /* side-effects can't occur */
+ } else if (magr == &youmonst) {
You("eat %s brain!", s_suffix(mon_nam(mdef)));
} else if (mdef == &youmonst) {
Your("brain is eaten!");
if (Half_physical_damage) dmg = (dmg+1) / 2;
mdamageu(mtmp, dmg);
- if (!uarmh || uarmh->otyp != DUNCE_CAP)
- (void) eat_brains(mtmp, &youmonst, TRUE, (int *)0);
+ if (!uarmh || uarmh->otyp != DUNCE_CAP) {
+ /* eat_brains() will miss if target is mindless (won't
+ happen here; hero is considered to retain his mind
+ regardless of current shape) or is noncorporeal
+ (can't happen here; no one can poly into a ghost
+ or shade) so this check for missing is academic */
+ if (eat_brains(mtmp, &youmonst, TRUE, (int *)0) == MM_MISS)
+ break;
+ }
/* adjattrib gives dunce cap message when appropriate */
(void) adjattrib(A_INT, -rnd(2), FALSE);
forget_levels(25); /* lose memory of 25% of levels */