Removed redundant call to .resetSummonData for mon that switches out

This commit is contained in:
Wlowscha 2025-02-20 09:35:01 +01:00
parent 67bbfcb37d
commit abee0a696f
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -109,7 +109,7 @@ export class SwitchSummonPhase extends SummonPhase {
const party = this.player ? this.getParty() : globalScene.getEnemyParty();
const switchedInPokemon = party[this.slotIndex];
this.lastPokemon = this.getPokemon();
console.log(this.lastPokemon.name, this.lastPokemon.isOnField(), this.lastPokemon.canApplyAbility());
console.log(this.lastPokemon.name, switchedInPokemon.name);
if (this.switchType === SwitchType.BATON_PASS && switchedInPokemon) {
(this.player ? globalScene.getEnemyField() : globalScene.getPlayerField()).forEach(enemyPokemon => enemyPokemon.transferTagsBySourceId(this.lastPokemon.id, switchedInPokemon.id));
if (!globalScene.findModifier(m => m instanceof SwitchEffectTransferModifier && (m as SwitchEffectTransferModifier).pokemonId === switchedInPokemon.id)) {
@ -196,8 +196,6 @@ export class SwitchSummonPhase extends SummonPhase {
pokemon.turnData.switchedInThisTurn = true;
}
this.lastPokemon?.resetSummonData();
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
// Reverts to weather-based forms when weather suppressors (Cloud Nine/Air Lock) are switched out
globalScene.arena.triggerWeatherBasedFormChanges();