[Bug] Fix tags not resetting on switch (#3119)

Fixes #2982
This commit is contained in:
NightKev 2024-07-24 07:27:37 -07:00 committed by GitHub
parent 0ba8959b11
commit d1e1879920
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1655,6 +1655,11 @@ export class SwitchSummonPhase extends SummonPhase {
pokemonName: getPokemonNameWithAffix(this.getPokemon())
})
);
// Ensure improperly persisted summon data (such as tags) is cleared upon switching
if (!this.batonPass) {
party[this.fieldIndex].resetBattleData();
party[this.fieldIndex].resetSummonData();
}
this.summon();
};
if (this.player) {