--Emerald-Gaze Pendulum-Angel function c249000381.initial_effect(c) --pendulum summon aux.EnablePendulumAttribute(c) --draw local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,2490003811) e1:SetCondition(c249000381.drawcon) e1:SetTarget(c249000381.drawtg) e1:SetOperation(c249000381.drawop) c:RegisterEffect(e1) --draw (pzone) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1,2490003812) e2:SetCondition(c249000381.condition) e2:SetTarget(c249000381.target) e2:SetOperation(c249000381.operation) c:RegisterEffect(e2) end function c249000381.confilter(c) return c:IsSetCard(0x1B7) and not c:IsCode(249000381) end function c249000381.drawcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetSummonType()==SUMMON_TYPE_PENDULUM and c:IsPreviousLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(c249000381.filter,tp,LOCATION_ONFIELD,0,1,nil) end function c249000381.drawtg(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 c249000381.drawop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) end function c249000381.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x1B7) end function c249000381.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 function c249000381.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Draw(tp,1,REASON_EFFECT) end