From a111c96adff83b932bdaa721e95437b753e98651 Mon Sep 17 00:00:00 2001 From: "Mr.WaterT" Date: Thu, 13 Jun 2024 16:55:04 +0900 Subject: [PATCH] update battle-info.ts --- src/ui/battle-info.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index c246af73d07..722cf433f9a 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -661,7 +661,11 @@ export default class BattleInfo extends Phaser.GameObjects.Container { instant = true; } const durationMultiplier = Phaser.Tweens.Builders.GetEaseFunction("Sine.easeIn")(1 - (Math.max(this.lastLevel - 100, 0) / 150)); - const duration = this.visible && !instant ? (((levelExp - this.lastLevelExp) / relLevelExp) * 1650) * durationMultiplier * levelDurationMultiplier : 0; + let duration = this.visible && !instant ? (((levelExp - this.lastLevelExp) / relLevelExp) * 1650) * durationMultiplier * levelDurationMultiplier : 0; + const speed = (this.scene as BattleScene).expGainsSpeed; + if (speed) { + duration = speed >= 3 ? 0 : duration / Math.pow(2, speed); + } if (ratio === 1) { this.lastLevelExp = 0; this.lastLevel++;