]> granicus.if.org Git - nethack/commitdiff
remove unnecessary code on destroy_one_item()
authorSHIRAKATA Kentaro <argrath@ub32.org>
Sat, 26 Feb 2022 11:40:43 +0000 (20:40 +0900)
committerPatR <rankin@nethack.org>
Tue, 28 Jun 2022 19:52:06 +0000 (12:52 -0700)
`physical_damage` is initialized to FALSE, and no codes change it.

src/zap.c

index 095e852dc5402b147f5acf84f5b422bbfad8dade..5792b5cd6f5cdac06375bfc3c27c3916d58fca64 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -5156,10 +5156,8 @@ destroy_one_item(struct obj *obj, int osym, int dmgtyp)
     long i, cnt, quan;
     int dmg, xresist, skip, dindx;
     const char *mult;
-    boolean physical_damage;
     boolean chargeit = FALSE;
 
-    physical_damage = FALSE;
     xresist = skip = 0;
     /* lint suppression */
     dmg = dindx = 0;
@@ -5295,8 +5293,6 @@ destroy_one_item(struct obj *obj, int osym, int dmgtyp)
 
                 if (dmgtyp == AD_FIRE && osym == FOOD_CLASS)
                     how = "exploding glob of slime";
-                if (physical_damage)
-                    dmg = Maybe_Half_Phys(dmg);
                 losehp(dmg, one ? how : (const char *) makeplural(how),
                        one ? KILLED_BY_AN : KILLED_BY);
                 exercise(A_STR, FALSE);