hello guys, my monster Synchro Summon condition, needs to the following Synchro Monsters Materials
"2 Tuners Synchro Monsters + 1 non-Tuner Synchro Monster"
but, I want the Synchro Summon it is necessary the following Synchro Monsters Materials
"2 Tuners Synchro Monsters + 1 or more non-Tuner Synchro Monster(s)"
how can I make this?
Script (only Synchro Summon)
--Zemor, The Overlord Darkness Warrior
function c11478963.initial_effect(c)
--Synchro Summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c11478963.syncon)
e1:SetOperation(c11478963.synop)
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
end
function c11478963.matfilter1(c,syncard)
return c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end
function c11478963.matfilter2(c,syncard)
return c:IsType(TYPE_SYNCHRO) and c:IsNotTuner() and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end
function c11478963.synfilter1(c,syncard,lv,g1,g2)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f1=c.tuner_filter
return g1:IsExists(c11478963.synfilter2,1,c,syncard,lv-tlv,g2,f1,c)
end
function c11478963.synfilter2(c,syncard,lv,g2,f1,tuner1)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f2=c.tuner_filter
if f1 and not f1(c) then return false end
if f2 and not f2(tuner1) then return false end
return g2:IsExists(c11478963.synfilter3,1,nil,syncard,lv-tlv,f1,f2)
end
function c11478963.synfilter3(c,syncard,lv,f1,f2)
local mlv=c:GetSynchroLevel(syncard)
local lv1=bit.band(mlv,0xffff)
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 c11478963.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=nil
local g2=nil
if mg then
g1=mg:Filter(c11478963.matfilter1,nil,c)
g2=mg:Filter(c11478963.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c11478963.matfilter1,tp,LOCATION_MZONE,0,nil,c)
g2=Duel.GetMatchingGroup(c11478963.matfilter2,tp,LOCATION_MZONE,0,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
local tlv=tuner:GetSynchroLevel(c)
if lv-tlv<=0 then return false end
local f1=tuner.tuner_filter
if not pe then
return g1:IsExists(c11478963.synfilter2,1,tuner,c,lv-tlv,g2,f1,tuner)
else
return c11478963.synfilter2(pe:GetOwner(),c,lv-tlv,g2,f1,tuner)
end
end
if not pe then
return g1:IsExists(c11478963.synfilter1,1,nil,c,lv,g1,g2)
else
return c11478963.synfilter1(pe:GetOwner(),c,lv,g1,g2)
end
end
function c11478963.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=Group.CreateGroup()
local g1=nil
local g2=nil
local g3=nil
local g4=nil
if mg then
g1=mg:Filter(c11478963.matfilter1,nil,c)
g2=mg:Filter(c11478963.matfilter2,nil,c)
g3=mg:Filter(c11478963.matfilter1,nil,c)
g4=mg:Filter(c11478963.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c11478963.matfilter1,tp,LOCATION_MZONE,1,nil,c)
g2=Duel.GetMatchingGroup(c11478963.matfilter2,tp,LOCATION_MZONE,1,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
g:AddCard(tuner)
local lv1=tuner:GetSynchroLevel(c)
local f1=tuner.tuner_filter
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner2=nil
if not pe then
local t2=g1:FilterSelect(tp,c11478963.synfilter2,1,1,tuner,c,lv-lv1,g2,g4,f1,tuner)
tuner2=t2:GetFirst()
else
tuner2=pe:GetOwner()
Group.FromCards(tuner2):Select(tp,1,1,nil)
end
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
m3=g2:FilterSelect(tp,c11478963.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
g:Merge(m3)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner1=nil
local hand=nil
if not pe then
local t1=g1:FilterSelect(tp,c11478963.synfilter1,1,1,nil,c,lv,g1,g2,g3,g4)
tuner1=t1:GetFirst()
else
tuner1=pe:GetOwner()
Group.FromCards(tuner1):Select(tp,1,1,nil)
end
g:AddCard(tuner1)
local lv1=tuner1:GetSynchroLevel(c)
local f1=tuner1.tuner_filter
local tuner2=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local t2=g1:FilterSelect(tp,c11478963.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1)
tuner2=t2:GetFirst()
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
m3=g2:FilterSelect(tp,c11478963.synfilter3,f1,f2,nil,c,lv-lv1-lv2,f1,f2)
g:Merge(m3)
end
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
end
Script (Complete)
--Zemor, The Overlord Darkness Warrior
function c11478963.initial_effect(c)
--Synchro Summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c11478963.syncon)
e1:SetOperation(c11478963.synop)
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
--Cannot Special Summon
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(aux.FALSE)
c:RegisterEffect(e2)
--Cannot Disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e3)
--Atk/Def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(c11478963.atkdefop)
c:RegisterEffect(e4)
--Negate Card(s) or Effect(s)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(11478963,0))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c11478963.negeffcon)
e5:SetCost(c11478963.negcost)
e5:SetTarget(c11478963.negefftg)
e5:SetOperation(c11478963.negeffop)
c:RegisterEffect(e5)
--Negate Summon
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e6:SetDescription(aux.Stringid(11478963,1))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_SUMMON)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetCondition(c11478963.negsmcon)
e6:SetCost(c11478963.negcost)
e6:SetTarget(c11478963.negsmtg)
e6:SetOperation(c11478963.negsmop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetDescription(aux.Stringid(11478963,2))
e7:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e7)
local e8=e6:Clone()
e8:SetDescription(aux.Stringid(11478963,3))
e8:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e8)
--Revive
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(11478963,4))
e9:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e9:SetCategory(CATEGORY_SPECIAL_SUMMON)
e9:SetCode(EVENT_PHASE+PHASE_END)
e9:SetRange(LOCATION_GRAVE)
e9:SetTarget(c11478963.revtg)
e9:SetOperation(c11478963.revop)
c:RegisterEffect(e9)
--Immune
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_GRAVE)
e10:SetCode(EFFECT_IMMUNE_EFFECT)
e10:SetValue(c11478963.efilter)
c:RegisterEffect(e10)
end
function c11478963.matfilter1(c,syncard)
return c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end
function c11478963.matfilter2(c,syncard)
return c:IsType(TYPE_SYNCHRO) and c:IsNotTuner() and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end
function c11478963.synfilter1(c,syncard,lv,g1,g2)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f1=c.tuner_filter
return g1:IsExists(c11478963.synfilter2,1,c,syncard,lv-tlv,g2,f1,c)
end
function c11478963.synfilter2(c,syncard,lv,g2,f1,tuner1)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f2=c.tuner_filter
if f1 and not f1(c) then return false end
if f2 and not f2(tuner1) then return false end
return g2:IsExists(c11478963.synfilter3,1,nil,syncard,lv-tlv,f1,f2)
end
function c11478963.synfilter3(c,syncard,lv,f1,f2)
local mlv=c:GetSynchroLevel(syncard)
local lv1=bit.band(mlv,0xffff)
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 c11478963.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=nil
local g2=nil
if mg then
g1=mg:Filter(c11478963.matfilter1,nil,c)
g2=mg:Filter(c11478963.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c11478963.matfilter1,tp,LOCATION_MZONE,0,nil,c)
g2=Duel.GetMatchingGroup(c11478963.matfilter2,tp,LOCATION_MZONE,0,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
local tlv=tuner:GetSynchroLevel(c)
if lv-tlv<=0 then return false end
local f1=tuner.tuner_filter
if not pe then
return g1:IsExists(c11478963.synfilter2,1,tuner,c,lv-tlv,g2,f1,tuner)
else
return c11478963.synfilter2(pe:GetOwner(),c,lv-tlv,g2,f1,tuner)
end
end
if not pe then
return g1:IsExists(c11478963.synfilter1,1,nil,c,lv,g1,g2)
else
return c11478963.synfilter1(pe:GetOwner(),c,lv,g1,g2)
end
end
function c11478963.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=Group.CreateGroup()
local g1=nil
local g2=nil
local g3=nil
local g4=nil
if mg then
g1=mg:Filter(c11478963.matfilter1,nil,c)
g2=mg:Filter(c11478963.matfilter2,nil,c)
g3=mg:Filter(c11478963.matfilter1,nil,c)
g4=mg:Filter(c11478963.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c11478963.matfilter1,tp,LOCATION_MZONE,1,nil,c)
g2=Duel.GetMatchingGroup(c11478963.matfilter2,tp,LOCATION_MZONE,1,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
g:AddCard(tuner)
local lv1=tuner:GetSynchroLevel(c)
local f1=tuner.tuner_filter
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner2=nil
if not pe then
local t2=g1:FilterSelect(tp,c11478963.synfilter2,1,1,tuner,c,lv-lv1,g2,g4,f1,tuner)
tuner2=t2:GetFirst()
else
tuner2=pe:GetOwner()
Group.FromCards(tuner2):Select(tp,1,1,nil)
end
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
m3=g2:FilterSelect(tp,c11478963.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
g:Merge(m3)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner1=nil
local hand=nil
if not pe then
local t1=g1:FilterSelect(tp,c11478963.synfilter1,1,1,nil,c,lv,g1,g2,g3,g4)
tuner1=t1:GetFirst()
else
tuner1=pe:GetOwner()
Group.FromCards(tuner1):Select(tp,1,1,nil)
end
g:AddCard(tuner1)
local lv1=tuner1:GetSynchroLevel(c)
local f1=tuner1.tuner_filter
local tuner2=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local t2=g1:FilterSelect(tp,c11478963.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1)
tuner2=t2:GetFirst()
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
m3=g2:FilterSelect(tp,c11478963.synfilter3,f1,f2,nil,c,lv-lv1-lv2,f1,f2)
g:Merge(m3)
end
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
end
function c11478963.atkdefop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
local s=0
local ss=0
local tc=g:GetFirst()
while tc do
local a=tc:GetTextAttack()
local d=tc:GetTextDefence()
if a<0 then a=0 end
if d<0 then d=0 end
s=s+a
ss=ss+d
tc=g:GetNext()
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(s)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENCE)
e2:SetValue(ss)
c:RegisterEffect(e2)
end
function c11478963.negeffcon(e,tp,eg,ep,ev,re,r,rp)
local self=e:GetHandler()
return not self:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and re:GetHandler()~=self
end
function c11478963.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local self=e:GetHandler()
if chk==0 then return self:IsReleasable() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Release(self,REASON_COST)
Duel.SetChainLimit(aux.FALSE)
end
function c11478963.negefftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ng=Group.CreateGroup()
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tc=te:GetHandler()
ng:AddCard(tc)
dg:AddCard(tc)
end
Duel.SetTargetCard(dg)
local op=0
if ng:GetCount()>1 then op=Duel.SelectOption(tp,aux.Stringid(11478963,5),aux.Stringid(11478963,6)) end
e:SetLabel(op)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
if re:GetHandler():IsAbleToDeck() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
end
function c11478963.negeffop(e,tp,eg,ep,ev,re,r,rp)
local self=e:GetHandler()
local dg=Group.CreateGroup()
for i=1,ev do
if e:GetLabel()==0 then
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
Duel.NegateActivation(i)
local tc=te:GetHandler()
dg:AddCard(tc)
elseif e:GetLabel()~=0 then
Duel.NegateActivation(ev)
end
end
if e:GetLabel()==0 and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(dg,REASON_EFFECT)
elseif e:GetLabel()~=0 and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
self:RegisterFlagEffect(11478963,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0)
end
function c11478963.negsmfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c11478963.negsmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11478963.negsmfilter,1,nil)
end
function c11478963.negsmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ng=eg:Filter(c11478963.negsmfilter,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,ng,ng:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,ng,ng:GetCount(),0,0)
end
function c11478963.negsmop(e,tp,eg,ep,ev,re,r,rp)
local self=e:GetHandler()
local ng=eg:Filter(c11478963.negsmfilter,nil)
Duel.NegateSummon(ng)
Duel.Destroy(ng,REASON_EFFECT)
self:RegisterFlagEffect(11478963,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0)
end
function c11478963.revtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(11478963)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c11478963.revop(e,tp,eg,ep,ev,re,r,rp)
local self=e:GetHandler()
if self:IsRelateToEffect(e) then
Duel.SpecialSummon(self,0,tp,tp,true,false,POS_FACEUP)
end
end
function c11478963.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
Card Effect Description (if really necessary)
2 Tuners Synchro Monsters + 1 non-Tuner Synchro Monster
Must be Synchro Summoned (from the Extra Deck) and cannot be Special Summoned by other ways. This card Synchro Summon cannot be negated. This card original ATK and DEF becomes the combined original ATK and DEF of Synchro Material Monsters used to Synchro Summon it. While this card is face-up on the field, when a card(s) or effect(s) is activated, OR when a monster(s) would be Summoned, you can tribute this card, negate that activation(s) or Summon(s), and if you do, destroy that card(s). If you activated this card effect's (and was not negated), you can Special Summon this card from the Graveyard during the End Phase. This card is unaffected by other cards effects while is in the Graveyard. (Neither cards or effects can be activated in response to this card activations).