Commit 2ba1c266 authored by mercury233's avatar mercury233 Committed by mercury233

fix EFFECT_SYNCHRO_MATERIAL_CUSTOM cards

parent 509df8ca
......@@ -29,7 +29,7 @@ function c3096468.initial_effect(c)
c:RegisterEffect(e3)
end
function c3096468.synfilter(c,syncard,tuner,f)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
return c:IsFaceupEx() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c3096468.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
......@@ -57,7 +57,9 @@ function c3096468.syntg(e,syncard,f,min,max)
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c3096468.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c3096468.synfilter,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c3096468.synfilter,tp,LOCATION_HAND,0,c,syncard,c,f)
mg:Merge(exg)
return mg:IsExists(c3096468.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c3096468.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
......@@ -66,7 +68,9 @@ function c3096468.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c3096468.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c3096468.synfilter,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c3096468.synfilter,tp,LOCATION_HAND,0,c,syncard,c,f)
mg:Merge(exg)
for i=1,maxc do
local cg=mg:Filter(c3096468.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break end
......
......@@ -72,7 +72,7 @@ function c33541430.cardiansynlevel(c)
return 2
end
function c33541430.synfilter(c,syncard,tuner,f)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
return c:IsFaceupEx() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c33541430.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
......@@ -96,7 +96,7 @@ function c33541430.syntg(e,syncard,f,min,max)
local lv=syncard:GetLevel()
if lv<=c:GetLevel() and lv<=c33541430.cardiansynlevel(c) then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c33541430.synfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c33541430.synfilter,c,syncard,c,f)
return mg:IsExists(c33541430.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c33541430.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
......@@ -105,7 +105,7 @@ function c33541430.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c33541430.synfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c33541430.synfilter,c,syncard,c,f)
for i=1,maxc do
local cg=mg:Filter(c33541430.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break end
......
......@@ -31,7 +31,7 @@ function c55863245.initial_effect(c)
c:RegisterEffect(e3)
end
function c55863245.synfilter(c,syncard,tuner,f)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
return c:IsFaceupEx() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c55863245.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
......@@ -59,7 +59,9 @@ function c55863245.syntg(e,syncard,f,min,max)
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c55863245.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c55863245.synfilter,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c55863245.synfilter,tp,LOCATION_HAND,0,c,syncard,c,f)
mg:Merge(exg)
return mg:IsExists(c55863245.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c55863245.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
......@@ -68,7 +70,9 @@ function c55863245.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c55863245.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c55863245.synfilter,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c55863245.synfilter,tp,LOCATION_HAND,0,c,syncard,c,f)
mg:Merge(exg)
for i=1,maxc do
local cg=mg:Filter(c55863245.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break end
......
......@@ -85,7 +85,7 @@ function c57261568.cardiansynlevel(c)
return 2
end
function c57261568.synfilter(c,syncard,tuner,f)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
return c:IsFaceupEx() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c57261568.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
......@@ -109,7 +109,7 @@ function c57261568.syntg(e,syncard,f,min,max)
local lv=syncard:GetLevel()
if lv<=c:GetLevel() and lv<=c57261568.cardiansynlevel(c) then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c57261568.synfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c57261568.synfilter,c,syncard,c,f)
return mg:IsExists(c57261568.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c57261568.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
......@@ -118,7 +118,7 @@ function c57261568.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c57261568.synfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c57261568.synfilter,c,syncard,c,f)
for i=1,maxc do
local cg=mg:Filter(c57261568.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break end
......
......@@ -25,7 +25,7 @@ function c64910482.initial_effect(c)
c:RegisterEffect(e3)
end
function c64910482.synfilter1(c,syncard,tuner,f)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
return c:IsFaceupEx() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c64910482.synfilter2(c,syncard,tuner,f)
return c:IsSetCard(0x27) and c:IsNotTuner(syncard) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
......@@ -52,9 +52,9 @@ function c64910482.syntg(e,syncard,f,min,max)
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c64910482.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c64910482.synfilter1,c,syncard,c,f)
if syncard:IsSetCard(0x27) then
local exg=Duel.GetMatchingGroup(c64910482.synfilter2,syncard:GetControler(),LOCATION_HAND,0,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c64910482.synfilter2,tp,LOCATION_HAND,0,c,syncard,c,f)
mg:Merge(exg)
end
return mg:IsExists(c64910482.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
......@@ -65,9 +65,9 @@ function c64910482.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c64910482.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c64910482.synfilter1,c,syncard,c,f)
if syncard:IsSetCard(0x27) then
local exg=Duel.GetMatchingGroup(c64910482.synfilter2,syncard:GetControler(),LOCATION_HAND,0,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c64910482.synfilter2,tp,LOCATION_HAND,0,c,syncard,c,f)
mg:Merge(exg)
end
for i=1,maxc do
......
......@@ -77,7 +77,7 @@ function c89818984.cardiansynlevel(c)
return 2
end
function c89818984.synfilter(c,syncard,tuner,f)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
return c:IsFaceupEx() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c89818984.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
......@@ -101,7 +101,7 @@ function c89818984.syntg(e,syncard,f,min,max)
local lv=syncard:GetLevel()
if lv<=c:GetLevel() and lv<=c89818984.cardiansynlevel(c) then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c89818984.synfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c89818984.synfilter,c,syncard,c,f)
return mg:IsExists(c89818984.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c89818984.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
......@@ -110,7 +110,7 @@ function c89818984.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c89818984.synfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local mg=Duel.GetSynchroMaterial(tp):Filter(c89818984.synfilter,c,syncard,c,f)
for i=1,maxc do
local cg=mg:Filter(c89818984.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break 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