diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index 6d47cc75..ce1c452a 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -298,7 +298,18 @@ function BattleBaseController:onLinkChange() end if not self:getCurActionUnitComp():getActiveSkillLimit() then - local aniSequence, influenceElementType, lineCount, elementTypeMap, linkElementType = self:calculateCurElimination(true) + local aniSequence, influenceElementType, lineCount, elementTypeMap, linkElementType, effectGridMap, randomPosList = self:calculateCurElimination(true) + if randomPosList then + for _, posId in ipairs(randomPosList) do + local gridEntity = self.battleData:getGridEntity(posId) + if gridEntity and gridEntity:canLink() then + local elementType = gridEntity:getElementType() + if elementTypeMap[elementType] and elementTypeMap[elementType] > 0 then + elementTypeMap[elementType] = elementTypeMap[elementType] - 1 + end + end + end + end self.battleUI:refreshSkill(elementTypeMap, count > 0, self.curActionSide) end @@ -1197,7 +1208,7 @@ function BattleBaseController:calculateCurElimination(onlyCheck) end end - return self.aniSequence, influenceElementTypeMap, lineCount, self.elementTypeMap, linkElementType, self.effectGridMap + return self.aniSequence, influenceElementTypeMap, lineCount, self.elementTypeMap, linkElementType, self.effectGridMap, randomPosList end function BattleBaseController:dealGridBreak(posId, condition, time, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck)