From 6cdf92851e916361abc118472d1c27c81812b317 Mon Sep 17 00:00:00 2001 From: cohrs Date: Wed, 27 Mar 2002 02:31:21 +0000 Subject: [PATCH] half-physical-damage from gas spore explosion should only affect you - noticed the fix for applying half physical damage to gas spore explosions affected damage to all monsters, not just you --- doc/fixes34.1 | 1 + src/explode.c | 3 ++- src/mon.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index d2a45197f..17c752ace 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/explode.c b/src/explode.c index 4d073bc25..457c5f740 100644 --- a/src/explode.c +++ b/src/explode.c @@ -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); diff --git a/src/mon.c b/src/mon.c index a213006fd..4d8c64b16 100644 --- 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.");