function c210216014.initial_effect(c) --Attach local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCost(c210216014.cost) e1:SetCountLimit(1,210216014) e1:SetTarget(c210216014.target) e1:SetOperation(c210216014.activate) c:RegisterEffect(e1) --Indestructable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_XMATERIAL) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e3) end function c210216014.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function c210216014.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x216) end function c210216014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and c210216014.filter(chkc) end if chk==0 then if e:GetLabel()==0 then return false end e:SetLabel(0) return Duel.IsExistingTarget(c210216014.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,c210216014.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end function c210216014.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) and c:IsRelateToEffect(e) then c:CancelToGrave() Duel.Overlay(tc,Group.FromCards(c)) end end