Browse Source

Passives clamped at 75%

combat-2
MagicBot 8 months ago
parent
commit
601ed40eb2
  1. 6
      src/engine/gameManager/FinalCombatManager.java

6
src/engine/gameManager/FinalCombatManager.java

@ -166,6 +166,12 @@ public class FinalCombatManager { @@ -166,6 +166,12 @@ public class FinalCombatManager {
float blockChance = ((AbstractCharacter) target).getPassiveChance("Block", attacker.getLevel(), true);
float parryChance = ((AbstractCharacter) target).getPassiveChance("Parry", attacker.getLevel(), true);
// Passive chance clamped at 75
dodgeChance = Math.max(0, Math.min(75, dodgeChance));
blockChance = Math.max(0, Math.min(75, blockChance));
parryChance = Math.max(0, Math.min(75, parryChance));
if (hitRoll < dodgeChance)
passiveType = Enum.PassiveType.Dodge;
else if (hitRoll < blockChance)

Loading…
Cancel
Save