bug修复

This commit is contained in:
xiekaidong 2023-06-14 19:05:15 +08:00
parent 5214dd8136
commit 3f23f976e3
3 changed files with 7 additions and 7 deletions

View File

@ -396,6 +396,7 @@ if NOT_PUBLISH then
map[posId] = entity:getSnapshoptInfo() map[posId] = entity:getSnapshoptInfo()
end end
Logger.logHighlight("——————————战斗棋盘快照如下————————") Logger.logHighlight("——————————战斗棋盘快照如下————————")
Logger.logHighlight("——————————当前转斗回合步骤————————" .. ModuleManager.BattleManager.battleController.roundStep)
Logger.printTable(map) Logger.printTable(map)
end end
end end

View File

@ -691,7 +691,6 @@ end
function BattleController:enterRoundBegin() function BattleController:enterRoundBegin()
self.needWaitingBoardOver = nil self.needWaitingBoardOver = nil
self.waveRoundCount[self.waveIndex] = (self.waveRoundCount[self.waveIndex] or 0) + 1 self.waveRoundCount[self.waveIndex] = (self.waveRoundCount[self.waveIndex] or 0) + 1
self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_BEGIN
self:takeGridEffect() self:takeGridEffect()
self:enterEliminationBegin() self:enterEliminationBegin()
table.clear(self.lastRoundBreakedGridType) table.clear(self.lastRoundBreakedGridType)

View File

@ -73,9 +73,7 @@ local function _takeEliminationGridAndElement(posId, skillEntity, gridEntities,
cludePosIdsMap[posId] = true cludePosIdsMap[posId] = true
end end
end end
-- for _, entity in ipairs(sequenceEntities) do
-- cludePosIdsMap[entity:getPosId()] = nil
-- end
local posIdInfos = ModuleManager.BattleManager:getAroundPosIdsByList(posId, boardrange, cludePosIdsMap) local posIdInfos = ModuleManager.BattleManager:getAroundPosIdsByList(posId, boardrange, cludePosIdsMap)
cludePosIdsMap = {} cludePosIdsMap = {}
for _, info in ipairs(posIdInfos) do for _, info in ipairs(posIdInfos) do
@ -175,7 +173,7 @@ local function _takeRandomKillRowOrColumn(atkUnitComp, skillEntity, battleContro
local rowMap = {} local rowMap = {}
local columnMap = {} local columnMap = {}
local rList = {} local rList = {}
local rListCount = 0 local rListCount = 0
local cList = {} local cList = {}
local cListCount = 0 local cListCount = 0
for posId, entity in pairs(battleData:getGridEnties()) do for posId, entity in pairs(battleData:getGridEnties()) do
@ -231,6 +229,8 @@ local function _takeRandomKillRowOrColumn(atkUnitComp, skillEntity, battleContro
for index, info in ipairs(infoList) do for index, info in ipairs(infoList) do
for _, posId in ipairs(info.posList) do for _, posId in ipairs(info.posList) do
if not temp_map[posId] then if not temp_map[posId] then
local entity = battleData:getGridEntity(posId)
entity:setIsIdle(true)
battleController:addFillWaitingCount() battleController:addFillWaitingCount()
temp_map[posId] = true temp_map[posId] = true
end end
@ -242,7 +242,6 @@ local function _takeRandomKillRowOrColumn(atkUnitComp, skillEntity, battleContro
battleController.battleUI:showGridEffectSfx(info.centerPos, BattleConst.GRID_KILL_SFX.line, function() battleController.battleUI:showGridEffectSfx(info.centerPos, BattleConst.GRID_KILL_SFX.line, function()
for _, posId in ipairs(info.posList) do for _, posId in ipairs(info.posList) do
local entity = battleData:getGridEntity(posId) local entity = battleData:getGridEntity(posId)
entity:setIsIdle(true)
if entity:getCell() then if entity:getCell() then
entity:getCell():doScale(0, 1, function() entity:getCell():doScale(0, 1, function()
battleController:reduceFillWaitingCount() battleController:reduceFillWaitingCount()
@ -383,6 +382,8 @@ local function _takeKillRowAndColumn(atkUnitComp, skillEntity, battleController)
for index, info in ipairs(infoList) do for index, info in ipairs(infoList) do
for _, posId in ipairs(info.posList) do for _, posId in ipairs(info.posList) do
if not temp_map[posId] then if not temp_map[posId] then
local entity = battleData:getGridEntity(posId)
entity:setIsIdle(true)
battleController:addFillWaitingCount() battleController:addFillWaitingCount()
temp_map[posId] = true temp_map[posId] = true
end end
@ -394,7 +395,6 @@ local function _takeKillRowAndColumn(atkUnitComp, skillEntity, battleController)
battleController.battleUI:showGridEffectSfx(info.centerPos, BattleConst.GRID_KILL_SFX.line, function() battleController.battleUI:showGridEffectSfx(info.centerPos, BattleConst.GRID_KILL_SFX.line, function()
for _, posId in ipairs(info.posList) do for _, posId in ipairs(info.posList) do
local entity = battleData:getGridEntity(posId) local entity = battleData:getGridEntity(posId)
entity:setIsIdle(true)
if entity:getCell() then if entity:getCell() then
entity:getCell():doScale(0, 1, function() entity:getCell():doScale(0, 1, function()
battleController:reduceFillWaitingCount() battleController:reduceFillWaitingCount()