From 3681fc51485d88872ed5d6fa751a024e3f92e947 Mon Sep 17 00:00:00 2001 From: jnotsknab Date: Fri, 20 Jun 2025 18:13:05 -0500 Subject: [PATCH] Removed unecessary arg in turn start phase as refactor no longer needs it --- src/phases/turn-start-phase.ts | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index 6219907fb68..be36508c025 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -1,6 +1,5 @@ import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; import { allMoves } from "#app/data/data-lists"; -import { AbilityId } from "#enums/ability-id"; import { Stat } from "#app/enums/stat"; import type Pokemon from "#app/field/pokemon"; import { PokemonMove } from "#app/data/moves/pokemon-move"; @@ -209,27 +208,8 @@ export class TurnStartPhase extends FieldPhase { break; case Command.RUN: { - let runningPokemon = pokemon; - if (globalScene.currentBattle.double) { - const playerActivePokemon = field.filter(pokemon => { - if (pokemon) { - return pokemon.isPlayer() && pokemon.isActive(); - } - return; - }); - // if only one pokemon is alive, use that one - if (playerActivePokemon.length > 1) { - // find which active pokemon has faster speed - const fasterPokemon = - playerActivePokemon[0].getStat(Stat.SPD) > playerActivePokemon[1].getStat(Stat.SPD) - ? playerActivePokemon[0] - : playerActivePokemon[1]; - // check if either active pokemon has the ability "Run Away" - const hasRunAway = playerActivePokemon.find(p => p.hasAbility(AbilityId.RUN_AWAY)); - runningPokemon = hasRunAway !== undefined ? hasRunAway : fasterPokemon; - } - } - phaseManager.unshiftNew("AttemptRunPhase", runningPokemon.getFieldIndex()); + //Team Based action, no need for checking individual pokemon or whether its doubles + phaseManager.unshiftNew("AttemptRunPhase"); } break; }