From db92663daa97e3367ba95f34ee21c5422609e35e Mon Sep 17 00:00:00 2001 From: Robert Antonius <40657895+roberika@users.noreply.github.com> Date: Wed, 17 Apr 2024 09:56:13 +0700 Subject: [PATCH] Fixed switch out attacks trigger contact for the replacement pokemon Changed force switch out attribute to be applied after the move is done. Additionally manually typed switch out attacks to be non baton pass moves. --- src/data/move.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 938a911f0..2e5ab23cb 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2676,7 +2676,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { private batonPass: boolean; constructor(user?: boolean, batonPass?: boolean) { - super(false, MoveEffectTrigger.HIT, true); + super(false, MoveEffectTrigger.POST_APPLY, true); this.user = !!user; this.batonPass = !!batonPass; } @@ -4491,7 +4491,7 @@ export function initMoves() { .makesContact(false) .target(MoveTarget.ATTACKER), new AttackMove(Moves.U_TURN, Type.BUG, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 4) - .attr(ForceSwitchOutAttr, true), + .attr(ForceSwitchOutAttr, true, false), new AttackMove(Moves.CLOSE_COMBAT, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 4) .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true), new AttackMove(Moves.PAYBACK, Type.DARK, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 4) @@ -4895,7 +4895,7 @@ export function initMoves() { new AttackMove(Moves.GRASS_PLEDGE, Type.GRASS, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 5) .partial(), new AttackMove(Moves.VOLT_SWITCH, Type.ELECTRIC, MoveCategory.SPECIAL, 70, 100, 20, -1, 0, 5) - .attr(ForceSwitchOutAttr, true), + .attr(ForceSwitchOutAttr, true, false), new AttackMove(Moves.STRUGGLE_BUG, Type.BUG, MoveCategory.SPECIAL, 50, 100, 20, 100, 0, 5) .attr(StatChangeAttr, BattleStat.SPATK, -1) .target(MoveTarget.ALL_NEAR_ENEMIES), @@ -5041,7 +5041,7 @@ export function initMoves() { .target(MoveTarget.ALL_NEAR_ENEMIES), new StatusMove(Moves.PARTING_SHOT, Type.DARK, 100, 20, 100, 0, 6) .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1) - .attr(ForceSwitchOutAttr, true) + .attr(ForceSwitchOutAttr, true, false) .soundBased(), new StatusMove(Moves.TOPSY_TURVY, Type.DARK, -1, 20, -1, 0, 6) .attr(InvertStatsAttr), @@ -5665,7 +5665,7 @@ export function initMoves() { .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], 1) .target(MoveTarget.NEAR_ALLY), new AttackMove(Moves.FLIP_TURN, Type.WATER, MoveCategory.PHYSICAL, 60, 100, 20, -1, 0, 8) - .attr(ForceSwitchOutAttr, true), + .attr(ForceSwitchOutAttr, true, false), new AttackMove(Moves.TRIPLE_AXEL, Type.ICE, MoveCategory.PHYSICAL, 20, 90, 10, -1, 0, 8) .attr(MultiHitAttr, MultiHitType._3_INCR) .attr(MissEffectAttr, (user: Pokemon, move: Move) => {