mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-08 17:32:18 +02:00
Fix Lucky Chant tests failing
This commit is contained in:
parent
660d554e58
commit
735bb7b8bb
@ -2241,13 +2241,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
console.log(`crit stage: +${critLevel.value}`);
|
console.log(`crit stage: +${critLevel.value}`);
|
||||||
const critChance = [24, 8, 2, 1][Math.max(0, Math.min(critLevel.value, 3))];
|
const critChance = [24, 8, 2, 1][Math.max(0, Math.min(critLevel.value, 3))];
|
||||||
isCritical = critChance === 1 || !this.scene.randBattleSeedInt(critChance);
|
isCritical = critChance === 1 || !this.scene.randBattleSeedInt(critChance);
|
||||||
|
}
|
||||||
|
|
||||||
const noCritTag = this.scene.arena.getTagOnSide(NoCritTag, defendingSide);
|
const noCritTag = this.scene.arena.getTagOnSide(NoCritTag, defendingSide);
|
||||||
const blockCrit = new Utils.BooleanHolder(false);
|
const blockCrit = new Utils.BooleanHolder(false);
|
||||||
applyAbAttrs(BlockCritAbAttr, this, null, false, blockCrit);
|
applyAbAttrs(BlockCritAbAttr, this, null, false, blockCrit);
|
||||||
if (noCritTag || blockCrit.value || Overrides.NEVER_CRIT_OVERRIDE) {
|
if (noCritTag || blockCrit.value || Overrides.NEVER_CRIT_OVERRIDE) {
|
||||||
isCritical = false;
|
isCritical = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { cancelled, result, damage: dmg } = this.getAttackDamage(source, move, false, isCritical, false);
|
const { cancelled, result, damage: dmg } = this.getAttackDamage(source, move, false, isCritical, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user