--Silent Swordsman LV4 function c269000029.initial_effect(c) --lvlup local e1=Effect.CreateEffect(c) e1:SetDescription(2) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_PHASE+PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(c269000029.spcon) e1:SetTarget(c269000029.sptg) e1:SetOperation(c269000029.spop) c:RegisterEffect(e1) --immune spell local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(c269000029.efilter) c:RegisterEffect(e2) end c269000029.lvup={269000030} function c269000029.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end function c269000029.spfilter(c,e,tp) return c:IsCode(269000030) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function c269000029.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c269000029.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) end function c269000029.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsFacedown() or not Duel.IsExistingMatchingCard(c269000029.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c269000029.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SendtoGrave(c,REASON_EFFECT) Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) tc:CompleteProcedure() end end function c269000029.efilter(e,te) return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() end