--Levelution Dragon function c30039205.initial_effect(c) --Return destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(30039205,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetTarget(c30039205.target) e1:SetOperation(c30039205.operation) c:RegisterEffect(e1) --to hand local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e2:SetTarget(c30039205.thtg) e2:SetOperation(c30039205.thop) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end function c30039205.filter1(c) return c:IsSetCard(0x93f) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() end function c30039205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(c30039205.filter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g1=Duel.SelectTarget(tp,c30039205.filter1,tp,LOCATION_GRAVE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0) end function c30039205.operation(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_DESTROY) if g1:GetFirst():IsRelateToEffect(e) then Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) if g2:GetFirst():IsRelateToEffect(e) then Duel.BreakEffect() Duel.Destroy(g2,REASON_EFFECT) end end end function c30039205.filter(c) return c:IsSetCard(0x93f) and c:IsAbleToHand() end function c30039205.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c30039205.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c30039205.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c30039205.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