small locales fixes

This commit is contained in:
ImperialSympathizer 2024-09-22 19:04:56 -04:00
parent eb0e8ccca7
commit cf80abe33f
5 changed files with 19 additions and 13 deletions

View File

@ -19,10 +19,11 @@ import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
const namespace = "mysteryEncounter:mysteriousChest"; const namespace = "mysteryEncounter:mysteriousChest";
const RAND_LENGTH = 100; const RAND_LENGTH = 100;
const COMMON_REWARDS_WEIGHT = 20; // 20% const TRAP_PERCENT = 35;
const ULTRA_REWARDS_WEIGHT = 50; // 30% const COMMON_REWARDS_PERCENT = 20;
const ROGUE_REWARDS_WEIGHT = 60; // 10% const ULTRA_REWARDS_PERCENT = 30;
const MASTER_REWARDS_WEIGHT = 65; // 5% const ROGUE_REWARDS_PERCENT = 10;
const MASTER_REWARDS_PERCENT = 5;
/** /**
* Mysterious Chest encounter. * Mysterious Chest encounter.
@ -83,6 +84,11 @@ export const MysteriousChestEncounter: MysteryEncounter =
encounter.enemyPartyConfigs = [config]; encounter.enemyPartyConfigs = [config];
encounter.setDialogueToken("gimmighoulName", getPokemonSpecies(Species.GIMMIGHOUL).getName()); 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; return true;
}) })
@ -109,7 +115,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
roll roll
}; };
if (roll >= MASTER_REWARDS_WEIGHT) { if (roll < TRAP_PERCENT) {
// Chest is springing trap, change to red chest sprite // Chest is springing trap, change to red chest sprite
const blueChestSprites = introVisuals.getSpriteAtIndex(0); const blueChestSprites = introVisuals.getSpriteAtIndex(0);
const redChestSprites = introVisuals.getSpriteAtIndex(1); const redChestSprites = introVisuals.getSpriteAtIndex(1);
@ -124,7 +130,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
// Open the chest // Open the chest
const encounter = scene.currentBattle.mysteryEncounter!; const encounter = scene.currentBattle.mysteryEncounter!;
const roll = encounter.misc.roll; 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%) // Choose between 2 COMMON / 2 GREAT tier items (20%)
setEncounterRewards(scene, { setEncounterRewards(scene, {
guaranteedModifierTiers: [ guaranteedModifierTiers: [
@ -137,7 +143,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
// Display result message then proceed to rewards // Display result message then proceed to rewards
queueEncounterMessage(scene, `${namespace}.option.1.normal`); queueEncounterMessage(scene, `${namespace}.option.1.normal`);
leaveEncounterWithoutBattle(scene); 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%) // Choose between 3 ULTRA tier items (30%)
setEncounterRewards(scene, { setEncounterRewards(scene, {
guaranteedModifierTiers: [ guaranteedModifierTiers: [
@ -149,13 +155,13 @@ export const MysteriousChestEncounter: MysteryEncounter =
// Display result message then proceed to rewards // Display result message then proceed to rewards
queueEncounterMessage(scene, `${namespace}.option.1.good`); queueEncounterMessage(scene, `${namespace}.option.1.good`);
leaveEncounterWithoutBattle(scene); 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%) // Choose between 2 ROGUE tier items (10%)
setEncounterRewards(scene, { guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE] }); setEncounterRewards(scene, { guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE] });
// Display result message then proceed to rewards // Display result message then proceed to rewards
queueEncounterMessage(scene, `${namespace}.option.1.great`); queueEncounterMessage(scene, `${namespace}.option.1.great`);
leaveEncounterWithoutBattle(scene); 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%) // Choose 1 MASTER tier item (5%)
setEncounterRewards(scene, { guaranteedModifierTiers: [ModifierTier.MASTER] }); setEncounterRewards(scene, { guaranteedModifierTiers: [ModifierTier.MASTER] });
// Display result message then proceed to rewards // Display result message then proceed to rewards

View File

@ -8,7 +8,7 @@
"option": { "option": {
"1": { "1": {
"label": "Offer to Battle", "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!" "selected": "A challenge, eh?\nMy bugs are more than ready for you!"
}, },
"2": { "2": {

View File

@ -10,7 +10,7 @@
"label": "Battle the Clown", "label": "Battle the Clown",
"tooltip": "(-) Strange Battle\n(?) Affects Pokémon Abilities", "tooltip": "(-) Strange Battle\n(?) Affects Pokémon Abilities",
"selected": "Your pitiful Pokémon are poised for a pathetic performance!", "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}}!", "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_prompt": "Would you like to permanently teach a Pokémon the {{ability}} ability?",
"ability_gained": "@s{level_up_fanfare}{{chosenPokemon}} gained the {{ability}} ability!" "ability_gained": "@s{level_up_fanfare}{{chosenPokemon}} gained the {{ability}} ability!"

View File

@ -12,7 +12,7 @@
}, },
"2": { "2": {
"label": "Learn Its Dance", "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}}!" "selected": "You watch the {{oricorioName}} closely as it performs its dance...$@s{level_up_fanfare}Your {{selectedPokemon}} learned from the {{oricorioName}}!"
}, },
"3": { "3": {

View File

@ -6,7 +6,7 @@
"option": { "option": {
"1": { "1": {
"label": "Open It", "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...", "selected": "You open the chest to find...",
"normal": "Just some normal tools and items.", "normal": "Just some normal tools and items.",
"good": "Some pretty nice tools and items.", "good": "Some pretty nice tools and items.",