Commit 928f64e3 authored by DailyShana's avatar DailyShana

refine

parent 4b59b1ae
...@@ -1857,15 +1857,16 @@ end ...@@ -1857,15 +1857,16 @@ end
function Auxiliary.LCheckRecursive(c,tp,sg,mg,lc,ct,minc,maxc,gf) function Auxiliary.LCheckRecursive(c,tp,sg,mg,lc,ct,minc,maxc,gf)
sg:AddCard(c) sg:AddCard(c)
ct=ct+1 ct=ct+1
local res=not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc) local res=Auxiliary.LCheckGoal(tp,sg,lc,minc,ct,gf)
and (Auxiliary.LCheckGoal(tp,sg,lc,minc,ct,gf) or ct<maxc and mg:IsExists(Auxiliary.LCheckRecursive,1,sg,tp,sg,mg,lc,ct,minc,maxc,gf)
or ct<maxc and mg:IsExists(Auxiliary.LCheckRecursive,1,sg,tp,sg,mg,lc,ct,minc,maxc,gf))
sg:RemoveCard(c) sg:RemoveCard(c)
ct=ct-1 ct=ct-1
return res return res
end end
function Auxiliary.LCheckGoal(tp,sg,lc,minc,ct,gf) function Auxiliary.LCheckGoal(tp,sg,lc,minc,ct,gf)
return ct>=minc and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg)) return ct>=minc and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,lc:GetLink(),ct,ct)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc)
end end
function Auxiliary.LinkCondition(f,minc,maxc,gf) function Auxiliary.LinkCondition(f,minc,maxc,gf)
return function(e,c) return function(e,c)
......
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