From 8169760e1ebdbe22a9e6106ed0f0f9f6776615c9 Mon Sep 17 00:00:00 2001 From: AJ Fontaine <36677462+Fontbane@users.noreply.github.com> Date: Sat, 2 Nov 2024 00:21:45 -0400 Subject: [PATCH] [Bug] Prevent wild mons fleeing with U-turn, Flip Turn, Volt Switch (#4643) * Wild mons can't flee with U-turn * Update src/data/move.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/move.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/data/move.ts b/src/data/move.ts index c5b14304fb2..837602ca71a 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5750,6 +5750,11 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { return false; } + // Don't allow wild mons to flee with U-turn et al + if (this.selfSwitch && !user.isPlayer() && move.category !== MoveCategory.STATUS) { + return false; + } + if (switchOutTarget.hp > 0) { switchOutTarget.leaveField(false); user.scene.queueMessage(i18next.t("moveTriggers:fled", { pokemonName: getPokemonNameWithAffix(switchOutTarget) }), null, true, 500);