--created by Seth, coded by Lyris --Mextro Sightseeker local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:HOPT() e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetOperation(s.thop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BE_MATERIAL) e3:HOPT() e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCategory(CATEGORY_RECOVER) e3:SetCondition(s.lpcon) e3:SetTarget(s.lptg) e3:SetOperation(s.lpop) c:RegisterEffect(e3) end function s.filter(c) return c:IsSetCard(0xee5) and c:IsAbleToHand() end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,3) local g=Duel.GetDecktopGroup(tp,3):Filter(s.filter,nil) if #g>0 and Duel.SelectYesNo(tp,1190) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end Duel.ShuffleDeck(tp) local tc=Duel.GetOperatedGroup():GetFirst() if tc and tc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,1152) then Duel.BreakEffect() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end function s.lpcon(e,tp,eg,ep,ev,re,r,rp) local rc=e:GetHandler():GetReasonCard() return r==REASON_LINK and rc:IsSetCard(0xee5) end function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) end function s.ffilter(c,tp) return c:IsSetCard(0xee5) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) if Duel.Recover(tp,1000,REASON_EFFECT)<1 then return end local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ffilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,tp) if #g>0 and Duel.SelectYesNo(tp,1150) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local tc=g:Select(tp,1,1,nil):GetFirst() Duel.BreakEffect() local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) if fc then Duel.SendtoGrave(fc,REASON_RULE) Duel.BreakEffect() end Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) local te=tc:GetActivateEffect() te:UseCountLimit(tp,1,true) local tep=tc:GetControler() local cost=te:GetCost() if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) end end