mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-29 21:13:55 +01: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
|
// Options Window
|
||||||
for (let i = 0; i < this.filteredEncounterOptions.length; i++) {
|
for (let i = 0; i < this.filteredEncounterOptions.length; i++) {
|
||||||
|
const option = this.filteredEncounterOptions[i];
|
||||||
|
|
||||||
let optionText;
|
let optionText;
|
||||||
switch (this.filteredEncounterOptions.length) {
|
switch (this.filteredEncounterOptions.length) {
|
||||||
case 2:
|
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 });
|
optionText = addBBCodeTextObject(this.scene, i % 2 === 0 ? 0 : 100, i < 2 ? 0 : 16, "-", TextStyle.WINDOW, { wordWrap: { width: 558 }, fontSize: "80px", lineSpacing: -8 });
|
||||||
break;
|
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;
|
let text: string;
|
||||||
if (option.hasRequirements() && this.optionsMeetsReqs[i]) {
|
if (option.hasRequirements() && this.optionsMeetsReqs[i]) {
|
||||||
// Options with special requirements that are met are automatically colored green
|
// Options with special requirements that are met are automatically colored green
|
||||||
@ -336,8 +337,6 @@ export default class MysteryEncounterUiHandler extends UiHandler {
|
|||||||
optionText.setText(text);
|
optionText.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.optionsMeetsReqs.push(option.meetsRequirements(this.scene));
|
|
||||||
|
|
||||||
if (!this.optionsMeetsReqs[i]) {
|
if (!this.optionsMeetsReqs[i]) {
|
||||||
optionText.setAlpha(0.5);
|
optionText.setAlpha(0.5);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user