Fix flee odds being incorrect
All checks were successful
Build / Build (push) Successful in 57s

This commit is contained in:
2025-11-08 10:32:29 +01:00
parent 90eaeb1a72
commit fa05cdd773
3 changed files with 35 additions and 2 deletions

View File

@@ -55,8 +55,8 @@ public class Gen7MiscLibrary : IMiscLibrary
var userSide = battle.Sides[battleData.SideIndex];
userSide.RegisterFleeAttempt();
var fleeChance = (userSpeed * 32 / (opponentSpeed / 4) + 30 * userSide.FleeAttempts) / 256;
var random = battle.Random.GetInt(0, 100);
var fleeChance = userSpeed * 32 / (opponentSpeed / 4) + 30 * userSide.FleeAttempts;
var random = battle.Random.GetInt(0, 256);
return random < fleeChance;
}
}