Restore luck display

Since Luck is not being removed anymore, make it show again
This commit is contained in:
RedstonewolfX 2024-09-24 18:23:52 -04:00
parent 97542cefd8
commit 93ff4adc30
2 changed files with 3 additions and 8 deletions

View File

@ -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));
}
});
}

View File

@ -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();