--Silent Star Dragomir, the Skydian's Radiance function c97569826.initial_effect(c) c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),2,2,c97569826.lcheck) --to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(97569826,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_REMOVE) e1:SetCountLimit(1,97569826) e1:SetTarget(c97569826.thtg) e1:SetOperation(c97569826.thop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(c97569826.thcon) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,97569826) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetCost(c97569826.tgcost) e3:SetTarget(c97569826.tgtg) e3:SetOperation(c97569826.tgop) c:RegisterEffect(e3) end function c97569826.lcheck(g,lc) return g:IsExists(Card.IsSetCard,1,nil,0x528) or g:IsExists(Card.IsSetCard,1,nil,0x223) or g:IsExists(Card.IsSetCard,1,nil,0x2a7) or g:IsExists(Card.IsSetCard,1,nil,0xd0a1) end function c97569826.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end function c97569826.thfilter(c) return c:IsSetCard(0xd0a1) or c:IsSetCard(0x223) and c:IsAbleToHand() end function c97569826.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local dg=Duel.GetMatchingGroup(c97569826.thfilter,tp,LOCATION_DECK,0,nil) return dg:GetClassCount(Card.GetCode)>=3 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c97569826.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c97569826.thfilter,tp,LOCATION_DECK,0,nil) if g:GetClassCount(Card.GetCode)>=3 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg1=g:Select(tp,1,1,nil) g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg2=g:Select(tp,1,1,nil) g:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg3=g:Select(tp,1,1,nil) sg1:Merge(sg2) sg1:Merge(sg3) Duel.ConfirmCards(1-tp,sg1) local cg=sg1:RandomSelect(1-tp,1) local tc=cg:GetFirst() Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function c97569826.rmfil(c) return c:IsSetCard(0x223) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() end function c97569826.tgfilter(c) return c:IsSetCard(0xd0a1) or c:IsSetCard(0x223) and c:IsAbleToGrave() end function c97569826.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c97569826.rmfil,tp,LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,c97569826.rmfil,tp,LOCATION_EXTRA,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function c97569826.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c97569826.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function c97569826.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c97569826.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end