Fix not passing overrideStatus to canSetStatus
This commit is contained in:
parent
40edac9d0a
commit
82c80b1e11
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue