--Galaxy-Eyes Tachyon Neon Lustrous function c405107.initial_effect(c) --Synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(c405107.mfilter),aux.NonTuner(c405107.mfilter2),1) c:EnableReviveLimit() --Banish local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(405107,0)) e1:SetCategory(CATEGORY_REMOVE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCode(EVENT_CHAINING) e1:SetCondition(c405107.condition) e1:SetTarget(c405107.target) e1:SetOperation(c405107.operation) c:RegisterEffect(e1) --Destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(88241506,1)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_BECOME_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,405107) e2:SetCondition(c405107.descon) e2:SetTarget(c405107.destg) e2:SetOperation(c405107.desop) c:RegisterEffect(e2) --Destroy replace local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DESTROY_REPLACE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetRange(LOCATION_MZONE) e3:SetTarget(c405107.desreptg) e3:SetOperation(c405107.desrepop) c:RegisterEffect(e3) end function c405107.mfilter(c) return c:IsSetCard(0x7b) end function c405107.mfilter2(c) return c:IsSetCard(0x55) or c:IsSetCard(0x7b) end function c405107.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function c405107.filter(c) return c:IsFaceup() and c:IsAbleToRemove() end function c405107.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c405107.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c405107.filter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,c405107.filter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function c405107.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(1-tp) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetOperation(c405107.retop) Duel.RegisterEffect(e1,tp) end end function c405107.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) end function c405107.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsContains(e:GetHandler()) and ep~=tp end function c405107.desfilter(c) return c:IsDestructable() end function c405107.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c405107.desfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c405107.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,c405107.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c405107.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end function c405107.repfilter(c) return c:IsFaceup() and c:IsSetCard(0x55) or c:IsSetCard(0x7b) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function c405107.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() and Duel.IsExistingMatchingCard(c405107.repfilter,tp,LOCATION_MZONE,0,1,c) end if Duel.SelectYesNo(tp,aux.Stringid(405107,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) local g=Duel.SelectMatchingCard(tp,c405107.repfilter,tp,LOCATION_MZONE,0,1,1,c) e:SetLabelObject(g:GetFirst()) Duel.HintSelection(g) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) return true else return false end end function c405107.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) end