--Chronovert Call local s,id=GetID() function s.initial_effect(c) --When your opponent activates a card or effect in response to your card or effect activation: Special Summon 1 "Chronovert Dragon" from your Extra Deck. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) --If this card is in your GY: You can target 1 "Chronovert" Time Leap Monster in your GY or among your banished cards; Shuffle both that card and this card into the Deck. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ch=Duel.GetCurrentChain(true)-1 if ch<=0 then return false end local cplayer=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER) local ceff=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_EFFECT) return ep==1-tp and cplayer==tp end function s.spfilter(c,e,tp) return c:IsCode(177222522) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA) end function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.tdfilter(c) return c:IsType(TYPE_TIMELEAP) and c:IsSetCard(0x724) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.tdfilter(chkc) and chkc:IsControler(tp) and chkc~=c end if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,c) g:AddCard(c) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then local g=Group.CreateGroup(c,tc) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end