mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-22 01:35:31 -05:00
Fix interaction between Terastallization and Pursuit in NatDex formatst if used on a switching enemy
* Terastallization should happen before Pursuit.
This commit is contained in:
parent
a3c090d808
commit
274ee23d90
|
|
@ -14916,10 +14916,20 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = {
|
|||
}
|
||||
// Run through each action in queue to check if the Pursuit user is supposed to Mega Evolve this turn.
|
||||
// If it is, then Mega Evolve before moving.
|
||||
if (source.canMegaEvo || source.canUltraBurst) {
|
||||
if (source.canMegaEvo || source.canUltraBurst || source.canTerastallize) {
|
||||
for (const [actionIndex, action] of this.queue.entries()) {
|
||||
if (action.pokemon === source && action.choice === 'megaEvo') {
|
||||
this.actions.runMegaEvo(source);
|
||||
if (action.pokemon === source) {
|
||||
switch (action.choice) {
|
||||
case 'megaEvo':
|
||||
this.actions.runMegaEvo(source);
|
||||
break;
|
||||
// Also a "forme" change that happens before moves, though only possible in NatDex
|
||||
case 'terastallize':
|
||||
this.actions.terastallize(source);
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
this.queue.list.splice(actionIndex, 1);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user