Fix not passing overrideStatus to canSetStatus

This commit is contained in:
Dean 2025-03-09 23:13:13 -07:00
parent 40edac9d0a
commit 82c80b1e11
2 changed files with 2 additions and 2 deletions

View File

@ -2433,7 +2433,7 @@ export class StatusEffectAttr extends MoveEffectAttr {
}
return false;
}
if (((!pokemon. status || this.overrideStatus) || (pokemon.status.effect === this.effect && moveChance < 0))
if (((!pokemon.status || this.overrideStatus) || (pokemon.status.effect === this.effect && moveChance < 0))
&& pokemon.trySetStatus(this.effect, true, user, this.turnsRemaining, null, this.overrideStatus)) {
applyPostAttackAbAttrs(ConfusionOnStatusEffectAbAttr, user, target, move, null, false, this.effect);
return true;

View File

@ -5441,7 +5441,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
sourceText: string | null = null,
overrideStatus?: boolean
): boolean {
if (!this.canSetStatus(effect, asPhase, false, sourcePokemon)) {
if (!this.canSetStatus(effect, asPhase, overrideStatus, sourcePokemon)) {
return false;
}
if (this.isFainted() && effect !== StatusEffect.FAINT) {