National Dex: Let Rayquaza terastallize if it can’t Mega Evolve (#9299)

Because Terastal is handled through a field rather than a method, MRC's failure to update it caused inconsistent behavior.

This resolves the inconsistency with gen 8 implementation behavior (Rayquaza was able to dynamax under MRC).
This commit is contained in:
Zachary Perlmutter 2023-03-13 13:20:46 -07:00 committed by GitHub
parent 4ccea821e3
commit cc47a1c53b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1239,7 +1239,11 @@ export const Rulesets: {[k: string]: FormatData} = {
onBegin() {
this.add('rule', 'Mega Rayquaza Clause: You cannot mega evolve Rayquaza');
for (const pokemon of this.getAllPokemon()) {
if (pokemon.species.id === 'rayquaza') pokemon.canMegaEvo = null;
if (pokemon.species.id === 'rayquaza') {
pokemon.canMegaEvo = null;
// ability to terastal was determined before the clause activated, causing incorrect behavior
pokemon.canTerastallize = this.actions.canTerastallize(pokemon);
}
}
},
},