Commit 1b1a4525 authored by Aephiex's avatar Aephiex Committed by nanahira

merge CanPlayerXyz.... into MustMaterialCheck (#1044)

parent ac0e1bd2
...@@ -265,7 +265,10 @@ function Auxiliary.GetMustMaterialGroup(tp,code) ...@@ -265,7 +265,10 @@ function Auxiliary.GetMustMaterialGroup(tp,code)
end end
function Auxiliary.MustMaterialCheck(v,tp,code) function Auxiliary.MustMaterialCheck(v,tp,code)
local g=Auxiliary.GetMustMaterialGroup(tp,code) local g=Auxiliary.GetMustMaterialGroup(tp,code)
if not v then return #g==0 end if not v then
if code==EFFECT_MUST_BE_XMATERIAL and Duel.IsPlayerAffectedByEffect(tp,67120578) then return false end
return #g==0
end
local t=Auxiliary.GetValueType(v) local t=Auxiliary.GetValueType(v)
for tc in Auxiliary.Next(g) do for tc in Auxiliary.Next(g) do
if (t=="Card" and v~=tc) if (t=="Card" and v~=tc)
...@@ -533,9 +536,6 @@ end ...@@ -533,9 +536,6 @@ end
function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,op) function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,op)
return alterf(c) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0 and (not op or op(e,tp,0,c)) return alterf(c) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0 and (not op or op(e,tp,0,c))
end end
function Auxiliary.CanPlayerXyzSummonCardWithoutMaterial(tp)
return Duel.IsPlayerAffectedByEffect(tp,67120578)==nil and Auxiliary.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
end
--Xyz monster, lv k*n --Xyz monster, lv k*n
function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op) function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(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