Skip to content

Commit

Permalink
Update battle.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisXV authored Feb 26, 2024
1 parent 78ab342 commit b0b16a2
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2519,16 +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);
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 b0b16a2

Please sign in to comment.