Commit ab74de86 authored by Vury Leo's avatar Vury Leo

less clone

parent bfb506f0
......@@ -3646,6 +3646,7 @@ function Fusion.StrictGroup(e,leftovers,mg_base,grp,tc,fgoalcheck,chkf)
return Fusion.FinalCheck(e,mg,tc,fgoalcheck,chkf)
end
--- @param mg_base Group
-- Search mode: find *some* subset of size [grp.min…grp.max] that passes
function Fusion.SearchGroup(e,leftovers,mg_base,grp,tc,fgoalcheck,chkf)
-- pre‐filter by grp.filter
......@@ -3673,9 +3674,9 @@ function Fusion.SearchGroup(e,leftovers,mg_base,grp,tc,fgoalcheck,chkf)
local fcheck_ok={}
if hasFCheck then
for i,c in ipairs(matched) do
local tmp=mg_base:Clone()
tmp:Merge(Group.FromCards(c))
fcheck_ok[i]=aux.FCheckAdditional(tc:GetOwner(),tmp,tc)
mg_base:AddCard(c)
fcheck_ok[i]=aux.FCheckAdditional(tc:GetOwner(),mg_base,tc)
mg_base:RemoveCard(c)
end
else
for i=1,#matched do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment