--Vertex Melody Stan --Scripted by Zerry function c11111304.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11111304,0)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_HAND+LOCATION_MZONE) e2:SetCountLimit(1,11111304) e2:SetCondition(c11111304.setcon) e2:SetCost(c11111304.setcost) e2:SetOperation(c11111304.setop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11111304,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,11111304+100) e3:SetTarget(c11111304.copytg) e3:SetOperation(c11111304.copyop) c:RegisterEffect(e3) end function c11111304.setcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return not e:GetHandler():IsStatus(STATUS_CHAINING) and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) end function c11111304.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function c11111304.setfilter(c) return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsSetCard(0x5a3) and c:IsSSetable() end function c11111304.setop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local tc=Duel.SelectMatchingCard(tp,c11111304.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if tc then Duel.SSet(tp,tc) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) tc:RegisterEffect(e2) end end function c11111304.copyfilter(c) return c:IsSetCard(0x5a3) and c:IsFaceup() and c:IsLocation(LOCATION_PZONE) end function c11111304.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_PZONE) and c11111304.copyfilter(chkc) and chkc~=c end if chk==0 then return Duel.IsExistingTarget(c11111304.copyfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c11111304.copyfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,c) end function c11111304.copyop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_PZONE) then local code=tc:GetOriginalCode() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) c:RegisterEffect(e1) end end