战斗相关bug修复
This commit is contained in:
parent
19f2695c22
commit
89b35ce6aa
@ -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", -- 通关波数
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user