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)