Commit 4bdae2df authored by mercury233's avatar mercury233 Committed by GitHub

add tp and xyzc param (#3095)

parent 12ebabdb
......@@ -373,7 +373,7 @@ function Auxiliary.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc,mgchk)
local g=sg:Clone()
g:Merge(sg1)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if gc and not gc(g,syncard) then return false end
if gc and not gc(g,syncard,tp) then return false end
if smat and not g:IsContains(smat) then return false end
if not Auxiliary.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL) then return false end
if Duel.IsPlayerAffectedByEffect(tp,8173184)
......@@ -482,7 +482,7 @@ function Auxiliary.Xyz2XMaterialEffectFilter(c,xyzc,lv,f,tp,checked)
local e=c:IsHasEffect(EFFECT_DOUBLE_XMATERIAL,tp)
if not e then return false end
local tg=e:GetTarget()
if tg and not tg(e,xyzc) then return false end
if tg and not tg(e,xyzc,tp) then return false end
return true
end
function Auxiliary.Xyz2XMaterialGoal(g,tp,xyzc,minc)
......@@ -500,7 +500,7 @@ function Auxiliary.Xyz2XMaterialGoal(g,tp,xyzc,minc)
if le then
local tg=le:GetTarget()
local limit_value=le:GetValue() -- not fully implemented: assuming Hard once per turn effects
if (not tg or tg(le,xyzc)) and (not limit_value or not limit_table[limit_value]) then
if (not tg or tg(le,xyzc,tp)) and (not limit_value or not limit_table[limit_value]) then
ct2=ct2+1
if limit_value then
limit_table[limit_value]=true
......@@ -664,7 +664,7 @@ function Auxiliary.XyzLevelFreeFilter(c,xyzc,f)
end
function Auxiliary.XyzLevelFreeGoal(g,tp,xyzc,gf)
if Duel.GetLocationCountFromEx(tp,tp,g,xyzc)<=0 then return false end
if gf and not gf(g) then return false end
if gf and not gf(g,xyzc,tp) then return false end
local lg=g:Filter(Card.IsHasEffect,nil,EFFECT_XYZ_MIN_COUNT)
for c in Auxiliary.Next(lg) do
local le=c:IsHasEffect(EFFECT_XYZ_MIN_COUNT)
......
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