mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-19 18:57:37 +00:00
migrate field-trip encounter
This commit is contained in:
parent
d9e0957d40
commit
ce73c38e33
@ -1,50 +0,0 @@
|
|||||||
import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
|
|
||||||
|
|
||||||
export const FieldTripDialogue: MysteryEncounterDialogue = {
|
|
||||||
intro: [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_intro_message"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_intro_dialogue",
|
|
||||||
speaker: "mysteryEncounter:field_trip_speaker"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
encounterOptionsDialogue: {
|
|
||||||
title: "mysteryEncounter:field_trip_title",
|
|
||||||
description: "mysteryEncounter:field_trip_description",
|
|
||||||
query: "mysteryEncounter:field_trip_query",
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
buttonLabel: "mysteryEncounter:field_trip_option_1_label",
|
|
||||||
buttonTooltip: "mysteryEncounter:field_trip_option_1_tooltip",
|
|
||||||
secondOptionPrompt: "mysteryEncounter:field_trip_second_option_prompt",
|
|
||||||
selected: [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_option_selected"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonLabel: "mysteryEncounter:field_trip_option_2_label",
|
|
||||||
buttonTooltip: "mysteryEncounter:field_trip_option_2_tooltip",
|
|
||||||
secondOptionPrompt: "mysteryEncounter:field_trip_second_option_prompt",
|
|
||||||
selected: [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_option_selected"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonLabel: "mysteryEncounter:field_trip_option_3_label",
|
|
||||||
buttonTooltip: "mysteryEncounter:field_trip_option_3_tooltip",
|
|
||||||
secondOptionPrompt: "mysteryEncounter:field_trip_second_option_prompt",
|
|
||||||
selected: [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_option_selected"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,220 +1,333 @@
|
|||||||
import { generateModifierTypeOption, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterExp, setEncounterRewards, } from "#app/data/mystery-encounters/mystery-encounter-utils";
|
import { MoveCategory } from "#app/data/move";
|
||||||
|
import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option";
|
||||||
|
import {
|
||||||
|
generateModifierTypeOption,
|
||||||
|
leaveEncounterWithoutBattle,
|
||||||
|
selectPokemonForOption,
|
||||||
|
setEncounterExp,
|
||||||
|
setEncounterRewards,
|
||||||
|
} from "#app/data/mystery-encounters/mystery-encounter-utils";
|
||||||
|
import { TempBattleStat } from "#app/data/temp-battle-stat";
|
||||||
|
import { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||||
|
import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";
|
||||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
import BattleScene from "../../../battle-scene";
|
import BattleScene from "../../../battle-scene";
|
||||||
import MysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier } from "../mystery-encounter";
|
import MysteryEncounter, {
|
||||||
import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option";
|
MysteryEncounterBuilder,
|
||||||
import { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
MysteryEncounterTier,
|
||||||
import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";
|
} from "../mystery-encounter";
|
||||||
import { MoveCategory } from "#app/data/move";
|
|
||||||
import { TempBattleStat } from "#app/data/temp-battle-stat";
|
|
||||||
|
|
||||||
export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder
|
/** i18n namespace for the encounter */
|
||||||
.withEncounterType(MysteryEncounterType.FIELD_TRIP)
|
const namespace = "mysteryEncounter:field_trip";
|
||||||
.withEncounterTier(MysteryEncounterTier.COMMON)
|
|
||||||
.withIntroSpriteConfigs([
|
export const FieldTripEncounter: MysteryEncounter =
|
||||||
{
|
MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.FIELD_TRIP)
|
||||||
spriteKey: "preschooler_m",
|
.withEncounterTier(MysteryEncounterTier.COMMON)
|
||||||
fileRoot: "trainer",
|
.withSceneWaveRangeRequirement(10, 180)
|
||||||
hasShadow: true
|
.withIntroSpriteConfigs([
|
||||||
},
|
{
|
||||||
{
|
spriteKey: "preschooler_m",
|
||||||
spriteKey: "teacher",
|
fileRoot: "trainer",
|
||||||
fileRoot: "mystery-encounters",
|
hasShadow: true,
|
||||||
hasShadow: true
|
},
|
||||||
},
|
{
|
||||||
{
|
spriteKey: "teacher",
|
||||||
spriteKey: "preschooler_f",
|
fileRoot: "mystery-encounters",
|
||||||
fileRoot: "trainer",
|
hasShadow: true,
|
||||||
hasShadow: true
|
},
|
||||||
},
|
{
|
||||||
])
|
spriteKey: "preschooler_f",
|
||||||
.withHideIntroVisuals(false)
|
fileRoot: "trainer",
|
||||||
.withSceneWaveRangeRequirement(10, 180)
|
hasShadow: true,
|
||||||
.withOption(new MysteryEncounterOptionBuilder()
|
},
|
||||||
.withPreOptionPhase(async (scene: BattleScene): Promise<boolean> => {
|
])
|
||||||
const encounter = scene.currentBattle.mysteryEncounter;
|
.withIntroDialogue([
|
||||||
const onPokemonSelected = (pokemon: PlayerPokemon) => {
|
{
|
||||||
// Return the options for Pokemon move valid for this option
|
text: `${namespace}_intro_message`,
|
||||||
return pokemon.moveset.map((move: PokemonMove) => {
|
},
|
||||||
const option: OptionSelectItem = {
|
{
|
||||||
label: move.getName(),
|
text: `${namespace}_intro_dialogue`,
|
||||||
handler: () => {
|
speaker: `${namespace}_speaker`,
|
||||||
// Pokemon and move selected
|
},
|
||||||
const correctMove = move.getMove().category === MoveCategory.PHYSICAL;
|
])
|
||||||
encounter.setDialogueToken("moveCategory", "Physical");
|
.withHideIntroVisuals(false)
|
||||||
if (!correctMove) {
|
.withTitle(`${namespace}_title`)
|
||||||
encounter.dialogue.encounterOptionsDialogue.options[0].selected = [
|
.withDescription(`${namespace}_description`)
|
||||||
{
|
.withQuery(`${namespace}_query`)
|
||||||
text: "mysteryEncounter:field_trip_option_incorrect",
|
.withOption(
|
||||||
speaker: "mysteryEncounter:field_trip_speaker"
|
new MysteryEncounterOptionBuilder()
|
||||||
},
|
.withDialogue({
|
||||||
{
|
buttonLabel: `${namespace}_option_1_label`,
|
||||||
text: "mysteryEncounter:field_trip_lesson_learned",
|
buttonTooltip: `${namespace}_option_1_tooltip`,
|
||||||
|
secondOptionPrompt: `${namespace}_second_option_prompt`,
|
||||||
|
selected: [
|
||||||
|
{
|
||||||
|
text: `${namespace}_option_selected`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
.withPreOptionPhase(async (scene: BattleScene): Promise<boolean> => {
|
||||||
|
const encounter = scene.currentBattle.mysteryEncounter;
|
||||||
|
const onPokemonSelected = (pokemon: PlayerPokemon) => {
|
||||||
|
// Return the options for Pokemon move valid for this option
|
||||||
|
return pokemon.moveset.map((move: PokemonMove) => {
|
||||||
|
const option: OptionSelectItem = {
|
||||||
|
label: move.getName(),
|
||||||
|
handler: () => {
|
||||||
|
// Pokemon and move selected
|
||||||
|
const correctMove =
|
||||||
|
move.getMove().category === MoveCategory.PHYSICAL;
|
||||||
|
encounter.setDialogueToken("moveCategory", "Physical");
|
||||||
|
if (!correctMove) {
|
||||||
|
encounter.options[0].dialogue.selected = [
|
||||||
|
{
|
||||||
|
text: `${namespace}_option_incorrect`,
|
||||||
|
speaker: `${namespace}_speaker`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `${namespace}_lesson_learned`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
setEncounterExp(
|
||||||
|
scene,
|
||||||
|
scene.getParty().map((p) => p.id),
|
||||||
|
50
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
encounter.setDialogueToken("pokeName", pokemon.name);
|
||||||
|
encounter.setDialogueToken("move", move.getName());
|
||||||
|
encounter.options[0].dialogue.selected = [
|
||||||
|
{
|
||||||
|
text: `${namespace}_option_selected`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
setEncounterExp(scene, [pokemon.id], 100);
|
||||||
}
|
}
|
||||||
];
|
encounter.misc = {
|
||||||
setEncounterExp(scene, scene.getParty().map(p => p.id), 50);
|
correctMove: correctMove,
|
||||||
} else {
|
};
|
||||||
encounter.setDialogueToken("pokeName", pokemon.name);
|
return true;
|
||||||
encounter.setDialogueToken("move", move.getName());
|
},
|
||||||
encounter.dialogue.encounterOptionsDialogue.options[0].selected = [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_option_selected"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
setEncounterExp(scene, [pokemon.id], 100);
|
|
||||||
}
|
|
||||||
encounter.misc = {
|
|
||||||
correctMove: correctMove
|
|
||||||
};
|
};
|
||||||
return true;
|
return option;
|
||||||
}
|
});
|
||||||
};
|
};
|
||||||
return option;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return selectPokemonForOption(scene, onPokemonSelected);
|
return selectPokemonForOption(scene, onPokemonSelected);
|
||||||
})
|
})
|
||||||
.withOptionPhase(async (scene: BattleScene) => {
|
.withOptionPhase(async (scene: BattleScene) => {
|
||||||
const encounter = scene.currentBattle.mysteryEncounter;
|
const encounter = scene.currentBattle.mysteryEncounter;
|
||||||
if (encounter.misc.correctMove) {
|
if (encounter.misc.correctMove) {
|
||||||
const modifiers = [
|
const modifiers = [
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.ATK]),
|
generateModifierTypeOption(
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.DEF]),
|
scene,
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.SPD]),
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
generateModifierTypeOption(scene, modifierTypes.DIRE_HIT)
|
[TempBattleStat.ATK]
|
||||||
];
|
),
|
||||||
|
generateModifierTypeOption(
|
||||||
|
scene,
|
||||||
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
|
[TempBattleStat.DEF]
|
||||||
|
),
|
||||||
|
generateModifierTypeOption(
|
||||||
|
scene,
|
||||||
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
|
[TempBattleStat.SPD]
|
||||||
|
),
|
||||||
|
generateModifierTypeOption(scene, modifierTypes.DIRE_HIT),
|
||||||
|
];
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeOptions: modifiers, fillRemaining: false });
|
setEncounterRewards(scene, {
|
||||||
}
|
guaranteedModifierTypeOptions: modifiers,
|
||||||
|
fillRemaining: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
leaveEncounterWithoutBattle(scene, !encounter.misc.correctMove);
|
leaveEncounterWithoutBattle(scene, !encounter.misc.correctMove);
|
||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.withOption(new MysteryEncounterOptionBuilder()
|
.withOption(
|
||||||
.withPreOptionPhase(async (scene: BattleScene): Promise<boolean> => {
|
new MysteryEncounterOptionBuilder()
|
||||||
const encounter = scene.currentBattle.mysteryEncounter;
|
.withDialogue({
|
||||||
const onPokemonSelected = (pokemon: PlayerPokemon) => {
|
buttonLabel: `${namespace}_option_2_label`,
|
||||||
// Return the options for Pokemon move valid for this option
|
buttonTooltip: `${namespace}_option_2_tooltip`,
|
||||||
return pokemon.moveset.map((move: PokemonMove) => {
|
secondOptionPrompt: `${namespace}_second_option_prompt`,
|
||||||
const option: OptionSelectItem = {
|
selected: [
|
||||||
label: move.getName(),
|
{
|
||||||
handler: () => {
|
text: `${namespace}_option_selected`,
|
||||||
// Pokemon and move selected
|
},
|
||||||
const correctMove = move.getMove().category === MoveCategory.SPECIAL;
|
],
|
||||||
encounter.setDialogueToken("moveCategory", "Special");
|
})
|
||||||
if (!correctMove) {
|
.withPreOptionPhase(async (scene: BattleScene): Promise<boolean> => {
|
||||||
encounter.dialogue.encounterOptionsDialogue.options[1].selected = [
|
const encounter = scene.currentBattle.mysteryEncounter;
|
||||||
{
|
const onPokemonSelected = (pokemon: PlayerPokemon) => {
|
||||||
text: "mysteryEncounter:field_trip_option_incorrect",
|
// Return the options for Pokemon move valid for this option
|
||||||
speaker: "mysteryEncounter:field_trip_speaker"
|
return pokemon.moveset.map((move: PokemonMove) => {
|
||||||
},
|
const option: OptionSelectItem = {
|
||||||
{
|
label: move.getName(),
|
||||||
text: "mysteryEncounter:field_trip_lesson_learned",
|
handler: () => {
|
||||||
|
// Pokemon and move selected
|
||||||
|
const correctMove =
|
||||||
|
move.getMove().category === MoveCategory.SPECIAL;
|
||||||
|
encounter.setDialogueToken("moveCategory", "Special");
|
||||||
|
if (!correctMove) {
|
||||||
|
encounter.options[1].dialogue.selected = [
|
||||||
|
{
|
||||||
|
text: `${namespace}_option_incorrect`,
|
||||||
|
speaker: `${namespace}_speaker`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `${namespace}_lesson_learned`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
setEncounterExp(
|
||||||
|
scene,
|
||||||
|
scene.getParty().map((p) => p.id),
|
||||||
|
50
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
encounter.setDialogueToken("pokeName", pokemon.name);
|
||||||
|
encounter.setDialogueToken("move", move.getName());
|
||||||
|
encounter.options[1].dialogue.selected = [
|
||||||
|
{
|
||||||
|
text: `${namespace}_option_selected`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
setEncounterExp(scene, [pokemon.id], 100);
|
||||||
}
|
}
|
||||||
];
|
encounter.misc = {
|
||||||
setEncounterExp(scene, scene.getParty().map(p => p.id), 50);
|
correctMove: correctMove,
|
||||||
} else {
|
};
|
||||||
encounter.setDialogueToken("pokeName", pokemon.name);
|
return true;
|
||||||
encounter.setDialogueToken("move", move.getName());
|
},
|
||||||
encounter.dialogue.encounterOptionsDialogue.options[1].selected = [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_option_selected"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
setEncounterExp(scene, [pokemon.id], 100);
|
|
||||||
}
|
|
||||||
encounter.misc = {
|
|
||||||
correctMove: correctMove
|
|
||||||
};
|
};
|
||||||
return true;
|
return option;
|
||||||
}
|
});
|
||||||
};
|
};
|
||||||
return option;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return selectPokemonForOption(scene, onPokemonSelected);
|
return selectPokemonForOption(scene, onPokemonSelected);
|
||||||
})
|
})
|
||||||
.withOptionPhase(async (scene: BattleScene) => {
|
.withOptionPhase(async (scene: BattleScene) => {
|
||||||
const encounter = scene.currentBattle.mysteryEncounter;
|
const encounter = scene.currentBattle.mysteryEncounter;
|
||||||
if (encounter.misc.correctMove) {
|
if (encounter.misc.correctMove) {
|
||||||
const modifiers = [
|
const modifiers = [
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.SPATK]),
|
generateModifierTypeOption(
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.SPDEF]),
|
scene,
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.SPD]),
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
generateModifierTypeOption(scene, modifierTypes.DIRE_HIT)
|
[TempBattleStat.SPATK]
|
||||||
];
|
),
|
||||||
|
generateModifierTypeOption(
|
||||||
|
scene,
|
||||||
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
|
[TempBattleStat.SPDEF]
|
||||||
|
),
|
||||||
|
generateModifierTypeOption(
|
||||||
|
scene,
|
||||||
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
|
[TempBattleStat.SPD]
|
||||||
|
),
|
||||||
|
generateModifierTypeOption(scene, modifierTypes.DIRE_HIT),
|
||||||
|
];
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeOptions: modifiers, fillRemaining: false });
|
setEncounterRewards(scene, {
|
||||||
}
|
guaranteedModifierTypeOptions: modifiers,
|
||||||
|
fillRemaining: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
leaveEncounterWithoutBattle(scene, !encounter.misc.correctMove);
|
leaveEncounterWithoutBattle(scene, !encounter.misc.correctMove);
|
||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.withOption(new MysteryEncounterOptionBuilder()
|
.withOption(
|
||||||
.withPreOptionPhase(async (scene: BattleScene): Promise<boolean> => {
|
new MysteryEncounterOptionBuilder()
|
||||||
const encounter = scene.currentBattle.mysteryEncounter;
|
.withDialogue({
|
||||||
const onPokemonSelected = (pokemon: PlayerPokemon) => {
|
buttonLabel: `${namespace}_option_3_label`,
|
||||||
// Return the options for Pokemon move valid for this option
|
buttonTooltip: `${namespace}_option_3_tooltip`,
|
||||||
return pokemon.moveset.map((move: PokemonMove) => {
|
secondOptionPrompt: `${namespace}_second_option_prompt`,
|
||||||
const option: OptionSelectItem = {
|
selected: [
|
||||||
label: move.getName(),
|
{
|
||||||
handler: () => {
|
text: `${namespace}_option_selected`,
|
||||||
// Pokemon and move selected
|
},
|
||||||
const correctMove = move.getMove().category === MoveCategory.STATUS;
|
],
|
||||||
encounter.setDialogueToken("moveCategory", "Status");
|
})
|
||||||
if (!correctMove) {
|
.withPreOptionPhase(async (scene: BattleScene): Promise<boolean> => {
|
||||||
encounter.dialogue.encounterOptionsDialogue.options[2].selected = [
|
const encounter = scene.currentBattle.mysteryEncounter;
|
||||||
{
|
const onPokemonSelected = (pokemon: PlayerPokemon) => {
|
||||||
text: "mysteryEncounter:field_trip_option_incorrect",
|
// Return the options for Pokemon move valid for this option
|
||||||
speaker: "mysteryEncounter:field_trip_speaker"
|
return pokemon.moveset.map((move: PokemonMove) => {
|
||||||
},
|
const option: OptionSelectItem = {
|
||||||
{
|
label: move.getName(),
|
||||||
text: "mysteryEncounter:field_trip_lesson_learned",
|
handler: () => {
|
||||||
|
// Pokemon and move selected
|
||||||
|
const correctMove =
|
||||||
|
move.getMove().category === MoveCategory.STATUS;
|
||||||
|
encounter.setDialogueToken("moveCategory", "Status");
|
||||||
|
if (!correctMove) {
|
||||||
|
encounter.options[2].dialogue.selected = [
|
||||||
|
{
|
||||||
|
text: `${namespace}_option_incorrect`,
|
||||||
|
speaker: `${namespace}_speaker`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `${namespace}_lesson_learned`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
setEncounterExp(
|
||||||
|
scene,
|
||||||
|
scene.getParty().map((p) => p.id),
|
||||||
|
50
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
encounter.setDialogueToken("pokeName", pokemon.name);
|
||||||
|
encounter.setDialogueToken("move", move.getName());
|
||||||
|
encounter.options[2].dialogue.selected = [
|
||||||
|
{
|
||||||
|
text: `${namespace}_option_selected`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
setEncounterExp(scene, [pokemon.id], 100);
|
||||||
}
|
}
|
||||||
];
|
encounter.misc = {
|
||||||
setEncounterExp(scene, scene.getParty().map(p => p.id), 50);
|
correctMove: correctMove,
|
||||||
} else {
|
};
|
||||||
encounter.setDialogueToken("pokeName", pokemon.name);
|
return true;
|
||||||
encounter.setDialogueToken("move", move.getName());
|
},
|
||||||
encounter.dialogue.encounterOptionsDialogue.options[2].selected = [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:field_trip_option_selected"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
setEncounterExp(scene, [pokemon.id], 100);
|
|
||||||
}
|
|
||||||
encounter.misc = {
|
|
||||||
correctMove: correctMove
|
|
||||||
};
|
};
|
||||||
return true;
|
return option;
|
||||||
}
|
});
|
||||||
};
|
};
|
||||||
return option;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return selectPokemonForOption(scene, onPokemonSelected);
|
return selectPokemonForOption(scene, onPokemonSelected);
|
||||||
})
|
})
|
||||||
.withOptionPhase(async (scene: BattleScene) => {
|
.withOptionPhase(async (scene: BattleScene) => {
|
||||||
const encounter = scene.currentBattle.mysteryEncounter;
|
const encounter = scene.currentBattle.mysteryEncounter;
|
||||||
if (encounter.misc.correctMove) {
|
if (encounter.misc.correctMove) {
|
||||||
const modifiers = [
|
const modifiers = [
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.ACC]),
|
generateModifierTypeOption(
|
||||||
generateModifierTypeOption(scene, modifierTypes.TEMP_STAT_BOOSTER, [TempBattleStat.SPD]),
|
scene,
|
||||||
generateModifierTypeOption(scene, modifierTypes.GREAT_BALL),
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
generateModifierTypeOption(scene, modifierTypes.IV_SCANNER)
|
[TempBattleStat.ACC]
|
||||||
];
|
),
|
||||||
|
generateModifierTypeOption(
|
||||||
|
scene,
|
||||||
|
modifierTypes.TEMP_STAT_BOOSTER,
|
||||||
|
[TempBattleStat.SPD]
|
||||||
|
),
|
||||||
|
generateModifierTypeOption(scene, modifierTypes.GREAT_BALL),
|
||||||
|
generateModifierTypeOption(scene, modifierTypes.IV_SCANNER),
|
||||||
|
];
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeOptions: modifiers, fillRemaining: false });
|
setEncounterRewards(scene, {
|
||||||
}
|
guaranteedModifierTypeOptions: modifiers,
|
||||||
|
fillRemaining: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
leaveEncounterWithoutBattle(scene, !encounter.misc.correctMove);
|
leaveEncounterWithoutBattle(scene, !encounter.misc.correctMove);
|
||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.build();
|
.build();
|
||||||
|
@ -6,7 +6,6 @@ import { TrainingSessionDialogue } from "#app/data/mystery-encounters/dialogue/t
|
|||||||
import { SleepingSnorlaxDialogue } from "./dialogue/sleeping-snorlax-dialogue";
|
import { SleepingSnorlaxDialogue } from "./dialogue/sleeping-snorlax-dialogue";
|
||||||
import { ShadyVitaminDealerDialogue } from "#app/data/mystery-encounters/dialogue/shady-vitamin-dealer";
|
import { ShadyVitaminDealerDialogue } from "#app/data/mystery-encounters/dialogue/shady-vitamin-dealer";
|
||||||
import { TextStyle } from "#app/ui/text";
|
import { TextStyle } from "#app/ui/text";
|
||||||
import { FieldTripDialogue } from "#app/data/mystery-encounters/dialogue/field-trip-dialogue";
|
|
||||||
|
|
||||||
export class TextDisplay {
|
export class TextDisplay {
|
||||||
speaker?: TemplateStringsArray | `mysteryEncounter:${string}`;
|
speaker?: TemplateStringsArray | `mysteryEncounter:${string}`;
|
||||||
@ -89,5 +88,4 @@ export function initMysteryEncounterDialogue() {
|
|||||||
allMysteryEncounterDialogue[MysteryEncounterType.TRAINING_SESSION] = TrainingSessionDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.TRAINING_SESSION] = TrainingSessionDialogue;
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxDialogue;
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerDialogue;
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.FIELD_TRIP] = FieldTripDialogue;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user