.
This commit is contained in:
parent
7ce2b6a419
commit
9702c903ac
@ -1785,7 +1785,6 @@ function BattleBaseController:onFillBoardOver(isRoundBeginCheck)
|
||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BOARD_FILL_OVER)
|
||||
self:popBoardCacheSkill(function()
|
||||
self:generateSkill(function()
|
||||
self:generateUniversal(function()
|
||||
if self.onFillBoardOverCallback then
|
||||
local callback = self.onFillBoardOverCallback
|
||||
self.onFillBoardOverCallback = nil
|
||||
@ -1795,7 +1794,6 @@ function BattleBaseController:onFillBoardOver(isRoundBeginCheck)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
else
|
||||
self:generateSkill(function()
|
||||
self.battleUI:refreshSkill(nil, nil, self:getCurActionSide())
|
||||
@ -2003,28 +2001,6 @@ function BattleBaseController:getUniversalElementList()
|
||||
return posIds[math.random(1, #posIds)]
|
||||
end
|
||||
|
||||
function BattleBaseController:generateUniversal(callback)
|
||||
local posId = self:getUniversalElementList()
|
||||
|
||||
if not self.battleUI or not posId then
|
||||
if callback then
|
||||
callback()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if self.atkTeam:checkUniversal() then
|
||||
local gridEntities = self.battleData:getGridEnties()
|
||||
local entity = gridEntities[posId]
|
||||
entity:setUniversal(true, false, self.curActionSide)
|
||||
local cell = entity:getCell()
|
||||
cell:refresh(entity)
|
||||
callback()
|
||||
else
|
||||
callback()
|
||||
end
|
||||
end
|
||||
|
||||
function BattleBaseController:generateGridType(skillTypeParameter, monsterPos)
|
||||
if not skillTypeParameter then
|
||||
return
|
||||
@ -2328,8 +2304,12 @@ function BattleBaseController:getRandomGridInfo()
|
||||
-- elementType = self.getRandomGridInfoTypeList[index]
|
||||
-- end
|
||||
local elementType = math.random(1, BattleConst.ELEMENT_TYPE.PURPLE)
|
||||
local isUniversal = false
|
||||
if self.atkTeam:checkUniversal() then
|
||||
isUniversal = true
|
||||
end
|
||||
|
||||
return {gridType = gridType, elementType = elementType, isUniversal = true}
|
||||
return {gridType = gridType, elementType = elementType, isUniversal = isUniversal}
|
||||
end
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user