--Nepgear --coded by Concordia function c68709369.initial_effect(c) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(68709369,1)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,68709369) e1:SetCondition(c68709369.shcon) e1:SetTarget(c68709369.shtg) e1:SetOperation(c68709369.shop) c:RegisterEffect(e1) --recycle local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BE_MATERIAL) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,68719369) e2:SetCondition(c68709369.tgcon) e2:SetTarget(c68709369.tgtg) e2:SetOperation(c68709369.tgop) c:RegisterEffect(e2) end function c68709369.shcon(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsSetCard(0xf08) or re:GetHandler():IsSetCard(0xf09) end function c68709369.filter(c) return c:IsCode(68709323) and c:IsAbleToHand() end function c68709369.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c68709369.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c68709369.shop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c68709369.filter,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 function c68709369.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0xf09) and r&REASON_FUSION+REASON_LINK~=0 end function c68709369.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c68709369.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,c68709369.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) end function c68709369.tgfilter(c) return c:IsSetCard(0xf08) or c:IsSetCard(0xf09) and c:IsAbleToDeck() end function c68709369.tgop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if tg:FilterCount(Card.IsRelateToEffect,nil,e)~=1 then return end Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) end