diff --git a/lua/app/config/skill_rogue.lua b/lua/app/config/skill_rogue.lua index 52006ed2..da5b0b5c 100644 --- a/lua/app/config/skill_rogue.lua +++ b/lua/app/config/skill_rogue.lua @@ -723,7 +723,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 1300114, 1300115 @@ -1724,7 +1724,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=6, - ["type"]=17, + ["type"]=18, ["parameter"]={ 1600114, 1600115 @@ -1799,7 +1799,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=6, - ["type"]=17, + ["type"]=18, ["parameter"]={ 1600124, 1600125 @@ -1816,7 +1816,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=6, - ["type"]=17, + ["type"]=18, ["parameter"]={ 1600124, 1600125, @@ -2035,7 +2035,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2300114, 2300115 @@ -2098,7 +2098,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2300124, 2300125 @@ -2114,7 +2114,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2300124, 2300125, @@ -2331,7 +2331,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2400114, 2400115 @@ -2602,7 +2602,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2500114, 2500115 @@ -2912,7 +2912,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2500224, 2500226 @@ -2928,7 +2928,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2500225, 2500226 @@ -3001,7 +3001,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2500234, 2500236 @@ -3014,7 +3014,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2500235, 2500236 @@ -3210,7 +3210,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=6, - ["type"]=17, + ["type"]=18, ["parameter"]={ 2600124, 2600125 @@ -3410,7 +3410,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3300114, 3300115 @@ -3612,7 +3612,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3300144, 3300145 @@ -3692,7 +3692,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3400114, 3400115 @@ -3755,7 +3755,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3400124, 3400125 @@ -3771,7 +3771,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3400124, 3400126 @@ -3869,7 +3869,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3400134, 3400135 @@ -4011,7 +4011,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3500114, 3500115 @@ -4296,7 +4296,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 3500214, 3500215 @@ -4788,7 +4788,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 4400114, 4400115 @@ -4880,7 +4880,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 4400124, 4400125 @@ -4964,7 +4964,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 4400134, 4400135 @@ -5331,7 +5331,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 4500214, 4500215 @@ -5403,7 +5403,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 4500223, 4500224 @@ -5420,7 +5420,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 4500224, 4500225 @@ -5591,7 +5591,7 @@ local skill_rogue = { [5300111]={ ["method"]=2, ["limit_times"]=1, - ["weight"]=3000, + ["weight"]=3000000000, ["qlt"]=3, ["type"]=2, ["skill_position"]=5, @@ -5611,7 +5611,7 @@ local skill_rogue = { [5300112]={ ["method"]=2, ["limit_times"]=1, - ["weight"]=3000, + ["weight"]=3000000000, ["qlt"]=3, ["type"]=2, ["skill_position"]=5, @@ -5638,9 +5638,9 @@ local skill_rogue = { }, [5300113]={ ["limit_times"]=1, - ["weight"]=3000, + ["weight"]=3000000000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5300114, 5300115 @@ -5679,7 +5679,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=0, ["qlt"]=3, - ["type"]=18, + ["type"]=19, ["parameter"]={ 6, 1, @@ -5717,7 +5717,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5300124, 5300125 @@ -5908,7 +5908,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5400114, 5400115 @@ -6000,7 +6000,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5400124, 5400125 @@ -6087,7 +6087,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5400134, 5400135 @@ -6263,7 +6263,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5500124, 5500125 @@ -6276,7 +6276,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5500124, 5500126 @@ -6404,7 +6404,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5500144, 5500145 @@ -6417,7 +6417,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5500144, 5500146 @@ -6590,7 +6590,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=5, - ["type"]=17, + ["type"]=18, ["parameter"]={ 5500224, 5500225 diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index a6038cf3..8ff5e5f7 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -1420,7 +1420,8 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx) end end - local effectList = skill:getEffectList() + local linkNum = self.battleController.battleData:getLastSequenceLinkNum() + local effectList = skill:getEffectList(linkNum) if effectList == nil then return end diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index bc4f9744..45c3dd7a 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -1041,6 +1041,7 @@ end function BattleBaseController:enterRoundBegin() self.battleData:clearBreakGridEdgeTag() + self.battleData:clearLastSequenceLinkNum() self:hideTouchCancel() self:resetSideActionCount() self:setCurActionSide(SIDE_ATK) @@ -2401,6 +2402,12 @@ end function BattleBaseController:dealSelectSkill(skillId, value, side, isSnapshot) side = side or self:getCurActionSide() + local cfg = ConfigManager:getConfig("skill_rogue") + local skillCfg = cfg[skillId] + if skillCfg.limit_times and self:getSkillCount(skillId) >= skillCfg.limit_times then + return + end + self.battleData:addSkillCount(skillId, value, side) BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self, value, side, isSnapshot) 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 6a6f837a..4b291488 100644 --- a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua +++ b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua @@ -36,6 +36,10 @@ local _changeBaseSkill = function(skillId, skillInfo, battleBaseData, battleCont for effectType, effect in pairs(skillEntity:getSkillRatioAdd()) do -- 技能效果概率 unitEntity:addSkillRatio(newSkillId, effect) end + + for effectType, effect in pairs(skillEntity:getLinkNumSkillRoundAdd()) do -- 带条件技能回合数 + unitEntity:addLinkNumSkillEffectRound(newSkillId, effect) + end end end end @@ -439,6 +443,58 @@ local _addSkillBreakEnergyMultiple = function(skillId, skillInfo, battleBaseData end end +local _addSkillMerge = function(skillId, skillInfo, battleBaseData, battleController, value, side) + if not skillInfo.parameter then + return + end + + for i, v in ipairs(skillInfo.parameter) do + battleController:dealSelectSkill(v, value, side) + end +end + +local _addSkillLinkNumRound = function(skillId, skillInfo, battleBaseData, battleController, value, side) + local elementType = skillInfo.skill_position + if not elementType or not skillInfo.parameter then + return + end + + local linkNum = skillInfo.parameter[1] + local index = skillInfo.parameter[2] + local value = skillInfo.parameter[3] + if not linkNum or not index or not value then + return + end + + local effect + local entity = battleBaseData:getSkillEntityByElement(elementType, side) + if entity and entity:getEffect() then + local effectCfg = entity:getEffect()[index] + if effectCfg then + effect = GFunc.getTable(effectCfg) + effect.round = effect.round + value + effect.linkNum = linkNum + end + end + + if not effect then + return + end + + local skillEntity = battleBaseData:getSkillEntityByElement(elementType, side) + if skillEntity then + local skillId = skillEntity:getSkillId() + skillEntity:addLinkNumSkillEffectRoundAdd(effect) + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then + return + end + if actionTeam:getAllMembers()[elementType] then + actionTeam:getAllMembers()[elementType]:addLinkNumSkillEffectRound(skillId, effect) + end + end +end + BattleRogueSkillHandle._effectOn = { [1] = _changeBaseSkill, -- 改变初始技能ID [2] = _addEliminationRange, -- 增加消除数量 @@ -457,6 +513,8 @@ BattleRogueSkillHandle._effectOn = { [15] = _addLinkCountPowerEffect, -- 链接超过x元素获得倍数技能效果 [16] = _addSkillRatio, -- 增加技能效果概率 [17] = _addSkillBreakEnergyMultiple, -- 增加技能消除的元素的能量倍数 + [18] = _addSkillMerge, -- 融合技能,参数配本表的ID,获得后直接让配的技能ID都生效 + [19] = _addSkillLinkNumRound, -- 需要做成链接超X个元素时将主技能的第几个BUFF的回合数增加。参数配置[链接数,第几个BUFF,回合数加值] } function BattleRogueSkillHandle.takeEffect(skillId, battleData, battleController, value, side, isSnapshot) diff --git a/lua/app/ui/summon/summon_main_ui.lua b/lua/app/ui/summon/summon_main_ui.lua index d44574f6..d2408687 100755 --- a/lua/app/ui/summon/summon_main_ui.lua +++ b/lua/app/ui/summon/summon_main_ui.lua @@ -382,8 +382,13 @@ function SummonMainUI:onSummonRsp(result, newHero) self.vfx01s[i]:setActive(false) self.vfx02s[i]:setActive(false) end - local id = result.rewards[1].item.id - local qlt = DataManager.HeroData:getHeroQlt(id) - 2 + local qlt = 3 + for i, v in ipairs(result.rewards) do + local id = v.item.id + local q = DataManager.HeroData:getHeroQlt(id) + qlt = math.max(qlt, q) + end + qlt = qlt - 2 self.summonResult = result.rewards self.aniSeq = self.root:createBindTweenSequence() if self.vfxs[qlt] then diff --git a/lua/app/userdata/battle/battle_base_data.lua b/lua/app/userdata/battle/battle_base_data.lua index 85a7367a..a972a857 100644 --- a/lua/app/userdata/battle/battle_base_data.lua +++ b/lua/app/userdata/battle/battle_base_data.lua @@ -388,12 +388,23 @@ function BattleBaseData:clearSkillInfluenceGrids() end function BattleBaseData:clearGridSequence() + if self.gridSequence then + self.lastSequenceLinkNum = #self.gridSequence + end self.gridSequence = {} -- 格子队列 self.gridSequenceMap = {} -- 格子队列对应的map,方面查找 self.isVirtual = nil self:clearSkillInfluenceGrids() end +function BattleBaseData:getLastSequenceLinkNum() + return self.lastSequenceLinkNum +end + +function BattleBaseData:clearLastSequenceLinkNum() + self.lastSequenceLinkNum = nil +end + function BattleBaseData:getGridEnties() return self.gridEntities or {} 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 22b0eff4..58570831 100644 --- a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua @@ -15,6 +15,7 @@ function BattleBoardSkillEntity:ctor(skillId, side) self.skillEffectNumAdd = {} -- 技能效果参数增加 type = 7 用于技能替换时生效 self.skillRoundAdd = {} -- 技能效果回合增加 type = 8 用于技能替换时生效 self.skillRatioAdd = {} -- 技能效果概率增加 type = 16 用于技能替换时生效 + self.skillLinkNumRoundAdd = {} -- 技能效果回合增加 type = 19 用于技能替换时生效 self.originSkillId = skillId self.upSkillIdMap = {} @@ -491,6 +492,14 @@ function BattleBoardSkillEntity:getSkillRoundAdd() return self.skillRoundAdd end +function BattleBoardSkillEntity:addLinkNumSkillEffectRoundAdd(effect) + self.skillLinkNumRoundAdd[effect.type] = effect +end + +function BattleBoardSkillEntity:getLinkNumSkillRoundAdd() + return self.skillLinkNumRoundAdd +end + function BattleBoardSkillEntity:addSkillRatioAdd(effect) local effectInfo = self.skillRatioAdd[effect.type] if effectInfo then diff --git a/lua/app/userdata/battle/skill/battle_buff_entity.lua b/lua/app/userdata/battle/skill/battle_buff_entity.lua index 4ba0a43b..dd5f8b29 100644 --- a/lua/app/userdata/battle/skill/battle_buff_entity.lua +++ b/lua/app/userdata/battle/skill/battle_buff_entity.lua @@ -12,6 +12,7 @@ function BattleBuffEntity:init(effectParams, owner, hostSkill) self.effectNum = effectParams.num self.round = effectParams.round self.ratio = effectParams.ratio + self.linkNum = effectParams.linkNum self.owner = owner self.hostSkill = hostSkill self.targetSide = nil diff --git a/lua/app/userdata/battle/skill/battle_skill_entity.lua b/lua/app/userdata/battle/skill/battle_skill_entity.lua index 09a6dd8e..ced97378 100644 --- a/lua/app/userdata/battle/skill/battle_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_skill_entity.lua @@ -174,6 +174,12 @@ function BattleSkillEntity:addSkillEffectRound(effect) end end +function BattleSkillEntity:addLinkNumSkillEffectRound(effect) + local buffEntity = BattleBuffEntity:create() + buffEntity:init(effect, self.owner, self) + self.effectLinkNum = buffEntity +end + function BattleSkillEntity:addSkillEffectRatio(effect) local buffEntity for _, entity in ipairs(self.effectList) do @@ -274,8 +280,23 @@ function BattleSkillEntity:getSkillAttackName() return self.skillInfo.name_act end -function BattleSkillEntity:getEffectList() - return self.effectList +function BattleSkillEntity:getEffectList(linkNum) + if not self.effectLinkNum then + return self.effectList + end + local list = {} + for _, effect in ipairs(self.effectList) do + if linkNum and effect:getName() == self.effectLinkNum:getName() then + if linkNum >= self.effectLinkNum.linkNum then + table.insert(list, self.effectLinkNum) + else + table.insert(list, effect) + end + else + table.insert(list, effect) + end + end + return list end function BattleSkillEntity:getEffectBlock() diff --git a/lua/app/userdata/battle/team/battle_unit_entity.lua b/lua/app/userdata/battle/team/battle_unit_entity.lua index ed3a12f0..43aa6977 100644 --- a/lua/app/userdata/battle/team/battle_unit_entity.lua +++ b/lua/app/userdata/battle/team/battle_unit_entity.lua @@ -248,6 +248,23 @@ function BattleUnitEntity:addSkillRound(skillId, effect) end end +function BattleUnitEntity:addLinkNumSkillEffectRound(skillId, effect) + for _, skillEntity in ipairs(self.activeSkills) do + if skillEntity:getSkillId() == skillId then + skillEntity:addLinkNumSkillEffectRound(effect) + break + end + end + if self.passiveSkills then + for _, skillEntity in ipairs(self.passiveSkills) do + if skillEntity:getSkillId() == skillId then + skillEntity:addLinkNumSkillEffectRound(effect) + break + end + end + end +end + function BattleUnitEntity:addSkillRatio(skillId, effect) for _, skillEntity in ipairs(self.activeSkills) do if skillEntity:getSkillId() == skillId then