From 125db5affcedea0e8ba9882fb4cf5c4564120ae2 Mon Sep 17 00:00:00 2001 From: chouettevan Date: Wed, 15 May 2024 18:29:59 -0400 Subject: [PATCH] Emergency Exit now activates between hazards --- data/abilities.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/abilities.ts b/data/abilities.ts index 382fb6db4201..a810a59eb45d 100644 --- a/data/abilities.ts +++ b/data/abilities.ts @@ -1213,6 +1213,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = { num: 302, }, emergencyexit: { + onEntryHazard(pokemon) { + if (pokemon.hasAbility('emergencyexit') && this.canSwitch(pokemon.side) && pokemon.hp < pokemon.maxhp/2 ) { + pokemon.switchFlag = true; + return false; + } + }, onEmergencyExit(target) { if (!this.canSwitch(target.side) || target.forceSwitchFlag || target.switchFlag) return; for (const side of this.sides) {