--Shary the Voodoll Overmaster function c212870.initial_effect(c) --link summon aux.AddLinkProcedure(c,nil,2,99,c212870.lcheck) c:EnableReviveLimit() --to grave local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(212870,0)) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,212870) e1:SetTarget(c212870.tgtg) e1:SetOperation(c212870.tgop) c:RegisterEffect(e1) --draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(212870,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,212870) e2:SetTarget(c212870.drtg) e2:SetOperation(c212870.drop) c:RegisterEffect(e2) end function c212870.lcheck(g) return g:IsExists(Card.IsLinkSetCard,1,nil,0x26eb) end function c212870.tgfilter(c) return c:IsSetCard(0x26eb) and c:IsAbleToGrave() end function c212870.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c212870.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) end function c212870.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c212870.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end function c212870.tdfilter(c) return c:IsSetCard(0x26eb) and c:IsAbleToDeck() end function c212870.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c212870.tdfilter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c212870.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,c212870.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c212870.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if tg:GetCount()<=0 then return end 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>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end end