Skip to content

Commit

Permalink
Fix Tera permanently replacing sprite (smogon#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik99999 authored and MathyFurret committed Mar 25, 2024
1 parent f54aef7 commit 344638e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/battle-animations.ts
Expand Up @@ -1477,6 +1477,9 @@ export class BattleScene implements BattleSceneStub {
animDragOut(pokemon: Pokemon) {
return pokemon.sprite.animDragOut(pokemon);
}
resetStatbar(pokemon: Pokemon, startHidden?: boolean) {
return pokemon.sprite.resetStatbar(pokemon, startHidden);
}
updateStatbar(pokemon: Pokemon, updatePrevhp?: boolean, updateHp?: boolean) {
return pokemon.sprite.updateStatbar(pokemon, updatePrevhp, updateHp);
}
Expand Down
1 change: 1 addition & 0 deletions src/battle-scene-stub.ts
Expand Up @@ -63,6 +63,7 @@ export class BattleSceneStub {
animUnsummon(pokemon: Pokemon, instant?: boolean) { }
animDragIn(pokemon: Pokemon, slot: number) { }
animDragOut(pokemon: Pokemon) { }
resetStatbar(pokemon: Pokemon, startHidden?: boolean) { }
updateStatbar(pokemon: Pokemon, updatePrevhp?: boolean, updateHp?: boolean) { }
updateStatbarIfExists(pokemon: Pokemon, updatePrevhp?: boolean, updateHp?: boolean) { }
animTransform(pokemon: Pokemon, isCustomAnim?: boolean, isPermanent?: boolean) { }
Expand Down
3 changes: 2 additions & 1 deletion src/battle.ts
Expand Up @@ -2469,7 +2469,8 @@ export class Battle {
poke.terastallized = type;
poke.details += `, tera:${type}`;
poke.searchid += `, tera:${type}`;
this.scene.animTransform(poke, true, true);
this.scene.animTransform(poke, true);
this.scene.resetStatbar(poke);
this.log(args, kwArgs);
break;
}
Expand Down

0 comments on commit 344638e

Please sign in to comment.