diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 1622ffd6..75d6aae0 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -2440,12 +2440,12 @@ local function _addCurRoundAttr(self, instruction, callback) local mainComp = self:getOtherSideMainUnit(BattleConst.SIDE_DEF) for _, effect in ipairs(instruction.effectList) do local target - if effect:getTartgetSide() == BattleConst.SIDE_DEF then + if effect:getTargetSide() == BattleConst.SIDE_DEF then target = defComp - elseif effect:getTartgetSide() == BattleConst.SIDE_ATK then + elseif effect:getTargetSide() == BattleConst.SIDE_ATK then target = mainComp else - local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTartgetSide()] + local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTargetSide()] if matchType then target = self.atkTeam:getUnitComp()[matchType] end diff --git a/lua/app/module/battle/helper/battle_instructions_helper.lua b/lua/app/module/battle/helper/battle_instructions_helper.lua index 3c2eacee..fef3ecb9 100644 --- a/lua/app/module/battle/helper/battle_instructions_helper.lua +++ b/lua/app/module/battle/helper/battle_instructions_helper.lua @@ -186,21 +186,22 @@ local generateLinkCountMoreEffects = function(instructions, skillEntity, lineCou end local generateLinkCountPowerEffects = function(instructions, skillEntity, lineCount) - if not skillEntity:getLinkCountMoreEffects() then + Logger.logHighlight("generateLinkCountPowerEffects " .. table.nums(skillEntity:getLinkCountPowerEffects())) + if not skillEntity:getLinkCountPowerEffects() then return end local effectList - for rogueSkill, list in pairs(skillEntity:getLinkCountMoreEffects()) do + for rogueSkill, list in pairs(skillEntity:getLinkCountPowerEffects()) do for index, info in pairs(list) do if info.paramsCount and info.paramsCount <= lineCount then - local poser = lineCount // info.paramsCount - for i = 1, poser do - if not effectList then - effectList = {} - end - table.insert(effectList, info.buffEntity) + local power = lineCount // info.paramsCount + if not effectList then + effectList = {} end + local newNum = info.originBuffEntity:getEffectNum() * power + info.useBuffEntity:setEffectNum(newNum) + table.insert(effectList, info.useBuffEntity) end end end @@ -248,6 +249,8 @@ BattleInstructionsHelper.generateInstructions = function(skillEntity, elementTyp BattleInstructionsHelper._generateAttackInstructions(instructions, skillEntity, elementType, elementTypeCount) ---- 加buff BattleInstructionsHelper._generateBuffInstructions(instructions, skillEntity, elementType, lineCount, influenceElementTypeMap, battleController) + + return instructions end return BattleInstructionsHelper diff --git a/lua/app/module/battle/helper/battle_instructions_helper.lua.meta b/lua/app/module/battle/helper/battle_instructions_helper.lua.meta new file mode 100644 index 00000000..cd2ad418 --- /dev/null +++ b/lua/app/module/battle/helper/battle_instructions_helper.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6fd938e7da92c8e4e9a0b7560081b1cd +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua index a4700259..99bd4bed 100644 --- a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua +++ b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua @@ -209,7 +209,7 @@ local _addSkillEffect = function(skillId, skillInfo, battleData, battleControlle end return else - local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTartgetSide()] + local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[skillInfo.obj] if matchType then target = battleController.atkTeam:getUnitComp()[matchType] end diff --git a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua index 1808f29e..8437fb21 100644 --- a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua @@ -420,13 +420,22 @@ function BattleBoardSkillEntity:addLinkCountPowerEffects(rogueSkill, index, effe local info = self.linkCountPowerEffects[rogueSkill][index] if not info then info = {paramsCount = paramsCount} - info.buffEntity = BattleBuffEntity:create() - info.buffEntity:init(effect, unitEntity) + info.originBuffEntity = BattleBuffEntity:create() + info.originBuffEntity:init(effect, unitEntity) + info.originBuffEntity:setTargetSide(targetSide) + + info.useBuffEntity = BattleBuffEntity:create() + info.useBuffEntity:init(effect, unitEntity) + info.useBuffEntity:setTargetSide(targetSide) + self.linkCountPowerEffects[rogueSkill][index] = info else - info.buffEntity:init(effect, unitEntity) + info.originBuffEntity:init(effect, unitEntity) + info.originBuffEntity:setTargetSide(targetSide) + + info.useBuffEntity:init(effect, unitEntity) + info.useBuffEntity:setTargetSide(targetSide) end - info.buffEntity:setTargetSide(targetSide) end function BattleBoardSkillEntity:removeLinkCountPowerEffects(rogueSkill) diff --git a/lua/app/userdata/battle/skill/battle_buff_entity.lua b/lua/app/userdata/battle/skill/battle_buff_entity.lua index 31a0cd1d..c3677090 100644 --- a/lua/app/userdata/battle/skill/battle_buff_entity.lua +++ b/lua/app/userdata/battle/skill/battle_buff_entity.lua @@ -78,7 +78,7 @@ function BattleBuffEntity:setRound(num) self.round = num end -function BattleBuffEntity:getTartgetSide() +function BattleBuffEntity:getTargetSide() return self.targetSide end