From: arromdee Date: Sat, 2 Mar 2002 01:07:11 +0000 (+0000) Subject: This fixes beta bug 8003 (half physical damage from gas spores) as well as a X-Git-Tag: MOVE2GIT~3099 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6d445d5145d42b942308f57d64f2ad1ab96dd42;p=nethack This fixes beta bug 8003 (half physical damage from gas spores) as well as a minor bit of cleanup in mon.c. --- diff --git a/doc/fixes34.0 b/doc/fixes34.0 index 6f8ca3d40..bb8d9c48f 100644 --- a/doc/fixes34.0 +++ b/doc/fixes34.0 @@ -447,6 +447,7 @@ if you see a monster jump into a trap in a secret corridor, it's not secret fixed a few places where unblock_point wasn't called but should have been cloned monsters should have the same name and tameness as the original you should stop eating (etc.) if a monster attacks you and misses +half physical damage should apply to gas spores Platform- and/or Interface-Specific Fixes diff --git a/src/mon.c b/src/mon.c index 0664b7cab..e40b07005 100644 --- a/src/mon.c +++ b/src/mon.c @@ -20,6 +20,15 @@ STATIC_DCL int FDECL(select_newcham_form, (struct monst *)); STATIC_DCL void FDECL(kill_eggs, (struct obj *)); #endif +#ifdef REINCARNATION +#define LEVEL_SPECIFIC_NOCORPSE(mdat) \ + (Is_rogue_level(&u.uz) || \ + (level.flags.graveyard && is_undead(mdat) && rn2(3))) +#else +#define LEVEL_SPECIFIC_NOCORPSE(mdat) \ + (level.flags.graveyard && is_undead(mdat) && rn2(3)) +#endif + #if 0 /* part of the original warning code which was replaced in 3.3.1 */ @@ -1409,6 +1418,7 @@ boolean 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 (swallowed && magr) { if (magr == &youmonst) { There("is an explosion in your %s!", @@ -1442,11 +1452,7 @@ boolean swallowed; /* digestion */ /* must duplicate this below check in xkilled() since it results in * creating no objects as well as no corpse */ - if ( -#ifdef REINCARNATION - Is_rogue_level(&u.uz) || -#endif - (level.flags.graveyard && is_undead(mdat) && rn2(3))) + if (LEVEL_SPECIFIC_NOCORPSE(mdat)) return FALSE; if (bigmonst(mdat) || mdat == &mons[PM_LIZARD] @@ -1691,11 +1697,7 @@ xkilled(mtmp, dest) goto cleanup; } - if((dest & 2) -#ifdef REINCARNATION - || Is_rogue_level(&u.uz) -#endif - || (level.flags.graveyard && is_undead(mdat) && rn2(3))) + if((dest & 2) || LEVEL_SPECIFIC_NOCORPSE(mdat)) goto cleanup; #ifdef MAIL