mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-23 01:54:49 +01:00
fix pokemon not returning after winstrate battle
This commit is contained in:
parent
64811239d7
commit
c831baa375
@ -17,6 +17,7 @@ import { PartyHealPhase, ReturnPhase, ShowTrainerPhase } from "#app/phases";
|
|||||||
import { SpeciesFormChangeManualTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangeManualTrigger } from "#app/data/pokemon-forms";
|
||||||
import { applyPostBattleInitAbAttrs, PostBattleInitAbAttr } from "#app/data/ability";
|
import { applyPostBattleInitAbAttrs, PostBattleInitAbAttr } from "#app/data/ability";
|
||||||
import { showEncounterDialogue } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
import { showEncounterDialogue } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
||||||
|
import { MysteryEncounterMode } from "#enums/mystery-encounter-mode";
|
||||||
|
|
||||||
/** the i18n namespace for the encounter */
|
/** the i18n namespace for the encounter */
|
||||||
const namespace = "mysteryEncounter:theWinstrateChallenge";
|
const namespace = "mysteryEncounter:theWinstrateChallenge";
|
||||||
@ -140,7 +141,7 @@ async function spawnNextTrainerOrEndEncounter(scene: BattleScene) {
|
|||||||
await showEncounterDialogue(scene, `${namespace}.victory`, `${namespace}.speaker`);
|
await showEncounterDialogue(scene, `${namespace}.victory`, `${namespace}.speaker`);
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: [modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE], fillRemaining: false });
|
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: [modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE], fillRemaining: false });
|
||||||
encounter.doContinueEncounter = null;
|
encounter.doContinueEncounter = null;
|
||||||
leaveEncounterWithoutBattle(scene);
|
leaveEncounterWithoutBattle(scene, false, MysteryEncounterMode.TRAINER_BATTLE);
|
||||||
} else {
|
} else {
|
||||||
await initBattleWithEnemyConfig(scene, nextConfig);
|
await initBattleWithEnemyConfig(scene, nextConfig);
|
||||||
}
|
}
|
||||||
|
@ -634,9 +634,10 @@ export function initSubsequentOptionSelect(scene: BattleScene, optionSelectSetti
|
|||||||
* Will skip any shops and rewards, and queue the next encounter phase as normal
|
* Will skip any shops and rewards, and queue the next encounter phase as normal
|
||||||
* @param scene
|
* @param scene
|
||||||
* @param addHealPhase - when true, will add a shop phase to end of encounter with 0 rewards but healing items are available
|
* @param addHealPhase - when true, will add a shop phase to end of encounter with 0 rewards but healing items are available
|
||||||
|
* @param encounterMode - Can set custom encounter mode if necessary (may be required for forcing Pokemon to return before next phase)
|
||||||
*/
|
*/
|
||||||
export function leaveEncounterWithoutBattle(scene: BattleScene, addHealPhase: boolean = false) {
|
export function leaveEncounterWithoutBattle(scene: BattleScene, addHealPhase: boolean = false, encounterMode: MysteryEncounterMode = MysteryEncounterMode.NO_BATTLE) {
|
||||||
scene.currentBattle.mysteryEncounter.encounterMode = MysteryEncounterMode.NO_BATTLE;
|
scene.currentBattle.mysteryEncounter.encounterMode = encounterMode;
|
||||||
scene.clearPhaseQueue();
|
scene.clearPhaseQueue();
|
||||||
scene.clearPhaseQueueSplice();
|
scene.clearPhaseQueueSplice();
|
||||||
handleMysteryEncounterVictory(scene, addHealPhase);
|
handleMysteryEncounterVictory(scene, addHealPhase);
|
||||||
|
@ -1969,7 +1969,7 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
.setPartyTemplates(trainerPartyTemplates.TWO_AVG_ONE_STRONG),
|
.setPartyTemplates(trainerPartyTemplates.TWO_AVG_ONE_STRONG),
|
||||||
[TrainerType.VICKY]: new TrainerConfig(++t).setName("Vicky").setTitle("The Winstrates")
|
[TrainerType.VICKY]: new TrainerConfig(++t).setName("Vicky").setTitle("The Winstrates")
|
||||||
.setMoneyMultiplier(1)
|
.setMoneyMultiplier(1)
|
||||||
.setPartyTemplates(trainerPartyTemplates.ONE_STRONG),
|
.setPartyTemplates(trainerPartyTemplates.ONE_AVG),
|
||||||
[TrainerType.VITO]: new TrainerConfig(++t).setName("Vito").setTitle("The Winstrates")
|
[TrainerType.VITO]: new TrainerConfig(++t).setName("Vito").setTitle("The Winstrates")
|
||||||
.setMoneyMultiplier(2)
|
.setMoneyMultiplier(2)
|
||||||
.setPartyTemplates(new TrainerPartyCompoundTemplate(new TrainerPartyTemplate(3, PartyMemberStrength.AVERAGE), new TrainerPartyTemplate(2, PartyMemberStrength.STRONG)))
|
.setPartyTemplates(new TrainerPartyCompoundTemplate(new TrainerPartyTemplate(3, PartyMemberStrength.AVERAGE), new TrainerPartyTemplate(2, PartyMemberStrength.STRONG)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user