--Temm, Summoner of Eternna function c213005.initial_effect(c) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(213005,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,213005) e1:SetTarget(c213005.sptg) e1:SetOperation(c213005.spop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --remove local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(213005,1)) e3:SetCategory(CATEGORY_REMOVE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_TO_GRAVE) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,213005) e3:SetCondition(c213005.addcon) e3:SetTarget(c213005.addtg) e3:SetOperation(c213005.addop) c:RegisterEffect(e3) end function c213005.spfilter1(c,e,tp) return c:IsSetCard(0x2700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c213005.spfilter2(c) return c:IsSetCard(0x2700) and c:IsType(TYPE_MONSTER) end function c213005.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c213005.spfilter,tp,LOCATION_DECK,0,3,nil) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) end function c213005.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c213005.spfilter2,tp,LOCATION_DECK,0,nil) if g:GetCount()>=3 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,3,3,nil) Duel.ConfirmCards(1-tp,sg) local tg=sg:RandomSelect(1-tp,1) local tc=tg:GetFirst() if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) sg:RemoveCard(tc) end end end function c213005.addcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsType(TYPE_XYZ) end function c213005.thfilter1(c) return c:IsSetCard(0x2700) and c:IsType(TYPE_MONSTER) and not c:IsCode(213005) and c:IsAbleToHand() end function c213005.addtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c213005.thfilter1(chkc) end if chk==0 then return Duel.IsExistingTarget(c213005.thfilter1,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,c213005.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function c213005.addop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end