--Keeper of Ancient Secrets --Created and Scripted by Swaggy, published by Slick local m=8002103 local cm=_G["c"..m] function cm.initial_effect(c) --time leap procedure aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,5,cm.sumcon,cm.tlfilter,nil) c:EnableReviveLimit() --I am protecc by sword 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:SetCondition(cm.eqcon2) c:RegisterEffect(e1) --Neg 0 on summon, boi local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(cm.sscon) e2:SetTarget(cm.sstg) e2:SetOperation(cm.ssop) c:RegisterEffect(e2) --AYAYAYAAAAAAAAAAAAAAAAAAA (He has Pillars. Its a JoJoke.) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCondition(cm.thcon) e3:SetTarget(cm.thtg) e3:SetOperation(cm.thop) c:RegisterEffect(e3) end function cm.sumcon(e,c) local tp=c:GetControler() return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,3,nil) or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_SZONE,0,1,nil) end function cm.filter1(c) return c:IsFaceup() and c:IsRace(RACE_WARRIOR) end function cm.filter2(c) return c:IsFaceup() and c:IsType(TYPE_EQUIP) end function cm.tlfilter(c,e,mg) return c:IsRace(RACE_WARRIOR) and c:GetLevel()==e:GetHandler():GetFuture()-1 end function cm.eqcon2(e) return e:GetHandler():GetEquipGroup():IsExists(nil,1,nil) end function cm.sscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_TIMELEAP) end function cm.ssfilter(c,e,tp) return c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) end function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.ssfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function cm.ssop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,cm.ssfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function cm.confilter(c) return c:GetSummonPlayer()==tp and c:IsRace(RACE_WARRIOR) and c:IsLevelBelow(4) and c:IsFaceup() end function cm.thcon(e,tp,eg,ev,re,r,rp) return eg:IsExists(cm.confilter,1,nil,tp) end function cm.thfilter(c) return c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() end function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function cm.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local tc=g:GetFirst() if not tc then return end if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,tc) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ACTIVATE+EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(cm.aclimit) e1:SetLabel(tc:GetCode()) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end end