diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/EffectCaster.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/EffectCaster.lua index c9193ec185..d313ced391 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/EffectCaster.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/EffectCaster.lua @@ -205,7 +205,16 @@ function EffectCaster:GetDirectTargetsNoExile() return list end - +-- 获取直接目标和没有被放逐的目标,不包含不灭可能为空 +function EffectCaster:GetDirectTargetsNoNODead() + local list = {} + for _, role in ipairs(self.effectTargets[1]) do + if not BattleLogic.BuffMgr:HasBuff(role,BuffName.NoDead) then + table.insert(list, role) + end + end + return list +end -- 获取技能目标最大人数 function EffectCaster:GetMaxTargetNum() diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 6b0a8d5ecb..3db31337ff 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -2720,7 +2720,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special then - local list = skill:GetDirectTargets() + local list = skill:GetDirectTargetsNoNoDead() if list then local tv = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro]) * f1)) for _, r in ipairs(list) do diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index 8b3e55be94..68a8958b38 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -125,6 +125,11 @@ end function Skill:GetDirectTargetsNoExile() return self.effectCaster:GetDirectTargetsNoExile() end + +-- 获取直接目标,不包含触发不灭的目标,可能为空 +function Skill:GetDirectTargetsNoNoDead() + return self.effectCaster:GetDirectTargetsNoNODead() +end -- 获取技能目标最大人数 function Skill:GetMaxTargetNum() return self.effectCaster:GetMaxTargetNum() diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/XuanYuanMirrorFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/XuanYuanMirrorFormation.lua index a9380ad25d..77f5042a88 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/XuanYuanMirrorFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/XuanYuanMirrorFormation.lua @@ -70,9 +70,27 @@ function this.GetOneKeyUpHeroList() end end) -- 限制数量 + local upList = {} for k, v in ipairs(tempHeros) do if #heros < rulesNum then table.insert(heros, v) + upList[v.dynamicId] = 1 + end + end + -- 所有英雄,按战力补位 + local allHeros = this.GetHeroList() + table.sort(allHeros,function(a,b) + if a.warPower == b.warPower then + return a.id > b.id + else + return a.warPower > b.warPower + end + end) + for k, v in ipairs(allHeros) do + if not upList[v.dynamicId] then + if #heros < 6 then + table.insert(heros, v) + end end end return heros diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroPropManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroPropManager.lua index 983ec2546b..0c6d67986a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroPropManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroPropManager.lua @@ -424,6 +424,8 @@ end -- 将整个人置为脏数据 function this.SetHeroDirty(dId) this.IsHeroDirty[dId] = {} + -- 战斗力需要重新计算 + HeroPowerManager.SetPowerDirty(dId) end @@ -442,9 +444,6 @@ function this.SetConditionData(dId, powerType, condList) end this.IsConPropDirty[dId][powerType] = true this.IsConPropDirty[dId].isDirty = true - - -- 战斗力需要重新计算 - HeroPowerManager.SetPowerDirty(dId) end function this.SetConditionProp(dId, powerType, condProp) @@ -518,8 +517,6 @@ function this.SetTeamData(dId, powerType, propList) this.IsTeamPropDirty[dId] = {} end this.IsTeamPropDirty[dId].isDirty = true - -- 战斗力需要重新计算 - HeroPowerManager.SetPowerDirty(dId) end -- 刷新编队属性