]> granicus.if.org Git - nethack/commitdiff
mind flayer's damage
authorPatR <rankin@nethack.org>
Mon, 25 Jan 2016 00:23:33 +0000 (16:23 -0800)
committerPatR <rankin@nethack.org>
Mon, 25 Jan 2016 00:23:33 +0000 (16:23 -0800)
From a followup to #H2247, April 2011...  Physical damage from a mind
flayer attack was inflicted in the AD_DRIN case for hitmu(), then
being inflicted again in the common code after the switch statement.
The new comment explaining the reason for non-standard damage is just
a guess.

doc/fixes36.1
src/mhitu.c

index 59d97f7b5cd3aca20e865ecd53318dc2e7dc5c91..1fe9633945eea6af7fcb6c8ec3f0f0a2fab2e874 100644 (file)
@@ -124,6 +124,7 @@ override MSGTYPE=norep while executing the ':' command
 if a chameleon took vampire form, it would stop periodically changing shape
 corpses obtained from tipping an ice box wouldn't rot away
 suppress "you climb up the stairs" message if verbose option is off
+physical damage from mind flayer attack was being inflicted twice
 
 
 Platform- and/or Interface-Specific Fixes
index 814061ccd6c91ade27cbbc51dae40c9a1779f4a0..d8c85a1330657b22d570deb31a8e2fdaae56245e 100644 (file)
@@ -1091,9 +1091,11 @@ register struct attack *mattk;
                  helm_simple_name(uarmh));
             break;
         }
+        /* negative armor class doesn't reduce this damage */
         if (Half_physical_damage)
             dmg = (dmg + 1) / 2;
         mdamageu(mtmp, dmg);
+        dmg = 0; /* don't inflict a second dose below */
 
         if (!uarmh || uarmh->otyp != DUNCE_CAP) {
             /* eat_brains() will miss if target is mindless (won't