This commit is contained in:
puxuan 2025-10-16 21:26:20 +08:00
parent 7ce2b6a419
commit 9702c903ac

View File

@ -1785,15 +1785,13 @@ function BattleBaseController:onFillBoardOver(isRoundBeginCheck)
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BOARD_FILL_OVER) EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BOARD_FILL_OVER)
self:popBoardCacheSkill(function() self:popBoardCacheSkill(function()
self:generateSkill(function() self:generateSkill(function()
self:generateUniversal(function() if self.onFillBoardOverCallback then
if self.onFillBoardOverCallback then local callback = self.onFillBoardOverCallback
local callback = self.onFillBoardOverCallback self.onFillBoardOverCallback = nil
self.onFillBoardOverCallback = nil callback()
callback() else
else self:enterElimination(true)
self:enterElimination(true) end
end
end)
end) end)
end) end)
else else
@ -2003,28 +2001,6 @@ function BattleBaseController:getUniversalElementList()
return posIds[math.random(1, #posIds)] return posIds[math.random(1, #posIds)]
end 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) function BattleBaseController:generateGridType(skillTypeParameter, monsterPos)
if not skillTypeParameter then if not skillTypeParameter then
return return
@ -2328,8 +2304,12 @@ function BattleBaseController:getRandomGridInfo()
-- elementType = self.getRandomGridInfoTypeList[index] -- elementType = self.getRandomGridInfoTypeList[index]
-- end -- end
local elementType = math.random(1, BattleConst.ELEMENT_TYPE.PURPLE) 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 end