update encounter biome mapping and option coloring/disablement with requirements

This commit is contained in:
ImperialSympathizer 2024-07-11 14:37:29 -04:00
parent 810c50cda2
commit f128b47db5
10 changed files with 276 additions and 112 deletions

View File

@ -4,8 +4,8 @@
"image": "mad_scientist_m.png",
"format": "RGBA8888",
"size": {
"w": 44,
"h": 74
"w": 46,
"h": 76
},
"scale": 1,
"frames": [
@ -24,8 +24,8 @@
"h": 74
},
"frame": {
"x": 0,
"y": 0,
"x": 1,
"y": 1,
"w": 44,
"h": 74
}
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:895f0a79b89fa0fb44167f4584fd9a22:357b46953b7e17c6b2f43a62d52855d8:cc1ed0e4f90aaa9dcf1b39a0af1283b0$"
"smartupdate": "$TexturePacker:SmartUpdate:a7f8ff2bbb362868f51125c254eb6681:cf76e61ddd31a8f46af67ced168c44a2:4fc09abe16c0608828269e5da81d0744$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 920 B

View File

@ -10,7 +10,7 @@
"scale": 1,
"frames": [
{
"filename": "Spr_HGSS_Teacher.png",
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {

View File

@ -2696,7 +2696,7 @@ export default class BattleScene extends SceneBase {
encounter = availableEncounters[Utils.randSeedInt(availableEncounters.length)];
// New encounter object to not dirty flags
encounter = new MysteryEncounter(encounter);
encounter.meetsRequirements(this);
encounter.populateDialogueTokensFromRequirements(this);
return encounter;
}
}

View File

@ -19,21 +19,12 @@ import { StatChangePhase } from "#app/phases";
import { TextStyle } from "#app/ui/text";
import { randSeedInt } from "#app/utils";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import BattleScene from "../../../battle-scene";
import MysteryEncounter, { MysteryEncounterBuilder, MysteryEncounterTier } from "../mystery-encounter";
import { MoveRequirement } from "../mystery-encounter-requirements";
const validMovesForSteal = [
Moves.PLUCK,
Moves.COVET,
Moves.FAKE_OUT,
Moves.THIEF,
Moves.TRICK,
Moves.SWITCHEROO,
Moves.GIGA_DRAIN
];
import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option";
import { STEALING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups";
export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder
.withEncounterType(MysteryEncounterType.FIGHT_OR_FLIGHT)
@ -82,13 +73,10 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder
];
// If player has a stealing move, they succeed automatically
const moveRequirement = new MoveRequirement(validMovesForSteal);
const validPokemon = moveRequirement.queryParty(scene.getParty());
if (validPokemon?.length > 0) {
// Use first valid pokemon to execute the theivery
const pokemon = validPokemon[0];
encounter.setDialogueToken("thiefPokemon", pokemon.name);
encounter.setDialogueToken(...moveRequirement.getDialogueToken(scene, pokemon));
encounter.options[1].meetsRequirements(scene);
const primaryPokemon = encounter.options[1].primaryPokemon;
if (primaryPokemon) {
// Use primaryPokemon to execute the thievery
encounter.dialogue.encounterOptionsDialogue.options[1].buttonTooltip = "mysteryEncounter:fight_or_flight_option_2_steal_tooltip";
encounter.dialogue.encounterOptionsDialogue.options[1].style = TextStyle.SUMMARY_GREEN;
} else {
@ -104,44 +92,44 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder
setEncounterRewards(scene, { guaranteedModifierTypeOptions: [item], fillRemaining: false });
await initBattleWithEnemyConfig(scene, scene.currentBattle.mysteryEncounter.enemyPartyConfigs[0]);
})
.withOptionPhase(async (scene: BattleScene) => {
// Pick steal
const encounter = scene.currentBattle.mysteryEncounter;
const item = scene.currentBattle.mysteryEncounter.misc as ModifierTypeOption;
setEncounterRewards(scene, { guaranteedModifierTypeOptions: [item], fillRemaining: false });
.withOption(new MysteryEncounterOptionBuilder()
.withPrimaryPokemonRequirement(new MoveRequirement(STEALING_MOVES)) // Will set option2PrimaryName and option2PrimaryMove dialogue tokens automatically
.withDisabledOnRequirementsNotMet(false)
.withOptionPhase(async (scene: BattleScene) => {
// Pick steal
const encounter = scene.currentBattle.mysteryEncounter;
const item = scene.currentBattle.mysteryEncounter.misc as ModifierTypeOption;
setEncounterRewards(scene, { guaranteedModifierTypeOptions: [item], fillRemaining: false });
// If player has a stealing move, they succeed automatically
const moveRequirement = new MoveRequirement(validMovesForSteal);
const validPokemon = moveRequirement.queryParty(scene.getParty());
if (validPokemon?.length > 0) {
// Use first valid pokemon to execute the theivery
const pokemon = validPokemon[0];
encounter.setDialogueToken("thiefPokemon", pokemon.name);
encounter.setDialogueToken(...moveRequirement.getDialogueToken(scene, pokemon));
await showEncounterText(scene, "mysteryEncounter:fight_or_flight_option_2_steal_result");
leaveEncounterWithoutBattle(scene);
return;
}
// If player has a stealing move, they succeed automatically
const primaryPokemon = encounter.options[1].primaryPokemon;
if (primaryPokemon) {
// Use primaryPokemon to execute the thievery
await showEncounterText(scene, "mysteryEncounter:fight_or_flight_option_2_steal_result");
leaveEncounterWithoutBattle(scene);
return;
}
const roll = randSeedInt(16);
if (roll > 6) {
// Noticed and attacked by boss, gets +1 to all stats at start of fight (62.5%)
const config = scene.currentBattle.mysteryEncounter.enemyPartyConfigs[0];
config.pokemonConfigs[0].tags = [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON];
config.pokemonConfigs[0].mysteryEncounterBattleEffects = (pokemon: Pokemon) => {
pokemon.scene.currentBattle.mysteryEncounter.setDialogueToken("enemyPokemon", pokemon.name);
queueEncounterMessage(pokemon.scene, "mysteryEncounter:fight_or_flight_boss_enraged");
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD], 1));
};
await showEncounterText(scene, "mysteryEncounter:fight_or_flight_option_2_bad_result");
await initBattleWithEnemyConfig(scene, config);
} else {
// Steal item (37.5%)
// Display result message then proceed to rewards
await showEncounterText(scene, "mysteryEncounter:fight_or_flight_option_2_good_result");
leaveEncounterWithoutBattle(scene);
}
})
const roll = randSeedInt(16);
if (roll > 6) {
// Noticed and attacked by boss, gets +1 to all stats at start of fight (62.5%)
const config = scene.currentBattle.mysteryEncounter.enemyPartyConfigs[0];
config.pokemonConfigs[0].tags = [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON];
config.pokemonConfigs[0].mysteryEncounterBattleEffects = (pokemon: Pokemon) => {
pokemon.scene.currentBattle.mysteryEncounter.setDialogueToken("enemyPokemon", pokemon.name);
queueEncounterMessage(pokemon.scene, "mysteryEncounter:fight_or_flight_boss_enraged");
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD], 1));
};
await showEncounterText(scene, "mysteryEncounter:fight_or_flight_option_2_bad_result");
await initBattleWithEnemyConfig(scene, config);
} else {
// Steal item (37.5%)
// Display result message then proceed to rewards
await showEncounterText(scene, "mysteryEncounter:fight_or_flight_option_2_good_result");
leaveEncounterWithoutBattle(scene);
}
})
.build())
.withOptionPhase(async (scene: BattleScene) => {
// Leave encounter with no rewards or exp
leaveEncounterWithoutBattle(scene, true);

View File

@ -2,7 +2,6 @@ import {
modifierTypes
} from "#app/modifier/modifier-type";
import { BerryType } from "#enums/berry-type";
import { Moves } from "#enums/moves";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { Species } from "#enums/species";
import BattleScene from "../../../battle-scene";
@ -19,6 +18,7 @@ import {
leaveEncounterWithoutBattle, queueEncounterMessage, setEncounterExp,
setEncounterRewards
} from "../mystery-encounter-utils";
import { STEALING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups";
export const SleepingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuilder
.withEncounterType(MysteryEncounterType.SLEEPING_SNORLAX)
@ -98,7 +98,7 @@ export const SleepingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuilde
}
})
.withOption(new MysteryEncounterOptionBuilder()
.withPrimaryPokemonRequirement(new MoveRequirement([Moves.PLUCK, Moves.COVET, Moves.KNOCK_OFF, Moves.THIEF, Moves.TRICK, Moves.SWITCHEROO]))
.withPrimaryPokemonRequirement(new MoveRequirement(STEALING_MOVES))
.withOptionPhase(async (scene: BattleScene) => {
// Steal the Snorlax's Leftovers
const instance = scene.currentBattle.mysteryEncounter;

View File

@ -16,36 +16,148 @@ export const BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT = 1;
export const WIGHT_INCREMENT_ON_SPAWN_MISS = 5;
export const AVERAGE_ENCOUNTERS_PER_RUN_TARGET = 15;
export const EXTREME_ENCOUNTER_BIOMES = [
Biome.SEA,
Biome.SEABED,
Biome.BADLANDS,
Biome.DESERT,
Biome.ICE_CAVE,
Biome.VOLCANO,
Biome.WASTELAND,
Biome.ABYSS,
Biome.SPACE,
Biome.END
];
export const NON_EXTREME_ENCOUNTER_BIOMES = [
Biome.TOWN,
Biome.PLAINS,
Biome.GRASS,
Biome.TALL_GRASS,
Biome.METROPOLIS,
Biome.FOREST,
Biome.SWAMP,
Biome.BEACH,
Biome.LAKE,
Biome.MOUNTAIN,
Biome.CAVE,
Biome.MEADOW,
Biome.POWER_PLANT,
Biome.GRAVEYARD,
Biome.DOJO,
Biome.FACTORY,
Biome.RUINS,
Biome.CONSTRUCTION_SITE,
Biome.JUNGLE,
Biome.FAIRY_CAVE,
Biome.TEMPLE,
Biome.SLUM,
Biome.SNOWY_FOREST,
Biome.ISLAND,
Biome.LABORATORY
];
/**
* Places where you could very reasonably expect to encounter a single human
*
* Diff from NON_EXTREME_ENCOUNTER_BIOMES:
* + BADLANDS
* + DESERT
* + ICE_CAVE
*/
export const HUMAN_TRANSITABLE_BIOMES = [
Biome.TOWN,
Biome.PLAINS,
Biome.GRASS,
Biome.TALL_GRASS,
Biome.METROPOLIS,
Biome.FOREST,
Biome.SWAMP,
Biome.BEACH,
Biome.LAKE,
Biome.MOUNTAIN,
Biome.BADLANDS,
Biome.CAVE,
Biome.DESERT,
Biome.ICE_CAVE,
Biome.MEADOW,
Biome.POWER_PLANT,
Biome.GRAVEYARD,
Biome.DOJO,
Biome.FACTORY,
Biome.RUINS,
Biome.CONSTRUCTION_SITE,
Biome.JUNGLE,
Biome.FAIRY_CAVE,
Biome.TEMPLE,
Biome.SLUM,
Biome.SNOWY_FOREST,
Biome.ISLAND,
Biome.LABORATORY
];
/**
* Places where you could expect a town or city, some form of large civilization
*/
export const CIVILIZATION_ENCOUNTER_BIOMES = [
Biome.TOWN,
Biome.PLAINS,
Biome.GRASS,
Biome.TALL_GRASS,
Biome.METROPOLIS,
Biome.BEACH,
Biome.LAKE,
Biome.MEADOW,
Biome.POWER_PLANT,
Biome.GRAVEYARD,
Biome.DOJO,
Biome.FACTORY,
Biome.CONSTRUCTION_SITE,
Biome.SLUM,
Biome.ISLAND
];
export const allMysteryEncounters: { [encounterType: number]: MysteryEncounter } = {};
// TO ENABLE AN ENCOUNTER IN ALL BIOMES, DO NOT SPECIFY IN ANY OF THESE LISTS/MAPS
const extremeBiomeEncounters: MysteryEncounterType[] = [];
const nonExtremeBiomeEncounters: MysteryEncounterType[] = [
MysteryEncounterType.FIELD_TRIP
];
const humanTransitableBiomeEncounters: MysteryEncounterType[] = [
MysteryEncounterType.MYSTERIOUS_CHALLENGERS,
MysteryEncounterType.SHADY_VITAMIN_DEALER
];
const civilizationBiomeEncounters: MysteryEncounterType[] = [
MysteryEncounterType.DEPARTMENT_STORE_SALE
];
const anyBiomeEncounters: MysteryEncounterType[] = [
MysteryEncounterType.FIGHT_OR_FLIGHT,
MysteryEncounterType.DARK_DEAL,
MysteryEncounterType.MYSTERIOUS_CHEST,
MysteryEncounterType.TRAINING_SESSION
];
// Add MysteryEncounterType to biomes to enable it exclusively for those biomes
// To enable an encounter in all biomes, do not add to this map
export const mysteryEncountersByBiome = new Map<Biome, MysteryEncounterType[]>([
[Biome.TOWN, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.PLAINS, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.TOWN, []],
[Biome.PLAINS, []],
[Biome.GRASS, [
MysteryEncounterType.SLEEPING_SNORLAX,
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.TALL_GRASS, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.METROPOLIS, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.TALL_GRASS, []],
[Biome.METROPOLIS, []],
[Biome.FOREST, [
MysteryEncounterType.SLEEPING_SNORLAX
]],
[Biome.SEA, []],
[Biome.SWAMP, []],
[Biome.BEACH, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.BEACH, []],
[Biome.LAKE, []],
[Biome.SEABED, []],
[Biome.MOUNTAIN, [
@ -57,31 +169,21 @@ export const mysteryEncountersByBiome = new Map<Biome, MysteryEncounterType[]>([
]],
[Biome.DESERT, []],
[Biome.ICE_CAVE, []],
[Biome.MEADOW, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.POWER_PLANT, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.MEADOW, []],
[Biome.POWER_PLANT, []],
[Biome.VOLCANO, []],
[Biome.GRAVEYARD, []],
[Biome.DOJO, []],
[Biome.FACTORY, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.FACTORY, []],
[Biome.RUINS, []],
[Biome.WASTELAND, []],
[Biome.ABYSS, []],
[Biome.SPACE, []],
[Biome.CONSTRUCTION_SITE, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.CONSTRUCTION_SITE, []],
[Biome.JUNGLE, []],
[Biome.FAIRY_CAVE, []],
[Biome.TEMPLE, []],
[Biome.SLUM, [
MysteryEncounterType.DEPARTMENT_STORE_SALE
]],
[Biome.SLUM, []],
[Biome.SNOWY_FOREST, []],
[Biome.ISLAND, []],
[Biome.LABORATORY, []]
@ -90,7 +192,7 @@ export const mysteryEncountersByBiome = new Map<Biome, MysteryEncounterType[]>([
export function initMysteryEncounters() {
allMysteryEncounters[MysteryEncounterType.MYSTERIOUS_CHALLENGERS] = MysteriousChallengersEncounter;
allMysteryEncounters[MysteryEncounterType.MYSTERIOUS_CHEST] = MysteriousChestEncounter;
allMysteryEncounters[MysteryEncounterType.DARK_DEAL] = DarkDealEncounter;
allMysteryEncounters[MysteryEncounterType.DARK_DEAL] = DarkDealEncounter; // TODO: move to HUMAN if we add an ANY biome ROGUE tier encounter
allMysteryEncounters[MysteryEncounterType.FIGHT_OR_FLIGHT] = FightOrFlightEncounter;
allMysteryEncounters[MysteryEncounterType.TRAINING_SESSION] = TrainingSessionEncounter;
allMysteryEncounters[MysteryEncounterType.SLEEPING_SNORLAX] = SleepingSnorlaxEncounter;
@ -98,15 +200,49 @@ export function initMysteryEncounters() {
allMysteryEncounters[MysteryEncounterType.SHADY_VITAMIN_DEALER] = ShadyVitaminDealerEncounter;
allMysteryEncounters[MysteryEncounterType.FIELD_TRIP] = FieldTripEncounter;
// Append encounters that can occur in any biome to biome map
const anyBiomeEncounters: MysteryEncounterType[] = Object.keys(MysteryEncounterType).filter(e => !isNaN(Number(e))).map(k => Number(k) as MysteryEncounterType);
mysteryEncountersByBiome.forEach(biomeEncounters => {
biomeEncounters.forEach(e => {
if (anyBiomeEncounters.includes(e)) {
anyBiomeEncounters.splice(anyBiomeEncounters.indexOf(e), 1);
// Add extreme encounters to biome map
extremeBiomeEncounters.forEach(encounter => {
EXTREME_ENCOUNTER_BIOMES.forEach(biome => {
const encountersForBiome = mysteryEncountersByBiome.get(biome);
if (!encountersForBiome.includes(encounter)) {
encountersForBiome.push(encounter);
}
});
});
// Add non-extreme encounters to biome map
nonExtremeBiomeEncounters.forEach(encounter => {
NON_EXTREME_ENCOUNTER_BIOMES.forEach(biome => {
const encountersForBiome = mysteryEncountersByBiome.get(biome);
if (!encountersForBiome.includes(encounter)) {
encountersForBiome.push(encounter);
}
});
});
// Add human encounters to biome map
humanTransitableBiomeEncounters.forEach(encounter => {
HUMAN_TRANSITABLE_BIOMES.forEach(biome => {
const encountersForBiome = mysteryEncountersByBiome.get(biome);
if (!encountersForBiome.includes(encounter)) {
encountersForBiome.push(encounter);
}
});
});
// Add civilization encounters to biome map
civilizationBiomeEncounters.forEach(encounter => {
CIVILIZATION_ENCOUNTER_BIOMES.forEach(biome => {
const encountersForBiome = mysteryEncountersByBiome.get(biome);
if (!encountersForBiome.includes(encounter)) {
encountersForBiome.push(encounter);
}
});
});
mysteryEncountersByBiome.forEach(biomeEncounters => biomeEncounters.push(...anyBiomeEncounters));
// Add ANY biome encounters to biome map
mysteryEncountersByBiome.forEach(biomeEncounters => {
anyBiomeEncounters.forEach(encounter => {
if (!biomeEncounters.includes(encounter)) {
biomeEncounters.push(encounter);
}
});
});
}

View File

@ -0,0 +1,42 @@
import { Moves } from "#enums/moves";
export const STEALING_MOVES = [
Moves.PLUCK,
Moves.COVET,
Moves.KNOCK_OFF,
Moves.FAKE_OUT,
Moves.THIEF,
Moves.TRICK,
Moves.SWITCHEROO
];
export const DISTRACTION_MOVES = [
Moves.FAKE_OUT,
Moves.FOLLOW_ME,
Moves.TAUNT,
Moves.ROAR,
Moves.TELEPORT,
Moves.CHARM,
Moves.FAKE_TEARS,
Moves.TICKLE,
Moves.CAPTIVATE,
Moves.RAGE_POWDER,
Moves.SUBSTITUTE,
Moves.SHED_TAIL
];
export const PROTECTING_MOVES = [
Moves.PROTECT,
Moves.WIDE_GUARD,
Moves.MAX_GUARD,
Moves.SAFEGUARD,
Moves.REFLECT,
Moves.BARRIER,
Moves.QUICK_GUARD,
Moves.FLOWER_SHIELD,
Moves.KINGS_SHIELD,
Moves.CRAFTY_SHIELD,
Moves.SPIKY_SHIELD,
Moves.OBSTRUCT,
Moves.DETECT
];

View File

@ -43,14 +43,14 @@ export const mysteryEncounter: SimpleTranslationEntries = {
"fight_or_flight_option_1_tooltip": "(-) Hard Battle\n(+) New Item",
"fight_or_flight_option_2_label": "Steal the item",
"fight_or_flight_option_2_tooltip": "@[SUMMARY_GREEN]{(35%) Steal Item}\n@[SUMMARY_BLUE]{(65%) Harder Battle}",
"fight_or_flight_option_2_steal_tooltip": "@[SUMMARY_GREEN]{(?) Use a Pokémon Move}",
"fight_or_flight_option_2_steal_tooltip": "(+) @ec{option2PrimaryName} uses @ec{option2PrimaryMove}",
"fight_or_flight_option_3_label": "Leave",
"fight_or_flight_option_3_tooltip": "(-) No Rewards",
"fight_or_flight_option_1_selected_message": "You approach the\nPokémon without fear.",
"fight_or_flight_option_2_good_result": `.@d{32}.@d{32}.@d{32}
$You manage to sneak your way\npast and grab the item!`,
"fight_or_flight_option_2_steal_result": `.@d{32}.@d{32}.@d{32}
$Your @ec{thiefPokemon} helps you out and uses @ec{move}!
$Your @ec{option2PrimaryName} helps you out and uses @ec{option2PrimaryMove}!
$ You nabbed the item!`,
"fight_or_flight_option_2_bad_result": `.@d{32}.@d{32}.@d{32}
$The Pokémon catches you\nas you try to sneak around!`,

View File

@ -110,7 +110,7 @@ export default class MysteryEncounterUiHandler extends UiHandler {
this.unblockInput();
}, 300);
});
} else if (this.blockInput || !this.optionsMeetsReqs[cursor]) {
} else if (this.blockInput || (!this.optionsMeetsReqs[cursor] && this.filteredEncounterOptions[cursor].isDisabledOnRequirementsNotMet)) {
success = false;
} else {
const selected = this.filteredEncounterOptions[cursor];
@ -253,7 +253,7 @@ export default class MysteryEncounterUiHandler extends UiHandler {
if (this.blockInput) {
this.blockInput = false;
for (let i = 0; i < this.optionsContainer.length - 1; i++) {
if (!this.optionsMeetsReqs[i]) {
if (!this.optionsMeetsReqs[i] && this.filteredEncounterOptions[i].isDisabledOnRequirementsNotMet) {
continue;
}
(this.optionsContainer.getAt(i) as Phaser.GameObjects.Text).setAlpha(1);
@ -334,9 +334,7 @@ export default class MysteryEncounterUiHandler extends UiHandler {
optionText.setText(text);
}
if (!this.optionsMeetsReqs[i]) {
if (!this.optionsMeetsReqs[i] && this.filteredEncounterOptions[i].isDisabledOnRequirementsNotMet) {
optionText.setAlpha(0.5);
}
if (this.blockInput) {
@ -424,7 +422,7 @@ export default class MysteryEncounterUiHandler extends UiHandler {
const mysteryEncounter = this.scene.currentBattle.mysteryEncounter;
let text;
const option = mysteryEncounter.dialogue.encounterOptionsDialogue.options[cursor];
if (!this.optionsMeetsReqs[cursor] && option.disabledTooltip) {
if (!this.optionsMeetsReqs[cursor] && this.filteredEncounterOptions[cursor].isDisabledOnRequirementsNotMet && option.disabledTooltip) {
text = getEncounterText(this.scene, option.disabledTooltip, TextStyle.TOOLTIP_CONTENT);
} else {
text = getEncounterText(this.scene, option.buttonTooltip, TextStyle.TOOLTIP_CONTENT);