Fix Lucky Chant tests failing

This commit is contained in:
innerthunder 2024-08-31 23:49:30 -07:00
parent 660d554e58
commit 735bb7b8bb

View File

@ -2241,6 +2241,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
console.log(`crit stage: +${critLevel.value}`);
const critChance = [24, 8, 2, 1][Math.max(0, Math.min(critLevel.value, 3))];
isCritical = critChance === 1 || !this.scene.randBattleSeedInt(critChance);
}
const noCritTag = this.scene.arena.getTagOnSide(NoCritTag, defendingSide);
const blockCrit = new Utils.BooleanHolder(false);
@ -2248,7 +2249,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
if (noCritTag || blockCrit.value || Overrides.NEVER_CRIT_OVERRIDE) {
isCritical = false;
}
}
const { cancelled, result, damage: dmg } = this.getAttackDamage(source, move, false, isCritical, false);