--Sands Azir function c11000130.initial_effect(c) c:SetUniqueOnField(1,1,11000130) --Own Special Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c11000130.spcon) e1:SetOperation(c11000130.spop) c:RegisterEffect(e1) --Special Monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11000130,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(c11000130.target) e2:SetOperation(c11000130.operation) c:RegisterEffect(e2) end function c11000130.rfilter(c) return c:IsSetCard(0x1F6) end function c11000130.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(c:GetControler(),c11000130.rfilter,1,nil) end function c11000130.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.SelectReleaseGroup(c:GetControler(),c11000130.rfilter,1,1,nil) Duel.Release(g,REASON_COST) end function c11000130.spfilter(c,e,tp) return c:IsSetCard(0x1F6) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c11000130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c11000130.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) end function c11000130.operation(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,c11000130.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if g:GetCount()>0 then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(1) tc:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) e3:SetValue(1) e3:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e3,true) Duel.SpecialSummonComplete() end end end