Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local s,id,o=GetID()
- function s.initial_effect(c)
- local e1=Effect.CreateEffect(c)
- e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
- e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
- e1:SetCode(EVENT_SUMMON_SUCCESS)
- e1:SetProperty(EFFECT_FLAG_DELAY)
- e1:SetTarget(s.target)
- e1:SetOperation(s.operation)
- c:RegisterEffect(e1)
- end
- function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
- if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
- Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
- end
- function s.operation(e,tp,eg,ep,ev,re,r,rp)
- if Duel.Draw(tp,2,REASON_EFFECT)==2 then
- local g=Duel.GetOperatedGroup()
- if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then
- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
- local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
- Duel.Destroy(sg,REASON_EFFECT)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement