name: Intercept
card_text: Activate only when a monster is Tribute Summoned with 1 Tribute. Take control of that monster.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_CONTROL)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	if not s.global_check then
  		s.global_check = true
  		local ge1 = Effect.CreateEffect(c)
  		ge1:SetType(EFFECT_TYPE_FIELD)
  		ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_SET_AVAILABLE + EFFECT_FLAG_IGNORE_RANGE)
  		ge1:SetCode(EFFECT_MATERIAL_CHECK)
  		ge1:SetValue(s.valcheck)
  		Duel.RegisterEffect(ge1, 0)
  	end
  end
  function s.valcheck(e, c)
  	if c:GetMaterialCount() == 1 and c:GetMaterial():GetFirst():IsType(TYPE_MONSTER) then
  		c:RegisterFlagEffect(id, 0, 0, 0)
  	end
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local tc = eg:GetFirst()
  	local res = tc:IsSummonType(SUMMON_TYPE_ADVANCE) and tc:GetFlagEffect(id) ~= 0
  	tc:ResetFlagEffect(id)
  	return res
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return eg:GetFirst():IsCanBeEffectTarget(e) and eg:GetFirst():IsControlerCanBeChanged()
  	end
  	Duel.SetTargetCard(eg)
  	Duel.SetOperationInfo(0, CATEGORY_CONTROL, eg, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.GetControl(tc, tp)
  	end
  end
  
  
source_text: Intercept
  Activate only when a monster is Tribute Summoned with 1 Tribute. Take control of that monster.
target_text: -- Intercept
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_CONTROL)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	if not s.global_check then
  		s.global_check = true
  		local ge1 = Effect.CreateEffect(c)
  		ge1:SetType(EFFECT_TYPE_FIELD)
  		ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_SET_AVAILABLE + EFFECT_FLAG_IGNORE_RANGE)
  		ge1:SetCode(EFFECT_MATERIAL_CHECK)
  		ge1:SetValue(s.valcheck)
  		Duel.RegisterEffect(ge1, 0)
  	end
  end
  function s.valcheck(e, c)
  	if c:GetMaterialCount() == 1 and c:GetMaterial():GetFirst():IsType(TYPE_MONSTER) then
  		c:RegisterFlagEffect(id, 0, 0, 0)
  	end
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local tc = eg:GetFirst()
  	local res = tc:IsSummonType(SUMMON_TYPE_ADVANCE) and tc:GetFlagEffect(id) ~= 0
  	tc:ResetFlagEffect(id)
  	return res
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return eg:GetFirst():IsCanBeEffectTarget(e) and eg:GetFirst():IsControlerCanBeChanged()
  	end
  	Duel.SetTargetCard(eg)
  	Duel.SetOperationInfo(0, CATEGORY_CONTROL, eg, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.GetControl(tc, tp)
  	end
  end
  
  