From 47439bf597fb38b3c7dcb14624afd0b5b91b2bc9 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 14 Apr 2023 18:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=BA=9B=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller.lua | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) 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