mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 16:26:25 +00:00
small locales fixes
This commit is contained in:
parent
eb0e8ccca7
commit
cf80abe33f
@ -19,10 +19,11 @@ import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||
const namespace = "mysteryEncounter:mysteriousChest";
|
||||
|
||||
const RAND_LENGTH = 100;
|
||||
const COMMON_REWARDS_WEIGHT = 20; // 20%
|
||||
const ULTRA_REWARDS_WEIGHT = 50; // 30%
|
||||
const ROGUE_REWARDS_WEIGHT = 60; // 10%
|
||||
const MASTER_REWARDS_WEIGHT = 65; // 5%
|
||||
const TRAP_PERCENT = 35;
|
||||
const COMMON_REWARDS_PERCENT = 20;
|
||||
const ULTRA_REWARDS_PERCENT = 30;
|
||||
const ROGUE_REWARDS_PERCENT = 10;
|
||||
const MASTER_REWARDS_PERCENT = 5;
|
||||
|
||||
/**
|
||||
* Mysterious Chest encounter.
|
||||
@ -83,6 +84,11 @@ export const MysteriousChestEncounter: MysteryEncounter =
|
||||
encounter.enemyPartyConfigs = [config];
|
||||
|
||||
encounter.setDialogueToken("gimmighoulName", getPokemonSpecies(Species.GIMMIGHOUL).getName());
|
||||
encounter.setDialogueToken("trapPercent", TRAP_PERCENT.toString());
|
||||
encounter.setDialogueToken("commonPercent", COMMON_REWARDS_PERCENT.toString());
|
||||
encounter.setDialogueToken("ultraPercent", ULTRA_REWARDS_PERCENT.toString());
|
||||
encounter.setDialogueToken("roguePercent", ROGUE_REWARDS_PERCENT.toString());
|
||||
encounter.setDialogueToken("masterPercent", MASTER_REWARDS_PERCENT.toString());
|
||||
|
||||
return true;
|
||||
})
|
||||
@ -109,7 +115,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
|
||||
roll
|
||||
};
|
||||
|
||||
if (roll >= MASTER_REWARDS_WEIGHT) {
|
||||
if (roll < TRAP_PERCENT) {
|
||||
// Chest is springing trap, change to red chest sprite
|
||||
const blueChestSprites = introVisuals.getSpriteAtIndex(0);
|
||||
const redChestSprites = introVisuals.getSpriteAtIndex(1);
|
||||
@ -124,7 +130,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
|
||||
// Open the chest
|
||||
const encounter = scene.currentBattle.mysteryEncounter!;
|
||||
const roll = encounter.misc.roll;
|
||||
if (roll < COMMON_REWARDS_WEIGHT) {
|
||||
if (roll >= RAND_LENGTH - COMMON_REWARDS_PERCENT) {
|
||||
// Choose between 2 COMMON / 2 GREAT tier items (20%)
|
||||
setEncounterRewards(scene, {
|
||||
guaranteedModifierTiers: [
|
||||
@ -137,7 +143,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
|
||||
// Display result message then proceed to rewards
|
||||
queueEncounterMessage(scene, `${namespace}.option.1.normal`);
|
||||
leaveEncounterWithoutBattle(scene);
|
||||
} else if (roll < ULTRA_REWARDS_WEIGHT) {
|
||||
} else if (roll >= RAND_LENGTH - COMMON_REWARDS_PERCENT - ULTRA_REWARDS_PERCENT) {
|
||||
// Choose between 3 ULTRA tier items (30%)
|
||||
setEncounterRewards(scene, {
|
||||
guaranteedModifierTiers: [
|
||||
@ -149,13 +155,13 @@ export const MysteriousChestEncounter: MysteryEncounter =
|
||||
// Display result message then proceed to rewards
|
||||
queueEncounterMessage(scene, `${namespace}.option.1.good`);
|
||||
leaveEncounterWithoutBattle(scene);
|
||||
} else if (roll < ROGUE_REWARDS_WEIGHT) {
|
||||
} else if (roll >= RAND_LENGTH - COMMON_REWARDS_PERCENT - ULTRA_REWARDS_PERCENT - ROGUE_REWARDS_PERCENT) {
|
||||
// Choose between 2 ROGUE tier items (10%)
|
||||
setEncounterRewards(scene, { guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE] });
|
||||
// Display result message then proceed to rewards
|
||||
queueEncounterMessage(scene, `${namespace}.option.1.great`);
|
||||
leaveEncounterWithoutBattle(scene);
|
||||
} else if (roll < MASTER_REWARDS_WEIGHT) {
|
||||
} else if (roll >= RAND_LENGTH - COMMON_REWARDS_PERCENT - ULTRA_REWARDS_PERCENT - ROGUE_REWARDS_PERCENT - MASTER_REWARDS_PERCENT) {
|
||||
// Choose 1 MASTER tier item (5%)
|
||||
setEncounterRewards(scene, { guaranteedModifierTiers: [ModifierTier.MASTER] });
|
||||
// Display result message then proceed to rewards
|
||||
|
@ -8,7 +8,7 @@
|
||||
"option": {
|
||||
"1": {
|
||||
"label": "Offer to Battle",
|
||||
"tooltip": "(-) Challenging Battle\n(+) Teach a Pokémon a Bug Type Move",
|
||||
"tooltip": "(-) Challenging Battle\n(+) Teach any Pokémon a Bug Type Move",
|
||||
"selected": "A challenge, eh?\nMy bugs are more than ready for you!"
|
||||
},
|
||||
"2": {
|
||||
|
@ -10,7 +10,7 @@
|
||||
"label": "Battle the Clown",
|
||||
"tooltip": "(-) Strange Battle\n(?) Affects Pokémon Abilities",
|
||||
"selected": "Your pitiful Pokémon are poised for a pathetic performance!",
|
||||
"apply_ability_dialogue": "A sensational showcase!\nYour savvy suits a sensational skill as spoils!",
|
||||
"apply_ability_dialogue": "A sensational showcase!\nYour savvy suits a special skill as spoils!",
|
||||
"apply_ability_message": "The clown is offering to permanently Skill Swap one of your Pokémon's ability to {{ability}}!",
|
||||
"ability_prompt": "Would you like to permanently teach a Pokémon the {{ability}} ability?",
|
||||
"ability_gained": "@s{level_up_fanfare}{{chosenPokemon}} gained the {{ability}} ability!"
|
||||
|
@ -12,7 +12,7 @@
|
||||
},
|
||||
"2": {
|
||||
"label": "Learn Its Dance",
|
||||
"tooltip": "(+) Teach a Pokémon Revelation Dance",
|
||||
"tooltip": "(+) Teach any Pokémon Revelation Dance",
|
||||
"selected": "You watch the {{oricorioName}} closely as it performs its dance...$@s{level_up_fanfare}Your {{selectedPokemon}} learned from the {{oricorioName}}!"
|
||||
},
|
||||
"3": {
|
||||
|
@ -6,7 +6,7 @@
|
||||
"option": {
|
||||
"1": {
|
||||
"label": "Open It",
|
||||
"tooltip": "@[SUMMARY_BLUE]{(35%) Something terrible}\n@[SUMMARY_GREEN]{(40%) Okay Rewards}\n@[SUMMARY_GREEN]{(20%) Good Rewards}\n@[SUMMARY_GREEN]{(4%) Great Rewards}\n@[SUMMARY_GREEN]{(1%) Amazing Rewards}",
|
||||
"tooltip": "@[SUMMARY_BLUE]{({{trapPercent}}%) Something terrible}\n@[SUMMARY_GREEN]{({{commonPercent}}%) Okay Rewards}\n@[SUMMARY_GREEN]{({{ultraPercent}}%) Good Rewards}\n@[SUMMARY_GREEN]{({{roguePercent}}%) Great Rewards}\n@[SUMMARY_GREEN]{({{masterPercent}}%) Amazing Rewards}",
|
||||
"selected": "You open the chest to find...",
|
||||
"normal": "Just some normal tools and items.",
|
||||
"good": "Some pretty nice tools and items.",
|
||||
|
Loading…
Reference in New Issue
Block a user