Skip to content

Commit d43e960

Browse files
authored
Fix Morpeko forme locking (#2303)
1 parent e4e9512 commit d43e960

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

play.pokemonshowdown.com/src/battle.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -2520,16 +2520,20 @@ export class Battle {
25202520
case '-terastallize': {
25212521
let poke = this.getPokemon(args[1])!;
25222522
let type = Dex.types.get(args[2]).name;
2523+
let lockForme = false;
25232524
poke.removeVolatile('typeadd' as ID);
25242525
poke.teraType = type;
25252526
poke.terastallized = type;
25262527
poke.details += `, tera:${type}`;
25272528
poke.searchid += `, tera:${type}`;
25282529
if (poke.speciesForme.startsWith("Morpeko")) {
2530+
lockForme = true;
2531+
poke.speciesForme = poke.getSpeciesForme();
25292532
poke.details = poke.details.replace("Morpeko", poke.speciesForme);
25302533
poke.searchid = `${poke.ident}|${poke.details}`;
2534+
delete poke.volatiles['formechange'];
25312535
}
2532-
this.scene.animTransform(poke, true);
2536+
this.scene.animTransform(poke, true, lockForme);
25332537
this.scene.resetStatbar(poke);
25342538
this.log(args, kwArgs);
25352539
break;

0 commit comments

Comments
 (0)