From ebb4a77f1818001b7a4ded5fc7ea3e8b1de1c59c Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Wed, 31 May 2023 21:13:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8C=91=E6=88=98bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/controller/battle_controller.lua | 1 + lua/app/module/battle/controller/battle_controller_stage.lua | 1 + lua/app/module/battle/team/battle_team.lua | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 60c35ba5..1be6f5b5 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -119,6 +119,7 @@ function BattleController:onDefDead(callback) if callback then callback() end + self:handleBuffs(BattleConst.SIDE_DEF) end) else if callback then diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index 292766d8..e353fc7c 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -60,6 +60,7 @@ function BattleControllerStage:_stageGenerateNextMonster() local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT) monsterComp:initWithEntity(modelId, unitEntity, self) self.defTeam:addUnit(monsterComp, true) + self:handleBuffs(GConst.BattleConst.SIDE_DEF) self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent()) local bornTime = monsterComp:getAnimationDuration(GConst.BattleConst.SPINE_ANIMATION_NAME.BORN) if isBoss then -- 如果是boss就跑过去 diff --git a/lua/app/module/battle/team/battle_team.lua b/lua/app/module/battle/team/battle_team.lua index 89f1c453..e3176375 100644 --- a/lua/app/module/battle/team/battle_team.lua +++ b/lua/app/module/battle/team/battle_team.lua @@ -293,7 +293,7 @@ function BattleTeam:removeAllBuff() local count = #self.buffList for i = count, 1, -1 do buffEffect = self.buffList[i] - if buffEffect and not buffEffect.buff:isCantRemove() then + if buffEffect then self:updateBuffState(buffEffect.buff, -1) table.remove(self.buffList, i) BattleBuffHandle.removeBuff(self.mainUnit, buffEffect)