--Shya Divine Shaman function c11000501.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1FD),aux.NonTuner(nil),1) --todeck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(11000501,0)) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(c11000501.condition) e1:SetCost(c11000501.cost) e1:SetTarget(c11000501.target) e1:SetOperation(c11000501.operation) c:RegisterEffect(e1) end function c11000501.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO end function c11000501.filter(c) return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x1FD) end function c11000501.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end Duel.DiscardDeck(tp,2,REASON_COST) local g=Duel.GetOperatedGroup() local ct=g:FilterCount(c11000501.filter,nil) if ct~=0 then e:SetLabel(ct) else ct=0 e:SetLabel(ct) end end function c11000501.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,2,nil) and e:IsCostChecked() end local ct=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,ct,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) end function c11000501.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoDeck(g,nil,2,REASON_EFFECT) end