mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
Compare commits
10 Commits
fbefde83c4
...
76ca143477
Author | SHA1 | Date | |
---|---|---|---|
|
76ca143477 | ||
|
19af9bdb8b | ||
|
8e61b642a3 | ||
|
da7903ab92 | ||
|
70e7f8b4d4 | ||
|
5a445e3633 | ||
|
c18c2e0dce | ||
|
554b154e8b | ||
|
028bc1ed1a | ||
|
c657e61312 |
@ -27,13 +27,7 @@ import { UiInputs } from "#app/ui-inputs";
|
|||||||
import { biomeDepths, getBiomeName } from "#balance/biomes";
|
import { biomeDepths, getBiomeName } from "#balance/biomes";
|
||||||
import { pokemonPrevolutions } from "#balance/pokemon-evolutions";
|
import { pokemonPrevolutions } from "#balance/pokemon-evolutions";
|
||||||
import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#balance/starters";
|
import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#balance/starters";
|
||||||
import {
|
import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets } from "#data/battle-anims";
|
||||||
initCommonAnims,
|
|
||||||
initMoveAnim,
|
|
||||||
loadCommonAnimAssets,
|
|
||||||
loadMoveAnimAssets,
|
|
||||||
populateAnims,
|
|
||||||
} from "#data/battle-anims";
|
|
||||||
import { allAbilities, allMoves, allSpecies, modifierTypes } from "#data/data-lists";
|
import { allAbilities, allMoves, allSpecies, modifierTypes } from "#data/data-lists";
|
||||||
import { battleSpecDialogue } from "#data/dialogue";
|
import { battleSpecDialogue } from "#data/dialogue";
|
||||||
import type { SpeciesFormChangeTrigger } from "#data/form-change-triggers";
|
import type { SpeciesFormChangeTrigger } from "#data/form-change-triggers";
|
||||||
@ -388,7 +382,6 @@ export class BattleScene extends SceneBase {
|
|||||||
const defaultMoves = [MoveId.TACKLE, MoveId.TAIL_WHIP, MoveId.FOCUS_ENERGY, MoveId.STRUGGLE];
|
const defaultMoves = [MoveId.TACKLE, MoveId.TAIL_WHIP, MoveId.FOCUS_ENERGY, MoveId.STRUGGLE];
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
populateAnims(),
|
|
||||||
this.initVariantData(),
|
this.initVariantData(),
|
||||||
initCommonAnims().then(() => loadCommonAnimAssets(true)),
|
initCommonAnims().then(() => loadCommonAnimAssets(true)),
|
||||||
Promise.all(defaultMoves.map(m => initMoveAnim(m))).then(() => loadMoveAnimAssets(defaultMoves, true)),
|
Promise.all(defaultMoves.map(m => initMoveAnim(m))).then(() => loadMoveAnimAssets(defaultMoves, true)),
|
||||||
|
@ -404,22 +404,18 @@ export const chargeAnims = new Map<ChargeAnim, AnimConfig | [AnimConfig, AnimCon
|
|||||||
export const commonAnims = new Map<CommonAnim, AnimConfig>();
|
export const commonAnims = new Map<CommonAnim, AnimConfig>();
|
||||||
export const encounterAnims = new Map<EncounterAnim, AnimConfig>();
|
export const encounterAnims = new Map<EncounterAnim, AnimConfig>();
|
||||||
|
|
||||||
export function initCommonAnims(): Promise<void> {
|
export async function initCommonAnims(): Promise<void> {
|
||||||
return new Promise(resolve => {
|
const commonAnimFetches: Promise<Map<CommonAnim, AnimConfig>>[] = [];
|
||||||
const commonAnimNames = getEnumKeys(CommonAnim);
|
for (const commonAnimName of getEnumKeys(CommonAnim)) {
|
||||||
const commonAnimIds = getEnumValues(CommonAnim);
|
const commonAnimId = CommonAnim[commonAnimName];
|
||||||
const commonAnimFetches: Promise<Map<CommonAnim, AnimConfig>>[] = [];
|
commonAnimFetches.push(
|
||||||
for (let ca = 0; ca < commonAnimIds.length; ca++) {
|
globalScene
|
||||||
const commonAnimId = commonAnimIds[ca];
|
.cachedFetch(`./battle-anims/common-${toKebabCase(commonAnimName)}.json`)
|
||||||
commonAnimFetches.push(
|
.then(response => response.json())
|
||||||
globalScene
|
.then(cas => commonAnims.set(commonAnimId, new AnimConfig(cas))),
|
||||||
.cachedFetch(`./battle-anims/common-${toKebabCase(commonAnimNames[ca])}.json`)
|
);
|
||||||
.then(response => response.json())
|
}
|
||||||
.then(cas => commonAnims.set(commonAnimId, new AnimConfig(cas))),
|
await Promise.allSettled(commonAnimFetches);
|
||||||
);
|
|
||||||
}
|
|
||||||
Promise.allSettled(commonAnimFetches).then(() => resolve());
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initMoveAnim(move: MoveId): Promise<void> {
|
export function initMoveAnim(move: MoveId): Promise<void> {
|
||||||
@ -1396,279 +1392,3 @@ export class EncounterBattleAnim extends BattleAnim {
|
|||||||
return this.oppAnim;
|
return this.oppAnim;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function populateAnims() {
|
|
||||||
const commonAnimNames = getEnumKeys(CommonAnim).map(k => k.toLowerCase());
|
|
||||||
const commonAnimMatchNames = commonAnimNames.map(k => k.replace(/_/g, ""));
|
|
||||||
const commonAnimIds = getEnumValues(CommonAnim);
|
|
||||||
const chargeAnimNames = getEnumKeys(ChargeAnim).map(k => k.toLowerCase());
|
|
||||||
const chargeAnimMatchNames = chargeAnimNames.map(k => k.replace(/_/g, " "));
|
|
||||||
const chargeAnimIds = getEnumValues(ChargeAnim);
|
|
||||||
const commonNamePattern = /name: (?:Common:)?(Opp )?(.*)/;
|
|
||||||
const moveNameToId = {};
|
|
||||||
// Exclude MoveId.NONE;
|
|
||||||
for (const move of getEnumValues(MoveId).slice(1)) {
|
|
||||||
// KARATE_CHOP => KARATECHOP
|
|
||||||
const moveName = MoveId[move].toUpperCase().replace(/_/g, "");
|
|
||||||
moveNameToId[moveName] = move;
|
|
||||||
}
|
|
||||||
|
|
||||||
const seNames: string[] = []; //(await fs.readdir('./public/audio/se/battle_anims/')).map(se => se.toString());
|
|
||||||
|
|
||||||
const animsData: any[] = []; //battleAnimRawData.split('!ruby/array:PBAnimation').slice(1); // TODO: add a proper type
|
|
||||||
for (let a = 0; a < animsData.length; a++) {
|
|
||||||
const fields = animsData[a].split("@").slice(1);
|
|
||||||
|
|
||||||
const nameField = fields.find(f => f.startsWith("name: "));
|
|
||||||
|
|
||||||
let isOppMove: boolean | undefined;
|
|
||||||
let commonAnimId: CommonAnim | undefined;
|
|
||||||
let chargeAnimId: ChargeAnim | undefined;
|
|
||||||
if (!nameField.startsWith("name: Move:") && !(isOppMove = nameField.startsWith("name: OppMove:"))) {
|
|
||||||
const nameMatch = commonNamePattern.exec(nameField)!; // TODO: is this bang correct?
|
|
||||||
const name = nameMatch[2].toLowerCase();
|
|
||||||
if (commonAnimMatchNames.indexOf(name) > -1) {
|
|
||||||
commonAnimId = commonAnimIds[commonAnimMatchNames.indexOf(name)];
|
|
||||||
} else if (chargeAnimMatchNames.indexOf(name) > -1) {
|
|
||||||
isOppMove = nameField.startsWith("name: Opp ");
|
|
||||||
chargeAnimId = chargeAnimIds[chargeAnimMatchNames.indexOf(name)];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const nameIndex = nameField.indexOf(":", 5) + 1;
|
|
||||||
const animName = nameField.slice(nameIndex, nameField.indexOf("\n", nameIndex));
|
|
||||||
if (!moveNameToId.hasOwnProperty(animName) && !commonAnimId && !chargeAnimId) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const anim = commonAnimId || chargeAnimId ? new AnimConfig() : new AnimConfig();
|
|
||||||
if (anim instanceof AnimConfig) {
|
|
||||||
(anim as AnimConfig).id = moveNameToId[animName];
|
|
||||||
}
|
|
||||||
if (commonAnimId) {
|
|
||||||
commonAnims.set(commonAnimId, anim);
|
|
||||||
} else if (chargeAnimId) {
|
|
||||||
chargeAnims.set(chargeAnimId, !isOppMove ? anim : [chargeAnims.get(chargeAnimId) as AnimConfig, anim]);
|
|
||||||
} else {
|
|
||||||
moveAnims.set(
|
|
||||||
moveNameToId[animName],
|
|
||||||
!isOppMove ? (anim as AnimConfig) : [moveAnims.get(moveNameToId[animName]) as AnimConfig, anim as AnimConfig],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
for (let f = 0; f < fields.length; f++) {
|
|
||||||
const field = fields[f];
|
|
||||||
const fieldName = field.slice(0, field.indexOf(":"));
|
|
||||||
const fieldData = field.slice(fieldName.length + 1, field.lastIndexOf("\n")).trim();
|
|
||||||
switch (fieldName) {
|
|
||||||
case "array": {
|
|
||||||
const framesData = fieldData.split(" - - - ").slice(1);
|
|
||||||
for (let fd = 0; fd < framesData.length; fd++) {
|
|
||||||
anim.frames.push([]);
|
|
||||||
const frameData = framesData[fd];
|
|
||||||
const focusFramesData = frameData.split(" - - ");
|
|
||||||
for (let tf = 0; tf < focusFramesData.length; tf++) {
|
|
||||||
const values = focusFramesData[tf].replace(/ {6}- /g, "").split("\n");
|
|
||||||
const targetFrame = new AnimFrame(
|
|
||||||
Number.parseFloat(values[0]),
|
|
||||||
Number.parseFloat(values[1]),
|
|
||||||
Number.parseFloat(values[2]),
|
|
||||||
Number.parseFloat(values[11]),
|
|
||||||
Number.parseFloat(values[3]),
|
|
||||||
Number.parseInt(values[4]) === 1,
|
|
||||||
Number.parseInt(values[6]) === 1,
|
|
||||||
Number.parseInt(values[5]),
|
|
||||||
Number.parseInt(values[7]),
|
|
||||||
Number.parseInt(values[8]),
|
|
||||||
Number.parseInt(values[12]),
|
|
||||||
Number.parseInt(values[13]),
|
|
||||||
Number.parseInt(values[14]),
|
|
||||||
Number.parseInt(values[15]),
|
|
||||||
Number.parseInt(values[16]),
|
|
||||||
Number.parseInt(values[17]),
|
|
||||||
Number.parseInt(values[18]),
|
|
||||||
Number.parseInt(values[19]),
|
|
||||||
Number.parseInt(values[21]),
|
|
||||||
Number.parseInt(values[22]),
|
|
||||||
Number.parseInt(values[23]),
|
|
||||||
Number.parseInt(values[24]),
|
|
||||||
Number.parseInt(values[20]) === 1,
|
|
||||||
Number.parseInt(values[25]),
|
|
||||||
Number.parseInt(values[26]) as AnimFocus,
|
|
||||||
);
|
|
||||||
anim.frames[fd].push(targetFrame);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "graphic": {
|
|
||||||
const graphic = fieldData !== "''" ? fieldData : "";
|
|
||||||
anim.graphic = graphic.indexOf(".") > -1 ? graphic.slice(0, fieldData.indexOf(".")) : graphic;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "timing": {
|
|
||||||
const timingEntries = fieldData.split("- !ruby/object:PBAnimTiming ").slice(1);
|
|
||||||
for (let t = 0; t < timingEntries.length; t++) {
|
|
||||||
const timingData = timingEntries[t]
|
|
||||||
.replace(/\n/g, " ")
|
|
||||||
.replace(/[ ]{2,}/g, " ")
|
|
||||||
.replace(/[a-z]+: ! '', /gi, "")
|
|
||||||
.replace(/name: (.*?),/, 'name: "$1",')
|
|
||||||
.replace(
|
|
||||||
/flashColor: !ruby\/object:Color { alpha: ([\d.]+), blue: ([\d.]+), green: ([\d.]+), red: ([\d.]+)}/,
|
|
||||||
"flashRed: $4, flashGreen: $3, flashBlue: $2, flashAlpha: $1",
|
|
||||||
);
|
|
||||||
const frameIndex = Number.parseInt(/frame: (\d+)/.exec(timingData)![1]); // TODO: is the bang correct?
|
|
||||||
let resourceName = /name: "(.*?)"/.exec(timingData)![1].replace("''", ""); // TODO: is the bang correct?
|
|
||||||
const timingType = Number.parseInt(/timingType: (\d)/.exec(timingData)![1]); // TODO: is the bang correct?
|
|
||||||
let timedEvent: AnimTimedEvent | undefined;
|
|
||||||
switch (timingType) {
|
|
||||||
case 0:
|
|
||||||
if (resourceName && resourceName.indexOf(".") === -1) {
|
|
||||||
let ext: string | undefined;
|
|
||||||
["wav", "mp3", "m4a"].every(e => {
|
|
||||||
if (seNames.indexOf(`${resourceName}.${e}`) > -1) {
|
|
||||||
ext = e;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
if (!ext) {
|
|
||||||
ext = ".wav";
|
|
||||||
}
|
|
||||||
resourceName += `.${ext}`;
|
|
||||||
}
|
|
||||||
timedEvent = new AnimTimedSoundEvent(frameIndex, resourceName);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
timedEvent = new AnimTimedAddBgEvent(frameIndex, resourceName.slice(0, resourceName.indexOf(".")));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
timedEvent = new AnimTimedUpdateBgEvent(frameIndex, resourceName.slice(0, resourceName.indexOf(".")));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!timedEvent) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const propPattern = /([a-z]+): (.*?)(?:,|\})/gi;
|
|
||||||
let propMatch: RegExpExecArray;
|
|
||||||
while ((propMatch = propPattern.exec(timingData)!)) {
|
|
||||||
// TODO: is this bang correct?
|
|
||||||
const prop = propMatch[1];
|
|
||||||
let value: any = propMatch[2];
|
|
||||||
switch (prop) {
|
|
||||||
case "bgX":
|
|
||||||
case "bgY":
|
|
||||||
value = Number.parseFloat(value);
|
|
||||||
break;
|
|
||||||
case "volume":
|
|
||||||
case "pitch":
|
|
||||||
case "opacity":
|
|
||||||
case "colorRed":
|
|
||||||
case "colorGreen":
|
|
||||||
case "colorBlue":
|
|
||||||
case "colorAlpha":
|
|
||||||
case "duration":
|
|
||||||
case "flashScope":
|
|
||||||
case "flashRed":
|
|
||||||
case "flashGreen":
|
|
||||||
case "flashBlue":
|
|
||||||
case "flashAlpha":
|
|
||||||
case "flashDuration":
|
|
||||||
value = Number.parseInt(value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (timedEvent.hasOwnProperty(prop)) {
|
|
||||||
timedEvent[prop] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!anim.frameTimedEvents.has(frameIndex)) {
|
|
||||||
anim.frameTimedEvents.set(frameIndex, []);
|
|
||||||
}
|
|
||||||
anim.frameTimedEvents.get(frameIndex)!.push(timedEvent); // TODO: is this bang correct?
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "position":
|
|
||||||
anim.position = Number.parseInt(fieldData);
|
|
||||||
break;
|
|
||||||
case "hue":
|
|
||||||
anim.hue = Number.parseInt(fieldData);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// biome-ignore lint/correctness/noUnusedVariables: used in commented code
|
|
||||||
const animReplacer = (k, v) => {
|
|
||||||
if (k === "id" && !v) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (v instanceof Map) {
|
|
||||||
return Object.fromEntries(v);
|
|
||||||
}
|
|
||||||
if (v instanceof AnimTimedEvent) {
|
|
||||||
v["eventType"] = v.getEventType();
|
|
||||||
}
|
|
||||||
return v;
|
|
||||||
};
|
|
||||||
|
|
||||||
const animConfigProps = ["id", "graphic", "frames", "frameTimedEvents", "position", "hue"];
|
|
||||||
const animFrameProps = [
|
|
||||||
"x",
|
|
||||||
"y",
|
|
||||||
"zoomX",
|
|
||||||
"zoomY",
|
|
||||||
"angle",
|
|
||||||
"mirror",
|
|
||||||
"visible",
|
|
||||||
"blendType",
|
|
||||||
"target",
|
|
||||||
"graphicFrame",
|
|
||||||
"opacity",
|
|
||||||
"color",
|
|
||||||
"tone",
|
|
||||||
"flash",
|
|
||||||
"locked",
|
|
||||||
"priority",
|
|
||||||
"focus",
|
|
||||||
];
|
|
||||||
const propSets = [animConfigProps, animFrameProps];
|
|
||||||
|
|
||||||
// biome-ignore lint/correctness/noUnusedVariables: used in commented code
|
|
||||||
const animComparator = (a: Element, b: Element) => {
|
|
||||||
let props: string[];
|
|
||||||
for (let p = 0; p < propSets.length; p++) {
|
|
||||||
props = propSets[p];
|
|
||||||
// @ts-expect-error TODO
|
|
||||||
const ai = props.indexOf(a.key);
|
|
||||||
if (ai === -1) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// @ts-expect-error TODO
|
|
||||||
const bi = props.indexOf(b.key);
|
|
||||||
|
|
||||||
return ai < bi ? -1 : ai > bi ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*for (let ma of moveAnims.keys()) {
|
|
||||||
const data = moveAnims.get(ma);
|
|
||||||
(async () => {
|
|
||||||
await fs.writeFile(`../public/battle-anims/${Moves[ma].toLowerCase().replace(/\_/g, '-')}.json`, stringify(data, { replacer: animReplacer, cmp: animComparator, space: ' ' }));
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let ca of chargeAnims.keys()) {
|
|
||||||
const data = chargeAnims.get(ca);
|
|
||||||
(async () => {
|
|
||||||
await fs.writeFile(`../public/battle-anims/${chargeAnimNames[chargeAnimIds.indexOf(ca)].replace(/\_/g, '-')}.json`, stringify(data, { replacer: animReplacer, cmp: animComparator, space: ' ' }));
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let cma of commonAnims.keys()) {
|
|
||||||
const data = commonAnims.get(cma);
|
|
||||||
(async () => {
|
|
||||||
await fs.writeFile(`../public/battle-anims/common-${commonAnimNames[commonAnimIds.indexOf(cma)].replace(/\_/g, '-')}.json`, stringify(data, { replacer: animReplacer, cmp: animComparator, space: ' ' }));
|
|
||||||
})();
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
@ -82,7 +82,7 @@ export const ATrainersTestEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
encounter.dialogue.intro = [
|
encounter.dialogue.intro = [
|
||||||
{
|
{
|
||||||
speaker: `trainerNames:${trainerNameKey}`,
|
speaker: `trainerNames:${trainerNameKey}`,
|
||||||
text: `${namespace}:${trainerNameKey}.intro_dialogue`,
|
text: `${namespace}:${trainerNameKey}.introDialogue`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
encounter.options[0].dialogue!.selected = [
|
encounter.options[0].dialogue!.selected = [
|
||||||
|
@ -237,7 +237,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
modifierConfigs: bossModifierConfigs,
|
modifierConfigs: bossModifierConfigs,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.boss_enraged`);
|
queueEncounterMessage(`${namespace}:option.1.bossEnraged`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -300,7 +300,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
globalScene.addModifier(seedModifier, false, false, false, true);
|
globalScene.addModifier(seedModifier, false, false, false, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
queueEncounterMessage(`${namespace}:option.1.food_stash`);
|
queueEncounterMessage(`${namespace}:option.1.foodStash`);
|
||||||
};
|
};
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true }, undefined, givePartyPokemonReviverSeeds);
|
setEncounterRewards({ fillRemaining: true }, undefined, givePartyPokemonReviverSeeds);
|
||||||
|
@ -71,7 +71,7 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter = MysteryEncounterB
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -152,7 +152,7 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter = MysteryEncounterB
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
|
@ -254,7 +254,7 @@ export const BerriesAboundEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
undefined,
|
undefined,
|
||||||
doBerryRewards,
|
doBerryRewards,
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:option.2.selected_bad`);
|
await showEncounterText(`${namespace}:option.2.selectedBad`);
|
||||||
await initBattleWithEnemyConfig(config);
|
await initBattleWithEnemyConfig(config);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withOnInit(() => {
|
.withOnInit(() => {
|
||||||
@ -312,7 +312,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async () => {
|
.withPreOptionPhase(async () => {
|
||||||
// Player shows off their bug types
|
// Player shows off their bug types
|
||||||
@ -333,7 +333,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_0_to_1`,
|
text: `${namespace}:option.2.selected0To1`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else if (numBugTypes < 4) {
|
} else if (numBugTypes < 4) {
|
||||||
@ -344,7 +344,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_2_to_3`,
|
text: `${namespace}:option.2.selected2To3`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else if (numBugTypes < 6) {
|
} else if (numBugTypes < 6) {
|
||||||
@ -355,7 +355,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_4_to_5`,
|
text: `${namespace}:option.2.selected4To5`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
@ -398,7 +398,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_6`,
|
text: `${namespace}:option.2.selected6`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -421,17 +421,17 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.3.selected_dialogue`,
|
text: `${namespace}:option.3.selectedDialogue`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -476,7 +476,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
if (!hasValidItem) {
|
if (!hasValidItem) {
|
||||||
return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:option.3.invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -713,7 +713,7 @@ function doBugTypeMoveTutor(): Promise<void> {
|
|||||||
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO explain
|
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO explain
|
||||||
return new Promise<void>(async resolve => {
|
return new Promise<void>(async resolve => {
|
||||||
const moveOptions = globalScene.currentBattle.mysteryEncounter!.misc.moveTutorOptions;
|
const moveOptions = globalScene.currentBattle.mysteryEncounter!.misc.moveTutorOptions;
|
||||||
await showEncounterDialogue(`${namespace}:battle_won`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:battleWon`, `${namespace}:speaker`);
|
||||||
|
|
||||||
const moveInfoOverlay = new MoveInfoOverlay({
|
const moveInfoOverlay = new MoveInfoOverlay({
|
||||||
delayVisibility: false,
|
delayVisibility: false,
|
||||||
@ -748,7 +748,7 @@ function doBugTypeMoveTutor(): Promise<void> {
|
|||||||
|
|
||||||
const result = await selectOptionThenPokemon(
|
const result = await selectOptionThenPokemon(
|
||||||
optionSelectItems,
|
optionSelectItems,
|
||||||
`${namespace}:teach_move_prompt`,
|
`${namespace}:teachMovePrompt`,
|
||||||
undefined,
|
undefined,
|
||||||
onHoverOverCancel,
|
onHoverOverCancel,
|
||||||
);
|
);
|
||||||
|
@ -119,7 +119,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -233,7 +233,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
// After the battle, offer the player the opportunity to permanently swap ability
|
// After the battle, offer the player the opportunity to permanently swap ability
|
||||||
const abilityWasSwapped = await handleSwapAbility();
|
const abilityWasSwapped = await handleSwapAbility();
|
||||||
if (abilityWasSwapped) {
|
if (abilityWasSwapped) {
|
||||||
await showEncounterText(`${namespace}:option.1.ability_gained`);
|
await showEncounterText(`${namespace}:option.1.abilityGained`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Play animations once ability swap is complete
|
// Play animations once ability swap is complete
|
||||||
@ -267,10 +267,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected_2`,
|
text: `${namespace}:option.2.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected_3`,
|
text: `${namespace}:option.2.selected3`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -359,10 +359,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected_2`,
|
text: `${namespace}:option.3.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected_3`,
|
text: `${namespace}:option.3.selected3`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -432,8 +432,8 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
async function handleSwapAbility() {
|
async function handleSwapAbility() {
|
||||||
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO: Consider refactoring to avoid async promise executor
|
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO: Consider refactoring to avoid async promise executor
|
||||||
return new Promise<boolean>(async resolve => {
|
return new Promise<boolean>(async resolve => {
|
||||||
await showEncounterDialogue(`${namespace}:option.1.apply_ability_dialogue`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:option.1.applyAbilityDialogue`, `${namespace}:speaker`);
|
||||||
await showEncounterText(`${namespace}:option.1.apply_ability_message`);
|
await showEncounterText(`${namespace}:option.1.applyAbilityMessage`);
|
||||||
|
|
||||||
globalScene.ui.setMode(UiMode.MESSAGE).then(() => {
|
globalScene.ui.setMode(UiMode.MESSAGE).then(() => {
|
||||||
displayYesNoOptions(resolve);
|
displayYesNoOptions(resolve);
|
||||||
@ -442,7 +442,7 @@ async function handleSwapAbility() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function displayYesNoOptions(resolve) {
|
function displayYesNoOptions(resolve) {
|
||||||
showEncounterText(`${namespace}:option.1.ability_prompt`, null, 500, false);
|
showEncounterText(`${namespace}:option.1.abilityPrompt`, null, 500, false);
|
||||||
const fullOptions = [
|
const fullOptions = [
|
||||||
{
|
{
|
||||||
label: i18next.t("menu:yes"),
|
label: i18next.t("menu:yes"),
|
||||||
|
@ -174,7 +174,7 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
// Gets +1 to all stats except SPD on battle start
|
// Gets +1 to all stats except SPD on battle start
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.boss_enraged`);
|
queueEncounterMessage(`${namespace}:option.1.bossEnraged`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -273,8 +273,8 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -316,7 +316,7 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
}
|
}
|
||||||
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -99,6 +99,7 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
|||||||
MysteryEncounterType.DARK_DEAL,
|
MysteryEncounterType.DARK_DEAL,
|
||||||
)
|
)
|
||||||
.withEncounterTier(MysteryEncounterTier.ROGUE)
|
.withEncounterTier(MysteryEncounterTier.ROGUE)
|
||||||
|
.withDisallowedChallenges(Challenges.HARDCORE)
|
||||||
.withIntroSpriteConfigs([
|
.withIntroSpriteConfigs([
|
||||||
{
|
{
|
||||||
spriteKey: "dark_deal_scientist",
|
spriteKey: "dark_deal_scientist",
|
||||||
@ -118,7 +119,7 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withSceneWaveRangeRequirement(30, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES[1])
|
.withSceneWaveRangeRequirement(30, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES[1])
|
||||||
@ -136,10 +137,10 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
|||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.1.selected_dialogue`,
|
text: `${namespace}:option.1.selectedDialogue`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected_message`,
|
text: `${namespace}:option.1.selectedMessage`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
@ -193,7 +193,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -229,7 +229,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
// If pokemon has valid item, it can be selected
|
// If pokemon has valid item, it can be selected
|
||||||
const meetsReqs = encounter.options[1].pokemonMeetsPrimaryRequirements(pokemon);
|
const meetsReqs = encounter.options[1].pokemonMeetsPrimaryRequirements(pokemon);
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -303,7 +303,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -341,7 +341,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
// If pokemon has valid item, it can be selected
|
// If pokemon has valid item, it can be selected
|
||||||
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -43,7 +43,7 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBu
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
@ -56,7 +56,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -70,7 +70,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -118,7 +118,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -166,7 +166,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -226,7 +226,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:incorrect_exp`,
|
text: `${namespace}:incorrectExp`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
setEncounterExp(
|
setEncounterExp(
|
||||||
@ -243,7 +243,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:correct_exp`,
|
text: `${namespace}:correctExp`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
setEncounterExp([pokemon.id], 100);
|
setEncounterExp([pokemon.id], 100);
|
||||||
|
@ -247,7 +247,7 @@ export const FieryFalloutEncounter: MysteryEncounter = MysteryEncounterBuilder.w
|
|||||||
// Burn applied
|
// Burn applied
|
||||||
encounter.setDialogueToken("burnedPokemon", chosenPokemon.getNameToRender());
|
encounter.setDialogueToken("burnedPokemon", chosenPokemon.getNameToRender());
|
||||||
encounter.setDialogueToken("abilityName", allAbilities[AbilityId.HEATPROOF].name);
|
encounter.setDialogueToken("abilityName", allAbilities[AbilityId.HEATPROOF].name);
|
||||||
queueEncounterMessage(`${namespace}:option.2.target_burned`);
|
queueEncounterMessage(`${namespace}:option.2.targetBurned`);
|
||||||
|
|
||||||
// Also permanently change the burned Pokemon's ability to Heatproof
|
// Also permanently change the burned Pokemon's ability to Heatproof
|
||||||
applyAbilityOverrideToPokemon(chosenPokemon, AbilityId.HEATPROOF);
|
applyAbilityOverrideToPokemon(chosenPokemon, AbilityId.HEATPROOF);
|
||||||
@ -269,7 +269,7 @@ export const FieryFalloutEncounter: MysteryEncounter = MysteryEncounterBuilder.w
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -313,6 +313,6 @@ function giveLeadPokemonAttackTypeBoostItem() {
|
|||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
encounter.setDialogueToken("itemName", boosterModifierType.name);
|
encounter.setDialogueToken("itemName", boosterModifierType.name);
|
||||||
encounter.setDialogueToken("leadPokemon", leadPokemon.getNameToRender());
|
encounter.setDialogueToken("leadPokemon", leadPokemon.getNameToRender());
|
||||||
queueEncounterMessage(`${namespace}:found_item`);
|
queueEncounterMessage(`${namespace}:foundItem`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
isBoss: true,
|
isBoss: true,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
|
queueEncounterMessage(`${namespace}:option.1.statBoost`);
|
||||||
// Randomly boost 1 stat 2 stages
|
// Randomly boost 1 stat 2 stages
|
||||||
// Cannot boost Spd, Acc, or Evasion
|
// Cannot boost Spd, Acc, or Evasion
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
@ -165,7 +165,7 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -78,7 +78,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
|||||||
.withIntroDialogue([
|
.withIntroDialogue([
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.setLocalizationKey(`${namespace}`)
|
.setLocalizationKey(`${namespace}`)
|
||||||
@ -118,7 +118,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be selected
|
// Only Pokemon that are not KOed/legal can be selected
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -284,25 +284,25 @@ function handleNextTurn() {
|
|||||||
guaranteedModifierTypeFuncs: [modifierTypes.MULTI_LENS],
|
guaranteedModifierTypeFuncs: [modifierTypes.MULTI_LENS],
|
||||||
fillRemaining: false,
|
fillRemaining: false,
|
||||||
});
|
});
|
||||||
resultMessageKey = `${namespace}:best_result`;
|
resultMessageKey = `${namespace}:bestResult`;
|
||||||
} else if (healthRatio < 0.15) {
|
} else if (healthRatio < 0.15) {
|
||||||
// 2nd prize
|
// 2nd prize
|
||||||
setEncounterRewards({
|
setEncounterRewards({
|
||||||
guaranteedModifierTypeFuncs: [modifierTypes.SCOPE_LENS],
|
guaranteedModifierTypeFuncs: [modifierTypes.SCOPE_LENS],
|
||||||
fillRemaining: false,
|
fillRemaining: false,
|
||||||
});
|
});
|
||||||
resultMessageKey = `${namespace}:great_result`;
|
resultMessageKey = `${namespace}:greatResult`;
|
||||||
} else if (healthRatio < 0.33) {
|
} else if (healthRatio < 0.33) {
|
||||||
// 3rd prize
|
// 3rd prize
|
||||||
setEncounterRewards({
|
setEncounterRewards({
|
||||||
guaranteedModifierTypeFuncs: [modifierTypes.WIDE_LENS],
|
guaranteedModifierTypeFuncs: [modifierTypes.WIDE_LENS],
|
||||||
fillRemaining: false,
|
fillRemaining: false,
|
||||||
});
|
});
|
||||||
resultMessageKey = `${namespace}:good_result`;
|
resultMessageKey = `${namespace}:goodResult`;
|
||||||
} else {
|
} else {
|
||||||
// No prize
|
// No prize
|
||||||
isHealPhase = true;
|
isHealPhase = true;
|
||||||
resultMessageKey = `${namespace}:bad_result`;
|
resultMessageKey = `${namespace}:badResult`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// End the battle
|
// End the battle
|
||||||
@ -312,7 +312,7 @@ function handleNextTurn() {
|
|||||||
globalScene.currentBattle.mysteryEncounter!.doContinueEncounter = undefined;
|
globalScene.currentBattle.mysteryEncounter!.doContinueEncounter = undefined;
|
||||||
leaveEncounterWithoutBattle(isHealPhase);
|
leaveEncounterWithoutBattle(isHealPhase);
|
||||||
// Must end the TurnInit phase prematurely so battle phases aren't added to queue
|
// Must end the TurnInit phase prematurely so battle phases aren't added to queue
|
||||||
queueEncounterMessage(`${namespace}:end_game`);
|
queueEncounterMessage(`${namespace}:endGame`);
|
||||||
queueEncounterMessage(resultMessageKey);
|
queueEncounterMessage(resultMessageKey);
|
||||||
|
|
||||||
// Skip remainder of TurnInitPhase
|
// Skip remainder of TurnInitPhase
|
||||||
@ -320,9 +320,9 @@ function handleNextTurn() {
|
|||||||
}
|
}
|
||||||
if (encounter.misc.turnsRemaining < 3) {
|
if (encounter.misc.turnsRemaining < 3) {
|
||||||
// Display charging messages on turns that aren't the initial turn
|
// Display charging messages on turns that aren't the initial turn
|
||||||
queueEncounterMessage(`${namespace}:charging_continue`);
|
queueEncounterMessage(`${namespace}:chargingContinue`);
|
||||||
}
|
}
|
||||||
queueEncounterMessage(`${namespace}:turn_remaining_${encounter.misc.turnsRemaining}`);
|
queueEncounterMessage(`${namespace}:turnRemaining${encounter.misc.turnsRemaining}`);
|
||||||
encounter.misc.turnsRemaining--;
|
encounter.misc.turnsRemaining--;
|
||||||
|
|
||||||
// Don't skip remainder of TurnInitPhase
|
// Don't skip remainder of TurnInitPhase
|
||||||
|
@ -158,7 +158,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -248,7 +248,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Show the trade animation
|
// Show the trade animation
|
||||||
await showTradeBackground();
|
await showTradeBackground();
|
||||||
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
||||||
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
|
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
|
||||||
globalScene.playBgm(encounter.misc.bgmKey);
|
globalScene.playBgm(encounter.misc.bgmKey);
|
||||||
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
||||||
await hideTradeBackground();
|
await hideTradeBackground();
|
||||||
@ -369,7 +369,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Show the trade animation
|
// Show the trade animation
|
||||||
await showTradeBackground();
|
await showTradeBackground();
|
||||||
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
||||||
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
|
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
|
||||||
globalScene.playBgm(encounter.misc.bgmKey);
|
globalScene.playBgm(encounter.misc.bgmKey);
|
||||||
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
||||||
await hideTradeBackground();
|
await hideTradeBackground();
|
||||||
@ -384,7 +384,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -416,7 +416,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
return it.isTransferable;
|
return it.isTransferable;
|
||||||
}).length > 0;
|
}).length > 0;
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:option.3.invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -468,7 +468,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Generate a trainer name
|
// Generate a trainer name
|
||||||
const traderName = generateRandomTraderName();
|
const traderName = generateRandomTraderName();
|
||||||
encounter.setDialogueToken("tradeTrainerName", traderName.trim());
|
encounter.setDialogueToken("tradeTrainerName", traderName.trim());
|
||||||
await showEncounterText(`${namespace}:item_trade_selected`);
|
await showEncounterText(`${namespace}:itemTradeSelected`);
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
@ -740,10 +740,10 @@ function doPokemonTradeSequence(tradedPokemon: PlayerPokemon, receivedPokemon: P
|
|||||||
duration: 500,
|
duration: 500,
|
||||||
onComplete: async () => {
|
onComplete: async () => {
|
||||||
globalScene.fadeOutBgm(1000, false);
|
globalScene.fadeOutBgm(1000, false);
|
||||||
await showEncounterText(`${namespace}:pokemon_trade_selected`);
|
await showEncounterText(`${namespace}:pokemonTradeSelected`);
|
||||||
tradedPokemon.cry();
|
tradedPokemon.cry();
|
||||||
globalScene.playBgm("evolution");
|
globalScene.playBgm("evolution");
|
||||||
await showEncounterText(`${namespace}:pokemon_trade_goodbye`);
|
await showEncounterText(`${namespace}:pokemonTradeGoodbye`);
|
||||||
|
|
||||||
tradedPokeball.setAlpha(0);
|
tradedPokeball.setAlpha(0);
|
||||||
tradedPokeball.setVisible(true);
|
tradedPokeball.setVisible(true);
|
||||||
|
@ -63,9 +63,9 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withPokemonCanLearnMoveRequirement(OPTION_1_REQUIRED_MOVE)
|
.withPokemonCanLearnMoveRequirement(OPTION_1_REQUIRED_MOVE)
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.1.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected`,
|
text: `${namespace}:option.1.selected`,
|
||||||
@ -81,9 +81,9 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withPokemonCanLearnMoveRequirement(OPTION_2_REQUIRED_MOVE)
|
.withPokemonCanLearnMoveRequirement(OPTION_2_REQUIRED_MOVE)
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -58,7 +58,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withOnInit(() => {
|
.withOnInit(() => {
|
||||||
@ -128,7 +128,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Only Pokemon non-KOd pokemon can be selected
|
// Only Pokemon non-KOd pokemon can be selected
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -142,9 +142,9 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Give money and do dialogue
|
// Give money and do dialogue
|
||||||
if (moneyMultiplier > 2.5) {
|
if (moneyMultiplier > 2.5) {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
|
||||||
}
|
}
|
||||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
@ -153,7 +153,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
await showEncounterText(`${namespace}:pokemonTired`);
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true });
|
setEncounterRewards({ fillRemaining: true });
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
@ -210,7 +210,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Only Pokemon non-KOd pokemon can be selected
|
// Only Pokemon non-KOd pokemon can be selected
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -224,9 +224,9 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Give money and do dialogue
|
// Give money and do dialogue
|
||||||
if (moneyMultiplier > 2.5) {
|
if (moneyMultiplier > 2.5) {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
|
||||||
}
|
}
|
||||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
@ -235,7 +235,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
await showEncounterText(`${namespace}:pokemonTired`);
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true });
|
setEncounterRewards({ fillRemaining: true });
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
@ -248,7 +248,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -282,7 +282,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
await transitionMysteryEncounterIntroVisuals(false, false);
|
await transitionMysteryEncounterIntroVisuals(false, false);
|
||||||
|
|
||||||
// Give money and do dialogue
|
// Give money and do dialogue
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||||
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
|
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
await showEncounterText(
|
await showEncounterText(
|
||||||
@ -290,7 +290,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
await showEncounterText(`${namespace}:pokemonTired`);
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true });
|
setEncounterRewards({ fillRemaining: true });
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
|
@ -205,7 +205,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
|
|||||||
// 80% chance to increase flee stage +1
|
// 80% chance to increase flee stage +1
|
||||||
const fleeChangeResult = tryChangeFleeStage(1, 8);
|
const fleeChangeResult = tryChangeFleeStage(1, 8);
|
||||||
if (!fleeChangeResult) {
|
if (!fleeChangeResult) {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.busy_eating`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.busyEating`) ?? "", null, 1000, false);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.eating`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.eating`) ?? "", null, 1000, false);
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
|
|||||||
// 80% chance to decrease catch stage -1
|
// 80% chance to decrease catch stage -1
|
||||||
const catchChangeResult = tryChangeCatchStage(-1, 8);
|
const catchChangeResult = tryChangeCatchStage(-1, 8);
|
||||||
if (!catchChangeResult) {
|
if (!catchChangeResult) {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.beside_itself_angry`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.besideItselfAngry`) ?? "", null, 1000, false);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.angry`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.angry`) ?? "", null, 1000, false);
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ async function summonSafariPokemon() {
|
|||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
// Message pokemon remaining
|
// Message pokemon remaining
|
||||||
encounter.setDialogueToken("remainingCount", encounter.misc.safariPokemonRemaining);
|
encounter.setDialogueToken("remainingCount", encounter.misc.safariPokemonRemaining);
|
||||||
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remaining_count`) ?? "", null, true);
|
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remainingCount`) ?? "", null, true);
|
||||||
|
|
||||||
// Generate pokemon using safariPokemonRemaining so they are always the same pokemon no matter how many turns are taken
|
// Generate pokemon using safariPokemonRemaining so they are always the same pokemon no matter how many turns are taken
|
||||||
// Safari pokemon roll twice on shiny and HA chances, but are otherwise normal
|
// Safari pokemon roll twice on shiny and HA chances, but are otherwise normal
|
||||||
|
@ -70,7 +70,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -119,7 +119,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!encounter.pokemonMeetsPrimaryRequirements(pokemon)) {
|
if (!encounter.pokemonMeetsPrimaryRequirements(pokemon)) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -155,7 +155,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
|
|
||||||
chosenPokemon.setCustomNature(newNature);
|
chosenPokemon.setCustomNature(newNature);
|
||||||
encounter.setDialogueToken("newNature", getNatureName(newNature));
|
encounter.setDialogueToken("newNature", getNatureName(newNature));
|
||||||
queueEncounterMessage(`${namespace}:cheap_side_effects`);
|
queueEncounterMessage(`${namespace}:cheapSideEffects`);
|
||||||
setEncounterExp([chosenPokemon.id], 100);
|
setEncounterExp([chosenPokemon.id], 100);
|
||||||
await chosenPokemon.updateInfo();
|
await chosenPokemon.updateInfo();
|
||||||
})
|
})
|
||||||
@ -193,7 +193,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
|
|
||||||
// Only Pokemon that can gain benefits are unfainted
|
// Only Pokemon that can gain benefits are unfainted
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -215,7 +215,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
const chosenPokemon = encounter.misc.chosenPokemon;
|
const chosenPokemon = encounter.misc.chosenPokemon;
|
||||||
|
|
||||||
queueEncounterMessage(`${namespace}:no_bad_effects`);
|
queueEncounterMessage(`${namespace}:noBadEffects`);
|
||||||
setEncounterExp([chosenPokemon.id], 100);
|
setEncounterExp([chosenPokemon.id], 100);
|
||||||
|
|
||||||
await chosenPokemon.updateInfo();
|
await chosenPokemon.updateInfo();
|
||||||
|
@ -157,7 +157,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Fall asleep waiting for Snorlax
|
// Fall asleep waiting for Snorlax
|
||||||
// Full heal party
|
// Full heal party
|
||||||
globalScene.phaseManager.unshiftNew("PartyHealPhase", true);
|
globalScene.phaseManager.unshiftNew("PartyHealPhase", true);
|
||||||
queueEncounterMessage(`${namespace}:option.2.rest_result`);
|
queueEncounterMessage(`${namespace}:option.2.restResult`);
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@ -167,7 +167,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -122,7 +122,7 @@ export const TeleportingHijinksEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -227,7 +227,7 @@ async function doBiomeTransitionDialogueAndBattleInit() {
|
|||||||
isBoss: true,
|
isBoss: true,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:boss_enraged`);
|
queueEncounterMessage(`${namespace}:bossEnraged`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
|
@ -139,7 +139,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: trainerNameKey,
|
speaker: trainerNameKey,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withOnInit(() => {
|
.withOnInit(() => {
|
||||||
@ -189,13 +189,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
|
|
||||||
// Dialogue and egg calcs for Pokemon 1
|
// Dialogue and egg calcs for Pokemon 1
|
||||||
const [pokemon1CommonEggs, pokemon1RareEggs] = calculateEggRewardsForPokemon(pokemon1);
|
const [pokemon1CommonEggs, pokemon1RareEggs] = calculateEggRewardsForPokemon(pokemon1);
|
||||||
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltip_base`)!;
|
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltipBase`)!;
|
||||||
if (pokemon1RareEggs > 0) {
|
if (pokemon1RareEggs > 0) {
|
||||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||||
count: pokemon1RareEggs,
|
count: pokemon1RareEggs,
|
||||||
rarity: i18next.t("egg:greatTier"),
|
rarity: i18next.t("egg:greatTier"),
|
||||||
});
|
});
|
||||||
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon1RareEggs", eggsText);
|
encounter.setDialogueToken("pokemon1RareEggs", eggsText);
|
||||||
@ -205,7 +205,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
count: pokemon1CommonEggs,
|
count: pokemon1CommonEggs,
|
||||||
rarity: i18next.t("egg:defaultTier"),
|
rarity: i18next.t("egg:defaultTier"),
|
||||||
});
|
});
|
||||||
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon1CommonEggs", eggsText);
|
encounter.setDialogueToken("pokemon1CommonEggs", eggsText);
|
||||||
@ -214,13 +214,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
|
|
||||||
// Dialogue and egg calcs for Pokemon 2
|
// Dialogue and egg calcs for Pokemon 2
|
||||||
const [pokemon2CommonEggs, pokemon2RareEggs] = calculateEggRewardsForPokemon(pokemon2);
|
const [pokemon2CommonEggs, pokemon2RareEggs] = calculateEggRewardsForPokemon(pokemon2);
|
||||||
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltip_base`)!;
|
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltipBase`)!;
|
||||||
if (pokemon2RareEggs > 0) {
|
if (pokemon2RareEggs > 0) {
|
||||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||||
count: pokemon2RareEggs,
|
count: pokemon2RareEggs,
|
||||||
rarity: i18next.t("egg:greatTier"),
|
rarity: i18next.t("egg:greatTier"),
|
||||||
});
|
});
|
||||||
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon2RareEggs", eggsText);
|
encounter.setDialogueToken("pokemon2RareEggs", eggsText);
|
||||||
@ -230,7 +230,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
count: pokemon2CommonEggs,
|
count: pokemon2CommonEggs,
|
||||||
rarity: i18next.t("egg:defaultTier"),
|
rarity: i18next.t("egg:defaultTier"),
|
||||||
});
|
});
|
||||||
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon2CommonEggs", eggsText);
|
encounter.setDialogueToken("pokemon2CommonEggs", eggsText);
|
||||||
@ -239,13 +239,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
|
|
||||||
// Dialogue and egg calcs for Pokemon 3
|
// Dialogue and egg calcs for Pokemon 3
|
||||||
const [pokemon3CommonEggs, pokemon3RareEggs] = calculateEggRewardsForPokemon(pokemon3);
|
const [pokemon3CommonEggs, pokemon3RareEggs] = calculateEggRewardsForPokemon(pokemon3);
|
||||||
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltip_base`)!;
|
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltipBase`)!;
|
||||||
if (pokemon3RareEggs > 0) {
|
if (pokemon3RareEggs > 0) {
|
||||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||||
count: pokemon3RareEggs,
|
count: pokemon3RareEggs,
|
||||||
rarity: i18next.t("egg:greatTier"),
|
rarity: i18next.t("egg:greatTier"),
|
||||||
});
|
});
|
||||||
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon3RareEggs", eggsText);
|
encounter.setDialogueToken("pokemon3RareEggs", eggsText);
|
||||||
@ -255,7 +255,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
count: pokemon3CommonEggs,
|
count: pokemon3CommonEggs,
|
||||||
rarity: i18next.t("egg:defaultTier"),
|
rarity: i18next.t("egg:defaultTier"),
|
||||||
});
|
});
|
||||||
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon3CommonEggs", eggsText);
|
encounter.setDialogueToken("pokemon3CommonEggs", eggsText);
|
||||||
@ -321,14 +321,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
];
|
];
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon1CommonEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon1CommonEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon1CommonEggs"],
|
numEggs: encounter.dialogueTokens["pokemon1CommonEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon1RareEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon1RareEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon1RareEggs"],
|
numEggs: encounter.dialogueTokens["pokemon1RareEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -380,14 +380,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
];
|
];
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon2CommonEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon2CommonEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon2CommonEggs"],
|
numEggs: encounter.dialogueTokens["pokemon2CommonEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon2RareEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon2RareEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon2RareEggs"],
|
numEggs: encounter.dialogueTokens["pokemon2RareEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -439,14 +439,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
];
|
];
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon3CommonEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon3CommonEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon3CommonEggs"],
|
numEggs: encounter.dialogueTokens["pokemon3CommonEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon3RareEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon3RareEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon3RareEggs"],
|
numEggs: encounter.dialogueTokens["pokemon3RareEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -482,7 +482,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
|||||||
trainerType: TrainerType.EXPERT_POKEMON_BREEDER,
|
trainerType: TrainerType.EXPERT_POKEMON_BREEDER,
|
||||||
pokemonConfigs: [
|
pokemonConfigs: [
|
||||||
{
|
{
|
||||||
nickname: i18next.t(`${namespace}:cleffa_1_nickname`, {
|
nickname: i18next.t(`${namespace}:cleffa1Nickname`, {
|
||||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||||
}),
|
}),
|
||||||
species: getPokemonSpecies(cleffaSpecies),
|
species: getPokemonSpecies(cleffaSpecies),
|
||||||
@ -501,7 +501,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
|||||||
// All 3 members always Cleffa line, but different configs
|
// All 3 members always Cleffa line, but different configs
|
||||||
baseConfig.pokemonConfigs!.push(
|
baseConfig.pokemonConfigs!.push(
|
||||||
{
|
{
|
||||||
nickname: i18next.t(`${namespace}:cleffa_2_nickname`, {
|
nickname: i18next.t(`${namespace}:cleffa2Nickname`, {
|
||||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||||
}),
|
}),
|
||||||
species: getPokemonSpecies(cleffaSpecies),
|
species: getPokemonSpecies(cleffaSpecies),
|
||||||
@ -514,7 +514,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
|||||||
ivs: [31, 31, 31, 31, 31, 31],
|
ivs: [31, 31, 31, 31, 31, 31],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
nickname: i18next.t(`${namespace}:cleffa_3_nickname`, {
|
nickname: i18next.t(`${namespace}:cleffa3Nickname`, {
|
||||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||||
}),
|
}),
|
||||||
species: getPokemonSpecies(cleffaSpecies),
|
species: getPokemonSpecies(cleffaSpecies),
|
||||||
@ -647,7 +647,7 @@ function onGameOver() {
|
|||||||
encounter.dialogue.outro = [
|
encounter.dialogue.outro = [
|
||||||
{
|
{
|
||||||
speaker: trainerNameKey,
|
speaker: trainerNameKey,
|
||||||
text: `${namespace}:outro_failed`,
|
text: `${namespace}:outroFailed`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -178,8 +178,8 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
// Always max price for shiny (flip HA back to normal), and add special messaging
|
// Always max price for shiny (flip HA back to normal), and add special messaging
|
||||||
priceMultiplier = MAX_POKEMON_PRICE_MULTIPLIER;
|
priceMultiplier = MAX_POKEMON_PRICE_MULTIPLIER;
|
||||||
pokemon.abilityIndex = 0;
|
pokemon.abilityIndex = 0;
|
||||||
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:description_shiny`;
|
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:descriptionShiny`;
|
||||||
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltip_shiny`;
|
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltipShiny`;
|
||||||
}
|
}
|
||||||
const price = globalScene.getWaveMoneyAmount(priceMultiplier);
|
const price = globalScene.getWaveMoneyAmount(priceMultiplier);
|
||||||
encounter.setDialogueToken("purchasePokemon", pokemon.getNameToRender());
|
encounter.setDialogueToken("purchasePokemon", pokemon.getNameToRender());
|
||||||
@ -202,7 +202,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected_message`,
|
text: `${namespace}:option.1.selectedMessage`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@ -215,7 +215,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
updatePlayerMoney(-price, true, false);
|
updatePlayerMoney(-price, true, false);
|
||||||
|
|
||||||
// Show dialogue
|
// Show dialogue
|
||||||
await showEncounterDialogue(`${namespace}:option.1.selected_dialogue`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:option.1.selectedDialogue`, `${namespace}:speaker`);
|
||||||
await transitionMysteryEncounterIntroVisuals();
|
await transitionMysteryEncounterIntroVisuals();
|
||||||
|
|
||||||
// "Catch" purchased pokemon
|
// "Catch" purchased pokemon
|
||||||
|
@ -115,7 +115,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
],
|
],
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.2.stat_boost`);
|
queueEncounterMessage(`${namespace}:option.2.statBoost`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -181,7 +181,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
|
|
||||||
encounter.setDialogueToken("reductionValue", HIGH_BST_REDUCTION_VALUE.toString());
|
encounter.setDialogueToken("reductionValue", HIGH_BST_REDUCTION_VALUE.toString());
|
||||||
encounter.setDialogueToken("increaseValue", BST_INCREASE_VALUE.toString());
|
encounter.setDialogueToken("increaseValue", BST_INCREASE_VALUE.toString());
|
||||||
await showEncounterText(`${namespace}:option.1.selected_2`, null, undefined, true);
|
await showEncounterText(`${namespace}:option.1.selected2`, null, undefined, true);
|
||||||
|
|
||||||
encounter.dialogue.outro = [
|
encounter.dialogue.outro = [
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ export const TheWinstrateChallengeEncounter: MysteryEncounter = MysteryEncounter
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withAutoHideIntroVisuals(false)
|
.withAutoHideIntroVisuals(false)
|
||||||
@ -163,7 +163,7 @@ async function spawnNextTrainerOrEndEncounter() {
|
|||||||
globalScene.playSound("item_fanfare");
|
globalScene.playSound("item_fanfare");
|
||||||
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }));
|
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }));
|
||||||
|
|
||||||
await showEncounterDialogue(`${namespace}:victory_2`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:victory2`, `${namespace}:speaker`);
|
||||||
globalScene.ui.clearText(); // Clears "Winstrate" title from screen as rewards get animated in
|
globalScene.ui.clearText(); // Clears "Winstrate" title from screen as rewards get animated in
|
||||||
const machoBrace = generateModifierTypeOption(modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE)!;
|
const machoBrace = generateModifierTypeOption(modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE)!;
|
||||||
machoBrace.type.tier = ModifierTier.MASTER;
|
machoBrace.type.tier = ModifierTier.MASTER;
|
||||||
|
@ -90,7 +90,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be trained
|
// Only Pokemon that are not KOed/legal can be trained
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -174,7 +174,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.selected`,
|
text: `${namespace}:option.selected`,
|
||||||
@ -205,7 +205,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be trained
|
// Only Pokemon that are not KOed/legal can be trained
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -248,7 +248,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.selected`,
|
text: `${namespace}:option.selected`,
|
||||||
@ -295,7 +295,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be trained
|
// Only Pokemon that are not KOed/legal can be trained
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
|
@ -194,7 +194,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withOptionPhase(async () => {
|
.withOptionPhase(async () => {
|
||||||
// Investigate garbage, battle Gmax Garbodor
|
// Investigate garbage, battle Gmax Garbodor
|
||||||
globalScene.setFieldScale(0.75);
|
globalScene.setFieldScale(0.75);
|
||||||
await showEncounterText(`${namespace}:option.2.selected_2`);
|
await showEncounterText(`${namespace}:option.2.selected2`);
|
||||||
await transitionMysteryEncounterIntroVisuals();
|
await transitionMysteryEncounterIntroVisuals();
|
||||||
|
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
|
@ -97,7 +97,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
isBoss: false,
|
isBoss: false,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
|
queueEncounterMessage(`${namespace}:option.1.statBoost`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -191,7 +191,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -236,7 +236,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -143,7 +143,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.setLocalizationKey(`${namespace}`)
|
.setLocalizationKey(`${namespace}`)
|
||||||
@ -216,7 +216,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
|||||||
await cutsceneDialoguePromise;
|
await cutsceneDialoguePromise;
|
||||||
|
|
||||||
doHideDreamBackground();
|
doHideDreamBackground();
|
||||||
await showEncounterText(`${namespace}:option.1.dream_complete`);
|
await showEncounterText(`${namespace}:option.1.dreamComplete`);
|
||||||
|
|
||||||
await doNewTeamPostProcess(transformations);
|
await doNewTeamPostProcess(transformations);
|
||||||
setEncounterRewards({
|
setEncounterRewards({
|
||||||
@ -329,7 +329,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
|||||||
onBeforeRewards,
|
onBeforeRewards,
|
||||||
);
|
);
|
||||||
|
|
||||||
await showEncounterText(`${namespace}:option.2.selected_2`, null, undefined, true);
|
await showEncounterText(`${namespace}:option.2.selected2`, null, undefined, true);
|
||||||
await initBattleWithEnemyConfig(enemyPartyConfig);
|
await initBattleWithEnemyConfig(enemyPartyConfig);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -673,6 +673,8 @@ export async function catchPokemon(
|
|||||||
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
|
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
|
||||||
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
const addStatus = new BooleanHolder(true);
|
||||||
|
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
||||||
const doPokemonCatchMenu = () => {
|
const doPokemonCatchMenu = () => {
|
||||||
const end = () => {
|
const end = () => {
|
||||||
// Ensure the pokemon is in the enemy party in all situations
|
// Ensure the pokemon is in the enemy party in all situations
|
||||||
@ -708,9 +710,7 @@ export async function catchPokemon(
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
|
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
|
||||||
const addStatus = new BooleanHolder(true);
|
if (!(isObtain || addStatus.value)) {
|
||||||
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
|
||||||
if (!addStatus.value) {
|
|
||||||
removePokemon();
|
removePokemon();
|
||||||
end();
|
end();
|
||||||
return;
|
return;
|
||||||
@ -807,10 +807,16 @@ export async function catchPokemon(
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (showCatchObtainMessage) {
|
if (showCatchObtainMessage) {
|
||||||
|
let catchMessage: string;
|
||||||
|
if (isObtain) {
|
||||||
|
catchMessage = "battle:pokemonObtained";
|
||||||
|
} else if (addStatus.value) {
|
||||||
|
catchMessage = "battle:pokemonCaught";
|
||||||
|
} else {
|
||||||
|
catchMessage = "battle:pokemonCaughtButChallenge";
|
||||||
|
}
|
||||||
globalScene.ui.showText(
|
globalScene.ui.showText(
|
||||||
i18next.t(isObtain ? "battle:pokemonObtained" : "battle:pokemonCaught", {
|
i18next.t(catchMessage, { pokemonName: pokemon.getNameToRender() }),
|
||||||
pokemonName: pokemon.getNameToRender(),
|
|
||||||
}),
|
|
||||||
null,
|
null,
|
||||||
doPokemonCatchMenu,
|
doPokemonCatchMenu,
|
||||||
0,
|
0,
|
||||||
|
@ -253,8 +253,11 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||||||
|
|
||||||
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
|
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
|
||||||
|
|
||||||
|
const addStatus = new BooleanHolder(true);
|
||||||
|
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
||||||
|
|
||||||
globalScene.ui.showText(
|
globalScene.ui.showText(
|
||||||
i18next.t("battle:pokemonCaught", {
|
i18next.t(addStatus.value ? "battle:pokemonCaught" : "battle:pokemonCaughtButChallenge", {
|
||||||
pokemonName: getPokemonNameWithAffix(pokemon),
|
pokemonName: getPokemonNameWithAffix(pokemon),
|
||||||
}),
|
}),
|
||||||
null,
|
null,
|
||||||
@ -290,8 +293,6 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
|
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
|
||||||
const addStatus = new BooleanHolder(true);
|
|
||||||
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
|
|
||||||
if (!addStatus.value) {
|
if (!addStatus.value) {
|
||||||
removePokemon();
|
removePokemon();
|
||||||
end();
|
end();
|
||||||
|
@ -16,8 +16,10 @@ export class SelectBiomePhase extends BattlePhase {
|
|||||||
|
|
||||||
globalScene.resetSeed();
|
globalScene.resetSeed();
|
||||||
|
|
||||||
|
const gameMode = globalScene.gameMode;
|
||||||
const currentBiome = globalScene.arena.biomeType;
|
const currentBiome = globalScene.arena.biomeType;
|
||||||
const nextWaveIndex = globalScene.currentBattle.waveIndex + 1;
|
const currentWaveIndex = globalScene.currentBattle.waveIndex;
|
||||||
|
const nextWaveIndex = currentWaveIndex + 1;
|
||||||
|
|
||||||
const setNextBiome = (nextBiome: BiomeId) => {
|
const setNextBiome = (nextBiome: BiomeId) => {
|
||||||
if (nextWaveIndex % 10 === 1) {
|
if (nextWaveIndex % 10 === 1) {
|
||||||
@ -26,6 +28,15 @@ export class SelectBiomePhase extends BattlePhase {
|
|||||||
applyChallenges(ChallengeType.PARTY_HEAL, healStatus);
|
applyChallenges(ChallengeType.PARTY_HEAL, healStatus);
|
||||||
if (healStatus.value) {
|
if (healStatus.value) {
|
||||||
globalScene.phaseManager.unshiftNew("PartyHealPhase", false);
|
globalScene.phaseManager.unshiftNew("PartyHealPhase", false);
|
||||||
|
} else {
|
||||||
|
globalScene.phaseManager.unshiftNew(
|
||||||
|
"SelectModifierPhase",
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
gameMode.isFixedBattle(currentWaveIndex)
|
||||||
|
? gameMode.getFixedBattle(currentWaveIndex).customModifierRewardSettings
|
||||||
|
: undefined,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globalScene.phaseManager.unshiftNew("SwitchBiomePhase", nextBiome);
|
globalScene.phaseManager.unshiftNew("SwitchBiomePhase", nextBiome);
|
||||||
@ -33,12 +44,12 @@ export class SelectBiomePhase extends BattlePhase {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(globalScene.gameMode.isClassic && globalScene.gameMode.isWaveFinal(nextWaveIndex + 9)) ||
|
(gameMode.isClassic && gameMode.isWaveFinal(nextWaveIndex + 9)) ||
|
||||||
(globalScene.gameMode.isDaily && globalScene.gameMode.isWaveFinal(nextWaveIndex)) ||
|
(gameMode.isDaily && gameMode.isWaveFinal(nextWaveIndex)) ||
|
||||||
(globalScene.gameMode.hasShortBiomes && !(nextWaveIndex % 50))
|
(gameMode.hasShortBiomes && !(nextWaveIndex % 50))
|
||||||
) {
|
) {
|
||||||
setNextBiome(BiomeId.END);
|
setNextBiome(BiomeId.END);
|
||||||
} else if (globalScene.gameMode.hasRandomBiomes) {
|
} else if (gameMode.hasRandomBiomes) {
|
||||||
setNextBiome(this.generateNextBiome(nextWaveIndex));
|
setNextBiome(this.generateNextBiome(nextWaveIndex));
|
||||||
} else if (Array.isArray(biomeLinks[currentBiome])) {
|
} else if (Array.isArray(biomeLinks[currentBiome])) {
|
||||||
const biomes: BiomeId[] = (biomeLinks[currentBiome] as (BiomeId | [BiomeId, number])[])
|
const biomes: BiomeId[] = (biomeLinks[currentBiome] as (BiomeId | [BiomeId, number])[])
|
||||||
@ -73,9 +84,6 @@ export class SelectBiomePhase extends BattlePhase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
generateNextBiome(waveIndex: number): BiomeId {
|
generateNextBiome(waveIndex: number): BiomeId {
|
||||||
if (!(waveIndex % 50)) {
|
return waveIndex % 50 === 0 ? BiomeId.END : globalScene.generateRandomBiome(waveIndex);
|
||||||
return BiomeId.END;
|
|
||||||
}
|
|
||||||
return globalScene.generateRandomBiome(waveIndex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,9 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import { modifierTypes } from "#data/data-lists";
|
import { modifierTypes } from "#data/data-lists";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
import type { BattlerIndex } from "#enums/battler-index";
|
import type { BattlerIndex } from "#enums/battler-index";
|
||||||
import { ChallengeType } from "#enums/challenge-type";
|
|
||||||
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||||
import type { CustomModifierSettings } from "#modifiers/modifier-type";
|
|
||||||
import { handleMysteryEncounterVictory } from "#mystery-encounters/encounter-phase-utils";
|
import { handleMysteryEncounterVictory } from "#mystery-encounters/encounter-phase-utils";
|
||||||
import { PokemonPhase } from "#phases/pokemon-phase";
|
import { PokemonPhase } from "#phases/pokemon-phase";
|
||||||
import { applyChallenges } from "#utils/challenge-utils";
|
|
||||||
import { BooleanHolder } from "#utils/common";
|
|
||||||
|
|
||||||
export class VictoryPhase extends PokemonPhase {
|
export class VictoryPhase extends PokemonPhase {
|
||||||
public readonly phaseName = "VictoryPhase";
|
public readonly phaseName = "VictoryPhase";
|
||||||
@ -49,15 +45,19 @@ export class VictoryPhase extends PokemonPhase {
|
|||||||
if (globalScene.currentBattle.battleType === BattleType.TRAINER) {
|
if (globalScene.currentBattle.battleType === BattleType.TRAINER) {
|
||||||
globalScene.phaseManager.pushNew("TrainerVictoryPhase");
|
globalScene.phaseManager.pushNew("TrainerVictoryPhase");
|
||||||
}
|
}
|
||||||
if (globalScene.gameMode.isEndless || !globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)) {
|
|
||||||
|
const gameMode = globalScene.gameMode;
|
||||||
|
const currentWaveIndex = globalScene.currentBattle.waveIndex;
|
||||||
|
|
||||||
|
if (gameMode.isEndless || !gameMode.isWaveFinal(currentWaveIndex)) {
|
||||||
globalScene.phaseManager.pushNew("EggLapsePhase");
|
globalScene.phaseManager.pushNew("EggLapsePhase");
|
||||||
if (globalScene.gameMode.isClassic) {
|
if (gameMode.isClassic) {
|
||||||
switch (globalScene.currentBattle.waveIndex) {
|
switch (currentWaveIndex) {
|
||||||
case ClassicFixedBossWaves.RIVAL_1:
|
case ClassicFixedBossWaves.RIVAL_1:
|
||||||
case ClassicFixedBossWaves.RIVAL_2:
|
case ClassicFixedBossWaves.RIVAL_2:
|
||||||
// Get event modifiers for this wave
|
// Get event modifiers for this wave
|
||||||
timedEventManager
|
timedEventManager
|
||||||
.getFixedBattleEventRewards(globalScene.currentBattle.waveIndex)
|
.getFixedBattleEventRewards(currentWaveIndex)
|
||||||
.map(r => globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes[r]));
|
.map(r => globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes[r]));
|
||||||
break;
|
break;
|
||||||
case ClassicFixedBossWaves.EVIL_BOSS_2:
|
case ClassicFixedBossWaves.EVIL_BOSS_2:
|
||||||
@ -66,59 +66,53 @@ export class VictoryPhase extends PokemonPhase {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const healStatus = new BooleanHolder(globalScene.currentBattle.waveIndex % 10 === 0);
|
if (currentWaveIndex % 10) {
|
||||||
applyChallenges(ChallengeType.PARTY_HEAL, healStatus);
|
|
||||||
if (!healStatus.value) {
|
|
||||||
globalScene.phaseManager.pushNew(
|
globalScene.phaseManager.pushNew(
|
||||||
"SelectModifierPhase",
|
"SelectModifierPhase",
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
this.getFixedBattleCustomModifiers(),
|
gameMode.isFixedBattle(currentWaveIndex)
|
||||||
|
? gameMode.getFixedBattle(currentWaveIndex).customModifierRewardSettings
|
||||||
|
: undefined,
|
||||||
);
|
);
|
||||||
} else if (globalScene.gameMode.isDaily) {
|
} else if (gameMode.isDaily) {
|
||||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_CHARM);
|
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_CHARM);
|
||||||
if (
|
if (currentWaveIndex > 10 && !gameMode.isWaveFinal(currentWaveIndex)) {
|
||||||
globalScene.currentBattle.waveIndex > 10 &&
|
|
||||||
!globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)
|
|
||||||
) {
|
|
||||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
|
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const superExpWave = !globalScene.gameMode.isEndless ? (globalScene.offsetGym ? 0 : 20) : 10;
|
const superExpWave = !gameMode.isEndless ? (globalScene.offsetGym ? 0 : 20) : 10;
|
||||||
if (globalScene.gameMode.isEndless && globalScene.currentBattle.waveIndex === 10) {
|
if (gameMode.isEndless && currentWaveIndex === 10) {
|
||||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_SHARE);
|
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_SHARE);
|
||||||
}
|
}
|
||||||
if (
|
if (currentWaveIndex <= 750 && (currentWaveIndex <= 500 || currentWaveIndex % 30 === superExpWave)) {
|
||||||
globalScene.currentBattle.waveIndex <= 750 &&
|
|
||||||
(globalScene.currentBattle.waveIndex <= 500 || globalScene.currentBattle.waveIndex % 30 === superExpWave)
|
|
||||||
) {
|
|
||||||
globalScene.phaseManager.pushNew(
|
globalScene.phaseManager.pushNew(
|
||||||
"ModifierRewardPhase",
|
"ModifierRewardPhase",
|
||||||
globalScene.currentBattle.waveIndex % 30 !== superExpWave || globalScene.currentBattle.waveIndex > 250
|
currentWaveIndex % 30 !== superExpWave || currentWaveIndex > 250
|
||||||
? modifierTypes.EXP_CHARM
|
? modifierTypes.EXP_CHARM
|
||||||
: modifierTypes.SUPER_EXP_CHARM,
|
: modifierTypes.SUPER_EXP_CHARM,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (globalScene.currentBattle.waveIndex <= 150 && !(globalScene.currentBattle.waveIndex % 50)) {
|
if (currentWaveIndex <= 150 && !(currentWaveIndex % 50)) {
|
||||||
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
|
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
|
||||||
}
|
}
|
||||||
if (globalScene.gameMode.isEndless && !(globalScene.currentBattle.waveIndex % 50)) {
|
if (gameMode.isEndless && !(currentWaveIndex % 50)) {
|
||||||
globalScene.phaseManager.pushNew(
|
globalScene.phaseManager.pushNew(
|
||||||
"ModifierRewardPhase",
|
"ModifierRewardPhase",
|
||||||
!(globalScene.currentBattle.waveIndex % 250) ? modifierTypes.VOUCHER_PREMIUM : modifierTypes.VOUCHER_PLUS,
|
!(currentWaveIndex % 250) ? modifierTypes.VOUCHER_PREMIUM : modifierTypes.VOUCHER_PLUS,
|
||||||
);
|
);
|
||||||
globalScene.phaseManager.pushNew("AddEnemyBuffModifierPhase");
|
globalScene.phaseManager.pushNew("AddEnemyBuffModifierPhase");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (globalScene.gameMode.hasRandomBiomes || globalScene.isNewBiome()) {
|
if (gameMode.hasRandomBiomes || globalScene.isNewBiome()) {
|
||||||
globalScene.phaseManager.pushNew("SelectBiomePhase");
|
globalScene.phaseManager.pushNew("SelectBiomePhase");
|
||||||
}
|
}
|
||||||
|
|
||||||
globalScene.phaseManager.pushNew("NewBattlePhase");
|
globalScene.phaseManager.pushNew("NewBattlePhase");
|
||||||
} else {
|
} else {
|
||||||
globalScene.currentBattle.battleType = BattleType.CLEAR;
|
globalScene.currentBattle.battleType = BattleType.CLEAR;
|
||||||
globalScene.score += globalScene.gameMode.getClearScoreBonus();
|
globalScene.score += gameMode.getClearScoreBonus();
|
||||||
globalScene.updateScoreText();
|
globalScene.updateScoreText();
|
||||||
globalScene.phaseManager.pushNew("GameOverPhase", true);
|
globalScene.phaseManager.pushNew("GameOverPhase", true);
|
||||||
}
|
}
|
||||||
@ -126,18 +120,4 @@ export class VictoryPhase extends PokemonPhase {
|
|||||||
|
|
||||||
this.end();
|
this.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* If this wave is a fixed battle with special custom modifier rewards,
|
|
||||||
* will pass those settings to the upcoming {@linkcode SelectModifierPhase}`.
|
|
||||||
*/
|
|
||||||
getFixedBattleCustomModifiers(): CustomModifierSettings | undefined {
|
|
||||||
const gameMode = globalScene.gameMode;
|
|
||||||
const waveIndex = globalScene.currentBattle.waveIndex;
|
|
||||||
if (gameMode.isFixedBattle(waveIndex)) {
|
|
||||||
return gameMode.getFixedBattle(waveIndex).customModifierRewardSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -448,6 +448,8 @@ export function getAchievementDescription(localizationKey: string): string {
|
|||||||
return i18next.t("achv:FLIP_STATS.description", { context: genderStr });
|
return i18next.t("achv:FLIP_STATS.description", { context: genderStr });
|
||||||
case "FLIP_INVERSE":
|
case "FLIP_INVERSE":
|
||||||
return i18next.t("achv:FLIP_INVERSE.description", { context: genderStr });
|
return i18next.t("achv:FLIP_INVERSE.description", { context: genderStr });
|
||||||
|
case "NUZLOCKE":
|
||||||
|
return i18next.t("achv:NUZLOCKE.description", { context: genderStr });
|
||||||
case "BREEDERS_IN_SPACE":
|
case "BREEDERS_IN_SPACE":
|
||||||
return i18next.t("achv:BREEDERS_IN_SPACE.description", {
|
return i18next.t("achv:BREEDERS_IN_SPACE.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
|
@ -2142,7 +2142,12 @@ class PartyCancelButton extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
this.partyCancelPb = partyCancelPb;
|
this.partyCancelPb = partyCancelPb;
|
||||||
|
|
||||||
const partyCancelText = addTextObject(-10, -7, i18next.t("partyUiHandler:cancel"), TextStyle.PARTY_CANCEL_BUTTON);
|
const partyCancelText = addTextObject(
|
||||||
|
-10,
|
||||||
|
-7,
|
||||||
|
i18next.t("partyUiHandler:cancelButton"),
|
||||||
|
TextStyle.PARTY_CANCEL_BUTTON,
|
||||||
|
);
|
||||||
this.add(partyCancelText);
|
this.add(partyCancelText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,8 @@ export class RunInfoUiHandler extends UiHandler {
|
|||||||
this.runContainer.add(headerText);
|
this.runContainer.add(headerText);
|
||||||
const runName = addTextObject(0, 0, this.runInfo.name, TextStyle.WINDOW);
|
const runName = addTextObject(0, 0, this.runInfo.name, TextStyle.WINDOW);
|
||||||
runName.setOrigin(0, 0);
|
runName.setOrigin(0, 0);
|
||||||
runName.setPositionRelative(headerBg, 60, 4);
|
const runNameX = headerText.width / 6 + headerText.x + 4;
|
||||||
|
runName.setPositionRelative(headerBg, runNameX, 4);
|
||||||
this.runContainer.add(runName);
|
this.runContainer.add(runName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { Challenges } from "#enums/challenges";
|
import { Challenges } from "#enums/challenges";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
import { PokeballType } from "#enums/pokeball";
|
import { PokeballType } from "#enums/pokeball";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils";
|
||||||
import { GameManager } from "#test/test-utils/game-manager";
|
import { GameManager } from "#test/test-utils/game-manager";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
@ -52,4 +54,18 @@ describe("Challenges - Limited Catch", () => {
|
|||||||
|
|
||||||
expect(game.scene.getPlayerParty()).toHaveLength(1);
|
expect(game.scene.getPlayerParty()).toHaveLength(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should allow gift Pokémon from Mystery Encounters to be added to party", async () => {
|
||||||
|
game.override
|
||||||
|
.mysteryEncounterChance(100)
|
||||||
|
.mysteryEncounter(MysteryEncounterType.THE_POKEMON_SALESMAN)
|
||||||
|
.startingWave(12);
|
||||||
|
game.scene.money = 20000;
|
||||||
|
|
||||||
|
await game.challengeMode.runToSummon([SpeciesId.NUZLEAF]);
|
||||||
|
|
||||||
|
await runMysteryEncounterToEnd(game, 1);
|
||||||
|
|
||||||
|
expect(game.scene.getPlayerParty()).toHaveLength(2);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -3,6 +3,7 @@ import { Challenges } from "#enums/challenges";
|
|||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
|
import { ExpBoosterModifier } from "#modifiers/modifier";
|
||||||
import { GameManager } from "#test/test-utils/game-manager";
|
import { GameManager } from "#test/test-utils/game-manager";
|
||||||
import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler";
|
import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
@ -75,6 +76,7 @@ describe("Challenges - Limited Support", () => {
|
|||||||
await game.doKillOpponents();
|
await game.doKillOpponents();
|
||||||
await game.toNextWave();
|
await game.toNextWave();
|
||||||
|
|
||||||
|
expect(game.scene.getModifiers(ExpBoosterModifier)).toHaveLength(1);
|
||||||
expect(playerPokemon).not.toHaveFullHp();
|
expect(playerPokemon).not.toHaveFullHp();
|
||||||
|
|
||||||
game.move.use(MoveId.SPLASH);
|
game.move.use(MoveId.SPLASH);
|
||||||
|
@ -66,7 +66,7 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => {
|
|||||||
expect(AnOfferYouCantRefuseEncounter.dialogue).toBeDefined();
|
expect(AnOfferYouCantRefuseEncounter.dialogue).toBeDefined();
|
||||||
expect(AnOfferYouCantRefuseEncounter.dialogue.intro).toStrictEqual([
|
expect(AnOfferYouCantRefuseEncounter.dialogue.intro).toStrictEqual([
|
||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:intro_dialogue` },
|
{ speaker: `${namespace}:speaker`, text: `${namespace}:introDialogue` },
|
||||||
]);
|
]);
|
||||||
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.description).toBe(
|
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.description).toBe(
|
||||||
@ -180,7 +180,7 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
|
@ -194,7 +194,7 @@ describe("Berries Abound - Mystery Encounter", () => {
|
|||||||
|
|
||||||
// Should be enraged
|
// Should be enraged
|
||||||
expect(enemyField[0].summonData.statStages).toEqual([0, 1, 0, 1, 1, 0, 0]);
|
expect(enemyField[0].summonData.statStages).toEqual([0, 1, 0, 1, 1, 0, 0]);
|
||||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selected_bad`);
|
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selectedBad`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should start battle if fastest pokemon is slower than boss above wave 50", async () => {
|
it("should start battle if fastest pokemon is slower than boss above wave 50", async () => {
|
||||||
@ -218,7 +218,7 @@ describe("Berries Abound - Mystery Encounter", () => {
|
|||||||
|
|
||||||
// Should be enraged
|
// Should be enraged
|
||||||
expect(enemyField[0].summonData.statStages).toEqual([1, 1, 1, 1, 1, 0, 0]);
|
expect(enemyField[0].summonData.statStages).toEqual([1, 1, 1, 1, 1, 0, 0]);
|
||||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selected_bad`);
|
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selectedBad`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should skip battle when fastest pokemon is faster than boss", async () => {
|
it("Should skip battle when fastest pokemon is faster than boss", async () => {
|
||||||
|
@ -181,7 +181,7 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(BugTypeSuperfanEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(BugTypeSuperfanEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -389,7 +389,7 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -513,17 +513,17 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.3.selected_dialogue`,
|
text: `${namespace}:option.3.selectedDialogue`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ describe("Clowning Around - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(ClowningAroundEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(ClowningAroundEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -249,11 +249,11 @@ describe("Clowning Around - Mystery Encounter", () => {
|
|||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected_2`,
|
text: `${namespace}:option.2.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_3`,
|
text: `${namespace}:option.2.selected3`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@ -334,11 +334,11 @@ describe("Clowning Around - Mystery Encounter", () => {
|
|||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected_2`,
|
text: `${namespace}:option.3.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.3.selected_3`,
|
text: `${namespace}:option.3.selected3`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -186,8 +186,8 @@ describe("Dancing Lessons - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -186,7 +186,7 @@ describe("Delibird-y - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -348,7 +348,7 @@ describe("Delibird-y - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -61,7 +61,7 @@ describe("Department Store Sale - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(DepartmentStoreSaleEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(DepartmentStoreSaleEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -61,7 +61,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -78,7 +78,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ describe("Fiery Fallout - Mystery Encounter", () => {
|
|||||||
expect(option1.dialogue).toStrictEqual({
|
expect(option1.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -143,7 +143,7 @@ describe("Fight or Flight - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -71,7 +71,7 @@ describe("Fun And Games! - Mystery Encounter", () => {
|
|||||||
expect(FunAndGamesEncounter.dialogue.intro).toStrictEqual([
|
expect(FunAndGamesEncounter.dialogue.intro).toStrictEqual([
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(FunAndGamesEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(FunAndGamesEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -98,7 +98,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -99,9 +99,9 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
|||||||
expect(option1.dialogue).toBeDefined();
|
expect(option1.dialogue).toBeDefined();
|
||||||
expect(option1.dialogue).toStrictEqual({
|
expect(option1.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.1.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected`,
|
text: `${namespace}:option.1.selected`,
|
||||||
@ -162,9 +162,9 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
|||||||
expect(option2.dialogue).toBeDefined();
|
expect(option2.dialogue).toBeDefined();
|
||||||
expect(option2.dialogue).toStrictEqual({
|
expect(option2.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -65,7 +65,7 @@ describe("Part-Timer - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(PartTimerEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(PartTimerEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -219,7 +219,7 @@ describe("Part-Timer - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -207,7 +207,7 @@ describe("Teleporting Hijinks - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -71,7 +71,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: "trainerNames:expert_pokemon_breeder",
|
speaker: "trainerNames:expert_pokemon_breeder",
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -67,7 +67,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
|
|||||||
expect(dialogue).toBeDefined();
|
expect(dialogue).toBeDefined();
|
||||||
expect(dialogue.intro).toStrictEqual([
|
expect(dialogue.intro).toStrictEqual([
|
||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:intro_dialogue` },
|
{ speaker: `${namespace}:speaker`, text: `${namespace}:introDialogue` },
|
||||||
]);
|
]);
|
||||||
const { title, description, query } = dialogue.encounterOptionsDialogue!;
|
const { title, description, query } = dialogue.encounterOptionsDialogue!;
|
||||||
expect(title).toBe(`${namespace}:title`);
|
expect(title).toBe(`${namespace}:title`);
|
||||||
@ -120,7 +120,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
|
|||||||
buttonTooltip: expect.stringMatching(new RegExp(`^${namespace}\\:option\\.1\\.tooltip(_shiny)?$`)),
|
buttonTooltip: expect.stringMatching(new RegExp(`^${namespace}\\:option\\.1\\.tooltip(_shiny)?$`)),
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected_message`,
|
text: `${namespace}:option.1.selectedMessage`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -73,7 +73,7 @@ describe("The Winstrate Challenge - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(TheWinstrateChallengeEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(TheWinstrateChallengeEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -172,7 +172,7 @@ describe("Uncommon Breed - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -237,7 +237,7 @@ describe("Uncommon Breed - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -68,7 +68,7 @@ describe("Weird Dream - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(WeirdDreamEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(WeirdDreamEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
Loading…
Reference in New Issue
Block a user