From 7dc298a2bbb450c9e89dfb983af69dc6eb0a655e Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Wed, 20 Sep 2023 10:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=A6=E6=96=87=E5=89=AF=E6=9C=AC=E5=A4=8D?= =?UTF-8?q?=E6=B4=BB=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle_controller_dungeon_rune.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua b/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua index b8a5dcf6..26c7f27c 100644 --- a/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua +++ b/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua @@ -153,6 +153,16 @@ function BattleControllerDungeonRune:enterRoundBegin() if self.canRebirthTimes > 0 and not self.isBossChapter then ModuleManager.DungeonRuneManager:showRebirthUI(function() self.canRebirthTimes = self.canRebirthTimes - 1 + local mainUnit = self.atkTeam:getMainUnit() + mainUnit:rebirth() + local hp = mainUnit.unitEntity:getMaxHp() * 5000 // GConst.BattleConst.DEFAULT_FACTOR -- 回血50% + local x = mainUnit:takeDamageOrCure(mainUnit, hp, GConst.BattleConst.EFFECT_TYPE.HEAL, 0, BattleConst.SPECIAL_DAMAGE_OR_CURE_TYPE.AD_REBIRTH) + local hpPercent = mainUnit.unitEntity:getHpPercent() + self:refreshHp(mainUnit:getSide(), mainUnit.unitEntity:getHp(), hpPercent) + self.atkTeam:checkPassiveEvent(PASSIVE_EVENT.HP_LOWER_THAN, mainUnit, hpPercent) + mainUnit:changeState(UNIT_STATE.IDLE) + mainUnit:initPosition() + self.dungeonRuneRemainRoundCount = self.dungeonRuneRemainRoundCount + self.addRoundCount self.dungeonRuneMaxRoundCount = self.dungeonRuneMaxRoundCount + self.addRoundCount self.dungeonRuneRemainRoundCount = self.dungeonRuneRemainRoundCount - 1 @@ -345,10 +355,16 @@ function BattleControllerDungeonRune:tryShowRebirth(callback) local hpPercent = mainUnit.unitEntity:getHpPercent() self:refreshHp(mainUnit:getSide(), mainUnit.unitEntity:getHp(), hpPercent) self.atkTeam:checkPassiveEvent(PASSIVE_EVENT.HP_LOWER_THAN, mainUnit, hpPercent) - mainUnit:changeState(UNIT_STATE.IDLE) mainUnit:initPosition() + self.dungeonRuneRemainRoundCount = self.dungeonRuneRemainRoundCount + self.addRoundCount + self.dungeonRuneMaxRoundCount = self.dungeonRuneMaxRoundCount + self.addRoundCount + self.dungeonRuneRemainRoundCount = self.dungeonRuneRemainRoundCount - 1 + if self.battleUI then + local desc = self.dungeonRuneRemainRoundCount + 1 + self.battleUI:refreshWave(desc, GConst.ATLAS_PATH.COMMON, "common_dec_15") + end if callback then callback() end