function c400002.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(400002,1)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(c400002.settg) e1:SetOperation(c400002.setop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetCondition(c400002.condition) e2:SetTarget(c400002.target) e2:SetOperation(c400002.operation) c:RegisterEffect(e2) end function c400002.setfilter(c) return c:IsSetCard(0x246) and c:IsType(TYPE_QUICKPLAY) and c:IsSSetable() end function c400002.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c400002.setfilter,tp,LOCATION_GRAVE,0,1,nil) end end function c400002.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectMatchingCard(tp,c400002.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) if g:GetCount()>0 then local c=e:GetHandler() local tc=g:GetFirst() local fid=c:GetFieldID() Duel.SSet(tp,tc) Duel.ConfirmCards(1-tp,tc) end end function c400002.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetTurnPlayer()~=tp and re:GetHandler():IsType(TYPE_QUICKPLAY) and re:GetHandler():IsSetCard(0x246) and rp==tp end function c400002.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end function c400002.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end