migrate department-store-sale encounter
This commit is contained in:
parent
c589689a6c
commit
d9e0957d40
|
@ -1,36 +0,0 @@
|
||||||
import MysteryEncounterDialogue from "#app/data/mystery-encounters/mystery-encounter-dialogue";
|
|
||||||
|
|
||||||
export const DepartmentStoreSaleDialogue: MysteryEncounterDialogue = {
|
|
||||||
intro: [
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:department_store_sale_intro_message"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "mysteryEncounter:department_store_sale_intro_dialogue",
|
|
||||||
speaker: "mysteryEncounter:department_store_sale_speaker"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
encounterOptionsDialogue: {
|
|
||||||
title: "mysteryEncounter:department_store_sale_title",
|
|
||||||
description: "mysteryEncounter:department_store_sale_description",
|
|
||||||
query: "mysteryEncounter:department_store_sale_query",
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
buttonLabel: "mysteryEncounter:department_store_sale_option_1_label",
|
|
||||||
buttonTooltip: "mysteryEncounter:department_store_sale_option_1_tooltip"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonLabel: "mysteryEncounter:department_store_sale_option_2_label",
|
|
||||||
buttonTooltip: "mysteryEncounter:department_store_sale_option_2_tooltip"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonLabel: "mysteryEncounter:department_store_sale_option_3_label",
|
|
||||||
buttonTooltip: "mysteryEncounter:department_store_sale_option_3_tooltip"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonLabel: "mysteryEncounter:department_store_sale_option_4_label",
|
|
||||||
buttonTooltip: "mysteryEncounter:department_store_sale_option_4_tooltip"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
|
@ -21,6 +21,9 @@ import {
|
||||||
leaveEncounterWithoutBattle,
|
leaveEncounterWithoutBattle,
|
||||||
} from "../mystery-encounter-utils";
|
} from "../mystery-encounter-utils";
|
||||||
|
|
||||||
|
/** i18n namespace for encounter */
|
||||||
|
const namespace = "mysteryEncounter:dark_deal";
|
||||||
|
|
||||||
// Exclude Ultra Beasts, Paradox, Necrozma, Eternatus, and egg-locked mythicals
|
// Exclude Ultra Beasts, Paradox, Necrozma, Eternatus, and egg-locked mythicals
|
||||||
const excludedBosses = [
|
const excludedBosses = [
|
||||||
Species.NECROZMA,
|
Species.NECROZMA,
|
||||||
|
@ -88,31 +91,31 @@ export const DarkDealEncounter: MysteryEncounter =
|
||||||
])
|
])
|
||||||
.withIntroDialogue([
|
.withIntroDialogue([
|
||||||
{
|
{
|
||||||
text: "mysteryEncounter:dark_deal_intro_message",
|
text: `${namespace}_intro_message`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: "mysteryEncounter:dark_deal_speaker",
|
speaker: `${namespace}_speaker`,
|
||||||
text: "mysteryEncounter:dark_deal_intro_dialogue",
|
text: `${namespace}_intro_dialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withSceneWaveRangeRequirement(30, 180) // waves 30 to 180
|
.withSceneWaveRangeRequirement(30, 180) // waves 30 to 180
|
||||||
.withScenePartySizeRequirement(2, 6) // Must have at least 2 pokemon in party
|
.withScenePartySizeRequirement(2, 6) // Must have at least 2 pokemon in party
|
||||||
.withCatchAllowed(true)
|
.withCatchAllowed(true)
|
||||||
.withTitle("mysteryEncounter:dark_deal_title")
|
.withTitle(`${namespace}_title`)
|
||||||
.withDescription("mysteryEncounter:dark_deal_description")
|
.withDescription(`${namespace}_description`)
|
||||||
.withQuery("mysteryEncounter:dark_deal_query")
|
.withQuery(`${namespace}_query`)
|
||||||
.withOption(
|
.withOption(
|
||||||
new MysteryEncounterOptionBuilder()
|
new MysteryEncounterOptionBuilder()
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: "mysteryEncounter:dark_deal_option_1_label",
|
buttonLabel: `${namespace}_option_1_label`,
|
||||||
buttonTooltip: "mysteryEncounter:dark_deal_option_1_tooltip",
|
buttonTooltip: `${namespace}_option_1_tooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: "mysteryEncounter:dark_deal_speaker",
|
speaker: `${namespace}_speaker`,
|
||||||
text: "mysteryEncounter:dark_deal_option_1_selected",
|
text: `${namespace}_option_1_selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "mysteryEncounter:dark_deal_option_1_selected_message",
|
text: `${namespace}_option_1_selected_message`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
@ -180,12 +183,12 @@ export const DarkDealEncounter: MysteryEncounter =
|
||||||
)
|
)
|
||||||
.withSimpleOption(
|
.withSimpleOption(
|
||||||
{
|
{
|
||||||
buttonLabel: "mysteryEncounter:dark_deal_option_2_label",
|
buttonLabel: `${namespace}_option_2_label`,
|
||||||
buttonTooltip: "mysteryEncounter:dark_deal_option_2_tooltip",
|
buttonTooltip: `${namespace}_option_2_tooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: "mysteryEncounter:dark_deal_speaker",
|
speaker: `${namespace}_speaker`,
|
||||||
text: "mysteryEncounter:dark_deal_option_2_selected",
|
text: `${namespace}_option_2_selected`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -198,7 +201,7 @@ export const DarkDealEncounter: MysteryEncounter =
|
||||||
)
|
)
|
||||||
.withOutroDialogue([
|
.withOutroDialogue([
|
||||||
{
|
{
|
||||||
text: "mysteryEncounter:dark_deal_outro"
|
text: `${namespace}_outro`
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -7,29 +7,54 @@ import { randSeedInt } from "#app/utils";
|
||||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import BattleScene from "../../../battle-scene";
|
import BattleScene from "../../../battle-scene";
|
||||||
import MysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier } from "../mystery-encounter";
|
import MysteryEncounter, {
|
||||||
|
MysteryEncounterBuilder,
|
||||||
|
MysteryEncounterTier,
|
||||||
|
} from "../mystery-encounter";
|
||||||
|
|
||||||
export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBuilder
|
/** i18n namespace for encounter */
|
||||||
.withEncounterType(MysteryEncounterType.DEPARTMENT_STORE_SALE)
|
const namespace = "mysteryEncounter:department_store_sale";
|
||||||
|
|
||||||
|
export const DepartmentStoreSaleEncounter: MysteryEncounter =
|
||||||
|
MysteryEncounterBuilder.withEncounterType(
|
||||||
|
MysteryEncounterType.DEPARTMENT_STORE_SALE
|
||||||
|
)
|
||||||
.withEncounterTier(MysteryEncounterTier.COMMON)
|
.withEncounterTier(MysteryEncounterTier.COMMON)
|
||||||
|
.withSceneWaveRangeRequirement(10, 100)
|
||||||
.withIntroSpriteConfigs([
|
.withIntroSpriteConfigs([
|
||||||
{
|
{
|
||||||
spriteKey: "b2w2_lady",
|
spriteKey: "b2w2_lady",
|
||||||
fileRoot: "mystery-encounters",
|
fileRoot: "mystery-encounters",
|
||||||
hasShadow: true,
|
hasShadow: true,
|
||||||
x: -20
|
x: -20,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
spriteKey: Species.FURFROU.toString(),
|
spriteKey: Species.FURFROU.toString(),
|
||||||
fileRoot: "pokemon",
|
fileRoot: "pokemon",
|
||||||
hasShadow: true,
|
hasShadow: true,
|
||||||
repeat: true,
|
repeat: true,
|
||||||
x: 30
|
x: 30,
|
||||||
}
|
},
|
||||||
|
])
|
||||||
|
.withIntroDialogue([
|
||||||
|
{
|
||||||
|
text: `${namespace}_intro_message`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `${namespace}_intro_dialogue`,
|
||||||
|
speaker: `${namespace}_speaker`,
|
||||||
|
},
|
||||||
])
|
])
|
||||||
// .withHideIntroVisuals(false)
|
// .withHideIntroVisuals(false)
|
||||||
.withSceneWaveRangeRequirement(10, 100)
|
.withTitle(`${namespace}_title`)
|
||||||
.withSimpleOption(async (scene: BattleScene) => {
|
.withDescription(`${namespace}_description`)
|
||||||
|
.withQuery(`${namespace}_query`)
|
||||||
|
.withSimpleOption(
|
||||||
|
{
|
||||||
|
buttonLabel: `${namespace}_option_1_label`,
|
||||||
|
buttonTooltip: `${namespace}_option_1_tooltip`,
|
||||||
|
},
|
||||||
|
async (scene: BattleScene) => {
|
||||||
// Choose TMs
|
// Choose TMs
|
||||||
const modifiers = [];
|
const modifiers = [];
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
@ -46,10 +71,19 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBu
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: modifiers, fillRemaining: false });
|
setEncounterRewards(scene, {
|
||||||
|
guaranteedModifierTypeFuncs: modifiers,
|
||||||
|
fillRemaining: false,
|
||||||
|
});
|
||||||
leaveEncounterWithoutBattle(scene);
|
leaveEncounterWithoutBattle(scene);
|
||||||
})
|
}
|
||||||
.withSimpleOption(async (scene: BattleScene) => {
|
)
|
||||||
|
.withSimpleOption(
|
||||||
|
{
|
||||||
|
buttonLabel: `${namespace}_option_2_label`,
|
||||||
|
buttonTooltip: `${namespace}_option_2_tooltip`,
|
||||||
|
},
|
||||||
|
async (scene: BattleScene) => {
|
||||||
// Choose Vitamins
|
// Choose Vitamins
|
||||||
const modifiers = [];
|
const modifiers = [];
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
@ -64,10 +98,19 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBu
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: modifiers, fillRemaining: false });
|
setEncounterRewards(scene, {
|
||||||
|
guaranteedModifierTypeFuncs: modifiers,
|
||||||
|
fillRemaining: false,
|
||||||
|
});
|
||||||
leaveEncounterWithoutBattle(scene);
|
leaveEncounterWithoutBattle(scene);
|
||||||
})
|
}
|
||||||
.withSimpleOption(async (scene: BattleScene) => {
|
)
|
||||||
|
.withSimpleOption(
|
||||||
|
{
|
||||||
|
buttonLabel: `${namespace}_option_3_label`,
|
||||||
|
buttonTooltip: `${namespace}_option_3_tooltip`,
|
||||||
|
},
|
||||||
|
async (scene: BattleScene) => {
|
||||||
// Choose X Items
|
// Choose X Items
|
||||||
const modifiers = [];
|
const modifiers = [];
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
@ -82,10 +125,19 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBu
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: modifiers, fillRemaining: false });
|
setEncounterRewards(scene, {
|
||||||
|
guaranteedModifierTypeFuncs: modifiers,
|
||||||
|
fillRemaining: false,
|
||||||
|
});
|
||||||
leaveEncounterWithoutBattle(scene);
|
leaveEncounterWithoutBattle(scene);
|
||||||
})
|
}
|
||||||
.withSimpleOption(async (scene: BattleScene) => {
|
)
|
||||||
|
.withSimpleOption(
|
||||||
|
{
|
||||||
|
buttonLabel: `${namespace}_option_4_label`,
|
||||||
|
buttonTooltip: `${namespace}_option_4_tooltip`,
|
||||||
|
},
|
||||||
|
async (scene: BattleScene) => {
|
||||||
// Choose Pokeballs
|
// Choose Pokeballs
|
||||||
const modifiers = [];
|
const modifiers = [];
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
@ -104,7 +156,11 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBu
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: modifiers, fillRemaining: false });
|
setEncounterRewards(scene, {
|
||||||
|
guaranteedModifierTypeFuncs: modifiers,
|
||||||
|
fillRemaining: false,
|
||||||
|
});
|
||||||
leaveEncounterWithoutBattle(scene);
|
leaveEncounterWithoutBattle(scene);
|
||||||
})
|
}
|
||||||
|
)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { MysteriousChestDialogue } from "#app/data/mystery-encounters/dialogue/m
|
||||||
import { FightOrFlightDialogue } from "#app/data/mystery-encounters/dialogue/fight-or-flight-dialogue";
|
import { FightOrFlightDialogue } from "#app/data/mystery-encounters/dialogue/fight-or-flight-dialogue";
|
||||||
import { TrainingSessionDialogue } from "#app/data/mystery-encounters/dialogue/training-session-dialogue";
|
import { TrainingSessionDialogue } from "#app/data/mystery-encounters/dialogue/training-session-dialogue";
|
||||||
import { SleepingSnorlaxDialogue } from "./dialogue/sleeping-snorlax-dialogue";
|
import { SleepingSnorlaxDialogue } from "./dialogue/sleeping-snorlax-dialogue";
|
||||||
import { DepartmentStoreSaleDialogue } from "#app/data/mystery-encounters/dialogue/department-store-sale-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";
|
import { FieldTripDialogue } from "#app/data/mystery-encounters/dialogue/field-trip-dialogue";
|
||||||
|
@ -89,7 +88,6 @@ export function initMysteryEncounterDialogue() {
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.FIGHT_OR_FLIGHT] = FightOrFlightDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.FIGHT_OR_FLIGHT] = FightOrFlightDialogue;
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.TRAINING_SESSION] = TrainingSessionDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.TRAINING_SESSION] = TrainingSessionDialogue;
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxDialogue;
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.DEPARTMENT_STORE_SALE] = DepartmentStoreSaleDialogue;
|
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerDialogue;
|
||||||
allMysteryEncounterDialogue[MysteryEncounterType.FIELD_TRIP] = FieldTripDialogue;
|
allMysteryEncounterDialogue[MysteryEncounterType.FIELD_TRIP] = FieldTripDialogue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue