Skip to content

Commit

Permalink
Fix Morpeko forme locking
Browse files Browse the repository at this point in the history
  • Loading branch information
MathyFurret committed Nov 27, 2024
1 parent e4e9512 commit 92870b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion play.pokemonshowdown.com/src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2520,16 +2520,20 @@ export class Battle {
case '-terastallize': {
let poke = this.getPokemon(args[1])!;
let type = Dex.types.get(args[2]).name;
let lockForme = false;
poke.removeVolatile('typeadd' as ID);
poke.teraType = type;
poke.terastallized = type;
poke.details += `, tera:${type}`;
poke.searchid += `, tera:${type}`;
if (poke.speciesForme.startsWith("Morpeko")) {
lockForme = true;
poke.speciesForme = poke.getSpeciesForme();
poke.details = poke.details.replace("Morpeko", poke.speciesForme);
poke.searchid = `${poke.ident}|${poke.details}`;
delete poke.volatiles['formechange'];
}
this.scene.animTransform(poke, true);
this.scene.animTransform(poke, true, lockForme);
this.scene.resetStatbar(poke);
this.log(args, kwArgs);
break;
Expand Down

0 comments on commit 92870b2

Please sign in to comment.