--Sunseeker Guidance function c96770222.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,96770222+EFFECT_COUNT_CODE_OATH) e1:SetOperation(c96770222.activate) c:RegisterEffect(e1) --Search local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(c96770222.thcon) e2:SetTarget(c96770222.thtg) e2:SetOperation(c96770222.thop) c:RegisterEffect(e2) end function c96770222.filter(c) return c:IsSetCard(0xff7) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c96770222.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(c96770222.filter,tp,LOCATION_DECK,0,nil) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96770222,0)) 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 end function c96770222.thcfilter(c,tp) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff7) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) end function c96770222.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c96770222.thcfilter,1,nil,tp) end function c96770222.thfilter(c) return c:IsSetCard(0xff7) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c96770222.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c96770222.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c96770222.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c96770222.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end