This commit is contained in:
dingo
2026-01-18 19:15:53 -05:00
parent 42d29f8db6
commit 6a65fc15ce
2 changed files with 24 additions and 5 deletions
+11 -2
View File
@@ -156,8 +156,17 @@ public static class CombatCalculator
int unarmedMax = 3 + (int)(player.Strength * 0.5f);
return (unarmedMin, unarmedMax, "physical");
}
return (weapon.MinDamage, weapon.MaxDamage, weapon.DamageTypeKey);
// Safety: if both min and max are 0, use 1 as fallback
int minDmg = weapon.MinDamage;
int maxDmg = weapon.MaxDamage;
if (minDmg == 0 && maxDmg == 0)
{
minDmg = 1;
maxDmg = 1;
}
return (minDmg, maxDmg, weapon.DamageTypeKey);
}
/// <summary>