diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 643b64ed..22a7785a 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -469,6 +469,7 @@ function BattleController:takeGridEffect() end end + effectGrid = table.shuffle(effectGrid) local availableEffectTypeMap for _, entity in ipairs(effectGrid) do local effectType = entity:getEffectType() diff --git a/lua/app/module/battle/skill/battle_grid_effect_handle.lua b/lua/app/module/battle/skill/battle_grid_effect_handle.lua index b934123e..1a8bf2ac 100644 --- a/lua/app/module/battle/skill/battle_grid_effect_handle.lua +++ b/lua/app/module/battle/skill/battle_grid_effect_handle.lua @@ -26,11 +26,13 @@ local function _crossSpread(entity, gridEntities, battleController, onlyCheck) end local succ = false + tempList = table.shuffle(tempList) for _, posId in ipairs(tempList) do local gridEntity = gridEntities[posId] if gridEntity:isEmptyIdle() then battleController.battleData:setGridType(posId, BattleConst.GRID_TYPE.JELLY) succ = true + break end end