diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index b95ddd2d..2e49b17c 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -270,6 +270,13 @@ function BattleController:enterAtkStepOver() self:enterRefreshBoard() return end + + local atkTeam = self.battleData:getAtkTeam() + if not atkTeam or atkTeam:getIsDead() then -- 英雄死了, 直接结算 + self:enterNextWave() + return + end + self:enterDefStep() end @@ -289,6 +296,12 @@ function BattleController:enterDefStepOver() return end + local defTeam = self.battleData:getDefTeam() + if not defTeam or defTeam:getIsDead() then -- 怪物死了, 直接进入刷新逻辑 + self:enterRefreshBoard() + return + end + ---- 临时直接调用 self:enterRefreshBoard() end @@ -305,6 +318,13 @@ function BattleController:enterRoundEnd() self:enterNextWave() return end + + local atkTeam = self.battleData:getAtkTeam() + if not atkTeam or atkTeam:getIsDead() then -- 英雄死了, 直接结算 + self:enterNextWave() + return + end + self:enterRoundBegin() end