Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev

This commit is contained in:
chenxi 2023-04-25 16:20:21 +08:00
commit d60a461a60

View File

@ -94,16 +94,30 @@ function BattleBoardSkillEntity:getBoardRange()
end
local boardRangeList = {}
local map
for _, info in ipairs(self.config.boardrange) do
local singleInfo = {
type = info.type,
range = info.range
}
if self.addRange[info.type] then
if not map then
map = {}
end
map[info.type] = true
singleInfo.range = singleInfo.range + self.addRange[info.type]
end
table.insert(boardRangeList, singleInfo)
end
for t, v in pairs(self.addRange) do
if not map or not map[t] then
local singleInfo = {
type = t,
range = v
}
table.insert(boardRangeList, singleInfo)
end
end
return boardRangeList
end