move: fix issue with self switch moves causing softlocks

pull/243/merge
Madi Simpson 2024-05-05 09:13:53 -07:00 committed by Samuel H
parent fa2d257144
commit b6603e2c6c
1 changed files with 1 additions and 1 deletions

View File

@ -2977,7 +2977,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
return new Promise(resolve => { return new Promise(resolve => {
// Check if the move category is not STATUS or if the switch out condition is not met // Check if the move category is not STATUS or if the switch out condition is not met
if (!this.getCondition()(user, target, move)) { if (!this.getSwitchOutCondition()(user, target, move)) {
//Apply effects before switch out i.e. poison point, flame body, etc //Apply effects before switch out i.e. poison point, flame body, etc
applyPostDefendAbAttrs(PostDefendContactApplyStatusEffectAbAttr, target, user, new PokemonMove(move.id), null); applyPostDefendAbAttrs(PostDefendContactApplyStatusEffectAbAttr, target, user, new PokemonMove(move.id), null);
return resolve(false); return resolve(false);