defense calc null checks

This commit is contained in:
2025-02-25 21:11:49 -06:00
parent bfd89036b2
commit 16a0b9c0e3
2 changed files with 5 additions and 3 deletions
@@ -156,6 +156,8 @@ public class CombatUtilities {
switch (target.getObjectType()) {
case PlayerCharacter:
PlayerCharacter pc = (PlayerCharacter)target;
if(pc.combatStats == null)
pc.combatStats = new PlayerCombatStats(pc);
pc.combatStats.calculateDefense();
defense = pc.combatStats.defense;
break;