From 93ff4adc30ae56cffa36f6a5b33c9bbcf78ea9d5 Mon Sep 17 00:00:00 2001 From: RedstonewolfX <108761527+RedstonewolfX@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:23:52 -0400 Subject: [PATCH] Restore luck display Since Luck is not being removed anymore, make it show again --- src/battle-scene.ts | 9 ++------- src/ui/modifier-select-ui-handler.ts | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 03173e5678a..6b53ffd6a7f 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1672,9 +1672,8 @@ export default class BattleScene extends SceneBase { /** * Displays the current luck value. * @param duration The time for this label to fade in, if it is not already visible. - * @param isDaily If true, hides the label. (This is done because Luck does not apply in Daily Mode anymore) */ - updateAndShowText(duration: number, isDaily?: boolean): void { + updateAndShowText(duration: number): void { const labels = [ this.luckLabelText, this.luckText ]; labels.forEach(t => t.setAlpha(0)); const luckValue = getPartyLuckValue(this.getParty()); @@ -1685,16 +1684,12 @@ export default class BattleScene extends SceneBase { this.luckText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969); } this.luckLabelText.setX((this.game.canvas.width / 6) - 2 - (this.luckText.displayWidth + 2)); - if (isDaily) { - // Hide luck label - labels.forEach(t => t.setVisible(false)); - } this.tweens.add({ targets: labels, duration: duration, alpha: 1, onComplete: () => { - labels.forEach(t => t.setVisible(!isDaily)); + labels.forEach(t => t.setVisible(true)); } }); } diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index 04eab59a458..a1e10d74c64 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -230,7 +230,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { /* Multiplies the appearance duration by the speed parameter so that it is always constant, and avoids "flashbangs" at game speed x5 */ this.scene.showShopOverlay(750 * this.scene.gameSpeed); - this.scene.updateAndShowText(750, this.scene.gameMode.isDaily); + this.scene.updateAndShowText(750); this.scene.updateBiomeWaveText(); this.scene.updateMoneyText();