name: Dragunity
card_text: 1 Dragon Tuner + 1+ non-Tuner Winged Beast monsters
  Once per turn: You can add 1 Level 4 or lower Dragon or Winged Beast monster from your Deck to your hand, then discard 1 Dragon or Winged Beast monster.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, aux.FilterBoolFunction(Card.IsRace, RACE_DRAGON), aux.NonTuner(Card.IsRace, RACE_WINDBEAST), 1)
  	c:EnableReviveLimit()
  	--search
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_HANDES)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetCountLimit(1)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.filter(c)
  	return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON + RACE_WINDBEAST) and c:IsAbleToHand()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
  	Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 1, tp, 1)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g = Duel.SelectMatchingCard(tp, s.filter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	if g:GetCount() == 0 then
  		return
  	end
  	Duel.SendtoHand(g, nil, REASON_EFFECT)
  	Duel.ConfirmCards(1 - tp, g)
  	Duel.ShuffleHand(tp)
  	Duel.BreakEffect()
  	Duel.DiscardHand(tp, Card.IsRace, 1, 1, REASON_EFFECT + REASON_DISCARD, nil, RACE_DRAGON + RACE_WINDBEAST)
  end
  
  
source_text: Dragunity
  1 Dragon Tuner + 1+ non-Tuner Winged Beast monsters
  Once per turn: You can add 1 Level 4 or lower Dragon or Winged Beast monster from your Deck to your hand, then discard 1 Dragon or Winged Beast monster.
target_text: -- Dragunity
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, aux.FilterBoolFunction(Card.IsRace, RACE_DRAGON), aux.NonTuner(Card.IsRace, RACE_WINDBEAST), 1)
  	c:EnableReviveLimit()
  	--search
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_HANDES)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetCountLimit(1)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.filter(c)
  	return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON + RACE_WINDBEAST) and c:IsAbleToHand()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
  	Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 1, tp, 1)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g = Duel.SelectMatchingCard(tp, s.filter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	if g:GetCount() == 0 then
  		return
  	end
  	Duel.SendtoHand(g, nil, REASON_EFFECT)
  	Duel.ConfirmCards(1 - tp, g)
  	Duel.ShuffleHand(tp)
  	Duel.BreakEffect()
  	Duel.DiscardHand(tp, Card.IsRace, 1, 1, REASON_EFFECT + REASON_DISCARD, nil, RACE_DRAGON + RACE_WINDBEAST)
  end
  
  