Yellow
If this card is Normal Summoned or flipped face-up: You can Special Summon 1 Level 4 or lower "Ninja" monster from your hand in Attack Position or face-down Defense Position, also you cannot Special Summon monsters from the Extra Deck for the rest of this turn, except "Ninja" monsters. You can only use this effect of "Yellow Ninja" once per turn.
local SETCARD_ID_0 = 0x2b --Ninja

local SETCARD_ID_0 = 0x2b --Ninja
local s, id, o = GetID()
function s.initial_effect(c)
	--search
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e1:SetCode(EVENT_SUMMON_SUCCESS)
	e1:SetProperty(EFFECT_FLAG_DELAY)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EVENT_FLIP)
	c:RegisterEffect(e2)
end
function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_ATTACK + POS_FACEDOWN_DEFENSE)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND, 0, 1, nil, e, tp)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetTargetRange(1, 0)
	e1:SetTarget(s.splimit)
	e1:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e1, tp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) < 1 then
		return
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
	local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_HAND, 0, 1, 1, nil, e, tp)
	local tc = g:GetFirst()
	if tc then
		if Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP_ATTACK + POS_FACEDOWN_DEFENSE) ~= 0 and tc:IsFacedown() then
			Duel.ConfirmCards(1 - tp, tc)
		end
	end
end
function s.splimit(e, c, sump, sumtype, sumpos, targetp, se)
	return not c:IsSetCard(SETCARD_ID_0) and c:IsLocation(LOCATION_EXTRA)
end


Yellow
If this card is Normal Summoned or flipped face-up: You can Special Summon 1 Level 4 or lower "Ninja" monster from your hand in Attack Position or face-down Defense Position, also you cannot Special Summon monsters from the Extra Deck for the rest of this turn, except "Ninja" monsters. You can only use this effect of "Yellow Ninja" once per turn.
-- Yellow
local SETCARD_ID_0 = 0x2b --Ninja
local s, id, o = GetID()
function s.initial_effect(c)
	--search
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e1:SetCode(EVENT_SUMMON_SUCCESS)
	e1:SetProperty(EFFECT_FLAG_DELAY)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EVENT_FLIP)
	c:RegisterEffect(e2)
end
function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_ATTACK + POS_FACEDOWN_DEFENSE)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND, 0, 1, nil, e, tp)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetTargetRange(1, 0)
	e1:SetTarget(s.splimit)
	e1:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e1, tp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) < 1 then
		return
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
	local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_HAND, 0, 1, 1, nil, e, tp)
	local tc = g:GetFirst()
	if tc then
		if Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP_ATTACK + POS_FACEDOWN_DEFENSE) ~= 0 and tc:IsFacedown() then
			Duel.ConfirmCards(1 - tp, tc)
		end
	end
end
function s.splimit(e, c, sump, sumtype, sumpos, targetp, se)
	return not c:IsSetCard(SETCARD_ID_0) and c:IsLocation(LOCATION_EXTRA)
end

