Skip to content

Commit c6f7ca3

Browse files
committed
Update battle.ts
1 parent 6c05ea1 commit c6f7ca3

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

play.pokemonshowdown.com/src/battle.ts

+12-10
Original file line numberDiff line numberDiff line change
@@ -2529,16 +2529,18 @@ export class Battle {
25292529
this.log(args, kwArgs);
25302530
break;
25312531
}
2532-
case '-endTerastallize': {
2533-
let poke = this.getPokemon(args[1])!;
2534-
poke.removeVolatile('terastallize' as ID);
2535-
poke.teraType = '';
2536-
poke.terastallized = '';
2537-
poke.details = poke.details.replace(/, tera:[a-z]+/i, '');
2538-
poke.searchid = poke.searchid.replace(/, tera:[a-z]+/i, '');
2539-
this.scene.animTransform(poke, true);
2540-
this.scene.resetStatbar(poke);
2541-
this.log(args, kwArgs);
2532+
case '-custom': {
2533+
let poke = this.getPokemon(args[2])!;
2534+
if (args[1] && args[1] === 'endterastallize') {
2535+
poke.removeVolatile('terastallize' as ID);
2536+
poke.teraType = '';
2537+
poke.terastallized = '';
2538+
poke.details = poke.details.replace(/, tera:[a-z]+/i, '');
2539+
poke.searchid = poke.searchid.replace(/, tera:[a-z]+/i, '');
2540+
this.scene.animTransform(poke);
2541+
this.scene.resetStatbar(poke);
2542+
this.log(args, kwArgs);
2543+
}
25422544
break;
25432545
}
25442546
case '-start': {

0 commit comments

Comments
 (0)