From cf80abe33f7882f04812c63622c96d45f8e9ba00 Mon Sep 17 00:00:00 2001 From: ImperialSympathizer Date: Sun, 22 Sep 2024 19:04:56 -0400 Subject: [PATCH] small locales fixes --- .../encounters/mysterious-chest-encounter.ts | 24 ++++++++++++------- .../bug-type-superfan-dialogue.json | 2 +- .../clowning-around-dialogue.json | 2 +- .../dancing-lessons-dialogue.json | 2 +- .../mysterious-chest-dialogue.json | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts b/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts index b5da4340dea..4117de14fc4 100644 --- a/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts +++ b/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts @@ -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 diff --git a/src/locales/en/mystery-encounters/bug-type-superfan-dialogue.json b/src/locales/en/mystery-encounters/bug-type-superfan-dialogue.json index 09488addb98..188c94c7994 100644 --- a/src/locales/en/mystery-encounters/bug-type-superfan-dialogue.json +++ b/src/locales/en/mystery-encounters/bug-type-superfan-dialogue.json @@ -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": { diff --git a/src/locales/en/mystery-encounters/clowning-around-dialogue.json b/src/locales/en/mystery-encounters/clowning-around-dialogue.json index 17781240838..743358b4f29 100644 --- a/src/locales/en/mystery-encounters/clowning-around-dialogue.json +++ b/src/locales/en/mystery-encounters/clowning-around-dialogue.json @@ -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!" diff --git a/src/locales/en/mystery-encounters/dancing-lessons-dialogue.json b/src/locales/en/mystery-encounters/dancing-lessons-dialogue.json index 8e2883ecb16..065c4e0c06c 100644 --- a/src/locales/en/mystery-encounters/dancing-lessons-dialogue.json +++ b/src/locales/en/mystery-encounters/dancing-lessons-dialogue.json @@ -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": { diff --git a/src/locales/en/mystery-encounters/mysterious-chest-dialogue.json b/src/locales/en/mystery-encounters/mysterious-chest-dialogue.json index 1de7a5992ed..e789771b7b1 100644 --- a/src/locales/en/mystery-encounters/mysterious-chest-dialogue.json +++ b/src/locales/en/mystery-encounters/mysterious-chest-dialogue.json @@ -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.",