--Source Effigy - I.A. function c213210.initial_effect(c) aux.AddCodeList(c,213200) --pendulum summon aux.EnablePendulumAttribute(c) --splimit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(1,0) e1:SetTarget(c213210.splimit) c:RegisterEffect(e1) --to grave local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(213210,0)) e2:SetCategory(CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1,213210) e2:SetTarget(c213210.tgtg) e2:SetOperation(c213210.tgop) c:RegisterEffect(e2) --to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(213210,1)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_TO_GRAVE) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCountLimit(1,213211) e3:SetTarget(c213210.thtg) e3:SetOperation(c213210.thop) c:RegisterEffect(e3) --avoid damage local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_CHANGE_DAMAGE) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetTargetRange(1,0) e4:SetCondition(c213210.ndcon) e4:SetValue(0) c:RegisterEffect(e4) end function c213210.splimit(e,c,tp,sumtp,sumpos) return not c:IsRace(RACE_CYBERSE) end function c213210.tgfilter(c) return c:IsCode(213205) and c:IsAbleToGrave() end function c213210.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c213210.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function c213210.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c213210.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end function c213210.thfilter(c) return (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(213210) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c213210.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c213210.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) end function c213210.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c213210.thfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end end function c213210.ndcfilter(c) return c:IsFaceup() and c:IsOriginalCodeRule(213200) end function c213210.ndcon(e) return Duel.IsExistingMatchingCard(c213210.ndcfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end