--Twilightknight Sirius local m=88888815 local cm=c88888815 function cm.initial_effect(c) c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xff9a),1,1) c:SetSPSummonOnce(m) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,m) e2:SetCost(cm.cost) e2:SetTarget(cm.sptg) e2:SetOperation(cm.spop) c:RegisterEffect(e2) end function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) Duel.Release(sg,REASON_COST) end function cm.spfilter(c,e,tp) return c:IsSetCard(0xff9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function cm.spop(e,tp,eg,ep,ev,re,r,rp) local zone=e:GetHandler():GetLinkedZone(tp) if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,cm.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,zone) end end