Commit 58247202 authored by nanahira's avatar nanahira

update for better ram use

parent 10ec6b07
...@@ -1842,7 +1842,7 @@ function Auxiliary.GetLinkMaterials(tp,f,lc) ...@@ -1842,7 +1842,7 @@ function Auxiliary.GetLinkMaterials(tp,f,lc)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg return mg
end end
function Auxiliary.LCheckOtherMaterial(c,mg,lc) function Auxiliary.LCheckOtherMaterial(c,sg,lc)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL)} local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL)}
for _,te in pairs(le) do for _,te in pairs(le) do
local f=te:GetValue() local f=te:GetValue()
...@@ -1852,9 +1852,10 @@ function Auxiliary.LCheckOtherMaterial(c,mg,lc) ...@@ -1852,9 +1852,10 @@ function Auxiliary.LCheckOtherMaterial(c,mg,lc)
end end
function Auxiliary.LCheckMaterialCompatibility(sg,lc) function Auxiliary.LCheckMaterialCompatibility(sg,lc)
for tc in Auxiliary.Next(sg) do for tc in Auxiliary.Next(sg) do
local mg=sg:Clone() sg:RemoveCard(tc)
mg:RemoveCard(tc) local res=Auxiliary.LCheckOtherMaterial(tc,sg,lc)
if not Auxiliary.LCheckOtherMaterial(tc,mg,lc) then return false end sg:AddCard(tc)
if not res then return false end
end end
return true return true
end end
......
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