mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 14:59:26 +02:00
more fixes for consistency
This commit is contained in:
parent
667ca3283d
commit
0a98aa56f6
@ -3596,8 +3596,10 @@ export class PostTurnStatStageChangeAbAttr extends PostTurnAbAttr {
|
|||||||
if (!simulated) {
|
if (!simulated) {
|
||||||
if (!pokemon.hasAbility(Abilities.SPEED_BOOST)) {
|
if (!pokemon.hasAbility(Abilities.SPEED_BOOST)) {
|
||||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages));
|
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages));
|
||||||
|
this.showAbility = true;
|
||||||
} else if (pokemon.hasAbility(Abilities.SPEED_BOOST) && !pokemon.turnData.switchedInThisTurn && !pokemon.turnData.failedRunAway) {
|
} else if (pokemon.hasAbility(Abilities.SPEED_BOOST) && !pokemon.turnData.switchedInThisTurn && !pokemon.turnData.failedRunAway) {
|
||||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages));
|
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, this.stats, this.stages));
|
||||||
|
this.showAbility = true;
|
||||||
} else {
|
} else {
|
||||||
this.showAbility = false;
|
this.showAbility = false;
|
||||||
}
|
}
|
||||||
|
@ -238,10 +238,7 @@ export class SummonPhase extends PartyMemberPokemonPhase {
|
|||||||
this.scene.unshiftPhase(new ShinySparklePhase(this.scene, pokemon.getBattlerIndex()));
|
this.scene.unshiftPhase(new ShinySparklePhase(this.scene, pokemon.getBattlerIndex()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Switch in status is set before the pokemon is summoned and the new turn begins, so it is preserved from switch-summon-phase */
|
|
||||||
const switchedInStatus = pokemon.turnData?.switchedInThisTurn;
|
|
||||||
pokemon.resetTurnData();
|
pokemon.resetTurnData();
|
||||||
pokemon.turnData.switchedInThisTurn = switchedInStatus;
|
|
||||||
|
|
||||||
if (!this.loaded || [ BattleType.TRAINER, BattleType.MYSTERY_ENCOUNTER ].includes(this.scene.currentBattle.battleType) || (this.scene.currentBattle.waveIndex % 10) === 1) {
|
if (!this.loaded || [ BattleType.TRAINER, BattleType.MYSTERY_ENCOUNTER ].includes(this.scene.currentBattle.battleType) || (this.scene.currentBattle.waveIndex % 10) === 1) {
|
||||||
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
||||||
|
@ -105,10 +105,6 @@ export class SwitchSummonPhase extends SummonPhase {
|
|||||||
const party = this.player ? this.getParty() : this.scene.getEnemyParty();
|
const party = this.player ? this.getParty() : this.scene.getEnemyParty();
|
||||||
const switchedInPokemon = party[this.slotIndex];
|
const switchedInPokemon = party[this.slotIndex];
|
||||||
this.lastPokemon = this.getPokemon();
|
this.lastPokemon = this.getPokemon();
|
||||||
if (this.switchType !== SwitchType.INITIAL_SWITCH) {
|
|
||||||
switchedInPokemon.resetTurnData();
|
|
||||||
switchedInPokemon.turnData.switchedInThisTurn = true;
|
|
||||||
}
|
|
||||||
applyPreSwitchOutAbAttrs(PreSwitchOutAbAttr, this.lastPokemon);
|
applyPreSwitchOutAbAttrs(PreSwitchOutAbAttr, this.lastPokemon);
|
||||||
if (this.switchType === SwitchType.BATON_PASS && switchedInPokemon) {
|
if (this.switchType === SwitchType.BATON_PASS && switchedInPokemon) {
|
||||||
(this.player ? this.scene.getEnemyField() : this.scene.getPlayerField()).forEach(enemyPokemon => enemyPokemon.transferTagsBySourceId(this.lastPokemon.id, switchedInPokemon.id));
|
(this.player ? this.scene.getEnemyField() : this.scene.getPlayerField()).forEach(enemyPokemon => enemyPokemon.transferTagsBySourceId(this.lastPokemon.id, switchedInPokemon.id));
|
||||||
@ -189,6 +185,11 @@ export class SwitchSummonPhase extends SummonPhase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.switchType !== SwitchType.INITIAL_SWITCH) {
|
||||||
|
pokemon.resetTurnData();
|
||||||
|
pokemon.turnData.switchedInThisTurn = true;
|
||||||
|
}
|
||||||
|
|
||||||
this.lastPokemon?.resetSummonData();
|
this.lastPokemon?.resetSummonData();
|
||||||
|
|
||||||
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user