--Runecrafted Gusto local cid,id=GetID() function cid.initial_effect(c) c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,80000800,aux.FilterBoolFunction(Card.IsFusionSetCard,0x10),1,true,true) Auxiliary.Add_Runeslots(c,1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(cid.rpcon) e2:SetValue(1) c:RegisterEffect(e2) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(80000804,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetTarget(cid.target1) e1:SetOperation(cid.operation1) c:RegisterEffect(e1) end function cid.rpcon(e,tp,eg,ep,ev,re,r,rp) local red = 0x1ff5 local blue = 0x2ff5 local purple = 0x3ff5 local yellow = 0x4ff5 local orange = 0x5ff5 local green = 0x6ff5 local prismatic = 0x7ff5 return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,red) end function cid.filter1(c) return c:IsAbleToDeck() end function cid.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cid.filter1(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(cid.filter1,tp,LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,cid.filter1,tp,LOCATION_GRAVE,0,3,3,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function cid.operation1(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 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) if ct==3 then if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) else Duel.BreakEffect() Duel.GainRP(e:GetHandlerPlayer(),500) end end end