--Shya Divine Spirit function c11000503.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1FD),aux.NonTuner(nil),1) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(11000503,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c11000503.spcon) e1:SetCost(c11000503.cost) e1:SetTarget(c11000503.sptg) e1:SetOperation(c11000503.spop) c:RegisterEffect(e1) --indes local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11000503,1)) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(c11000503.indtg) e2:SetValue(c11000503.indct) c:RegisterEffect(e2) end function c11000503.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO end function c11000503.cfilter(c) return c:IsSetCard(0x1FD) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() end function c11000503.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11000503.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,c11000503.cfilter,1,1,REASON_COST+REASON_DISCARD) end function c11000503.spfilter(c,e,tp) return c:IsSetCard(0x1FD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c11000503.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c11000503.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c11000503.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c11000503.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function c11000503.indtg(e,c,tp,eg,ep,ev,re,r,rp,chk,chkc) return c:IsSetCard(0x1FD,0x1F3) end function c11000503.indct(e,re,r,rp) if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then return 1 else return 0 end end