--Majestic-Angel Lancer function c249000783.initial_effect(c) --spsummon proc local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c249000783.spcon) c:RegisterEffect(e1) --pierce local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_PIERCE) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(c249000783.target) c:RegisterEffect(e2) --draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(56286179,0)) e3:SetCategory(CATEGORY_DRAW) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetCondition(c249000783.drcon) e3:SetTarget(c249000783.drtg) e3:SetOperation(c249000783.drop) c:RegisterEffect(e3) end function c249000783.filter(c) return c:IsFaceup() and c:IsSetCard(0x103F) and not c:IsCode(249000783) end function c249000783.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c249000783.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function c249000783.target(e,c) return c:IsSetCard(0x3F) end function c249000783.drcon(e,tp,eg,ep,ev,re,r,rp) if ep==tp then return false end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() return d and d:IsDefensePos() and a:IsControler(tp) and a:IsSetCard(0x3F) end function c249000783.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c249000783.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end