Skip to content

Commit

Permalink
Fix not passing overrideStatus to canSetStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
emdeann committed Mar 10, 2025
1 parent 40edac9 commit 82c80b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/data/moves/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 82c80b1

Please sign in to comment.