mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 09:19:31 +02:00
Restore luck display
Since Luck is not being removed anymore, make it show again
This commit is contained in:
parent
97542cefd8
commit
93ff4adc30
@ -1672,9 +1672,8 @@ export default class BattleScene extends SceneBase {
|
|||||||
/**
|
/**
|
||||||
* Displays the current luck value.
|
* Displays the current luck value.
|
||||||
* @param duration The time for this label to fade in, if it is not already visible.
|
* @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 ];
|
const labels = [ this.luckLabelText, this.luckText ];
|
||||||
labels.forEach(t => t.setAlpha(0));
|
labels.forEach(t => t.setAlpha(0));
|
||||||
const luckValue = getPartyLuckValue(this.getParty());
|
const luckValue = getPartyLuckValue(this.getParty());
|
||||||
@ -1685,16 +1684,12 @@ export default class BattleScene extends SceneBase {
|
|||||||
this.luckText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969);
|
this.luckText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969);
|
||||||
}
|
}
|
||||||
this.luckLabelText.setX((this.game.canvas.width / 6) - 2 - (this.luckText.displayWidth + 2));
|
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({
|
this.tweens.add({
|
||||||
targets: labels,
|
targets: labels,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
labels.forEach(t => t.setVisible(!isDaily));
|
labels.forEach(t => t.setVisible(true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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 */
|
/* 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.showShopOverlay(750 * this.scene.gameSpeed);
|
||||||
this.scene.updateAndShowText(750, this.scene.gameMode.isDaily);
|
this.scene.updateAndShowText(750);
|
||||||
this.scene.updateBiomeWaveText();
|
this.scene.updateBiomeWaveText();
|
||||||
this.scene.updateMoneyText();
|
this.scene.updateMoneyText();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user