死局问题修复

This commit is contained in:
xiekaidong 2023-04-24 19:29:07 +08:00
parent bbcaeea573
commit 4bda42441f

View File

@ -1771,22 +1771,17 @@ function BattleController:findAttention()
for c = 1, GConst.BattleConst.COLUMN_COUNT do
local posId = ModuleManager.BattleManager:getPosId(r, c)
local gridEntity = self.battleData:getGridEntity(posId)
local skillId = gridEntity:getSkillId()
local mainElementType = gridEntity:getElementType()
if skillId then
local skillEntity = self.battleData:getSkillEntityBySkillId(skillId)
if skillEntity:getIgnoreElementType() then
mainElementType = nil
if gridEntity:canChangeInfo() then
pathList = {}
posIdMap = {}
self:findLinkLine(posId, posIdMap, false, mainElementType, pathList)
if table.nums(pathList) >= self:getMinEliminationCount() then
Logger.printTable(pathList)
find = true
break
end
end
pathList = {}
posIdMap = {}
self:findLinkLine(posId, posIdMap, mainElementType == nil, mainElementType, pathList)
if table.nums(pathList) >= self:getMinEliminationCount() then
find = true
break
end
end
if find then
break