--A Skydian watching over Golden Knights, Darivia --Scripted by Glitchy, updated by Zerry function c11111001.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,c11111001.sfilter,aux.NonTuner(c11111001.sfilter1),1) c:EnableReviveLimit() --tohand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(11111001,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_REMOVE) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,11111001) e1:SetCost(c11111001.cost) e1:SetTarget(c11111001.target) e1:SetOperation(c11111001.operation) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(c11111001.thcon) c:RegisterEffect(e2) --specialsummon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11111001,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,11111001) e3:SetCost(c11111001.rmcost) e3:SetTarget(c11111001.rmtg) e3:SetOperation(c11111001.rmop) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(11111001,ACTIVITY_SPSUMMON,c11111001.counterfilter) end function c11111001.counterfilter(c) return c:IsRace(RACE_WARRIOR) end function c11111001.sfilter(c) return c:IsSetCard(0x223) or c:IsSetCard(0x2a7) end function c11111001.sfilter1(c) return c:IsRace(RACE_WARRIOR) end function c11111001.filter(c) return (c:IsSetCard(0x223) or c:IsSetCard(0x2a7) or c:IsSetCard(0x528) or c:IsSetCard(0xd0a1)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c11111001.filter2(c,e,tp) return c:IsRace(RACE_WARRIOR) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c11111001.rmfil(c) return c:IsSetCard(0x223) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() end function c11111001.thcon(e,tp,eg,ep,ev,re,r,rp) return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)>0 end function c11111001.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(11111001,tp,ACTIVITY_SPSUMMON)==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(c11111001.splimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function c11111001.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11111001.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c11111001.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c11111001.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c11111001.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(c11111001,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsExistingMatchingCard(c11111001.rmfil,tp,LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,c11111001.rmfil,tp,LOCATION_EXTRA,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(c11111001.splimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function c11111001.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c11111001.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c11111001.rmop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c11111001.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end end function c11111001.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_WARRIOR) end