--Arietta, Vertex Melody Songstress --Scripted by Zerry function c11111302.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetTarget(c11111302.pentg) e2:SetOperation(c11111302.penop) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_TOHAND) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_BE_MATERIAL) e4:SetCountLimit(1,11111301) e4:SetCondition(c11111302.thcon) e4:SetTarget(c11111302.thtg) e4:SetOperation(c11111302.thop) c:RegisterEffect(e4) end function c11111302.penfilter(c) return c:IsSetCard(0x5a3) and c:IsType(TYPE_PENDULUM) and c:IsFacedown() and not c:IsForbidden() end function c11111302.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c11111302.penfilter,tp,LOCATION_EXTRA,0,1,nil) end end function c11111302.penop(e,tp,eg,ep,ev,re,r,rp) if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local g=Duel.SelectMatchingCard(tp,c11111302.penfilter,tp,LOCATION_EXTRA,0,1,1,nil) local tc=g:GetFirst() if tc then Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end function c11111302.thcon(e,tp,eg,ep,ev,re,r,rp) local rc=e:GetHandler():GetReasonCard() return rc:IsType(TYPE_FUSION) end function c11111302.filter(c) return c:IsSetCard(0x5a3) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() end function c11111302.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11111302.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c11111302.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c11111302.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