name: Hraesvelgr,
card_text: 2+ WIND monsters
  Gains 2400 ATK while your opponent has no monsters in their GY. (Quick Effect): You can target 1 monster in your opponent's GY; shuffle it into the Deck. You can only use this effect of "Hraesvelgr, the Desperate Doom Eagle" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--link summon
  	aux.AddLinkProcedure(c, aux.FilterBoolFunction(Card.IsLinkAttribute, ATTRIBUTE_WIND), 2)
  	c:EnableReviveLimit()
  	--atkup
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCondition(s.atkcon)
  	e1:SetValue(2400)
  	c:RegisterEffect(e1)
  	--to deck
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_TODECK)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id)
  	e2:SetTarget(s.tdtg)
  	e2:SetOperation(s.tdop)
  	c:RegisterEffect(e2)
  end
  function s.atkcon(e)
  	return not Duel.IsExistingMatchingCard(Card.IsType, e:GetHandlerPlayer(), 0, LOCATION_GRAVE, 1, nil, TYPE_MONSTER)
  end
  function s.tdfilter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
  end
  function s.tdtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1 - tp) and s.tdfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.tdfilter, tp, 0, LOCATION_GRAVE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g = Duel.SelectTarget(tp, s.tdfilter, tp, 0, LOCATION_GRAVE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, g, 1, 0, 0)
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SendtoDeck(tc, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	end
  end
  
  
source_text: Hraesvelgr,
  2+ WIND monsters
  Gains 2400 ATK while your opponent has no monsters in their GY. (Quick Effect): You can target 1 monster in your opponent's GY; shuffle it into the Deck. You can only use this effect of "Hraesvelgr, the Desperate Doom Eagle" once per turn.
target_text: -- Hraesvelgr,
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--link summon
  	aux.AddLinkProcedure(c, aux.FilterBoolFunction(Card.IsLinkAttribute, ATTRIBUTE_WIND), 2)
  	c:EnableReviveLimit()
  	--atkup
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCondition(s.atkcon)
  	e1:SetValue(2400)
  	c:RegisterEffect(e1)
  	--to deck
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_TODECK)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id)
  	e2:SetTarget(s.tdtg)
  	e2:SetOperation(s.tdop)
  	c:RegisterEffect(e2)
  end
  function s.atkcon(e)
  	return not Duel.IsExistingMatchingCard(Card.IsType, e:GetHandlerPlayer(), 0, LOCATION_GRAVE, 1, nil, TYPE_MONSTER)
  end
  function s.tdfilter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
  end
  function s.tdtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1 - tp) and s.tdfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.tdfilter, tp, 0, LOCATION_GRAVE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g = Duel.SelectTarget(tp, s.tdfilter, tp, 0, LOCATION_GRAVE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, g, 1, 0, 0)
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SendtoDeck(tc, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	end
  end
  
  