--Seguace Ængelico - Jibrail il Saggio || Ængelic Follower - Jibrail, of Wisdom --Scripted by: XGlitchy30 local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PSYCHO),3,3) --cannot link material local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e0:SetValue(1) c:RegisterEffect(e0) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,id) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.thcon) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) --ss local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id+100) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) --indes local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetCondition(s.prcon) e3:SetValue(1) c:RegisterEffect(e3) local e4=e3:Clone() e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e4) end --indes function s.prcon(e) return Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_REMOVED,0):IsExists(Card.IsFacedown,1,nil) end --search function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end function s.thfilter(c) if not c:IsAbleToHand() then return false end return c:IsLocation(LOCATION_REMOVED) and c:IsFacedown() or c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0xae6) and c:IsType(TYPE_MONSTER) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil) if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,g) local rg=g:Filter(Card.IsLocation,nil,LOCATION_HAND):Filter(aux.NOT(Card.IsSetCard),nil,0xae6):Filter(Card.IsDiscardable,nil,REASON_EFFECT) if #rg>0 then Duel.SendtoGrave(rg,REASON_EFFECT+REASON_DISCARD) end end end --ss function s.seqcfilter(c,tp,lg) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xae6) and lg:IsContains(c) and c:IsAbleToRemove(tp,POS_FACEDOWN) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local lg=e:GetHandler():GetLinkedGroup() return eg:IsExists(s.seqcfilter,1,nil,tp,lg) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local lg=e:GetHandler():GetLinkedGroup() if chkc then return eg:IsContains(chkc) and chkc:IsCanBeEffectTarget(e) and s.seqcfilter(chkc,tp,lg) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:Filter(s.seqcfilter,nil,tp,lg):IsExists(Card.IsCanBeEffectTarget,1,nil,e) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=eg:Filter(s.seqcfilter,nil,tp,lg):FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e) Duel.SetTargetCard(g) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,POS_FACEDOWN) end function s.spfilter(c,e,tp,mc) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xae6) and not c:IsCode(mc:GetCode()) and c:GetLevel() and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsType(TYPE_MONSTER) or not tc:IsSetCard(0xae6) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc) local sc=g:GetFirst() if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsAbleToRemove(tp,POS_FACEDOWN) then Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) end end