Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
d280b4ef3d
@ -2216,26 +2216,34 @@ function BattleController:resetGrids(posList)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local canRandomElmentList = {}
|
if not self.canRandomElmentList then
|
||||||
|
self.canRandomElmentList = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = #self.canRandomElmentList, 1, -1 do
|
||||||
|
table.remove(self.canRandomElmentList)
|
||||||
|
end
|
||||||
|
|
||||||
|
local elementCount = 0
|
||||||
for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do
|
for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do
|
||||||
if not lockElementMap[typeNum] and not self:getSealElementType()[typeNum] and self.battleData:getSkillEntityByElement(typeNum) then
|
if not lockElementMap[typeNum] and not self:getSealElementType()[typeNum] and self.battleData:getSkillEntityByElement(typeNum) then
|
||||||
table.insert(canRandomElmentList, typeNum)
|
table.insert(self.canRandomElmentList, typeNum)
|
||||||
|
elementCount = elementCount + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not canRandomElmentList[1] then
|
if elementCount <= 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local elementCount = #canRandomElmentList
|
local mainElement = self.canRandomElmentList[math.random(1, elementCount)]
|
||||||
local mainElement = canRandomElmentList[math.random(1, elementCount)]
|
|
||||||
|
|
||||||
for typeNum, _ in pairs(lockElementMap) do
|
for typeNum, _ in pairs(lockElementMap) do
|
||||||
table.insert(canRandomElmentList, typeNum)
|
table.insert(self.canRandomElmentList, typeNum)
|
||||||
elementCount = elementCount + 1
|
elementCount = elementCount + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local resetPosInfo = self:_dealResetGridsDataFunc2(useMap, emptySnapList, mainElement, backupSkill, keepSnapList, posMap, canRandomElmentList, elementCount, lockElementMap)
|
local resetPosInfo = self:_dealResetGridsDataFunc2(useMap, emptySnapList, mainElement, backupSkill, keepSnapList, posMap, self.canRandomElmentList, elementCount, lockElementMap)
|
||||||
|
|
||||||
return resetPosInfo
|
return resetPosInfo
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user