--Incognita dell'Organizzazione Angeli, Amans --Script by XGlitchy30 function c16599452.initial_effect(c) --target protection local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e0:SetRange(LOCATION_MZONE) e0:SetValue(c16599452.efilter) c:RegisterEffect(e0) --spsummon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,16599452) e1:SetCost(c16599452.spcost) e1:SetTarget(c16599452.sptg) e1:SetOperation(c16599452.spop) c:RegisterEffect(e1) --become tuner local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_REMOVE) e2:SetCountLimit(1,17599452) e2:SetCondition(c16599452.tunercon) e2:SetTarget(c16599452.tunertg) e2:SetOperation(c16599452.tunerop) c:RegisterEffect(e2) end --filters function c16599452.costfilter(c,lv) return c:IsRace(RACE_FAIRY) and c:GetLevel()>lv and c:IsAbleToRemoveAsCost() end function c16599452.spfilter(c,lv,e,tp) return c:IsSetCard(0x1559) and c:GetLevel()1 end --target protection function c16599452.efilter(e,re,rp) return ((re:GetHandler():GetLevel()>0 and re:GetHandler():IsLevelBelow(4)) or (re:GetHandler():GetRank()>0 and re:GetHandler():GetRank()<=4)) and rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_MONSTER) end --spsummon function c16599452.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c16599452.costfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16599452.costfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) if g:GetCount()>0 then Duel.Remove(g,POS_FACEUP,REASON_COST) end end function c16599452.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c16599452.spfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel(),e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c16599452.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c16599452.spfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetHandler():GetLevel(),e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end --activation limit local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(c16599452.aclimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end --become tuner function c16599452.tunercon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) end function c16599452.tunertg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16599452.tunerfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c16599452.tunerfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c16599452.tunerfilter,tp,LOCATION_MZONE,0,1,1,nil) end function c16599452.tunerop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end end