From c6f7ca33ed25011923f639b346d3b10d054a8c6f Mon Sep 17 00:00:00 2001 From: Kris Johnson <11083252+KrisXV@users.noreply.github.com> Date: Mon, 26 Feb 2024 13:49:30 -0700 Subject: [PATCH] Update battle.ts --- play.pokemonshowdown.com/src/battle.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/play.pokemonshowdown.com/src/battle.ts b/play.pokemonshowdown.com/src/battle.ts index 41042cf548..61069881fb 100644 --- a/play.pokemonshowdown.com/src/battle.ts +++ b/play.pokemonshowdown.com/src/battle.ts @@ -2529,16 +2529,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); + case '-custom': { + let poke = this.getPokemon(args[2])!; + if (args[1] && args[1] === 'endterastallize') { + 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); + this.scene.resetStatbar(poke); + this.log(args, kwArgs); + } break; } case '-start': {