defense calc null checks

This commit is contained in:
FatBoy committed 2025-02-25 21:11:49 -06:00
1 parent bfd89036b2
commit 16a0b9c0e3
2 files changed
+5 -3

No files matched your search

@@ -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;