Commit ad229644 authored by nanahira's avatar nanahira

update xyz

parent 8f37d226
...@@ -296,6 +296,27 @@ end ...@@ -296,6 +296,27 @@ end
function cm.XyzProcedureRankCheck(g,xyzc) function cm.XyzProcedureRankCheck(g,xyzc)
return g:GetClassCount(Card.GetRank)==1 return g:GetClassCount(Card.GetRank)==1
end end
function cm.XyzProcedureCustomTuneMagicianFilter(c,te)
local f=te:GetValue()
return f(te,c)
end
function cm.XyzProcedureCustomTuneMagicianCheck(c,g)
local eset={c:FilterEffect(EFFECT_TUNE_MAGICIAN_X)}
for _,te in ipairs(eset) do
if g:IsExists(cm.XyzProcedureCustomTuneMagicianFilter,1,c,te) then return true end
end
return false
end
function cm.XyzProcedureCustomCheck(g,xyzc,tp,gf)
if EFFECT_MUST_BE_XMATERIAL then
local eset={Duel.FilterPlayerEffect(tp,EFFECT_MUST_BE_XMATERIAL)}
for _,te in ipairs(eset) do
if not g:IsContains(te:GetHandler()) then return false end
end
end
if g:IsExists(cm.XyzProcedureCustomTuneMagicianCheck,1,nil,g) then return false end
return true
end
function cm.AddXyzProcedureCustom(c,func,gf,minc,maxc,xm,...) function cm.AddXyzProcedureCustom(c,func,gf,minc,maxc,xm,...)
local ext_params={...} local ext_params={...}
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -333,7 +354,7 @@ function cm.XyzProcedureCustomCondition(func,gf,minct,maxct,ext_params) ...@@ -333,7 +354,7 @@ function cm.XyzProcedureCustomCondition(func,gf,minct,maxct,ext_params)
else else
mg=Duel.GetMatchingGroup(cm.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params) mg=Duel.GetMatchingGroup(cm.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params)
end end
return maxc>=minc and cm.CheckGroup(mg,cm.CheckFieldFilter,nil,minc,maxc,tp,c,gf,c) return maxc>=minc and cm.CheckGroup(mg,cm.CheckFieldFilter,nil,minc,maxc,tp,c,cm.XyzProcedureCustomCheck,c,tp,gf)
end end
end end
function cm.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params) function cm.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params)
...@@ -354,7 +375,7 @@ function cm.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params) ...@@ -354,7 +375,7 @@ function cm.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params)
minc=math.max(minc,min) minc=math.max(minc,min)
maxc=math.min(maxc,max) maxc=math.min(maxc,max)
end end
g=cm.SelectGroupWithCancel(tp,HINTMSG_XMATERIAL,mg,cm.CheckFieldFilter,nil,minc,maxc,tp,c,gf,c) g=cm.SelectGroupWithCancel(tp,HINTMSG_XMATERIAL,mg,cm.CheckFieldFilter,nil,minc,maxc,tp,c,cm.XyzProcedureCustomCheck,c,tp,gf)
end end
if g then if g then
g:KeepAlive() g:KeepAlive()
......
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