--Psychether Dream Weaver, Ariette function c17029611.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),4,2) c:EnableReviveLimit() --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) c:RegisterEffect(e1) --draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(17029611,1)) e3:SetCategory(CATEGORY_DRAW) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,17029611) e3:SetCondition(c17029611.drcon) e3:SetCost(c17029611.drcost) e3:SetTarget(c17029611.drtg) e3:SetOperation(c17029611.drop) c:RegisterEffect(e3) --Declare and to top local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(17029611,0)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_TO_GRAVE) e4:SetRange(LOCATION_MZONE) e4:SetCategory(CATEGORY_TODECK) e4:SetCountLimit(1,17029621) e4:SetCondition(c17029611.tdcon) e4:SetTarget(c17029611.tdtg) e4:SetOperation(c17029611.tdop) c:RegisterEffect(e4) end function c17029611.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_SPELL) end function c17029611.drcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end c:RemoveOverlayCard(tp,1,1,REASON_COST) end function c17029611.tgfilter(c) return c:IsSetCard(0x720) and c:IsDiscardable() end function c17029611.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c17029611.tgfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function c17029611.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.DiscardHand(tp,c17029611.tgfilter,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then Duel.Draw(tp,2,REASON_EFFECT) end end function c17029611.afilter(c,tp) return c:IsType(TYPE_SPELL) and c:GetPreviousControler()==tp and c:IsSetCard(0x720) end function c17029611.tdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=eg:Filter(c17029611.afilter,nil,tp) return g:GetCount()>0 end function c17029611.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER) end function c17029611.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) c17029611.announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT} local ac=Duel.AnnounceCardFilter(tp,table.unpack(c17029611.announce_filter)) Duel.SetTargetParam(ac) local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) if g:GetCount()>0 then Duel.SendtoDeck(g,nil,0,REASON_EFFECT) end end