defense calc null checks
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user