Passives clamped at 75%

This commit is contained in:
2024-03-23 18:39:03 -04:00
parent 2bb414fc33
commit 601ed40eb2
@@ -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)