--Aurelian Seraphwing local s,id=GetID() function s.initial_effect(c) aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,8,s.sumcon,s.tlfilter) c:EnableReviveLimit() aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetCode(EVENT_RECOVER) ge1:SetLabel(id) ge1:SetOperation(s.regop) Duel.RegisterEffect(ge1,0) end) --Once per turn, if a player(s) gains LP: You can send 1 card from the field to the GY. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_RECOVER) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY) e1:SetCountLimit(1) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) --If this card destroys an opponent's monster by battle: Gain LP equal to the original ATK of that monster in the GY. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_RECOVER) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCondition(s.reccon) e2:SetTarget(s.rectg) e2:SetOperation(s.recop) c:RegisterEffect(e2) --If this card is in your GY: You can target 1 LIGHT monster you control; return this card to the Extra Deck, also gain LP equal to half the original ATK of that monster. local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_RECOVER) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,id) e3:SetTarget(s.tetg) e3:SetOperation(s.teop) c:RegisterEffect(e3) end function s.sumcon(e) local c=e:GetHandler() local tp=c:GetControler() return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)>0 end function s.tlfilter(c,e) local tp=c:GetControler() local ef=e:GetHandler():GetFuture() return c:IsLevelBelow(ef-1) and c:IsAttribute(ATTRIBUTE_LIGHT) end function s.regop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(1-tp,id,RESET_PHASE+PHASE_END,0,1) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToGrave() end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) if g:GetCount()>0 then Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT) end end end function s.reccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() local bc=c:GetBattleTarget() local rec=bc:GetBaseAttack() if rec<0 then rec=0 end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(rec) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) end function s.tefilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetAttack()>0 end function s.tetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tefilter(chkc) end if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingTarget(s.tefilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,s.tefilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.ceil(g:GetFirst():GetAttack()/2)) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0) end function s.teop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then Duel.Recover(tp,math.ceil(tc:GetAttack()/2),REASON_EFFECT) end end