From 4708ed1ae2d634121f085428feead3b071a2b0a2 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 19 May 2023 20:55:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=9A=8F=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/controller/battle_controller.lua | 1 + lua/app/module/battle/skill/battle_grid_effect_handle.lua | 1 + 2 files changed, 2 insertions(+) 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..f8960d87 100644 --- a/lua/app/module/battle/skill/battle_grid_effect_handle.lua +++ b/lua/app/module/battle/skill/battle_grid_effect_handle.lua @@ -31,6 +31,7 @@ local function _crossSpread(entity, gridEntities, battleController, onlyCheck) if gridEntity:isEmptyIdle() then battleController.battleData:setGridType(posId, BattleConst.GRID_TYPE.JELLY) succ = true + break end end From d2eff9d230815270a15133bc1f805e76bb73b32b Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 19 May 2023 20:59:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/skill/battle_grid_effect_handle.lua | 1 + 1 file changed, 1 insertion(+) 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 f8960d87..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,6 +26,7 @@ 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