--Overflow at Address 0xFF10A6BB local s,id=GetID() function s.initial_effect(c) aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,13,s.sumcon,{s.tlfilter,true}) c:EnableReviveLimit() --If this card is Time Leap Summoned: You can make your opponent banish the 1 face-up monster they control with the highest ATK (their choice, if tied). --Your opponent cannot activate cards or effects in response to this effect's activation. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.rmcon) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) --At the start of the Damage Step, if this card battles an opponent's monster: You can banish that opponent's monster. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) e2:SetTarget(s.rmtg2) e2:SetOperation(s.rmop2) c:RegisterEffect(e2) end function s.cfilter(c,atk) return c:IsFaceup() and (c:IsAttackAbove(atk) or c:IsDefenseAbove(atk)) end function s.sumcon(e,c) local tp=c:GetControler() return Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil,3001) end function s.tlfilter(c,e,mg) local tp=c:GetControler() local ef=e:GetHandler():GetFuture() return (c:IsLevel(ef-1) and c:IsType(TYPE_EFFECT)) or Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil,5001) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local mats=e:GetHandler():GetMaterial() return e:GetHandler():IsSummonType(SUMMON_TYPE_TIMELEAP) end function s.rmfilter(c) return c:IsFaceup() and c:IsAbleToRemove() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE,nil) local tg=g:GetMaxGroup(Card.GetAttack) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0) Duel.SetChainLimit(s.chlimit) end function s.chlimit(e,ep,tp) return tp==ep end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE,nil) if #g>0 then local tg=g:GetMaxGroup(Card.GetAttack) if #tg>1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local sg=tg:Select(1-tp,1,1,nil) Duel.HintSelection(sg) Duel.Remove(sg,POS_FACEUP,REASON_RULE,1-tp) else Duel.Remove(tg,POS_FACEUP,REASON_RULE,1-tp) end end end function s.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetHandler():GetBattleTarget() if chk==0 then return tc and tc:IsControler(1-tp) and tc:IsAbleToRemove() end Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) end function s.rmop2(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetBattleTarget() if tc and tc:IsRelateToBattle() then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end