mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
- Only enabled retries if enableRetries is enabled.
- Only enabled retries if enableRetries is enabled.
This commit is contained in:
parent
7f02a04f0b
commit
b6748519c6
@ -201,44 +201,46 @@ export class CommandUiHandler extends UiHandler {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.CYCLE_ABILITY:
|
case Button.CYCLE_ABILITY:
|
||||||
globalScene.ui.setMode(UiMode.MESSAGE)
|
if (globalScene.enableRetries){
|
||||||
globalScene.ui.showText(i18next.t("battle:retryBattle"), null, () => {
|
globalScene.ui.setMode(UiMode.MESSAGE)
|
||||||
globalScene.ui.setMode(
|
globalScene.ui.showText(i18next.t("battle:retryBattle"), null, () => {
|
||||||
UiMode.CONFIRM,
|
globalScene.ui.setMode(
|
||||||
() => {
|
UiMode.CONFIRM,
|
||||||
globalScene.ui.fadeOut(1250).then(() => {
|
() => {
|
||||||
globalScene.reset();
|
globalScene.ui.fadeOut(1250).then(() => {
|
||||||
globalScene.phaseManager.clearPhaseQueue();
|
globalScene.reset();
|
||||||
globalScene.gameData.loadSession(globalScene.sessionSlotId).then(() => {
|
globalScene.phaseManager.clearPhaseQueue();
|
||||||
globalScene.phaseManager.pushNew("EncounterPhase", true);
|
globalScene.gameData.loadSession(globalScene.sessionSlotId).then(() => {
|
||||||
|
globalScene.phaseManager.pushNew("EncounterPhase", true);
|
||||||
|
|
||||||
const availablePartyMembers = globalScene.getPokemonAllowedInBattle().length;
|
const availablePartyMembers = globalScene.getPokemonAllowedInBattle().length;
|
||||||
|
|
||||||
globalScene.phaseManager.pushNew("SummonPhase", 0);
|
globalScene.phaseManager.pushNew("SummonPhase", 0);
|
||||||
if (globalScene.currentBattle.double && availablePartyMembers > 1) {
|
|
||||||
globalScene.phaseManager.pushNew("SummonPhase", 1);
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
globalScene.currentBattle.waveIndex > 1 &&
|
|
||||||
globalScene.currentBattle.battleType !== BattleType.TRAINER
|
|
||||||
) {
|
|
||||||
globalScene.phaseManager.pushNew("CheckSwitchPhase", 0, globalScene.currentBattle.double);
|
|
||||||
if (globalScene.currentBattle.double && availablePartyMembers > 1) {
|
if (globalScene.currentBattle.double && availablePartyMembers > 1) {
|
||||||
globalScene.phaseManager.pushNew("CheckSwitchPhase", 1, globalScene.currentBattle.double);
|
globalScene.phaseManager.pushNew("SummonPhase", 1);
|
||||||
}
|
}
|
||||||
}
|
if (
|
||||||
globalScene.ui.fadeIn(1250);
|
globalScene.currentBattle.waveIndex > 1 &&
|
||||||
globalScene.phaseManager.shiftPhase();
|
globalScene.currentBattle.battleType !== BattleType.TRAINER
|
||||||
|
) {
|
||||||
|
globalScene.phaseManager.pushNew("CheckSwitchPhase", 0, globalScene.currentBattle.double);
|
||||||
|
if (globalScene.currentBattle.double && availablePartyMembers > 1) {
|
||||||
|
globalScene.phaseManager.pushNew("CheckSwitchPhase", 1, globalScene.currentBattle.double);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
globalScene.ui.fadeIn(1250);
|
||||||
|
globalScene.phaseManager.shiftPhase();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
},
|
() => { globalScene.ui.setMode(UiMode.COMMAND)},
|
||||||
() => { globalScene.ui.setMode(UiMode.COMMAND)},
|
false,
|
||||||
false,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
1000,
|
||||||
1000,
|
);
|
||||||
);
|
});
|
||||||
});
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user