--created by Seth, coded by Lyris --Great London Doctor Dan local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:HOPT() e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:HOPT() e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetTarget(s.sktg) e2:SetOperation(s.skop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:HOPT() e3:SetDescription(1152) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e3:SetTarget(s.rvtg) e3:SetOperation(s.rvop) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetCode(EVENT_BATTLE_START) e4:HOPT() e4:SetDescription(1101) e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) e4:SetCondition(s.ddcon) e4:SetTarget(s.ddtg) e4:SetOperation(s.ddop) c:RegisterEffect(e4) end function s.cfilter(c) return c:IsFaceup() and c:IsSetCard(0xd3f) end function s.spcon(e,tp) local ph=Duel.GetCurrentPhase() return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,_,_,_,_,_,_,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function s.sktg(e,tp,_,_,_,_,_,_,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xd3f) end end function s.skop(e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) local tc=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0xd3f):GetFirst() if not tc then return end Duel.ShuffleDeck(tp) Duel.MoveSequence(tc,SEQ_DECKTOP) Duel.ConfirmDecktop(tp,1) end function s.filter(c,e,tp) return c:IsSetCard(0xd3f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.rvtg(e,tp,_,_,_,_,_,_,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) e:SetLabel(Duel.AnnounceType(tp)) end function s.rvop(e,tp) if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end local tc=Duel.GetDecktopGroup(tp,1):GetFirst() Duel.ConfirmDecktop(tp,1) if not tc:IsType(1<0 then Duel.Draw(tp,1,REASON_EFFECT) end end