Browse Source

Revert "adjusted hit chance formula"

This reverts commit 3428a06bb8.
lakebane-strongholds
FatBoy-DOTC 2 months ago
parent
commit
8dce20e69f
  1. 4
      src/engine/gameManager/CombatManager.java

4
src/engine/gameManager/CombatManager.java

@ -1446,9 +1446,9 @@ public enum CombatManager {
public static boolean LandHit(int atr, int defense){ public static boolean LandHit(int atr, int defense){
int roll = ThreadLocalRandom.current().nextInt(101); int roll = ThreadLocalRandom.current().nextInt(101);
float chance = (atr-((atr+defense)*3.15f))/((defense-((atr+defense)*3.15f))+(atr-((atr+defense)*3.15f))); float chance = (float)((atr-((atr+defense)*0.315))/((defense-((atr+defense)*0.315))+(atr-((atr+defense)*0.315))));
int connvertedChance = (int)chance; int connvertedChance = (int)(chance * 100);
if(connvertedChance < 5) if(connvertedChance < 5)
connvertedChance = 5; connvertedChance = 5;

Loading…
Cancel
Save