Skip to content

Commit

Permalink
Update battle.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisXV committed Feb 26, 2024
1 parent 6c05ea1 commit c6f7ca3
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions play.pokemonshowdown.com/src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down

0 comments on commit c6f7ca3

Please sign in to comment.