--Shya Rising Star function c11000518.initial_effect(c) --atklimit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11000518,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,11000518) e2:SetTarget(c11000518.sptg1) e2:SetOperation(c11000518.spop1) c:RegisterEffect(e2) --special summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11000518,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,11000518) e3:SetCost(c11000518.spcost2) e3:SetTarget(c11000518.sptg2) e3:SetOperation(c11000518.spop2) c:RegisterEffect(e3) end function c11000518.tfilter(c,tp) local level=c:GetLevel() return c:IsSetCard(0x1FD) and c:IsFaceup() and Duel.IsExistingMatchingCard(c11000518.tgfilter,tp,LOCATION_DECK,0,1,nil,level) end function c11000518.tgfilter(c,level) return not c:IsLevel(level) and c:IsSetCard(0x1FD) and c:IsAbleToGrave() end function c11000518.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c11000518.tfilter(chkc,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c11000518.tfilter,tp,LOCATION_MZONE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,c11000518.tfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c11000518.spop1(e,tp,eg,ep,ev,re,r,rp) local c,tc=e:GetHandler(),Duel.GetFirstTarget() local level=tc:GetLevel() if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c11000518.tgfilter,tp,LOCATION_DECK,0,1,1,nil,level) local tgc=g:GetFirst() if tgc and Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end end function c11000518.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() end Duel.Release(e:GetHandler(),REASON_COST) end function c11000518.spfilter(c,e,tp) return c:IsSetCard(0x1FD) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(11000518) end function c11000518.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11000518.spfilter(chkc,e,tp) end if chk==0 then return Duel.IsExistingTarget(c11000518.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c11000518.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c11000518.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then end Duel.SpecialSummonComplete() end