--Nazarelic Vritra function c212565.initial_effect(c) --synchro summon c:EnableReviveLimit() aux.AddSynchroMixProcedure(c,c212565.matfilter1,nil,nil,aux.NonTuner(Card.IsSetCard,0x2609),1,99) --return local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(212565,2)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCondition(c212565.condition) e1:SetOperation(c212565.regop) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(212565,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,212565) e2:SetTarget(c212565.target) e2:SetOperation(c212565.operation) c:RegisterEffect(e2) --set local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(212565,1)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_TO_DECK) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetCountLimit(1,212566) e3:SetCondition(c212565.rtcon) e3:SetTarget(c212565.settg) e3:SetOperation(c212565.setop) c:RegisterEffect(e3) end function c212565.matfilter1(c) return c:IsSynchroType(TYPE_TUNER) or (c:IsSynchroType(TYPE_SPIRIT) ) end function c212565.condition(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end function c212565.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetTarget(c212565.rettg) e1:SetOperation(c212565.retop) e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END) c:RegisterEffect(e1) end function c212565.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) end function c212565.retop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end end function c212565.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function c212565.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end function c212565.rtfilter(c) return c:IsFaceup() and c:IsSetCard(0x2609) end function c212565.rtcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c212565.rtfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end function c212565.filter(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) end function c212565.setfilter(c,tp) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end function c212565.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c212565.setfilter(chkc,tp) end if chk==0 then return Duel.IsExistingTarget(c212565.setfilter,tp,0,LOCATION_GRAVE,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectTarget(tp,c212565.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) end function c212565.setop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end end