]> granicus.if.org Git - nethack/commitdiff
half-physical-damage from gas spore explosion should only affect you
authorcohrs <cohrs>
Wed, 27 Mar 2002 02:31:21 +0000 (02:31 +0000)
committercohrs <cohrs>
Wed, 27 Mar 2002 02:31:21 +0000 (02:31 +0000)
- <Someone> noticed the fix for applying half physical damage to gas spore
explosions affected damage to all monsters, not just you

doc/fixes34.1
src/explode.c
src/mon.c

index d2a45197fb70c874bdc76bb52b3675212c2527d2..17c752ace1d27ab41c8c47d088500d44918c7318 100644 (file)
@@ -21,6 +21,7 @@ fix iron ball cases that could put the chain in solid rock
 discovering a mimic on a closed door location should not unblock the location
 don't drop corpse when a monster kills another monster on an inaccessible
        location (i.e. behave like xkilled behaves)
+half-physical-damage from gas spore explosion should only affect you
 
 
 Platform- and/or Interface-Specific Fixes
index 4d073bc258715b47e0c3dd569ecb33964ae5175a..457c5f7400d07f0aa35bda58883a0083a359465e 100644 (file)
@@ -314,7 +314,8 @@ int expltype;
                if (Invulnerable) {
                    damu = 0;
                    You("are unharmed!");
-               }
+               } else if (Half_physical_damage && adtyp == AD_PHYS)
+                   damu = (damu+1) / 2;
                if (adtyp == AD_FIRE) (void) burnarmor(&youmonst);
                destroy_item(SCROLL_CLASS, (int) adtyp);
                destroy_item(SPBOOK_CLASS, (int) adtyp);
index a213006fd5b77bb8bcfd0f85e020530b964aa5b4..4d8c64b16761ea1724ae82b415b919d79b544b9f 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1419,13 +1419,13 @@ boolean was_swallowed;                  /* digestion */
                else if(mdat->mattk[i].damd)
                    tmp = d((int)mdat->mlevel+1, (int)mdat->mattk[i].damd);
                else tmp = 0;
-               if (Half_physical_damage) tmp = (tmp+1) / 2;
                if (was_swallowed && magr) {
                    if (magr == &youmonst) {
                        There("is an explosion in your %s!",
                              body_part(STOMACH));
                        Sprintf(killer_buf, "%s explosion",
                                s_suffix(mdat->mname));
+                       if (Half_physical_damage) tmp = (tmp+1) / 2;
                        losehp(tmp, killer_buf, KILLED_BY_AN);
                    } else {
                        if (flags.soundok) You_hear("an explosion.");