Updated the import and fixed the ForceSwitchOutAttr coding errors

This commit is contained in:
EmoUsedHM01 2024-04-11 20:23:48 +01:00 committed by GitHub
parent 4269c27b9c
commit ace72111de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ import * as Utils from "../utils";
import { WeatherType } from "./weather"; import { WeatherType } from "./weather";
import { ArenaTagSide, ArenaTrapTag } from "./arena-tag"; import { ArenaTagSide, ArenaTrapTag } from "./arena-tag";
import { ArenaTagType } from "./enums/arena-tag-type"; import { ArenaTagType } from "./enums/arena-tag-type";
import { ProtectAbilityAbAttr, BlockRecoilDamageAttr, BlockOneHitKOAbAttr, IgnoreContactAbAttr, MaxMultiHitAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr, PostDefendContactApplyStatusEffectAbAttr } from "./ability"; import { ProtectAbilityAbAttr, BlockRecoilDamageAttr, BlockOneHitKOAbAttr, IgnoreContactAbAttr, MaxMultiHitAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr, applyPostDefendAbAttrs, PostDefendContactApplyStatusEffectAbAttr } from "./ability";
import { Abilities } from "./enums/abilities"; import { Abilities } from "./enums/abilities";
import { PokemonHeldItemModifier } from "../modifier/modifier"; import { PokemonHeldItemModifier } from "../modifier/modifier";
import { BattlerIndex } from "../battle"; import { BattlerIndex } from "../battle";
@ -2479,7 +2479,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
if (move.category !== MoveCategory.STATUS && !this.getSwitchOutCondition()(user, target, move)) { if (move.category !== MoveCategory.STATUS && !this.getSwitchOutCondition()(user, target, move)) {
//Apply effects that need to be executed before switch out //Apply effects that need to be executed before switch out
//For example, applying poison or any other status condition //For example, applying poison or any other status condition
this.applyEffectsBeforeSwitchOut(user, target, move); applyPostDefendAbAttrs(PostDefendContactApplyStatusEffectAbAttr, target, user, move);
//Resolve the Promise after the switch out is complete //Resolve the Promise after the switch out is complete
return resolve(false); return resolve(false);
} }