diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index df44ba9d..81df1afc 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -1785,15 +1785,13 @@ 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 - callback() - else - self:enterElimination(true) - end - end) + if self.onFillBoardOverCallback then + local callback = self.onFillBoardOverCallback + self.onFillBoardOverCallback = nil + callback() + else + self:enterElimination(true) + end end) end) else @@ -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