--Temporius Timeline Swap local s,id=GetID() function s.initial_effect(c) --Target 1 Time Leap Monster you control; Return it to the Extra Deck, and if you do, Special Summon 1 Time Leap monster from your Extra Deck with the same Future and Attribute but a different name local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.cfilter(c,e,tp) return c:IsFaceup() and c:IsType(TYPE_TIMELEAP) and c:IsAbleToExtra() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetFuture(),c:GetAttribute(),c:GetCode()) end function s.spfilter(c,e,tp,lv,att,cid) --Debug.Message(c:GetCode()) return c:IsType(TYPE_TIMELEAP,c,0,tp) and c:GetFuture()==lv and c:GetAttribute()==att and c:GetCode()~=cid and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc1=Duel.GetFirstTarget() if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and Duel.SendtoDeck(tc1,nil,0,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_EXTRA) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc1:GetFuture(),tc1:GetAttribute(),tc1:GetCode()) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummon(tc,SUMMON_TYPE_TIMELEAP,tp,tp,false,false,POS_FACEUP)~=0 then --but return it to the Extra Deck during the End Phase of this turn. local fid=tc:GetFieldID() tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,0)) local e1=Effect.CreateEffect(tc) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetLabel(fid) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) Duel.RegisterEffect(e1,tp) end end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) if e:GetLabelObject():GetFlagEffectLabel(id)==e:GetLabel() then return true end e:Reset() return false end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(e:GetLabelObject(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end