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