--created by Discord \ LeonDuvall, coded by Lyris --Disstonant Meed, YC.Org Spymaster local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND) e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,0,1,nil,0x96b,0xcf6) end) e1:SetCost(aux.bfgcost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.filter(c) return c:IsSetCard(0x96b,0xcf6) and c:IsAbleToHand() end function s.cfilter(c) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x96b,0xcf6) and c:IsAbleToGrave() and not c:IsCode(id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.SetOperationInfo(0,CATEGORY_TOHAND,Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil),1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if Duel.SendtoGrave(Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK,0,1,1,nil),REASON_EFFECT)==0 or not Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_GRAVE) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,tc) end end