name: Tyrant's
card_text: Activate by Tributing 2 monsters. Your opponent cannot activate a Spell Card unless they also send 1 Spell Card from the Deck to the Graveyard.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	c:RegisterEffect(e1)
  	--activate cost
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_ACTIVATE_COST)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetTargetRange(0, 1)
  	e2:SetCondition(s.accon)
  	e2:SetTarget(s.actarget)
  	e2:SetCost(s.accost)
  	e2:SetOperation(s.acop)
  	c:RegisterEffect(e2)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckReleaseGroup(tp, nil, 2, nil)
  	end
  	local rg = Duel.SelectReleaseGroup(tp, nil, 2, 2, nil)
  	Duel.Release(rg, REASON_COST)
  end
  function s.accon(e)
  	s[0] = false
  	return true
  end
  function s.acfilter(c)
  	return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
  end
  function s.actarget(e, te, tp)
  	return te:IsActiveType(TYPE_SPELL) and te:IsHasType(EFFECT_TYPE_ACTIVATE)
  end
  function s.accost(e, te, tp)
  	return Duel.IsExistingMatchingCard(s.acfilter, tp, LOCATION_DECK, 0, 1, nil)
  end
  function s.acop(e, tp, eg, ep, ev, re, r, rp)
  	if s[0] then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(tp, s.acfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	Duel.SendtoGrave(g, REASON_COST)
  	s[0] = true
  end
  
  
source_text: Tyrant's
  Activate by Tributing 2 monsters. Your opponent cannot activate a Spell Card unless they also send 1 Spell Card from the Deck to the Graveyard.
target_text: -- Tyrant's
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	c:RegisterEffect(e1)
  	--activate cost
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_ACTIVATE_COST)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetTargetRange(0, 1)
  	e2:SetCondition(s.accon)
  	e2:SetTarget(s.actarget)
  	e2:SetCost(s.accost)
  	e2:SetOperation(s.acop)
  	c:RegisterEffect(e2)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckReleaseGroup(tp, nil, 2, nil)
  	end
  	local rg = Duel.SelectReleaseGroup(tp, nil, 2, 2, nil)
  	Duel.Release(rg, REASON_COST)
  end
  function s.accon(e)
  	s[0] = false
  	return true
  end
  function s.acfilter(c)
  	return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
  end
  function s.actarget(e, te, tp)
  	return te:IsActiveType(TYPE_SPELL) and te:IsHasType(EFFECT_TYPE_ACTIVATE)
  end
  function s.accost(e, te, tp)
  	return Duel.IsExistingMatchingCard(s.acfilter, tp, LOCATION_DECK, 0, 1, nil)
  end
  function s.acop(e, tp, eg, ep, ev, re, r, rp)
  	if s[0] then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(tp, s.acfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	Duel.SendtoGrave(g, REASON_COST)
  	s[0] = true
  end
  
  