--Shadowbrave - Arwen function c1392003.initial_effect(c) --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(1392003,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetCountLimit(1,1392003) e1:SetCondition(c1392003.spcon) e1:SetTarget(c1392003.sptg) e1:SetOperation(c1392003.spop) c:RegisterEffect(e1) --Piercing local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) --Add To Hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(1392003,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetCountLimit(1,1392000) e3:SetCondition(c1392003.thcon) e3:SetTarget(c1392003.thtg) e3:SetOperation(c1392003.thop) c:RegisterEffect(e3) end function c1392003.cfilter(c,tp,code) return c:IsSetCard(0x920) and c:GetCode()~=code and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp end function c1392003.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c1392003.cfilter,1,nil,tp,e:GetHandler():GetCode()) end function c1392003.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c1392003.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function c1392003.thcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function c1392003.filter(c) return c:IsSetCard(0x920) and c:IsAbleToHand() end function c1392003.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c1392003.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end function c1392003.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c1392003.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end