--Clock Frog local s,id=GetID() function s.initial_effect(c) aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,3,s.sumcon,s.tlfilter) c:EnableReviveLimit() --During your Main Phase: You can target 1 face-up monster your opponent controls with 1500 or less DEF; banish both this card and that monster until your next Standby Phase. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) --If this card on the field is destroyed by battle or card effect: You can target 1 Aqua monster in your GY; add it to your hand. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcon) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end function s.sumcon(e,c) local tp=c:GetControler() return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_GRAVE,0)>4 end function s.tlfilter(c,e,mg) local ef=e:GetHandler():GetFuture() return not c:IsType(TYPE_TOKEN) and c:IsLevelBelow(ef-1) end function s.rmfilter(c) return c:IsAbleToRemove() and c:IsDefenseBelow(1500) and c:IsFaceup() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE,1,1,e:GetHandler()) g:AddCard(e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end local g=Group.FromCards(c,tc) if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then local og=Duel.GetOperatedGroup() local oc=og:GetFirst() while oc do oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) oc=og:GetNext() end og:KeepAlive() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) e1:SetCountLimit(1) e1:SetLabelObject(og) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) Duel.RegisterEffect(e1,tp) end end function s.retfilter(c) return c:GetFlagEffect(id)~=0 end function s.retcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp end function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local sg=g:Filter(s.retfilter,nil) if sg:GetCount()>1 and sg:GetClassCount(Card.GetPreviousControler)==1 then local ft=Duel.GetLocationCount(sg:GetFirst():GetPreviousControler(),LOCATION_MZONE) if ft==1 then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) local tc=sg:Select(tp,1,1,nil):GetFirst() Duel.ReturnToField(tc) sg:RemoveCard(tc) end end local tc=sg:GetFirst() while tc do Duel.ReturnToField(tc) tc=sg:GetNext() end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) return c:IsMonster() and c:IsRace(RACE_AQUA) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end