From 89b35ce6aa8b37611609de5bf5eaf9ca48b288c7 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Wed, 31 May 2023 14:23:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E7=9B=B8=E5=85=B3bug?= =?UTF-8?q?=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 | 2 +- .../battle/controller/battle_controller_stage.lua | 2 +- .../module/battle/helper/battle_buff_special.lua | 4 ++-- lua/app/module/battle/team/battle_team.lua | 8 ++++++-- lua/app/module/chapter/chapter_manager.lua | 13 ++++++++++--- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 9829f952..07bbffa5 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -763,7 +763,7 @@ BattleConst.BATTLE_TASK_FIELD = { LINK_COUNT_OVER_6 = "clear_6_combo", -- 6连消个数 LINK_COUNT_OVER_8 = "clear_8_combo", -- 8连消个数 COMBO_OVER_10 = "clear_10_hit", -- 10连击以上次数 - BOARD_SKILL_RELEASE_COUNT = "skills_cast", -- 释放技能次数 + BOARD_SKILL_RELEASE_COUNT = "skill_cast", -- 释放技能次数 PASS_WAVE = "pass_wave", -- 通关波数 } diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index 25aa6f72..292766d8 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -124,7 +124,7 @@ function BattleControllerStage:getInitBoard() if config.mystery_box and config.mystery_box_reward then for i, index in ipairs(config.mystery_box) do - if not DataManager.ChapterData:getChapterMysteryBoxIsGot(self.chapterId, index) then + if not DataManager.ChapterData:getChapterMysteryBoxIsGot(self.chapterId, i) then self.mysteryBoxIndexMap[index] = config.mystery_box_reward[i] end end diff --git a/lua/app/module/battle/helper/battle_buff_special.lua b/lua/app/module/battle/helper/battle_buff_special.lua index 29de6c1d..b547b4e0 100644 --- a/lua/app/module/battle/helper/battle_buff_special.lua +++ b/lua/app/module/battle/helper/battle_buff_special.lua @@ -29,12 +29,12 @@ end local function _bleedOn(buffSender, buff, target, buffEffect) target.unitEntity:addAttr(buff:getName(), buff:getEffectNum(), false) - return target.unitEntity:addAttr(BattleConst.ATTR_NAME.BE_SUCKED, 1000, false) -- 写死10% + return target.unitEntity:addAttr(BattleConst.ATTR_NAME.BE_SUCKED, 500, false) -- 写死5% end local function _bleedOff(buffSender, target, buff, buffEffect) target.unitEntity:addAttr(buff:getName(), -buff:getEffectNum(), false) - target.unitEntity:addAttr(BattleConst.ATTR_NAME.BE_SUCKED, -1000, false) -- 写死10% + target.unitEntity:addAttr(BattleConst.ATTR_NAME.BE_SUCKED, -500, false) -- 写死5% return 1 end diff --git a/lua/app/module/battle/team/battle_team.lua b/lua/app/module/battle/team/battle_team.lua index d599e5ce..89f1c453 100644 --- a/lua/app/module/battle/team/battle_team.lua +++ b/lua/app/module/battle/team/battle_team.lua @@ -404,11 +404,15 @@ function BattleTeam:doBuffWork() break end buffEffect.round = buffEffect.round - 1 - BattleBuffHandle.doBuffWork(self.mainUnit, buffEffect) + local target = self.mainUnit + if buffEffect.target then + target = buffEffect.target + end + BattleBuffHandle.doBuffWork(target, buffEffect) if buffEffect.round <= 0 then self:updateBuffState(buffEffect.buff, -1) table.remove(self.buffList, i) - BattleBuffHandle.removeBuff(self.mainUnit, buffEffect) + BattleBuffHandle.removeBuff(target, buffEffect) end end self.battleController:refreshBuff(self.side, self.buffList) diff --git a/lua/app/module/chapter/chapter_manager.lua b/lua/app/module/chapter/chapter_manager.lua index c2d109c6..c15afee3 100644 --- a/lua/app/module/chapter/chapter_manager.lua +++ b/lua/app/module/chapter/chapter_manager.lua @@ -50,10 +50,17 @@ function ChapterManager:startFightFinish(result) end function ChapterManager:endFight(id, combatReport, gotMysteryBoxIndexs, taskProgress) + local cfg = ConfigManager:getConfig("chapter")[id] local mystery_box_idx = {} - if gotMysteryBoxIndexs then - for index, _ in pairs(gotMysteryBoxIndexs) do - table.insert(mystery_box_idx, index) + if gotMysteryBoxIndexs and cfg.mystery_box then + local indexMap = {} + for index, wave in ipairs(cfg.mystery_box) do + indexMap[wave] = index + end + for boardIndex, _ in pairs(gotMysteryBoxIndexs) do + if indexMap[boardIndex] then + table.insert(mystery_box_idx, indexMap[boardIndex]) + end end end local parmas = {