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