name: Monster
card_text: You can target 1 face-up monster you control; send 1 monster from your Extra Deck to the GY with the same original Type as that face-up monster, but for the rest of this turn, you cannot Special Summon monsters, except monsters with the same original Type as the monster sent to the GY by this effect. You can only use this effect of "Monster Express" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--to grave
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.tgtg)
  	e1:SetOperation(s.tgop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c, tp)
  	return c:IsFaceup() and Duel.IsExistingMatchingCard(s.tgfilter, tp, LOCATION_EXTRA, 0, 1, nil, c:GetOriginalRace())
  end
  function s.tgfilter(c, race)
  	return c:IsAbleToGrave() and c:GetOriginalRace() == race
  end
  function s.tgtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc, tp)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.cfilter, tp, LOCATION_MZONE, 0, 1, 1, nil, tp)
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.tgop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		local race = tc:GetOriginalRace()
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  		local g = Duel.SelectMatchingCard(tp, s.tgfilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, race)
  		if g:GetCount() > 0 and Duel.SendtoGrave(g, REASON_EFFECT) ~= 0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
  			local e1 = Effect.CreateEffect(e:GetHandler())
  			e1:SetType(EFFECT_TYPE_FIELD)
  			e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  			e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  			e1:SetLabel(g:GetFirst():GetOriginalRace())
  			e1:SetTargetRange(1, 0)
  			e1:SetTarget(s.splimit)
  			e1:SetReset(RESET_PHASE + PHASE_END)
  			Duel.RegisterEffect(e1, tp)
  		end
  	end
  end
  function s.splimit(e, c)
  	return not c:IsRace(e:GetLabel())
  end
  
  
source_text: Monster
  You can target 1 face-up monster you control; send 1 monster from your Extra Deck to the GY with the same original Type as that face-up monster, but for the rest of this turn, you cannot Special Summon monsters, except monsters with the same original Type as the monster sent to the GY by this effect. You can only use this effect of "Monster Express" once per turn.
target_text: -- Monster
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--to grave
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.tgtg)
  	e1:SetOperation(s.tgop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c, tp)
  	return c:IsFaceup() and Duel.IsExistingMatchingCard(s.tgfilter, tp, LOCATION_EXTRA, 0, 1, nil, c:GetOriginalRace())
  end
  function s.tgfilter(c, race)
  	return c:IsAbleToGrave() and c:GetOriginalRace() == race
  end
  function s.tgtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc, tp)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.cfilter, tp, LOCATION_MZONE, 0, 1, 1, nil, tp)
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.tgop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		local race = tc:GetOriginalRace()
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  		local g = Duel.SelectMatchingCard(tp, s.tgfilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, race)
  		if g:GetCount() > 0 and Duel.SendtoGrave(g, REASON_EFFECT) ~= 0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
  			local e1 = Effect.CreateEffect(e:GetHandler())
  			e1:SetType(EFFECT_TYPE_FIELD)
  			e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  			e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  			e1:SetLabel(g:GetFirst():GetOriginalRace())
  			e1:SetTargetRange(1, 0)
  			e1:SetTarget(s.splimit)
  			e1:SetReset(RESET_PHASE + PHASE_END)
  			Duel.RegisterEffect(e1, tp)
  		end
  	end
  end
  function s.splimit(e, c)
  	return not c:IsRace(e:GetLabel())
  end
  
  