mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 05:42:18 +02:00
Update phases.ts
This commit is contained in:
parent
050ea35508
commit
75d688f610
@ -3552,23 +3552,20 @@ export class GameOverModifierRewardPhase extends ModifierRewardPhase {
|
|||||||
super(scene, modifierTypeFunc);
|
super(scene, modifierTypeFunc);
|
||||||
}
|
}
|
||||||
|
|
||||||
async doReward(): Promise<void> {
|
doReward(): Promise<void> {
|
||||||
await new Promise<void>(resolve => {
|
return new Promise<void>(resolve => {
|
||||||
const newModifier = this.modifierType.newModifier();
|
const newModifier = this.modifierType.newModifier();
|
||||||
this.scene.addModifier(newModifier).then(() => {
|
this.scene.addModifier(newModifier).then(() => {
|
||||||
this.scene.playSound('level_up_fanfare');
|
this.scene.playSound('level_up_fanfare');
|
||||||
this.scene.ui.setMode(Mode.MESSAGE);
|
this.scene.ui.setMode(Mode.MESSAGE);
|
||||||
this.scene.ui.fadeIn(250).then(() => {
|
this.scene.ui.fadeIn(250).then(() => {
|
||||||
const modifierName = newModifier.type.name;
|
this.scene.ui.showText(`You received\n${newModifier.type.name}!`, null, () => {
|
||||||
const message = i18next.t("battle:modifierReceived", { modifierName });
|
|
||||||
|
|
||||||
this.scene.ui.showText(message, null, () => {
|
|
||||||
this.scene.time.delayedCall(1500, () => this.scene.arenaBg.setVisible(true));
|
this.scene.time.delayedCall(1500, () => this.scene.arenaBg.setVisible(true));
|
||||||
resolve();
|
resolve();
|
||||||
}, null, true, 1500);
|
}, null, true, 1500);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user