diff --git a/src/battle.ts b/src/battle.ts index b7dbb9a42..b8ac37802 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -212,6 +212,8 @@ export default class Battle { } randSeedInt(scene: BattleScene, range: integer, min: integer = 0): integer { + if (range <= 1) + return min; let ret: integer; const tempRngCounter = scene.rngCounter; const tempSeedOverride = scene.rngSeedOverride; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index bf7073ad0..a4d9acc04 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1213,7 +1213,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } if (source.getTag(BattlerTagType.CRIT_BOOST)) critLevel.value += 2; - const critChance = Math.ceil(16 / Math.pow(2, critLevel.value)); + const critChance = [24, 8, 2, 1][Math.max(0, Math.min(critLevel.value, 3))]; isCritical = !source.getTag(BattlerTagType.NO_CRIT) && (critChance === 1 || !this.scene.randBattleSeedInt(critChance)); if (isCritical) { const blockCrit = new Utils.BooleanHolder(false);