--Alien Dark Hole --Scripted by: XGlitchy30 local cid,id=GetID() function cid.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1) e1:SetCost(cid.spcost) e1:SetTarget(cid.sptg) e1:SetOperation(cid.spop) c:RegisterEffect(e1) --counters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(cid.ctcon) e2:SetTarget(cid.cttg) e2:SetOperation(cid.ctop) c:RegisterEffect(e2) --nuke local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCost(cid.drycost) e3:SetTarget(cid.drytg) e3:SetOperation(cid.dryop) c:RegisterEffect(e3) end --SPSUMMON function cid.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x100e,3,REASON_COST) end Duel.RemoveCounter(tp,1,1,0x100e,3,REASON_COST) end function cid.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,1,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function cid.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) end end --COUNTERS function cid.ctcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+1) end function cid.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,nil,0x100e,2) Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,#g,0x100e,2) end function cid.ctop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,nil,0x100e,2) if #g<=0 then return end local tc=g:GetFirst() while tc do tc:AddCounter(0x100e,2) tc=g:GetNext() end end --NUKE function cid.drycost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x100e,16,REASON_COST) end Duel.RemoveCounter(tp,1,1,0x100e,16,REASON_COST) end function cid.drytg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function cid.dryop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) if g:GetCount()>0 then Duel.Destroy(g,REASON_EFFECT) end end