name: Vendread
card_text: Target 1 face-up monster your opponent controls that has a Level; Tribute it, and if you do, Special Summon 1 "Vendread Token" (Zombie/DARK/ATK 0/DEF 0) with a Level equal to the Tributed monster's original Level. While the Token Special Summoned by this effect is on the field, you cannot Normal or Special Summon monsters, except "Vendread" monsters.
external_ids: local CARD_ID_0 = 30650148 --Vendread Token
  local SETCARD_ID_0 = 0x106 --Vendread
  
lua: local CARD_ID_0 = 30650148 --Vendread Token
  local SETCARD_ID_0 = 0x106 --Vendread
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter(c, tp)
  	return c:IsFaceup()
  		and c:GetOriginalLevel() > 0
  		and c:IsReleasableByEffect()
  		and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 0, 0, c:GetOriginalLevel(), RACE_ZOMBIE, ATTRIBUTE_DARK)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(1 - tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc, tp)
  	end
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RELEASE)
  	Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil, tp)
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and Duel.Release(tc, REASON_EFFECT) > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD)
  		e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  		e1:SetRange(LOCATION_MZONE)
  		e1:SetAbsoluteRange(tp, 1, 0)
  		e1:SetTarget(s.splimit)
  		token:RegisterEffect(e1, true)
  		local e2 = e1:Clone()
  		e2:SetCode(EFFECT_CANNOT_SUMMON)
  		token:RegisterEffect(e2, true)
  		local e3 = Effect.CreateEffect(e:GetHandler())
  		e3:SetType(EFFECT_TYPE_SINGLE)
  		e3:SetCode(EFFECT_CHANGE_LEVEL)
  		e3:SetValue(tc:GetOriginalLevel())
  		e3:SetReset(RESET_EVENT + RESETS_STANDARD)
  		token:RegisterEffect(e3, true)
  		Duel.SpecialSummonComplete()
  	end
  end
  function s.splimit(e, c)
  	return not c:IsSetCard(SETCARD_ID_0)
  end
  
  
source_text: Vendread
  Target 1 face-up monster your opponent controls that has a Level; Tribute it, and if you do, Special Summon 1 "Vendread Token" (Zombie/DARK/ATK 0/DEF 0) with a Level equal to the Tributed monster's original Level. While the Token Special Summoned by this effect is on the field, you cannot Normal or Special Summon monsters, except "Vendread" monsters.
target_text: -- Vendread
  local CARD_ID_0 = 30650148 --Vendread Token
  local SETCARD_ID_0 = 0x106 --Vendread
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter(c, tp)
  	return c:IsFaceup()
  		and c:GetOriginalLevel() > 0
  		and c:IsReleasableByEffect()
  		and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 0, 0, c:GetOriginalLevel(), RACE_ZOMBIE, ATTRIBUTE_DARK)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(1 - tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc, tp)
  	end
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RELEASE)
  	Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil, tp)
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and Duel.Release(tc, REASON_EFFECT) > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD)
  		e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  		e1:SetRange(LOCATION_MZONE)
  		e1:SetAbsoluteRange(tp, 1, 0)
  		e1:SetTarget(s.splimit)
  		token:RegisterEffect(e1, true)
  		local e2 = e1:Clone()
  		e2:SetCode(EFFECT_CANNOT_SUMMON)
  		token:RegisterEffect(e2, true)
  		local e3 = Effect.CreateEffect(e:GetHandler())
  		e3:SetType(EFFECT_TYPE_SINGLE)
  		e3:SetCode(EFFECT_CHANGE_LEVEL)
  		e3:SetValue(tc:GetOriginalLevel())
  		e3:SetReset(RESET_EVENT + RESETS_STANDARD)
  		token:RegisterEffect(e3, true)
  		Duel.SpecialSummonComplete()
  	end
  end
  function s.splimit(e, c)
  	return not c:IsSetCard(SETCARD_ID_0)
  end
  
  