name: The
card_text: If you control a Beast, Beast-Warrior, or Winged Beast monster: Draw 1 card for each of those Monster Types you control. You cannot activate other Spell/Trap Cards or effects during the turn you activate this card.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DRAW)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	Duel.AddCustomActivityCounter(id, ACTIVITY_CHAIN, s.chainfilter)
  end
  function s.chainfilter(re, tp, cid)
  	return not re:IsActiveType(TYPE_SPELL + TYPE_TRAP)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetCustomActivityCount(id, tp, ACTIVITY_CHAIN) == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetTargetRange(1, 0)
  	e1:SetValue(s.aclimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.aclimit(e, re, tp)
  	return re:IsActiveType(TYPE_SPELL + TYPE_TRAP)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsRace(RACE_BEAST + RACE_BEASTWARRIOR + RACE_WINDBEAST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, nil)
  	local ct = g:GetClassCount(Card.GetRace)
  	if chk == 0 then
  		return ct > 0 and Duel.IsPlayerCanDraw(tp, ct)
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(ct)
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, ct)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, nil)
  	local ct = g:GetClassCount(Card.GetRace)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	Duel.Draw(p, ct, REASON_EFFECT)
  end
  
  
source_text: The
  If you control a Beast, Beast-Warrior, or Winged Beast monster: Draw 1 card for each of those Monster Types you control. You cannot activate other Spell/Trap Cards or effects during the turn you activate this card.
target_text: -- The
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DRAW)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	Duel.AddCustomActivityCounter(id, ACTIVITY_CHAIN, s.chainfilter)
  end
  function s.chainfilter(re, tp, cid)
  	return not re:IsActiveType(TYPE_SPELL + TYPE_TRAP)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetCustomActivityCount(id, tp, ACTIVITY_CHAIN) == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetTargetRange(1, 0)
  	e1:SetValue(s.aclimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.aclimit(e, re, tp)
  	return re:IsActiveType(TYPE_SPELL + TYPE_TRAP)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsRace(RACE_BEAST + RACE_BEASTWARRIOR + RACE_WINDBEAST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, nil)
  	local ct = g:GetClassCount(Card.GetRace)
  	if chk == 0 then
  		return ct > 0 and Duel.IsPlayerCanDraw(tp, ct)
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(ct)
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, ct)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, nil)
  	local ct = g:GetClassCount(Card.GetRace)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	Duel.Draw(p, ct, REASON_EFFECT)
  end
  
  