--[[ Voidictator Demon - Paladin of Corvus Demone Vuotodespota - Paladino di Corvus Card Author: Walrus Scripted by: XGlitchy30 ]] local s,id=GetID() function s.initial_effect(c) if not s.progressive_id then s.progressive_id=id else s.progressive_id=s.progressive_id+100 end aux.AddOrigTimeleapType(c) aux.AddTimeleapProc(c,5,s.TLcon,aux.FilterBoolFunction(Card.IsSetCard,ARCHE_VOIDICTATOR_SERVANT)) c:EnableReviveLimit() --You can only control 1 "Voidictator Demon - Paladin of Corvus". c:SetUniqueOnField(1,0,id) --[[If this card is Time Leap Summoned: You can add 2 "Voidictator Servant" monsters with different names from your Deck to your hand.]] local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetCategory(CATEGORIES_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:HOPT() e1:SetCondition(aux.TimeleapSummonedCond) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) --[[If this card leaves the field because of an opponent's card, or if this card is banished because of a "Voidictator" card you own: Return this card to the Extra Deck, then, during your next Draw Phase, draw 3 cards instead of 1 for your normal draw.]] local e2=Effect.CreateEffect(c) e2:Desc(1) e2:SetCategory(CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_LEAVE_FIELD) e2:HOPT() e2:SetCondition(s.thcon) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) local e2x=e2:Clone() e2x:SetCode(EVENT_REMOVE) e2x:SetCondition(s.thcon2) c:RegisterEffect(e2x) aux.RegisterTriggeringArchetypeCheck(c,ARCHE_VOIDICTATOR) --[[Up to thrice per turn, if your opponent Special Summons a Time Leap Monster(s): Activate this effect; this card gains the effects of 1 of those face-up monsters until the end of the next turn.]] aux.RegisterMergedDelayedEventGlitchy(c,s.progressive_id,EVENT_SPSUMMON_SUCCESS,s.cfilter,s.progressive_id,LOCATION_MZONE,nil,LOCATION_MZONE,nil,nil,true) local e3=Effect.CreateEffect(c) e3:Desc(2) e3:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_CUSTOM+s.progressive_id) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(3) e3:SetTarget(s.eftg) e3:SetOperation(s.efop) c:RegisterEffect(e3) end function s.TLcon(e,c,tp,sg) local g=Duel.GetFieldGroup(0,LOCATION_REMOVED,LOCATION_REMOVED) return #g>=10 and g:FilterCount(Card.IsFaceup,nil)>=5 end --E1 function s.rmfilter(c) return c:IsSetCard(ARCHE_VOIDICTATOR_SERVANT) and c:IsMonster() and c:IsAbleToHand() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_DECK,0,nil) return g:GetClassCount(Card.GetCode)>=2 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_DECK,0,nil) if g:GetClassCount(Card.GetCode)>=2 then local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_ATOHAND) Duel.Search(sg,tp) end end --E2 function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return rp~=tp and not c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() return rc and aux.CheckArchetypeReasonEffect(s,re,ARCHE_VOIDICTATOR) and rc:IsOwner(tp) end function s.thfilter(c) return c:IsFaceup() and c:HasAttack() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() Duel.SetCardOperationInfo(c,CATEGORY_TODECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToChain() and Duel.ShuffleIntoDeck(c,nil,LOCATION_EXTRA)>0 then Duel.BreakEffect() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN) e1:SetValue(3) Duel.RegisterEffect(e1,tp) end end --E3 function s.cfilter(c,_,tp) return c:IsFaceup() and c:IsType(TYPE_TIMELEAP) and c:IsSummonPlayer(1-tp) end function s.checkfilter(c) return c:IsFaceup() and not c:IsForbidden() end function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetCard(eg) end function s.efop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetTargetCards():Filter(s.checkfilter,nil) if not c:IsRelateToChain() or c:IsFacedown() or #g<=0 then return end local tc=g:GetFirst() if #g>1 then Duel.HintMessage(tp,HINTMSG_SELECT) local sg=g:Select(tp,1,1,nil) Duel.HintSelection(sg) tc=sg:GetFirst() else Duel.HintSelection(Group.FromCards(tc)) end if tc then local code=tc:GetOriginalCode() local cid=c:CopyEffect(code,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END,2) end end