mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-19 07:20:57 +00:00
fix myster-encounter-ui-handler duplicate req. check
This commit is contained in:
parent
0326cb2538
commit
4d4d0e55cc
@ -307,6 +307,8 @@ export default class MysteryEncounterUiHandler extends UiHandler {
|
||||
|
||||
// Options Window
|
||||
for (let i = 0; i < this.filteredEncounterOptions.length; i++) {
|
||||
const option = this.filteredEncounterOptions[i];
|
||||
|
||||
let optionText;
|
||||
switch (this.filteredEncounterOptions.length) {
|
||||
case 2:
|
||||
@ -319,10 +321,9 @@ export default class MysteryEncounterUiHandler extends UiHandler {
|
||||
optionText = addBBCodeTextObject(this.scene, i % 2 === 0 ? 0 : 100, i < 2 ? 0 : 16, "-", TextStyle.WINDOW, { wordWrap: { width: 558 }, fontSize: "80px", lineSpacing: -8 });
|
||||
break;
|
||||
}
|
||||
const option = this.filteredEncounterOptions[i];
|
||||
this.optionsMeetsReqs.push(this.filteredEncounterOptions[i].meetsRequirements(this.scene));
|
||||
|
||||
const optionDialogue = option.dialogue ?? mysteryEncounter.dialogue.encounterOptionsDialogue.options[i];
|
||||
this.optionsMeetsReqs.push(option.meetsRequirements(this.scene));
|
||||
const optionDialogue = option.dialogue;
|
||||
let text: string;
|
||||
if (option.hasRequirements() && this.optionsMeetsReqs[i]) {
|
||||
// Options with special requirements that are met are automatically colored green
|
||||
@ -336,8 +337,6 @@ export default class MysteryEncounterUiHandler extends UiHandler {
|
||||
optionText.setText(text);
|
||||
}
|
||||
|
||||
this.optionsMeetsReqs.push(option.meetsRequirements(this.scene));
|
||||
|
||||
if (!this.optionsMeetsReqs[i]) {
|
||||
optionText.setAlpha(0.5);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user