mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-26 02:02:20 +02:00
Removed redundant call to .resetSummonData for mon that switches out
This commit is contained in:
parent
67bbfcb37d
commit
abee0a696f
@ -109,7 +109,7 @@ export class SwitchSummonPhase extends SummonPhase {
|
|||||||
const party = this.player ? this.getParty() : globalScene.getEnemyParty();
|
const party = this.player ? this.getParty() : globalScene.getEnemyParty();
|
||||||
const switchedInPokemon = party[this.slotIndex];
|
const switchedInPokemon = party[this.slotIndex];
|
||||||
this.lastPokemon = this.getPokemon();
|
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) {
|
if (this.switchType === SwitchType.BATON_PASS && switchedInPokemon) {
|
||||||
(this.player ? globalScene.getEnemyField() : globalScene.getPlayerField()).forEach(enemyPokemon => enemyPokemon.transferTagsBySourceId(this.lastPokemon.id, switchedInPokemon.id));
|
(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)) {
|
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;
|
pokemon.turnData.switchedInThisTurn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.lastPokemon?.resetSummonData();
|
|
||||||
|
|
||||||
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
||||||
// Reverts to weather-based forms when weather suppressors (Cloud Nine/Air Lock) are switched out
|
// Reverts to weather-based forms when weather suppressors (Cloud Nine/Air Lock) are switched out
|
||||||
globalScene.arena.triggerWeatherBasedFormChanges();
|
globalScene.arena.triggerWeatherBasedFormChanges();
|
||||||
|
Loading…
Reference in New Issue
Block a user