--Metal Armored Bug Evolved local s,id=GetID() function s.initial_effect(c) aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,9,s.sumcon,s.tlfilter) c:EnableReviveLimit() --Cannot be destroyed by card effects. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) c:RegisterEffect(e1) --When this card is Time Leap Summoned: Destroy all other cards in this card's column local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end function s.sumcon(e) local tp=e:GetHandler():GetControler() local ct1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) return ct2>ct1 end function s.tlfilter(c) local ef=c:GetFuture() return c:IsLevelBelow(ef-1) and c:IsType(TYPE_EFFECT) end function s.desfilter(c,g) return g:IsContains(c) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_TIMELEAP) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local cg=e:GetHandler():GetColumnGroup() local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),cg) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local cg=c:GetColumnGroup() if c:IsRelateToEffect(e) and c:IsFaceup() then local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c,cg) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end end --also, this card cannot attack directly for the rest of this turn. local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) c:RegisterEffect(e1) end