From 6d4e23616df5422acf59b24429f62248a2f166ec Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Tue, 25 Apr 2023 21:10:28 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/battle_const.lua | 6 ++++++ lua/app/module/battle/controller/battle_controller.lua | 8 ++++---- lua/app/userdata/battle/battle_grid_entity.lua | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 41dcf7c1..d4deea9b 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -301,9 +301,15 @@ BattleConst.AROUND_ELIMINATION_TO_TYPE_COUNT = { [BattleConst.GRID_TYPE.ICE] = BattleConst.GRID_TYPE.EMPTY, } +BattleConst.ELEMENT_TYPE_INVALID = { + [BattleConst.GRID_TYPE.SNOW_BOX] = true, + [BattleConst.GRID_TYPE.SOLID_SNOW] = true, +} + BattleConst.AROUND_BOOM_TYPE = { ACOUND = 1, LINE = 2, + SKILL = 3, } ---- 不可下落的格子类型 diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 9157e7bd..9fc17e6b 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -832,7 +832,7 @@ function BattleController:onLinkOver() influenceElementType[elementType] = true end else - boomGridIds[posId] = BattleConst.AROUND_BOOM_TYPE.LINE + boomGridIds[posId] = BattleConst.AROUND_BOOM_TYPE.SKILL end end end @@ -842,6 +842,7 @@ function BattleController:onLinkOver() local entity = self.battleData:getGridEntity(posId) if entity then local gridType = entity:getGridType() + local elementTypeInvalid = entity:isElmentTypeInvalid() if entity:addAroundEliminationCount(boomType) then if BattleConst.GRID_TYPE_BREAK_SFX[gridType] then if not gridBreakSfxInfo then @@ -853,12 +854,11 @@ function BattleController:onLinkOver() table.insert(gridBreakSfxInfo[gridType], posId) end - local elementTypeInvalid = entity:isElmentTypeInvalid() if entity:getIsIdle() then - eliminationPosIds[posId] = true if not eliminationPosIds[posId] then + eliminationPosIds[posId] = true table.insert(sequence, {posId = posId, noAni = elementTypeInvalid}) - if not entity:getSkillId() and not elementTypeInvalid then + if not entity:getSkillId() and not elementTypeInvalid then local elementType = entity:getElementType() elementTypeMap[elementType] = (elementTypeMap[elementType] or 0) + 1 end diff --git a/lua/app/userdata/battle/battle_grid_entity.lua b/lua/app/userdata/battle/battle_grid_entity.lua index 8be0e549..1e8608c8 100644 --- a/lua/app/userdata/battle/battle_grid_entity.lua +++ b/lua/app/userdata/battle/battle_grid_entity.lua @@ -80,14 +80,14 @@ function BattleGridEntity:isEmptyType() end function BattleGridEntity:isElmentTypeInvalid() - return BattleConst.AROUND_ELIMINATION_TO_TYPE_COUNT[self.gridType] ~= nil + return BattleConst.ELEMENT_TYPE_INVALID[self.gridType] ~= nil end function BattleGridEntity:addAroundEliminationCount(boomType) local nextGridType = BattleConst.AROUND_ELIMINATION_TO_TYPE_COUNT[self.gridType] if nextGridType then local beforeGridtype = self:getGridType() - if beforeGridtype == BattleConst.GRID_TYPE.VINES and boomType ~= BattleConst.AROUND_BOOM_TYPE.LINE then + if beforeGridtype == BattleConst.GRID_TYPE.VINES and boomType <= BattleConst.AROUND_BOOM_TYPE.ACOUND then return false end