--VECTOR Legion Rookie Scout --Scripted by Zerry function c67864669.initial_effect(c) --Link Summon aux.AddLinkProcedure(c,c67864669.lmfilter,2,2) c:EnableReviveLimit() --Equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(67864669,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,67864669) e1:SetCondition(c67864669.condition) e1:SetTarget(c67864669.target) e1:SetOperation(c67864669.operation) c:RegisterEffect(e1) --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(67864669,2)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,67864669+100) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCondition(c67864669.spcon) e2:SetTarget(c67864669.sptg) e2:SetOperation(c67864669.spop) c:RegisterEffect(e2) end --filters function c67864669.lmfilter(c) return c:IsLinkSetCard(0x2a6) end function c67864669.eqfilter(c,e,tp,ec) return c:IsType(TYPE_UNION) and c:IsSetCard(0x52a6) end function c67864669.cfilter(c,lg) return c:IsType(TYPE_UNION) and lg:IsContains(c) end function c67864669.spfilter(c,e,tp,zone) return c:IsSetCard(0x2a6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end --equip function c67864669.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end function c67864669.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and c67864669.eqfilter(chkc,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c67864669.eqfilter,tp,LOCATION_DECK,0,1,nil,tp) end Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) end function c67864669.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectMatchingCard(tp,c67864669.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp) local tc=g:GetFirst() if tc and aux.CheckUnionEquip(tc,e:GetHandler()) and Duel.Equip(tp,tc,e:GetHandler()) then aux.SetUnionState(tc) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(c67864669.splimit) Duel.RegisterEffect(e1,tp) end end function c67864669.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsSetCard(0x2a6) end --Special Summon function c67864669.spcon(e,tp,eg,ep,ev,re,r,rp) local lg=e:GetHandler():GetLinkedGroup() return eg:IsExists(c67864669.cfilter,1,nil,lg) end function c67864669.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local zone=e:GetHandler():GetLinkedZone(tp) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66015185.filter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c67864669.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c67864669.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c67864669.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() local zone=c:GetLinkedZone(tp) if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) end end