From 78ab3421004bb28f71c3e52e5a859e58fbe5fedd Mon Sep 17 00:00:00 2001 From: Kaen <66154904+Seerd@users.noreply.github.com> Date: Wed, 30 Aug 2023 14:04:03 -0400 Subject: [PATCH] End Terastallize Needed for https://github.com/smogon/pokemon-showdown/pull/9701 --- src/battle.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/battle.ts b/src/battle.ts index a43ec41503f..317eaf2147f 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -2519,6 +2519,18 @@ export class Battle { this.log(args, kwArgs); break; } + case '-endTerastallize': { + let poke = this.getPokemon(args[1])!; + poke.removeVolatile('terastallize' as ID); + poke.teraType = ''; + poke.terastallized = ''; + poke.details = poke.details.replace(/, tera:[a-z]+/i, ''); + poke.searchid = poke.searchid.replace(/, tera:[a-z]+/i, ''); + this.scene.animTransform(poke, true); + this.scene.resetStatbar(poke); + this.log(args, kwArgs); + break; + } case '-start': { let poke = this.getPokemon(args[1])!; let effect = Dex.getEffect(args[2]);