]> granicus.if.org Git - nethack/commitdiff
This fixes beta bug 8003 (half physical damage from gas spores) as well as a
authorarromdee <arromdee>
Sat, 2 Mar 2002 01:07:11 +0000 (01:07 +0000)
committerarromdee <arromdee>
Sat, 2 Mar 2002 01:07:11 +0000 (01:07 +0000)
minor bit of cleanup in mon.c.

doc/fixes34.0
src/mon.c

index 6f8ca3d405789afd4b724fbbef3d30957f994110..bb8d9c48f0a9f841db812f39af3df000e7708f2b 100644 (file)
@@ -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
index 0664b7cab338972412639e50f893a86a9ff71355..e40b070054685cf0334d608f1f73c5fd33829a46 100644 (file)
--- 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