--Liora, the Ethereal Sentinel Pixie local s,id=GetID() function s.initial_effect(c) aux.EnableExtraDeckSummonCountLimit() aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,2,s.sumcon,s.tlfilter) c:EnableReviveLimit() Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) --If this card is Time Leap Summoned, you can only Special Summon once from the Extra Deck for the rest of this turn. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.spcon) e1:SetOperation(s.spop) c:RegisterEffect(e1) --During the Main Phase, when your opponent activates a monster effect (Quick Effect): You can tribute this card; the activated effect becomes "Both players draw 1 card and gain 1000 LP". local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,0}) e2:SetCondition(s.efcon) e2:SetCost(s.efcost) e2:SetTarget(s.eftg) e2:SetOperation(s.efop) c:RegisterEffect(e2) --If this card is sent to the GY by an opponent's card: You can draw 1 card and gain 1000 LP. local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_TO_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.drcon) e3:SetTarget(s.drtg) e3:SetOperation(s.drop) c:RegisterEffect(e3) end function s.sumcon(e,c) local tp=c:GetControler() return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end function s.tlfilter(c,e,mg) local tp=c:GetControler() local ef=e:GetHandler():GetFuture() return c:IsLevelBelow(ef-1) and not c:IsType(TYPE_TOKEN) end function s.counterfilter(c) return not c:IsSummonLocation(LOCATION_EXTRA) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_TIMELEAP) end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetDescription(aux.Stringid(id,0)) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetOperation(s.checkop) e2:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(92345028) e3:SetTargetRange(1,0) e3:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) and aux.ExtraDeckSummonCountLimit[sump]<=0 end function s.cfilter(c,tp) return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.cfilter,1,nil,tp) then aux.ExtraDeckSummonCountLimit[tp]=aux.ExtraDeckSummonCountLimit[tp]-1 end if eg:IsExists(s.cfilter,1,nil,1-tp) then aux.ExtraDeckSummonCountLimit[1-tp]=aux.ExtraDeckSummonCountLimit[1-tp]-1 end end function s.efcon(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and Duel.IsMainPhase() end function s.efcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsReleasable() end Duel.Release(c,REASON_COST) end function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end end function s.efop(e,tp,eg,ep,ev,re,r,rp) local g=Group.CreateGroup() Duel.ChangeTargetCard(ev,g) Duel.ChangeChainOperation(ev,s.repop) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(1-tp,1000,REASON_EFFECT) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) Duel.Recover(p,1000,REASON_EFFECT) end