Clear data when wild pokémon is fleeing

This commit is contained in:
Wlowscha 2025-02-20 09:16:51 +01:00
parent f2a7d0b68c
commit 8908098f7c
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04
2 changed files with 2 additions and 3 deletions

View File

@ -4933,7 +4933,6 @@ class ForceSwitchOutHelper {
return false;
}
if (switchOutTarget.hp > 0) {
switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH);
const summonIndex = (globalScene.currentBattle.trainer ? globalScene.currentBattle.trainer.getNextSummonIndex((switchOutTarget as EnemyPokemon).trainerSlot) : 0);
globalScene.prependToPhase(new SwitchSummonPhase(this.switchType, switchOutTarget.getFieldIndex(), summonIndex, false, false), MoveEndPhase);
return true;
@ -4948,7 +4947,7 @@ class ForceSwitchOutHelper {
}
if (switchOutTarget.hp > 0) {
switchOutTarget.leaveField(false);
switchOutTarget.leaveField();
globalScene.queueMessage(i18next.t("moveTriggers:fled", { pokemonName: getPokemonNameWithAffix(switchOutTarget) }), null, true, 500);
if (globalScene.currentBattle.double) {

View File

@ -6209,7 +6209,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
}
if (switchOutTarget.hp > 0) {
switchOutTarget.leaveField(false);
switchOutTarget.leaveField();
globalScene.queueMessage(i18next.t("moveTriggers:fled", { pokemonName: getPokemonNameWithAffix(switchOutTarget) }), null, true, 500);
// in double battles redirect potential moves off fled pokemon