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 end
local boardRangeList = {} local boardRangeList = {}
local map
for _, info in ipairs(self.config.boardrange) do for _, info in ipairs(self.config.boardrange) do
local singleInfo = { local singleInfo = {
type = info.type, type = info.type,
range = info.range range = info.range
} }
if self.addRange[info.type] then if self.addRange[info.type] then
if not map then
map = {}
end
map[info.type] = true
singleInfo.range = singleInfo.range + self.addRange[info.type] singleInfo.range = singleInfo.range + self.addRange[info.type]
end end
table.insert(boardRangeList, singleInfo) table.insert(boardRangeList, singleInfo)
end 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 return boardRangeList
end end