From 8d279f8eb071de3434168354a8527ae76be192e8 Mon Sep 17 00:00:00 2001 From: geeil-han Date: Tue, 29 Oct 2024 09:39:49 +0100 Subject: [PATCH] added switchOutStatus for all relevant moves --- src/field/pokemon.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index d18999ca65a..2bd62e6d902 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2738,12 +2738,20 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { */ if (move.attrs.some(attr => attr instanceof ForceSwitchOutAttr)) { /** - * this currently works only for Circle Throw = 509, Dragon Tail = 525, Roar = 46 and Whirlwind = 18 {@link Moves} + * this works only for Circle Throw = 509, Dragon Tail = 525, Roar = 46 and Whirlwind = 18 {@link Moves} + * and targets the enemy/target of the attack + * * Note: There needs to be a better way to track the target of the switch-out effect */ if (move.id === 509 || move.id === 525 || move.id === 46 || move.id === 18) { this.switchOutStatus = true; } + /** + * Teleport = 100, Baton Pass = 226, U-Turn = 369, Volt Switch = 521, Parting Shot = 575, Flip Turn = 812, Shed Tail = 880 + */ + if (move.id === 100 || move.id === 226 || move.id === 369 || move.id === 575 || move.id === 812 || move.id === 880) { + source.switchOutStatus = true; + } } applyMoveAttrs(VariableMoveCategoryAttr, source, this, move, moveCategory);