--coded by Lyris local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_DRAGON),1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e1:SetCondition(s.tgcon) e1:SetCost(s.cost) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCondition(s.tgcon) e2:SetCost(s.cost) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function s.filter1(c) return c:IsSetCard(0x617) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE,0,3,nil) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsPlayerCanDraw(tp,1) then return end local tg=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE,0,3,3,nil) Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) if ct==3 then Duel.Draw(tp,1,REASON_EFFECT) end end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,3,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_REMOVED) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) local sg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_REMOVED,0,3,3,nil) if #sg>0 then Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN,tp) end end