--Nazarelic Tower function c212585.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --direct attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(c212585.target) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) --to grave local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(212585,0)) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,212585) e3:SetCondition(c212585.sndcon) e3:SetTarget(c212585.tgtg) e3:SetOperation(c212585.tgop) c:RegisterEffect(e3) end function c212585.cfilter(c) return c:IsFaceup() and c:IsSetCard(0x2609) and c:IsType(TYPE_MONSTER) end function c212585.sndcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c212585.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end function c212585.target(e,c) return c:IsSetCard(0x2609) and c:IsFaceup() end function c212585.tgfilter(c) return c:IsSetCard(0x2609) and c:IsAbleToGrave() end function c212585.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c212585.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) end function c212585.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c212585.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end