name: Virus
card_text: Tribute any number of monsters, except Tokens; your opponent sends an equal number of Spells from their Deck to the GY (or all their Spells, if lower than the number of Tributes).
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DECKDES)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetLabel(0)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	e:SetLabel(100)
  	return true
  end
  function s.rfilter(c)
  	return not c:IsType(TYPE_TOKEN)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		if e:GetLabel() ~= 100 then
  			return false
  		end
  		e:SetLabel(0)
  		return Duel.CheckReleaseGroup(tp, s.rfilter, 1, nil)
  	end
  	local rg = Duel.SelectReleaseGroup(tp, s.rfilter, 1, 7, nil)
  	e:SetLabel(rg:GetCount())
  	Duel.Release(rg, REASON_COST)
  end
  function s.filter(c)
  	return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local ct = e:GetLabel()
  	Duel.Hint(HINT_SELECTMSG, 1 - tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(1 - tp, s.filter, 1 - tp, LOCATION_DECK, 0, ct, ct, nil)
  	if g:GetCount() > 0 then
  		Duel.SendtoGrave(g, REASON_EFFECT)
  	end
  end
  
  
source_text: Virus
  Tribute any number of monsters, except Tokens; your opponent sends an equal number of Spells from their Deck to the GY (or all their Spells, if lower than the number of Tributes).
target_text: -- Virus
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DECKDES)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetLabel(0)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	e:SetLabel(100)
  	return true
  end
  function s.rfilter(c)
  	return not c:IsType(TYPE_TOKEN)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		if e:GetLabel() ~= 100 then
  			return false
  		end
  		e:SetLabel(0)
  		return Duel.CheckReleaseGroup(tp, s.rfilter, 1, nil)
  	end
  	local rg = Duel.SelectReleaseGroup(tp, s.rfilter, 1, 7, nil)
  	e:SetLabel(rg:GetCount())
  	Duel.Release(rg, REASON_COST)
  end
  function s.filter(c)
  	return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local ct = e:GetLabel()
  	Duel.Hint(HINT_SELECTMSG, 1 - tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(1 - tp, s.filter, 1 - tp, LOCATION_DECK, 0, ct, ct, nil)
  	if g:GetCount() > 0 then
  		Duel.SendtoGrave(g, REASON_EFFECT)
  	end
  end
  
  