From ae6b584a5f7088ebbe19baf1b40e633d0ec39346 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 3 Sep 2024 18:56:57 -0500 Subject: [PATCH] DS immunity fixed --- src/engine/gameManager/CombatManager.java | 5 +++++ src/engine/gameManager/PowersManager.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 081e6ab4..d3839df1 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -664,6 +664,9 @@ public enum CombatManager { DeferredPowerJob dpj = null; int max = (int)atr; + if(max < 10) + max = 10; + int min = (int)(max * 0.5f); if(max < min){ min = max - 1; @@ -673,6 +676,8 @@ public enum CombatManager { if(AbstractCharacter.IsAbstractCharacter(target)){ AbstractCharacter tar = (AbstractCharacter) target; max = tar.defenseRating; + if(max < 1) + max = 10; min = (int)(max * 0.5f); if(max < min){ min = max - 1; diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 0a814d30..3b929dfa 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -2346,6 +2346,8 @@ public enum PowersManager { boolean disable = true; int max = (int)atr; + if(max < 10) + max = 10; int min = (int)(max * 0.5f); if(max < min){ min = max - 1; @@ -2355,6 +2357,8 @@ public enum PowersManager { if(AbstractCharacter.IsAbstractCharacter(awo)){ AbstractCharacter tar = (AbstractCharacter) awo; max = tar.defenseRating; + if(max < 10) + max = 10; min = (int)(max * 0.5f); if(max < min){ min = max - 1;