Commit 321fec0f authored by salix5's avatar salix5

double tuner

parent d1ba1835
......@@ -21,7 +21,7 @@ function c55863245.initial_effect(c)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c55863245.efilter)
c:RegisterEffect(e2)
--
--hand synchro for double tuner
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
......@@ -79,14 +79,25 @@ function c93157004.synfilter3(c,syncard,lv,f1,f2)
local lv2=bit.rshift(mlv,16)
return (lv1==lv or lv2==lv) and (not f1 or f1(c)) and (not f2 or f2(c))
end
function c93157004.syncon(e,c,tuner)
function c93157004.syncon(e,c,tuner,mg)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<-2 then return false end
local g1=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g2=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g3=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
local g4=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
local g3=Group.CreateGroup()
local g4=Group.CreateGroup()
if mg then
g1=mg:Filter(c93157004.matfilter1,nil,c)
g2=mg:Filter(c93157004.matfilter2,nil,c)
g3=mg:Filter(c93157004.matfilter1,nil,c)
g4=mg:Filter(c93157004.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
g4=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
......@@ -105,12 +116,23 @@ function c93157004.syncon(e,c,tuner)
return c93157004.synfilter1(pe:GetOwner(),c,lv,g1,g2,g3,g4)
end
end
function c93157004.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner)
function c93157004.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g2=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g3=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
local g4=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
local g3=Group.CreateGroup()
local g4=Group.CreateGroup()
if mg then
g1=mg:Filter(c93157004.matfilter1,nil,c)
g2=mg:Filter(c93157004.matfilter2,nil,c)
g3=mg:Filter(c93157004.matfilter1,nil,c)
g4=mg:Filter(c93157004.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
g4=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
......
......@@ -82,13 +82,22 @@ function c97489701.synfilter3(c,syncard,lv,f1,f2)
local lv2=bit.rshift(mlv,16)
return (lv1==lv or lv2==lv) and (not f1 or f1(c)) and (not f2 or f2(c))
end
function c97489701.syncon(e,c,tuner)
function c97489701.syncon(e,c,tuner,mg)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<-2 then return false end
local g1=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g2=Duel.GetMatchingGroup(c97489701.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g3=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
local g3=Group.CreateGroup()
if mg then
g1=mg:Filter(c97489701.matfilter1,nil,c)
g2=mg:Filter(c97489701.matfilter2,nil,c)
g3=mg:Filter(c97489701.matfilter1,nil,c)
else
g1=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c97489701.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
......@@ -107,11 +116,20 @@ function c97489701.syncon(e,c,tuner)
return c97489701.synfilter1(pe:GetOwner(),c,lv,g1,g2)
end
end
function c97489701.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner)
function c97489701.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g2=Duel.GetMatchingGroup(c97489701.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
local g3=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
local g3=Group.CreateGroup()
if mg then
g1=mg:Filter(c97489701.matfilter1,nil,c)
g2=mg:Filter(c97489701.matfilter2,nil,c)
g3=mg:Filter(c97489701.matfilter1,nil,c)
else
g1=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c97489701.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
......
......@@ -108,6 +108,7 @@ function Auxiliary.NonTuner(f,a,b,c)
return target:IsNotTuner() and (not f or f(target,a,b,c))
end
end
--Synchron monster, 1 tuner + n or more monsters
function Auxiliary.AddSynchroProcedure(c,f1,f2,ct)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -148,6 +149,7 @@ function Auxiliary.SynOperation(f1,f2,minct,maxc)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
end
end
--Synchron monster, 1 tuner + 1 monster
function Auxiliary.AddSynchroProcedure2(c,f1,f2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
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