mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
[i18n] Change i18n keys to be camel case Part 2 (#6250)
* Change Achv locales * Change berry locales use * change bgm name locales use * change biome locales uses * change double battle dialogue use * change misc dialogue locales use * change dialogue locales use * change growth locales use * update menu-ui-handler locales use * change ME texts locales uses * fix biome drop down * fix a few missed keys * Update locales submodule
This commit is contained in:
parent
5d13714ea6
commit
03f54c1d8a
@ -1 +1 @@
|
|||||||
Subproject commit 748146c687fd1bdddd015ec4592c4e2b1496af32
|
Subproject commit 100e607c03d9c5ea0d405b2b75300cd0e6fa1635
|
@ -7,6 +7,7 @@ import { TimeOfDay } from "#enums/time-of-day";
|
|||||||
import { TrainerType } from "#enums/trainer-type";
|
import { TrainerType } from "#enums/trainer-type";
|
||||||
import { randSeedInt } from "#utils/common";
|
import { randSeedInt } from "#utils/common";
|
||||||
import { getEnumValues } from "#utils/enums";
|
import { getEnumValues } from "#utils/enums";
|
||||||
|
import { toCamelCase } from "#utils/strings";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export function getBiomeName(biome: BiomeId | -1) {
|
export function getBiomeName(biome: BiomeId | -1) {
|
||||||
@ -15,13 +16,13 @@ export function getBiomeName(biome: BiomeId | -1) {
|
|||||||
}
|
}
|
||||||
switch (biome) {
|
switch (biome) {
|
||||||
case BiomeId.GRASS:
|
case BiomeId.GRASS:
|
||||||
return i18next.t("biome:GRASS");
|
return i18next.t("biome:grass");
|
||||||
case BiomeId.RUINS:
|
case BiomeId.RUINS:
|
||||||
return i18next.t("biome:RUINS");
|
return i18next.t("biome:ruins");
|
||||||
case BiomeId.END:
|
case BiomeId.END:
|
||||||
return i18next.t("biome:END");
|
return i18next.t("biome:end");
|
||||||
default:
|
default:
|
||||||
return i18next.t(`biome:${BiomeId[biome].toUpperCase()}`);
|
return i18next.t(`biome:${toCamelCase(BiomeId[biome])}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,11 +11,11 @@ import { NumberHolder, randSeedInt, toDmgValue } from "#utils/common";
|
|||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export function getBerryName(berryType: BerryType): string {
|
export function getBerryName(berryType: BerryType): string {
|
||||||
return i18next.t(`berry:${BerryType[berryType]}.name`);
|
return i18next.t(`berry:${BerryType[berryType].toLowerCase()}.name`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBerryEffectDescription(berryType: BerryType): string {
|
export function getBerryEffectDescription(berryType: BerryType): string {
|
||||||
return i18next.t(`berry:${BerryType[berryType]}.effect`);
|
return i18next.t(`berry:${BerryType[berryType].toLowerCase()}.effect`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BerryPredicate = (pokemon: Pokemon) => boolean;
|
export type BerryPredicate = (pokemon: Pokemon) => boolean;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,43 +2,43 @@
|
|||||||
// that caused this to be moved out in the first place
|
// that caused this to be moved out in the first place
|
||||||
export const doubleBattleDialogue = {
|
export const doubleBattleDialogue = {
|
||||||
blue_red_double: {
|
blue_red_double: {
|
||||||
encounter: ["doubleBattleDialogue:blue_red_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:blueRedDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:blue_red_double.victory.1"],
|
victory: ["doubleBattleDialogue:blueRedDouble.victory.1"],
|
||||||
},
|
},
|
||||||
red_blue_double: {
|
red_blue_double: {
|
||||||
encounter: ["doubleBattleDialogue:red_blue_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:redBlueDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:red_blue_double.victory.1"],
|
victory: ["doubleBattleDialogue:redBlueDouble.victory.1"],
|
||||||
},
|
},
|
||||||
tate_liza_double: {
|
tate_liza_double: {
|
||||||
encounter: ["doubleBattleDialogue:tate_liza_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:tateLizaDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:tate_liza_double.victory.1"],
|
victory: ["doubleBattleDialogue:tateLizaDouble.victory.1"],
|
||||||
},
|
},
|
||||||
liza_tate_double: {
|
liza_tate_double: {
|
||||||
encounter: ["doubleBattleDialogue:liza_tate_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:lizaTateDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:liza_tate_double.victory.1"],
|
victory: ["doubleBattleDialogue:lizaTateDouble.victory.1"],
|
||||||
},
|
},
|
||||||
wallace_steven_double: {
|
wallace_steven_double: {
|
||||||
encounter: ["doubleBattleDialogue:wallace_steven_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:wallaceStevenDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:wallace_steven_double.victory.1"],
|
victory: ["doubleBattleDialogue:wallaceStevenDouble.victory.1"],
|
||||||
},
|
},
|
||||||
steven_wallace_double: {
|
steven_wallace_double: {
|
||||||
encounter: ["doubleBattleDialogue:steven_wallace_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:stevenWallaceDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:steven_wallace_double.victory.1"],
|
victory: ["doubleBattleDialogue:stevenWallaceDouble.victory.1"],
|
||||||
},
|
},
|
||||||
alder_iris_double: {
|
alder_iris_double: {
|
||||||
encounter: ["doubleBattleDialogue:alder_iris_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:alderIrisDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:alder_iris_double.victory.1"],
|
victory: ["doubleBattleDialogue:alderIrisDouble.victory.1"],
|
||||||
},
|
},
|
||||||
iris_alder_double: {
|
iris_alder_double: {
|
||||||
encounter: ["doubleBattleDialogue:iris_alder_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:irisAlderDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:iris_alder_double.victory.1"],
|
victory: ["doubleBattleDialogue:irisAlderDouble.victory.1"],
|
||||||
},
|
},
|
||||||
marnie_piers_double: {
|
marnie_piers_double: {
|
||||||
encounter: ["doubleBattleDialogue:marnie_piers_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:marniePiersDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:marnie_piers_double.victory.1"],
|
victory: ["doubleBattleDialogue:marniePiersDouble.victory.1"],
|
||||||
},
|
},
|
||||||
piers_marnie_double: {
|
piers_marnie_double: {
|
||||||
encounter: ["doubleBattleDialogue:piers_marnie_double.encounter.1"],
|
encounter: ["doubleBattleDialogue:piersMarnieDouble.encounter.1"],
|
||||||
victory: ["doubleBattleDialogue:piers_marnie_double.victory.1"],
|
victory: ["doubleBattleDialogue:piersMarnieDouble.victory.1"],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -132,7 +132,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
|||||||
const moneyCost = (encounter.options[0].requirements[0] as MoneyRequirement).requiredMoney;
|
const moneyCost = (encounter.options[0].requirements[0] as MoneyRequirement).requiredMoney;
|
||||||
updatePlayerMoney(-moneyCost, true, false);
|
updatePlayerMoney(-moneyCost, true, false);
|
||||||
await showEncounterText(
|
await showEncounterText(
|
||||||
i18next.t("mysteryEncounterMessages:paid_money", {
|
i18next.t("mysteryEncounterMessages:paidMoney", {
|
||||||
amount: moneyCost,
|
amount: moneyCost,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -149,7 +149,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
await showEncounterText(
|
await showEncounterText(
|
||||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -231,7 +231,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
await showEncounterText(
|
await showEncounterText(
|
||||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -286,7 +286,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
|
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
await showEncounterText(
|
await showEncounterText(
|
||||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -467,7 +467,7 @@ export function updatePlayerMoney(changeValue: number, playSound = true, showMes
|
|||||||
if (showMessage) {
|
if (showMessage) {
|
||||||
if (changeValue < 0) {
|
if (changeValue < 0) {
|
||||||
globalScene.phaseManager.queueMessage(
|
globalScene.phaseManager.queueMessage(
|
||||||
i18next.t("mysteryEncounterMessages:paid_money", {
|
i18next.t("mysteryEncounterMessages:paidMoney", {
|
||||||
amount: -changeValue,
|
amount: -changeValue,
|
||||||
}),
|
}),
|
||||||
null,
|
null,
|
||||||
@ -475,7 +475,7 @@ export function updatePlayerMoney(changeValue: number, playSound = true, showMes
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
globalScene.phaseManager.queueMessage(
|
globalScene.phaseManager.queueMessage(
|
||||||
i18next.t("mysteryEncounterMessages:receive_money", {
|
i18next.t("mysteryEncounterMessages:receiveMoney", {
|
||||||
amount: changeValue,
|
amount: changeValue,
|
||||||
}),
|
}),
|
||||||
null,
|
null,
|
||||||
@ -587,7 +587,7 @@ export function selectPokemonForOption(
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
onHover: () => {
|
onHover: () => {
|
||||||
showEncounterText(i18next.t("mysteryEncounterMessages:cancel_option"), 0, 0, false);
|
showEncounterText(i18next.t("mysteryEncounterMessages:cancelOption"), 0, 0, false);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -720,7 +720,7 @@ export function selectOptionThenPokemon(
|
|||||||
if (onHoverOverCancelOption) {
|
if (onHoverOverCancelOption) {
|
||||||
onHoverOverCancelOption();
|
onHoverOverCancelOption();
|
||||||
}
|
}
|
||||||
showEncounterText(i18next.t("mysteryEncounterMessages:cancel_option"), 0, 0, false);
|
showEncounterText(i18next.t("mysteryEncounterMessages:cancelOption"), 0, 0, false);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
const genderIndex = globalScene.gameData.gender ?? PlayerGender.UNSET;
|
const genderIndex = globalScene.gameData.gender ?? PlayerGender.UNSET;
|
||||||
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
||||||
globalScene.ui.showDialogue(
|
globalScene.ui.showDialogue(
|
||||||
i18next.t("miscDialogue:ending_endless", { context: genderStr }),
|
i18next.t("miscDialogue:endingEndless", { context: genderStr }),
|
||||||
i18next.t("miscDialogue:ending_name"),
|
i18next.t("miscDialogue:endingName"),
|
||||||
0,
|
0,
|
||||||
() => this.handleGameOver(),
|
() => this.handleGameOver(),
|
||||||
);
|
);
|
||||||
|
@ -214,244 +214,245 @@ export function getAchievementDescription(localizationKey: string): string {
|
|||||||
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
||||||
|
|
||||||
switch (localizationKey) {
|
switch (localizationKey) {
|
||||||
case "10K_MONEY":
|
case "10KMoney":
|
||||||
return i18next.t("achv:MoneyAchv.description", {
|
return i18next.t("achv:moneyAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
moneyAmount: achvs._10K_MONEY.moneyAmount.toLocaleString("en-US"),
|
moneyAmount: achvs._10K_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "100K_MONEY":
|
case "100KMoney":
|
||||||
return i18next.t("achv:MoneyAchv.description", {
|
return i18next.t("achv:moneyAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
moneyAmount: achvs._100K_MONEY.moneyAmount.toLocaleString("en-US"),
|
moneyAmount: achvs._100K_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "1M_MONEY":
|
case "1MMoney":
|
||||||
return i18next.t("achv:MoneyAchv.description", {
|
return i18next.t("achv:moneyAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
moneyAmount: achvs._1M_MONEY.moneyAmount.toLocaleString("en-US"),
|
moneyAmount: achvs._1M_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "10M_MONEY":
|
case "10MMoney":
|
||||||
return i18next.t("achv:MoneyAchv.description", {
|
return i18next.t("achv:moneyAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
moneyAmount: achvs._10M_MONEY.moneyAmount.toLocaleString("en-US"),
|
moneyAmount: achvs._10M_MONEY.moneyAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "250_DMG":
|
case "250Dmg":
|
||||||
return i18next.t("achv:DamageAchv.description", {
|
return i18next.t("achv:damageAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
damageAmount: achvs._250_DMG.damageAmount.toLocaleString("en-US"),
|
damageAmount: achvs._250_DMG.damageAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "1000_DMG":
|
case "1000Dmg":
|
||||||
return i18next.t("achv:DamageAchv.description", {
|
return i18next.t("achv:damageAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
damageAmount: achvs._1000_DMG.damageAmount.toLocaleString("en-US"),
|
damageAmount: achvs._1000_DMG.damageAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "2500_DMG":
|
case "2500Dmg":
|
||||||
return i18next.t("achv:DamageAchv.description", {
|
return i18next.t("achv:damageAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
damageAmount: achvs._2500_DMG.damageAmount.toLocaleString("en-US"),
|
damageAmount: achvs._2500_DMG.damageAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "10000_DMG":
|
case "10000Dmg":
|
||||||
return i18next.t("achv:DamageAchv.description", {
|
return i18next.t("achv:damageAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
damageAmount: achvs._10000_DMG.damageAmount.toLocaleString("en-US"),
|
damageAmount: achvs._10000_DMG.damageAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "250_HEAL":
|
case "250Heal":
|
||||||
return i18next.t("achv:HealAchv.description", {
|
return i18next.t("achv:healAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
healAmount: achvs._250_HEAL.healAmount.toLocaleString("en-US"),
|
healAmount: achvs._250_HEAL.healAmount.toLocaleString("en-US"),
|
||||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||||
});
|
});
|
||||||
case "1000_HEAL":
|
case "1000Heal":
|
||||||
return i18next.t("achv:HealAchv.description", {
|
return i18next.t("achv:healAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
healAmount: achvs._1000_HEAL.healAmount.toLocaleString("en-US"),
|
healAmount: achvs._1000_HEAL.healAmount.toLocaleString("en-US"),
|
||||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||||
});
|
});
|
||||||
case "2500_HEAL":
|
case "2500Heal":
|
||||||
return i18next.t("achv:HealAchv.description", {
|
return i18next.t("achv:healAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
healAmount: achvs._2500_HEAL.healAmount.toLocaleString("en-US"),
|
healAmount: achvs._2500_HEAL.healAmount.toLocaleString("en-US"),
|
||||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||||
});
|
});
|
||||||
case "10000_HEAL":
|
case "10000Heal":
|
||||||
return i18next.t("achv:HealAchv.description", {
|
return i18next.t("achv:healAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
healAmount: achvs._10000_HEAL.healAmount.toLocaleString("en-US"),
|
healAmount: achvs._10000_HEAL.healAmount.toLocaleString("en-US"),
|
||||||
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
HP: i18next.t(getShortenedStatKey(Stat.HP)),
|
||||||
});
|
});
|
||||||
case "LV_100":
|
case "lv100":
|
||||||
return i18next.t("achv:LevelAchv.description", {
|
return i18next.t("achv:levelAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
level: achvs.LV_100.level,
|
level: achvs.LV_100.level,
|
||||||
});
|
});
|
||||||
case "LV_250":
|
case "lv250":
|
||||||
return i18next.t("achv:LevelAchv.description", {
|
return i18next.t("achv:levelAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
level: achvs.LV_250.level,
|
level: achvs.LV_250.level,
|
||||||
});
|
});
|
||||||
case "LV_1000":
|
case "lv1000":
|
||||||
return i18next.t("achv:LevelAchv.description", {
|
return i18next.t("achv:levelAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
level: achvs.LV_1000.level,
|
level: achvs.LV_1000.level,
|
||||||
});
|
});
|
||||||
case "10_RIBBONS":
|
case "10Ribbons":
|
||||||
return i18next.t("achv:RibbonAchv.description", {
|
return i18next.t("achv:ribbonAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
ribbonAmount: achvs._10_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
ribbonAmount: achvs._10_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "25_RIBBONS":
|
case "25Ribbons":
|
||||||
return i18next.t("achv:RibbonAchv.description", {
|
return i18next.t("achv:ribbonAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
ribbonAmount: achvs._25_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
ribbonAmount: achvs._25_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "50_RIBBONS":
|
case "50Ribbons":
|
||||||
return i18next.t("achv:RibbonAchv.description", {
|
return i18next.t("achv:ribbonAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
ribbonAmount: achvs._50_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
ribbonAmount: achvs._50_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "75_RIBBONS":
|
case "75Ribbons":
|
||||||
return i18next.t("achv:RibbonAchv.description", {
|
return i18next.t("achv:ribbonAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
ribbonAmount: achvs._75_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
ribbonAmount: achvs._75_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "100_RIBBONS":
|
case "100Ribbons":
|
||||||
return i18next.t("achv:RibbonAchv.description", {
|
return i18next.t("achv:ribbonAchv.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
ribbonAmount: achvs._100_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
ribbonAmount: achvs._100_RIBBONS.ribbonAmount.toLocaleString("en-US"),
|
||||||
});
|
});
|
||||||
case "TRANSFER_MAX_STAT_STAGE":
|
case "transferMaxStatStage":
|
||||||
return i18next.t("achv:TRANSFER_MAX_STAT_STAGE.description", {
|
return i18next.t("achv:transferMaxStatStage.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MAX_FRIENDSHIP":
|
case "maxFriendship":
|
||||||
return i18next.t("achv:MAX_FRIENDSHIP.description", {
|
return i18next.t("achv:maxFriendship.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MEGA_EVOLVE":
|
case "megaEvolve":
|
||||||
return i18next.t("achv:MEGA_EVOLVE.description", { context: genderStr });
|
return i18next.t("achv:megaEvolve.description", { context: genderStr });
|
||||||
case "GIGANTAMAX":
|
case "gigantamax":
|
||||||
return i18next.t("achv:GIGANTAMAX.description", { context: genderStr });
|
return i18next.t("achv:gigantamax.description", { context: genderStr });
|
||||||
case "TERASTALLIZE":
|
case "terastallize":
|
||||||
return i18next.t("achv:TERASTALLIZE.description", { context: genderStr });
|
return i18next.t("achv:terastallize.description", { context: genderStr });
|
||||||
case "STELLAR_TERASTALLIZE":
|
case "stellarTerastallize":
|
||||||
return i18next.t("achv:STELLAR_TERASTALLIZE.description", {
|
return i18next.t("achv:stellarTerastallize.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "SPLICE":
|
case "splice":
|
||||||
return i18next.t("achv:SPLICE.description", { context: genderStr });
|
return i18next.t("achv:splice.description", { context: genderStr });
|
||||||
case "MINI_BLACK_HOLE":
|
case "miniBlackHole":
|
||||||
return i18next.t("achv:MINI_BLACK_HOLE.description", {
|
return i18next.t("achv:miniBlackHole.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "CATCH_MYTHICAL":
|
case "catchMythical":
|
||||||
return i18next.t("achv:CATCH_MYTHICAL.description", {
|
return i18next.t("achv:catchMythical.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "CATCH_SUB_LEGENDARY":
|
case "catchSubLegendary":
|
||||||
return i18next.t("achv:CATCH_SUB_LEGENDARY.description", {
|
return i18next.t("achv:catchSubLegendary.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "CATCH_LEGENDARY":
|
case "catchLegendary":
|
||||||
return i18next.t("achv:CATCH_LEGENDARY.description", {
|
return i18next.t("achv:catchLegendary.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "SEE_SHINY":
|
case "seeShiny":
|
||||||
return i18next.t("achv:SEE_SHINY.description", { context: genderStr });
|
return i18next.t("achv:seeShiny.description", { context: genderStr });
|
||||||
case "SHINY_PARTY":
|
case "shinyParty":
|
||||||
return i18next.t("achv:SHINY_PARTY.description", { context: genderStr });
|
return i18next.t("achv:shinyParty.description", { context: genderStr });
|
||||||
case "HATCH_MYTHICAL":
|
case "hatchMythical":
|
||||||
return i18next.t("achv:HATCH_MYTHICAL.description", {
|
return i18next.t("achv:hatchMythical.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "HATCH_SUB_LEGENDARY":
|
case "hatchSubLegendary":
|
||||||
return i18next.t("achv:HATCH_SUB_LEGENDARY.description", {
|
return i18next.t("achv:hatchSubLegendary.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "HATCH_LEGENDARY":
|
case "hatchLegendary":
|
||||||
return i18next.t("achv:HATCH_LEGENDARY.description", {
|
return i18next.t("achv:hatchLegendary.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "HATCH_SHINY":
|
case "hatchShiny":
|
||||||
return i18next.t("achv:HATCH_SHINY.description", { context: genderStr });
|
return i18next.t("achv:hatchShiny.description", { context: genderStr });
|
||||||
case "HIDDEN_ABILITY":
|
case "hiddenAbility":
|
||||||
return i18next.t("achv:HIDDEN_ABILITY.description", {
|
return i18next.t("achv:hiddenAbility.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "PERFECT_IVS":
|
case "perfectIvs":
|
||||||
return i18next.t("achv:PERFECT_IVS.description", { context: genderStr });
|
return i18next.t("achv:perfectIvs.description", { context: genderStr });
|
||||||
case "CLASSIC_VICTORY":
|
case "classicVictory":
|
||||||
return i18next.t("achv:CLASSIC_VICTORY.description", {
|
return i18next.t("achv:classicVictory.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "UNEVOLVED_CLASSIC_VICTORY":
|
case "unevolvedClassicVictory":
|
||||||
return i18next.t("achv:UNEVOLVED_CLASSIC_VICTORY.description", {
|
return i18next.t("achv:unevolvedClassicVictory.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MONO_GEN_ONE":
|
case "monoGenOne":
|
||||||
return i18next.t("achv:MONO_GEN_ONE.description", { context: genderStr });
|
return i18next.t("achv:monoGenOne.description", { context: genderStr });
|
||||||
case "MONO_GEN_TWO":
|
case "monoGenTwo":
|
||||||
return i18next.t("achv:MONO_GEN_TWO.description", { context: genderStr });
|
return i18next.t("achv:monoGenTwo.description", { context: genderStr });
|
||||||
case "MONO_GEN_THREE":
|
case "monoGenThree":
|
||||||
return i18next.t("achv:MONO_GEN_THREE.description", {
|
return i18next.t("achv:monoGenThree.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MONO_GEN_FOUR":
|
case "monoGenFour":
|
||||||
return i18next.t("achv:MONO_GEN_FOUR.description", {
|
return i18next.t("achv:monoGenFour.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MONO_GEN_FIVE":
|
case "monoGenFive":
|
||||||
return i18next.t("achv:MONO_GEN_FIVE.description", {
|
return i18next.t("achv:monoGenFive.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MONO_GEN_SIX":
|
case "monoGenSix":
|
||||||
return i18next.t("achv:MONO_GEN_SIX.description", { context: genderStr });
|
return i18next.t("achv:monoGenSix.description", { context: genderStr });
|
||||||
case "MONO_GEN_SEVEN":
|
case "monoGenSeven":
|
||||||
return i18next.t("achv:MONO_GEN_SEVEN.description", {
|
return i18next.t("achv:monoGenSeven.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MONO_GEN_EIGHT":
|
case "monoGenEight":
|
||||||
return i18next.t("achv:MONO_GEN_EIGHT.description", {
|
return i18next.t("achv:monoGenEight.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MONO_GEN_NINE":
|
case "monoGenNine":
|
||||||
return i18next.t("achv:MONO_GEN_NINE.description", {
|
return i18next.t("achv:monoGenNine.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "MONO_NORMAL":
|
case "monoNormal":
|
||||||
case "MONO_FIGHTING":
|
case "monoFighting":
|
||||||
case "MONO_FLYING":
|
case "monoFlying":
|
||||||
case "MONO_POISON":
|
case "monoPoison":
|
||||||
case "MONO_GROUND":
|
case "monoGround":
|
||||||
case "MONO_ROCK":
|
case "monoRock":
|
||||||
case "MONO_BUG":
|
case "monoBug":
|
||||||
case "MONO_GHOST":
|
case "monoGhost":
|
||||||
case "MONO_STEEL":
|
case "monoSteel":
|
||||||
case "MONO_FIRE":
|
case "monoFire":
|
||||||
case "MONO_WATER":
|
case "monoWater":
|
||||||
case "MONO_GRASS":
|
case "monoGrass":
|
||||||
case "MONO_ELECTRIC":
|
case "monoElectric":
|
||||||
case "MONO_PSYCHIC":
|
case "monoPsychic":
|
||||||
case "MONO_ICE":
|
case "monoIce":
|
||||||
case "MONO_DRAGON":
|
case "monoDragon":
|
||||||
case "MONO_DARK":
|
case "monoDark":
|
||||||
case "MONO_FAIRY":
|
case "monoFairy":
|
||||||
return i18next.t("achv:MonoType.description", {
|
return i18next.t("achv:monoType.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
type: i18next.t(`pokemonInfo:Type.${localizationKey.slice(5)}`),
|
// Todo: Remove the `toUpperCase()` again after changing the `pokemonInfo.json` locales
|
||||||
|
type: i18next.t(`pokemonInfo:Type.${localizationKey.slice(4).toUpperCase()}`),
|
||||||
});
|
});
|
||||||
case "FRESH_START":
|
case "freshStart":
|
||||||
return i18next.t("achv:FRESH_START.description", { context: genderStr });
|
return i18next.t("achv:freshStart.description", { context: genderStr });
|
||||||
case "INVERSE_BATTLE":
|
case "inverseBattle":
|
||||||
return i18next.t("achv:INVERSE_BATTLE.description", {
|
return i18next.t("achv:inverseBattle.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
case "FLIP_STATS":
|
case "flipStats":
|
||||||
return i18next.t("achv:FLIP_STATS.description", { context: genderStr });
|
return i18next.t("achv:flipStats.description", { context: genderStr });
|
||||||
case "FLIP_INVERSE":
|
case "flipInverse":
|
||||||
return i18next.t("achv:FLIP_INVERSE.description", { context: genderStr });
|
return i18next.t("achv:flipInverse.description", { context: genderStr });
|
||||||
case "NUZLOCKE":
|
case "nuzlocke":
|
||||||
return i18next.t("achv:NUZLOCKE.description", { context: genderStr });
|
return i18next.t("achv:nuzlocke.description", { context: genderStr });
|
||||||
case "BREEDERS_IN_SPACE":
|
case "breedersInSpace":
|
||||||
return i18next.t("achv:BREEDERS_IN_SPACE.description", {
|
return i18next.t("achv:breedersInSpace.description", {
|
||||||
context: genderStr,
|
context: genderStr,
|
||||||
});
|
});
|
||||||
default:
|
default:
|
||||||
@ -460,84 +461,84 @@ export function getAchievementDescription(localizationKey: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const achvs = {
|
export const achvs = {
|
||||||
_10K_MONEY: new MoneyAchv("10K_MONEY", "", 10000, "nugget", 10),
|
_10K_MONEY: new MoneyAchv("10KMoney", "", 10000, "nugget", 10),
|
||||||
_100K_MONEY: new MoneyAchv("100K_MONEY", "", 100000, "big_nugget", 25).setSecret(true),
|
_100K_MONEY: new MoneyAchv("100KMoney", "", 100000, "big_nugget", 25).setSecret(true),
|
||||||
_1M_MONEY: new MoneyAchv("1M_MONEY", "", 1000000, "relic_gold", 50).setSecret(true),
|
_1M_MONEY: new MoneyAchv("1MMoney", "", 1000000, "relic_gold", 50).setSecret(true),
|
||||||
_10M_MONEY: new MoneyAchv("10M_MONEY", "", 10000000, "coin_case", 100).setSecret(true),
|
_10M_MONEY: new MoneyAchv("10MMoney", "", 10000000, "coin_case", 100).setSecret(true),
|
||||||
_250_DMG: new DamageAchv("250_DMG", "", 250, "lucky_punch", 10),
|
_250_DMG: new DamageAchv("250Dmg", "", 250, "lucky_punch", 10),
|
||||||
_1000_DMG: new DamageAchv("1000_DMG", "", 1000, "lucky_punch_great", 25).setSecret(true),
|
_1000_DMG: new DamageAchv("1000Dmg", "", 1000, "lucky_punch_great", 25).setSecret(true),
|
||||||
_2500_DMG: new DamageAchv("2500_DMG", "", 2500, "lucky_punch_ultra", 50).setSecret(true),
|
_2500_DMG: new DamageAchv("2500Dmg", "", 2500, "lucky_punch_ultra", 50).setSecret(true),
|
||||||
_10000_DMG: new DamageAchv("10000_DMG", "", 10000, "lucky_punch_master", 100).setSecret(true),
|
_10000_DMG: new DamageAchv("10000Dmg", "", 10000, "lucky_punch_master", 100).setSecret(true),
|
||||||
_250_HEAL: new HealAchv("250_HEAL", "", 250, "potion", 10),
|
_250_HEAL: new HealAchv("250Heal", "", 250, "potion", 10),
|
||||||
_1000_HEAL: new HealAchv("1000_HEAL", "", 1000, "super_potion", 25).setSecret(true),
|
_1000_HEAL: new HealAchv("1000Heal", "", 1000, "super_potion", 25).setSecret(true),
|
||||||
_2500_HEAL: new HealAchv("2500_HEAL", "", 2500, "hyper_potion", 50).setSecret(true),
|
_2500_HEAL: new HealAchv("2500Heal", "", 2500, "hyper_potion", 50).setSecret(true),
|
||||||
_10000_HEAL: new HealAchv("10000_HEAL", "", 10000, "max_potion", 100).setSecret(true),
|
_10000_HEAL: new HealAchv("10000Heal", "", 10000, "max_potion", 100).setSecret(true),
|
||||||
LV_100: new LevelAchv("LV_100", "", 100, "rare_candy", 25).setSecret(),
|
LV_100: new LevelAchv("lv100", "", 100, "rare_candy", 25).setSecret(),
|
||||||
LV_250: new LevelAchv("LV_250", "", 250, "rarer_candy", 50).setSecret(true),
|
LV_250: new LevelAchv("lv250", "", 250, "rarer_candy", 50).setSecret(true),
|
||||||
LV_1000: new LevelAchv("LV_1000", "", 1000, "candy_jar", 100).setSecret(true),
|
LV_1000: new LevelAchv("lv1000", "", 1000, "candy_jar", 100).setSecret(true),
|
||||||
_10_RIBBONS: new RibbonAchv("10_RIBBONS", "", 10, "bronze_ribbon", 10),
|
_10_RIBBONS: new RibbonAchv("10Ribbons", "", 10, "bronze_ribbon", 10),
|
||||||
_25_RIBBONS: new RibbonAchv("25_RIBBONS", "", 25, "great_ribbon", 25).setSecret(true),
|
_25_RIBBONS: new RibbonAchv("25Ribbons", "", 25, "great_ribbon", 25).setSecret(true),
|
||||||
_50_RIBBONS: new RibbonAchv("50_RIBBONS", "", 50, "ultra_ribbon", 50).setSecret(true),
|
_50_RIBBONS: new RibbonAchv("50Ribbons", "", 50, "ultra_ribbon", 50).setSecret(true),
|
||||||
_75_RIBBONS: new RibbonAchv("75_RIBBONS", "", 75, "rogue_ribbon", 75).setSecret(true),
|
_75_RIBBONS: new RibbonAchv("75Ribbons", "", 75, "rogue_ribbon", 75).setSecret(true),
|
||||||
_100_RIBBONS: new RibbonAchv("100_RIBBONS", "", 100, "master_ribbon", 100).setSecret(true),
|
_100_RIBBONS: new RibbonAchv("100Ribbons", "", 100, "master_ribbon", 100).setSecret(true),
|
||||||
TRANSFER_MAX_STAT_STAGE: new Achv("TRANSFER_MAX_STAT_STAGE", "", "TRANSFER_MAX_STAT_STAGE.description", "baton", 20),
|
TRANSFER_MAX_STAT_STAGE: new Achv("transferMaxStatStage", "", "transferMaxStatStage.description", "baton", 20),
|
||||||
MAX_FRIENDSHIP: new Achv("MAX_FRIENDSHIP", "", "MAX_FRIENDSHIP.description", "soothe_bell", 25),
|
MAX_FRIENDSHIP: new Achv("maxFriendship", "", "maxFriendship.description", "soothe_bell", 25),
|
||||||
MEGA_EVOLVE: new Achv("MEGA_EVOLVE", "", "MEGA_EVOLVE.description", "mega_bracelet", 50),
|
MEGA_EVOLVE: new Achv("megaEvolve", "", "megaEvolve.description", "mega_bracelet", 50),
|
||||||
GIGANTAMAX: new Achv("GIGANTAMAX", "", "GIGANTAMAX.description", "dynamax_band", 50),
|
GIGANTAMAX: new Achv("gigantamax", "", "gigantamax.description", "dynamax_band", 50),
|
||||||
TERASTALLIZE: new Achv("TERASTALLIZE", "", "TERASTALLIZE.description", "tera_orb", 25),
|
TERASTALLIZE: new Achv("terastallize", "", "terastallize.description", "tera_orb", 25),
|
||||||
STELLAR_TERASTALLIZE: new Achv(
|
STELLAR_TERASTALLIZE: new Achv(
|
||||||
"STELLAR_TERASTALLIZE",
|
"stellarTerastallize",
|
||||||
"",
|
"",
|
||||||
"STELLAR_TERASTALLIZE.description",
|
"stellarTerastallize.description",
|
||||||
"stellar_tera_shard",
|
"stellar_tera_shard",
|
||||||
25,
|
25,
|
||||||
).setSecret(true),
|
).setSecret(true),
|
||||||
SPLICE: new Achv("SPLICE", "", "SPLICE.description", "dna_splicers", 10),
|
SPLICE: new Achv("splice", "", "splice.description", "dna_splicers", 10),
|
||||||
MINI_BLACK_HOLE: new ModifierAchv(
|
MINI_BLACK_HOLE: new ModifierAchv(
|
||||||
"MINI_BLACK_HOLE",
|
"miniBlackHole",
|
||||||
"",
|
"",
|
||||||
"MINI_BLACK_HOLE.description",
|
"miniBlackHole.description",
|
||||||
"mini_black_hole",
|
"mini_black_hole",
|
||||||
25,
|
25,
|
||||||
modifier => modifier instanceof TurnHeldItemTransferModifier,
|
modifier => modifier instanceof TurnHeldItemTransferModifier,
|
||||||
).setSecret(),
|
).setSecret(),
|
||||||
CATCH_MYTHICAL: new Achv("CATCH_MYTHICAL", "", "CATCH_MYTHICAL.description", "strange_ball", 50).setSecret(),
|
CATCH_MYTHICAL: new Achv("catchMythical", "", "catchMythical.description", "strange_ball", 50).setSecret(),
|
||||||
CATCH_SUB_LEGENDARY: new Achv("CATCH_SUB_LEGENDARY", "", "CATCH_SUB_LEGENDARY.description", "rb", 75).setSecret(),
|
CATCH_SUB_LEGENDARY: new Achv("catchSubLegendary", "", "catchSubLegendary.description", "rb", 75).setSecret(),
|
||||||
CATCH_LEGENDARY: new Achv("CATCH_LEGENDARY", "", "CATCH_LEGENDARY.description", "mb", 100).setSecret(),
|
CATCH_LEGENDARY: new Achv("catchLegendary", "", "catchLegendary.description", "mb", 100).setSecret(),
|
||||||
SEE_SHINY: new Achv("SEE_SHINY", "", "SEE_SHINY.description", "pb_gold", 75),
|
SEE_SHINY: new Achv("seeShiny", "", "seeShiny.description", "pb_gold", 75),
|
||||||
SHINY_PARTY: new Achv("SHINY_PARTY", "", "SHINY_PARTY.description", "shiny_charm", 100).setSecret(true),
|
SHINY_PARTY: new Achv("shinyParty", "", "shinyParty.description", "shiny_charm", 100).setSecret(true),
|
||||||
HATCH_MYTHICAL: new Achv("HATCH_MYTHICAL", "", "HATCH_MYTHICAL.description", "mystery_egg", 75).setSecret(),
|
HATCH_MYTHICAL: new Achv("hatchMythical", "", "hatchMythical.description", "mystery_egg", 75).setSecret(),
|
||||||
HATCH_SUB_LEGENDARY: new Achv(
|
HATCH_SUB_LEGENDARY: new Achv(
|
||||||
"HATCH_SUB_LEGENDARY",
|
"hatchSubLegendary",
|
||||||
"",
|
"",
|
||||||
"HATCH_SUB_LEGENDARY.description",
|
"hatchSubLegendary.description",
|
||||||
"oval_stone",
|
"oval_stone",
|
||||||
100,
|
100,
|
||||||
).setSecret(),
|
).setSecret(),
|
||||||
HATCH_LEGENDARY: new Achv("HATCH_LEGENDARY", "", "HATCH_LEGENDARY.description", "lucky_egg", 125).setSecret(),
|
HATCH_LEGENDARY: new Achv("hatchLegendary", "", "hatchLegendary.description", "lucky_egg", 125).setSecret(),
|
||||||
HATCH_SHINY: new Achv("HATCH_SHINY", "", "HATCH_SHINY.description", "golden_egg", 100).setSecret(),
|
HATCH_SHINY: new Achv("hatchShiny", "", "hatchShiny.description", "golden_egg", 100).setSecret(),
|
||||||
HIDDEN_ABILITY: new Achv("HIDDEN_ABILITY", "", "HIDDEN_ABILITY.description", "ability_charm", 75),
|
HIDDEN_ABILITY: new Achv("hiddenAbility", "", "hiddenAbility.description", "ability_charm", 75),
|
||||||
PERFECT_IVS: new Achv("PERFECT_IVS", "", "PERFECT_IVS.description", "blunder_policy", 100),
|
PERFECT_IVS: new Achv("perfectIvs", "", "perfectIvs.description", "blunder_policy", 100),
|
||||||
CLASSIC_VICTORY: new Achv(
|
CLASSIC_VICTORY: new Achv(
|
||||||
"CLASSIC_VICTORY",
|
"classicVictory",
|
||||||
"",
|
"",
|
||||||
"CLASSIC_VICTORY.description",
|
"classicVictory.description",
|
||||||
"relic_crown",
|
"relic_crown",
|
||||||
150,
|
150,
|
||||||
_ => globalScene.gameData.gameStats.sessionsWon === 0,
|
_ => globalScene.gameData.gameStats.sessionsWon === 0,
|
||||||
),
|
),
|
||||||
UNEVOLVED_CLASSIC_VICTORY: new Achv(
|
UNEVOLVED_CLASSIC_VICTORY: new Achv(
|
||||||
"UNEVOLVED_CLASSIC_VICTORY",
|
"unevolvedClassicVictory",
|
||||||
"",
|
"",
|
||||||
"UNEVOLVED_CLASSIC_VICTORY.description",
|
"unevolvedClassicVictory.description",
|
||||||
"eviolite",
|
"eviolite",
|
||||||
175,
|
175,
|
||||||
_ => globalScene.getPlayerParty().some(p => p.getSpeciesForm(true).speciesId in pokemonEvolutions),
|
_ => globalScene.getPlayerParty().some(p => p.getSpeciesForm(true).speciesId in pokemonEvolutions),
|
||||||
),
|
),
|
||||||
MONO_GEN_ONE_VICTORY: new ChallengeAchv(
|
MONO_GEN_ONE_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_ONE",
|
"monoGenOne",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_ONE.description",
|
"monoGenOne.description",
|
||||||
"ribbon_gen1",
|
"ribbon_gen1",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -548,9 +549,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_TWO_VICTORY: new ChallengeAchv(
|
MONO_GEN_TWO_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_TWO",
|
"monoGenTwo",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_TWO.description",
|
"monoGenTwo.description",
|
||||||
"ribbon_gen2",
|
"ribbon_gen2",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -561,9 +562,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_THREE_VICTORY: new ChallengeAchv(
|
MONO_GEN_THREE_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_THREE",
|
"monoGenThree",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_THREE.description",
|
"monoGenThree.description",
|
||||||
"ribbon_gen3",
|
"ribbon_gen3",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -574,9 +575,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_FOUR_VICTORY: new ChallengeAchv(
|
MONO_GEN_FOUR_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_FOUR",
|
"monoGenFour",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_FOUR.description",
|
"monoGenFour.description",
|
||||||
"ribbon_gen4",
|
"ribbon_gen4",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -587,9 +588,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_FIVE_VICTORY: new ChallengeAchv(
|
MONO_GEN_FIVE_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_FIVE",
|
"monoGenFive",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_FIVE.description",
|
"monoGenFive.description",
|
||||||
"ribbon_gen5",
|
"ribbon_gen5",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -600,9 +601,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_SIX_VICTORY: new ChallengeAchv(
|
MONO_GEN_SIX_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_SIX",
|
"monoGenSix",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_SIX.description",
|
"monoGenSix.description",
|
||||||
"ribbon_gen6",
|
"ribbon_gen6",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -613,9 +614,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_SEVEN_VICTORY: new ChallengeAchv(
|
MONO_GEN_SEVEN_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_SEVEN",
|
"monoGenSeven",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_SEVEN.description",
|
"monoGenSeven.description",
|
||||||
"ribbon_gen7",
|
"ribbon_gen7",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -626,9 +627,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_EIGHT_VICTORY: new ChallengeAchv(
|
MONO_GEN_EIGHT_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_EIGHT",
|
"monoGenEight",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_EIGHT.description",
|
"monoGenEight.description",
|
||||||
"ribbon_gen8",
|
"ribbon_gen8",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -639,9 +640,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GEN_NINE_VICTORY: new ChallengeAchv(
|
MONO_GEN_NINE_VICTORY: new ChallengeAchv(
|
||||||
"MONO_GEN_NINE",
|
"monoGenNine",
|
||||||
"",
|
"",
|
||||||
"MONO_GEN_NINE.description",
|
"monoGenNine.description",
|
||||||
"ribbon_gen9",
|
"ribbon_gen9",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -652,9 +653,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_NORMAL: new ChallengeAchv(
|
MONO_NORMAL: new ChallengeAchv(
|
||||||
"MONO_NORMAL",
|
"monoNormal",
|
||||||
"",
|
"",
|
||||||
"MONO_NORMAL.description",
|
"monoNormal.description",
|
||||||
"silk_scarf",
|
"silk_scarf",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -665,9 +666,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_FIGHTING: new ChallengeAchv(
|
MONO_FIGHTING: new ChallengeAchv(
|
||||||
"MONO_FIGHTING",
|
"monoFighting",
|
||||||
"",
|
"",
|
||||||
"MONO_FIGHTING.description",
|
"monoFighting.description",
|
||||||
"black_belt",
|
"black_belt",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -678,9 +679,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_FLYING: new ChallengeAchv(
|
MONO_FLYING: new ChallengeAchv(
|
||||||
"MONO_FLYING",
|
"monoFlying",
|
||||||
"",
|
"",
|
||||||
"MONO_FLYING.description",
|
"monoFlying.description",
|
||||||
"sharp_beak",
|
"sharp_beak",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -691,9 +692,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_POISON: new ChallengeAchv(
|
MONO_POISON: new ChallengeAchv(
|
||||||
"MONO_POISON",
|
"monoPoison",
|
||||||
"",
|
"",
|
||||||
"MONO_POISON.description",
|
"monoPoison.description",
|
||||||
"poison_barb",
|
"poison_barb",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -704,9 +705,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GROUND: new ChallengeAchv(
|
MONO_GROUND: new ChallengeAchv(
|
||||||
"MONO_GROUND",
|
"monoGround",
|
||||||
"",
|
"",
|
||||||
"MONO_GROUND.description",
|
"monoGround.description",
|
||||||
"soft_sand",
|
"soft_sand",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -717,9 +718,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_ROCK: new ChallengeAchv(
|
MONO_ROCK: new ChallengeAchv(
|
||||||
"MONO_ROCK",
|
"monoRock",
|
||||||
"",
|
"",
|
||||||
"MONO_ROCK.description",
|
"monoRock.description",
|
||||||
"hard_stone",
|
"hard_stone",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -730,9 +731,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_BUG: new ChallengeAchv(
|
MONO_BUG: new ChallengeAchv(
|
||||||
"MONO_BUG",
|
"monoBug",
|
||||||
"",
|
"",
|
||||||
"MONO_BUG.description",
|
"monoBug.description",
|
||||||
"silver_powder",
|
"silver_powder",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -743,9 +744,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GHOST: new ChallengeAchv(
|
MONO_GHOST: new ChallengeAchv(
|
||||||
"MONO_GHOST",
|
"monoGhost",
|
||||||
"",
|
"",
|
||||||
"MONO_GHOST.description",
|
"monoGhost.description",
|
||||||
"spell_tag",
|
"spell_tag",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -756,9 +757,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_STEEL: new ChallengeAchv(
|
MONO_STEEL: new ChallengeAchv(
|
||||||
"MONO_STEEL",
|
"monoSteel",
|
||||||
"",
|
"",
|
||||||
"MONO_STEEL.description",
|
"monoSteel.description",
|
||||||
"metal_coat",
|
"metal_coat",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -769,9 +770,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_FIRE: new ChallengeAchv(
|
MONO_FIRE: new ChallengeAchv(
|
||||||
"MONO_FIRE",
|
"monoFire",
|
||||||
"",
|
"",
|
||||||
"MONO_FIRE.description",
|
"monoFire.description",
|
||||||
"charcoal",
|
"charcoal",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -782,9 +783,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_WATER: new ChallengeAchv(
|
MONO_WATER: new ChallengeAchv(
|
||||||
"MONO_WATER",
|
"monoWater",
|
||||||
"",
|
"",
|
||||||
"MONO_WATER.description",
|
"monoWater.description",
|
||||||
"mystic_water",
|
"mystic_water",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -795,9 +796,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_GRASS: new ChallengeAchv(
|
MONO_GRASS: new ChallengeAchv(
|
||||||
"MONO_GRASS",
|
"monoGrass",
|
||||||
"",
|
"",
|
||||||
"MONO_GRASS.description",
|
"monoGrass.description",
|
||||||
"miracle_seed",
|
"miracle_seed",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -808,9 +809,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_ELECTRIC: new ChallengeAchv(
|
MONO_ELECTRIC: new ChallengeAchv(
|
||||||
"MONO_ELECTRIC",
|
"monoElectric",
|
||||||
"",
|
"",
|
||||||
"MONO_ELECTRIC.description",
|
"monoElectric.description",
|
||||||
"magnet",
|
"magnet",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -821,9 +822,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_PSYCHIC: new ChallengeAchv(
|
MONO_PSYCHIC: new ChallengeAchv(
|
||||||
"MONO_PSYCHIC",
|
"monoPsychic",
|
||||||
"",
|
"",
|
||||||
"MONO_PSYCHIC.description",
|
"monoPsychic.description",
|
||||||
"twisted_spoon",
|
"twisted_spoon",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -834,9 +835,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_ICE: new ChallengeAchv(
|
MONO_ICE: new ChallengeAchv(
|
||||||
"MONO_ICE",
|
"monoIce",
|
||||||
"",
|
"",
|
||||||
"MONO_ICE.description",
|
"monoIce.description",
|
||||||
"never_melt_ice",
|
"never_melt_ice",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -847,9 +848,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_DRAGON: new ChallengeAchv(
|
MONO_DRAGON: new ChallengeAchv(
|
||||||
"MONO_DRAGON",
|
"monoDragon",
|
||||||
"",
|
"",
|
||||||
"MONO_DRAGON.description",
|
"monoDragon.description",
|
||||||
"dragon_fang",
|
"dragon_fang",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -860,9 +861,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_DARK: new ChallengeAchv(
|
MONO_DARK: new ChallengeAchv(
|
||||||
"MONO_DARK",
|
"monoDark",
|
||||||
"",
|
"",
|
||||||
"MONO_DARK.description",
|
"monoDark.description",
|
||||||
"black_glasses",
|
"black_glasses",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -873,9 +874,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
MONO_FAIRY: new ChallengeAchv(
|
MONO_FAIRY: new ChallengeAchv(
|
||||||
"MONO_FAIRY",
|
"monoFairy",
|
||||||
"",
|
"",
|
||||||
"MONO_FAIRY.description",
|
"monoFairy.description",
|
||||||
"fairy_feather",
|
"fairy_feather",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -886,9 +887,9 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
FRESH_START: new ChallengeAchv(
|
FRESH_START: new ChallengeAchv(
|
||||||
"FRESH_START",
|
"freshStart",
|
||||||
"",
|
"",
|
||||||
"FRESH_START.description",
|
"freshStart.description",
|
||||||
"reviver_seed",
|
"reviver_seed",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -899,25 +900,25 @@ export const achvs = {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
INVERSE_BATTLE: new ChallengeAchv(
|
INVERSE_BATTLE: new ChallengeAchv(
|
||||||
"INVERSE_BATTLE",
|
"inverseBattle",
|
||||||
"",
|
"",
|
||||||
"INVERSE_BATTLE.description",
|
"inverseBattle.description",
|
||||||
"inverse",
|
"inverse",
|
||||||
100,
|
100,
|
||||||
c => c instanceof InverseBattleChallenge && c.value > 0,
|
c => c instanceof InverseBattleChallenge && c.value > 0,
|
||||||
),
|
),
|
||||||
FLIP_STATS: new ChallengeAchv(
|
FLIP_STATS: new ChallengeAchv(
|
||||||
"FLIP_STATS",
|
"flipStats",
|
||||||
"",
|
"",
|
||||||
"FLIP_STATS.description",
|
"flipStats.description",
|
||||||
"dubious_disc",
|
"dubious_disc",
|
||||||
100,
|
100,
|
||||||
c => c instanceof FlipStatChallenge && c.value > 0,
|
c => c instanceof FlipStatChallenge && c.value > 0,
|
||||||
),
|
),
|
||||||
FLIP_INVERSE: new ChallengeAchv(
|
FLIP_INVERSE: new ChallengeAchv(
|
||||||
"FLIP_INVERSE",
|
"flipInverse",
|
||||||
"",
|
"",
|
||||||
"FLIP_INVERSE.description",
|
"flipInverse.description",
|
||||||
"cracked_pot",
|
"cracked_pot",
|
||||||
100,
|
100,
|
||||||
c =>
|
c =>
|
||||||
@ -926,8 +927,8 @@ export const achvs = {
|
|||||||
globalScene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0),
|
globalScene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0),
|
||||||
).setSecret(),
|
).setSecret(),
|
||||||
// TODO: Decide on icon
|
// TODO: Decide on icon
|
||||||
NUZLOCKE: new ChallengeAchv("NUZLOCKE", "", "NUZLOCKE.description", "leaf_stone", 100, isNuzlockeChallenge),
|
NUZLOCKE: new ChallengeAchv("nuzlocke", "", "nuzlocke.description", "leaf_stone", 100, isNuzlockeChallenge),
|
||||||
BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 50).setSecret(),
|
BREEDERS_IN_SPACE: new Achv("breedersInSpace", "", "breedersInSpace.description", "moon_stone", 50).setSecret(),
|
||||||
};
|
};
|
||||||
|
|
||||||
export function initAchievements() {
|
export function initAchievements() {
|
||||||
|
@ -96,7 +96,7 @@ export class AchvsUiHandler extends MessageUiHandler {
|
|||||||
const genderIndex = globalScene.gameData.gender ?? PlayerGender.MALE;
|
const genderIndex = globalScene.gameData.gender ?? PlayerGender.MALE;
|
||||||
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
||||||
|
|
||||||
this.achvsName = i18next.t("achv:Achievements.name", { context: genderStr });
|
this.achvsName = i18next.t("achv:achievements.name", { context: genderStr });
|
||||||
this.vouchersName = i18next.t("voucher:vouchers");
|
this.vouchersName = i18next.t("voucher:vouchers");
|
||||||
|
|
||||||
this.iconsBg = addWindow(0, this.headerBg.height, WIDTH - 2, HEIGHT - this.headerBg.height - 68).setOrigin(0);
|
this.iconsBg = addWindow(0, this.headerBg.height, WIDTH - 2, HEIGHT - this.headerBg.height - 68).setOrigin(0);
|
||||||
@ -214,7 +214,7 @@ export class AchvsUiHandler extends MessageUiHandler {
|
|||||||
this.showText(!hidden ? achv.description : "");
|
this.showText(!hidden ? achv.description : "");
|
||||||
this.scoreText.setText(`${achv.score}pt`);
|
this.scoreText.setText(`${achv.score}pt`);
|
||||||
this.unlockText.setText(
|
this.unlockText.setText(
|
||||||
unlocked ? new Date(achvUnlocks[achv.id]).toLocaleDateString() : i18next.t("achv:Locked.name"),
|
unlocked ? new Date(achvUnlocks[achv.id]).toLocaleDateString() : i18next.t("achv:locked.name"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { TextStyle } from "#enums/text-style";
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { addTextObject } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { toTitleCase } from "#utils/strings";
|
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
const hiddenX = -150;
|
const hiddenX = -150;
|
||||||
@ -100,7 +100,7 @@ export class BgmBar extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRealBgmName(bgmName: string): string {
|
getRealBgmName(bgmName: string): string {
|
||||||
return i18next.t([`bgmName:${bgmName}`, "bgmName:missing_entries"], {
|
return i18next.t([`bgmName:${toCamelCase(bgmName)}`, "bgmName:missingEntries"], {
|
||||||
name: toTitleCase(bgmName),
|
name: toTitleCase(bgmName),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import { addWindow, WindowVariant } from "#ui/ui-theme";
|
|||||||
import { fixedInt, isLocal, sessionIdKey } from "#utils/common";
|
import { fixedInt, isLocal, sessionIdKey } from "#utils/common";
|
||||||
import { getCookie } from "#utils/cookies";
|
import { getCookie } from "#utils/cookies";
|
||||||
import { getEnumValues } from "#utils/enums";
|
import { getEnumValues } from "#utils/enums";
|
||||||
|
import { toCamelCase } from "#utils/strings";
|
||||||
import { isBeta } from "#utils/utility-vars";
|
import { isBeta } from "#utils/utility-vars";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
@ -138,7 +139,7 @@ export class MenuUiHandler extends MessageUiHandler {
|
|||||||
this.optionSelectText = addTextObject(
|
this.optionSelectText = addTextObject(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
this.menuOptions.map(o => `${i18next.t(`menuUiHandler:${MenuOptions[o]}`)}`).join("\n"),
|
this.menuOptions.map(o => `${i18next.t(`menuUiHandler:${toCamelCase(MenuOptions[o])}`)}`).join("\n"),
|
||||||
TextStyle.WINDOW,
|
TextStyle.WINDOW,
|
||||||
{ maxLines: this.menuOptions.length },
|
{ maxLines: this.menuOptions.length },
|
||||||
);
|
);
|
||||||
|
@ -473,7 +473,7 @@ export class MysteryEncounterUiHandler extends UiHandler {
|
|||||||
const viewPartyText = addBBCodeTextObject(
|
const viewPartyText = addBBCodeTextObject(
|
||||||
globalScene.scaledCanvas.width,
|
globalScene.scaledCanvas.width,
|
||||||
-24,
|
-24,
|
||||||
getBBCodeFrag(i18next.t("mysteryEncounterMessages:view_party_button"), TextStyle.PARTY),
|
getBBCodeFrag(i18next.t("mysteryEncounterMessages:viewPartyButton"), TextStyle.PARTY),
|
||||||
TextStyle.PARTY,
|
TextStyle.PARTY,
|
||||||
);
|
);
|
||||||
this.optionsContainer.add(viewPartyText);
|
this.optionsContainer.add(viewPartyText);
|
||||||
@ -694,7 +694,7 @@ export class MysteryEncounterUiHandler extends UiHandler {
|
|||||||
duration: 750,
|
duration: 750,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
this.dexProgressContainer.on("pointerover", () => {
|
this.dexProgressContainer.on("pointerover", () => {
|
||||||
globalScene.ui.showTooltip("", i18next.t("mysteryEncounterMessages:affects_pokedex"), true);
|
globalScene.ui.showTooltip("", i18next.t("mysteryEncounterMessages:affectsPokedex"), true);
|
||||||
});
|
});
|
||||||
this.dexProgressContainer.on("pointerout", () => {
|
this.dexProgressContainer.on("pointerout", () => {
|
||||||
globalScene.ui.hideTooltip();
|
globalScene.ui.hideTooltip();
|
||||||
|
@ -57,7 +57,7 @@ import { addWindow } from "#ui/ui-theme";
|
|||||||
import { BooleanHolder, getLocalizedSpriteKey, isNullOrUndefined, padInt, rgbHexToRgba } from "#utils/common";
|
import { BooleanHolder, getLocalizedSpriteKey, isNullOrUndefined, padInt, rgbHexToRgba } from "#utils/common";
|
||||||
import { getEnumValues } from "#utils/enums";
|
import { getEnumValues } from "#utils/enums";
|
||||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
||||||
import { toTitleCase } from "#utils/strings";
|
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||||
import { argbFromRgba } from "@material/material-color-utilities";
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
||||||
@ -1517,13 +1517,13 @@ export class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.biomes.map(b => {
|
this.biomes.map(b => {
|
||||||
options.push({
|
options.push({
|
||||||
label:
|
label:
|
||||||
i18next.t(`biome:${BiomeId[b.biome].toUpperCase()}`) +
|
i18next.t(`biome:${toCamelCase(BiomeId[b.biome])}`) +
|
||||||
" - " +
|
" - " +
|
||||||
i18next.t(`biome:${BiomePoolTier[b.tier].toUpperCase()}`) +
|
i18next.t(`biome:${toCamelCase(BiomePoolTier[b.tier])}`) +
|
||||||
(b.tod.length === 1 && b.tod[0] === -1
|
(b.tod.length === 1 && b.tod[0] === -1
|
||||||
? ""
|
? ""
|
||||||
: " (" +
|
: " (" +
|
||||||
b.tod.map(tod => i18next.t(`biome:${TimeOfDay[tod].toUpperCase()}`)).join(", ") +
|
b.tod.map(tod => i18next.t(`biome:${toCamelCase(TimeOfDay[tod])}`)).join(", ") +
|
||||||
")"),
|
")"),
|
||||||
handler: () => false,
|
handler: () => false,
|
||||||
});
|
});
|
||||||
@ -1538,13 +1538,13 @@ export class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.preBiomes.map(b => {
|
this.preBiomes.map(b => {
|
||||||
options.push({
|
options.push({
|
||||||
label:
|
label:
|
||||||
i18next.t(`biome:${BiomeId[b.biome].toUpperCase()}`) +
|
i18next.t(`biome:${toCamelCase(BiomeId[b.biome])}`) +
|
||||||
" - " +
|
" - " +
|
||||||
i18next.t(`biome:${BiomePoolTier[b.tier].toUpperCase()}`) +
|
i18next.t(`biome:${toCamelCase(BiomePoolTier[b.tier])}`) +
|
||||||
(b.tod.length === 1 && b.tod[0] === -1
|
(b.tod.length === 1 && b.tod[0] === -1
|
||||||
? ""
|
? ""
|
||||||
: " (" +
|
: " (" +
|
||||||
b.tod.map(tod => i18next.t(`biome:${TimeOfDay[tod].toUpperCase()}`)).join(", ") +
|
b.tod.map(tod => i18next.t(`biome:${toCamelCase(TimeOfDay[tod])}`)).join(", ") +
|
||||||
")"),
|
")"),
|
||||||
handler: () => false,
|
handler: () => false,
|
||||||
});
|
});
|
||||||
@ -2612,7 +2612,7 @@ export class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
// Setting growth rate text
|
// Setting growth rate text
|
||||||
if (isFormCaught) {
|
if (isFormCaught) {
|
||||||
let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
|
let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
|
||||||
const growthAux = growthReadable.replace(" ", "_");
|
const growthAux = toCamelCase(growthReadable);
|
||||||
if (i18next.exists("growth:" + growthAux)) {
|
if (i18next.exists("growth:" + growthAux)) {
|
||||||
growthReadable = i18next.t(("growth:" + growthAux) as any);
|
growthReadable = i18next.t(("growth:" + growthAux) as any);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@ import { BooleanHolder, fixedInt, getLocalizedSpriteKey, padInt, randIntRange, r
|
|||||||
import type { StarterPreferences } from "#utils/data";
|
import type { StarterPreferences } from "#utils/data";
|
||||||
import { loadStarterPreferences } from "#utils/data";
|
import { loadStarterPreferences } from "#utils/data";
|
||||||
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
|
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
|
||||||
|
import { toCamelCase } from "#utils/strings";
|
||||||
import { argbFromRgba } from "@material/material-color-utilities";
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
@ -324,7 +325,7 @@ export class PokedexUiHandler extends MessageUiHandler {
|
|||||||
.filter(value => typeof value === "number") // Filter numeric values from the enum
|
.filter(value => typeof value === "number") // Filter numeric values from the enum
|
||||||
.map(
|
.map(
|
||||||
(biomeValue, index) =>
|
(biomeValue, index) =>
|
||||||
new DropDownOption(index, new DropDownLabel(i18next.t(`biome:${BiomeId[biomeValue].toUpperCase()}`))),
|
new DropDownOption(index, new DropDownLabel(i18next.t(`biome:${toCamelCase(BiomeId[biomeValue])}`))),
|
||||||
);
|
);
|
||||||
biomeOptions.push(new DropDownOption(biomeOptions.length, new DropDownLabel(i18next.t("filterBar:uncatchable"))));
|
biomeOptions.push(new DropDownOption(biomeOptions.length, new DropDownLabel(i18next.t("filterBar:uncatchable"))));
|
||||||
const biomeDropDown: DropDown = new DropDown(0, 0, biomeOptions, this.updateStarters, DropDownType.HYBRID);
|
const biomeDropDown: DropDown = new DropDown(0, 0, biomeOptions, this.updateStarters, DropDownType.HYBRID);
|
||||||
|
@ -73,7 +73,7 @@ import {
|
|||||||
import type { StarterPreferences } from "#utils/data";
|
import type { StarterPreferences } from "#utils/data";
|
||||||
import { loadStarterPreferences, saveStarterPreferences } from "#utils/data";
|
import { loadStarterPreferences, saveStarterPreferences } from "#utils/data";
|
||||||
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
|
import { getPokemonSpeciesForm, getPokerusStarters } from "#utils/pokemon-utils";
|
||||||
import { toTitleCase } from "#utils/strings";
|
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||||
import { argbFromRgba } from "@material/material-color-utilities";
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import type { GameObjects } from "phaser";
|
import type { GameObjects } from "phaser";
|
||||||
@ -2264,7 +2264,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
options.push({
|
options.push({
|
||||||
label: i18next.t("menuUiHandler:POKEDEX"),
|
label: i18next.t("menuUiHandler:pokedex"),
|
||||||
handler: () => {
|
handler: () => {
|
||||||
ui.setMode(UiMode.STARTER_SELECT).then(() => {
|
ui.setMode(UiMode.STARTER_SELECT).then(() => {
|
||||||
const attributes = {
|
const attributes = {
|
||||||
@ -3470,7 +3470,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
//Growth translate
|
//Growth translate
|
||||||
let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
|
let growthReadable = toTitleCase(GrowthRate[species.growthRate]);
|
||||||
const growthAux = growthReadable.replace(" ", "_");
|
const growthAux = toCamelCase(growthReadable);
|
||||||
if (i18next.exists("growth:" + growthAux)) {
|
if (i18next.exists("growth:" + growthAux)) {
|
||||||
growthReadable = i18next.t(("growth:" + growthAux) as any);
|
growthReadable = i18next.t(("growth:" + growthAux) as any);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user