name: Floowandereeze
card_text: You can conduct Tribute Summons that require 2 Tributes by sending 1 monster you control and 1 card your opponent controls to the GY instead of Tributing (it is still treated as a Tribute Summon). During your Main Phase: You can reveal up to 2 Winged Beast monsters in your hand and place them on the bottom of your Deck in any order, then draw the same number of cards. You can only use this effect of "Floowandereeze and the Unexplored Winds" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_ACTIVATE)
  	e0:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e0)
  	--Tribute Summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SUMMON_PROC)
  	e1:SetTargetRange(LOCATION_HAND, 0)
  	e1:SetRange(LOCATION_SZONE)
  	e1:SetCondition(s.otcon)
  	e1:SetTarget(s.ottg)
  	e1:SetOperation(s.otop)
  	e1:SetValue(SUMMON_TYPE_ADVANCE)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_SET_PROC)
  	c:RegisterEffect(e2)
  	--Send to Deck & Draw
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_TODECK + CATEGORY_DRAW)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCountLimit(1, id)
  	e3:SetTarget(s.drtg)
  	e3:SetOperation(s.drop)
  	c:RegisterEffect(e3)
  end
  function s.otfilter(c, e, tp)
  	return c:IsAbleToGrave() and not c:IsImmuneToEffect(e) and Duel.GetMZoneCount(tp, c) > 0
  end
  function s.otfilter2(c, e)
  	return c:IsAbleToGrave() and not c:IsImmuneToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED)
  end
  function s.otcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return minc <= 2 and Duel.IsExistingMatchingCard(s.otfilter, tp, LOCATION_MZONE, 0, 1, nil, e, tp) and Duel.IsExistingMatchingCard(s.otfilter2, tp, 0, LOCATION_ONFIELD, 1, nil, e)
  end
  function s.ottg(e, c)
  	local mi, ma = c:GetTributeRequirement()
  	return mi <= 2 and ma >= 2
  end
  function s.otop(e, tp, eg, ep, ev, re, r, rp, c)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g1 = Duel.SelectMatchingCard(tp, s.otfilter, tp, LOCATION_MZONE, 0, 1, 1, nil, e, tp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g2 = Duel.SelectMatchingCard(tp, s.otfilter2, tp, 0, LOCATION_ONFIELD, 1, 1, nil, e)
  	g1:Merge(g2)
  	Duel.SendtoGrave(g1, REASON_EFFECT)
  	c:SetMaterial(nil)
  end
  function s.drfilter(c)
  	return c:IsRace(RACE_WINDBEAST) and c:IsAbleToDeck() and not c:IsPublic()
  end
  function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(s.drfilter, tp, LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, tp, LOCATION_HAND)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g = Duel.SelectMatchingCard(p, s.drfilter, p, LOCATION_HAND, 0, 1, 2, nil)
  	if g:GetCount() > 0 then
  		Duel.ConfirmCards(1 - p, g)
  		local ct = aux.PlaceCardsOnDeckBottom(p, g)
  		if ct == 0 then
  			return
  		end
  		Duel.BreakEffect()
  		Duel.Draw(p, ct, REASON_EFFECT)
  	end
  end
  
  
source_text: Floowandereeze
  You can conduct Tribute Summons that require 2 Tributes by sending 1 monster you control and 1 card your opponent controls to the GY instead of Tributing (it is still treated as a Tribute Summon). During your Main Phase: You can reveal up to 2 Winged Beast monsters in your hand and place them on the bottom of your Deck in any order, then draw the same number of cards. You can only use this effect of "Floowandereeze and the Unexplored Winds" once per turn.
target_text: -- Floowandereeze
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_ACTIVATE)
  	e0:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e0)
  	--Tribute Summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SUMMON_PROC)
  	e1:SetTargetRange(LOCATION_HAND, 0)
  	e1:SetRange(LOCATION_SZONE)
  	e1:SetCondition(s.otcon)
  	e1:SetTarget(s.ottg)
  	e1:SetOperation(s.otop)
  	e1:SetValue(SUMMON_TYPE_ADVANCE)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_SET_PROC)
  	c:RegisterEffect(e2)
  	--Send to Deck & Draw
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_TODECK + CATEGORY_DRAW)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCountLimit(1, id)
  	e3:SetTarget(s.drtg)
  	e3:SetOperation(s.drop)
  	c:RegisterEffect(e3)
  end
  function s.otfilter(c, e, tp)
  	return c:IsAbleToGrave() and not c:IsImmuneToEffect(e) and Duel.GetMZoneCount(tp, c) > 0
  end
  function s.otfilter2(c, e)
  	return c:IsAbleToGrave() and not c:IsImmuneToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED)
  end
  function s.otcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return minc <= 2 and Duel.IsExistingMatchingCard(s.otfilter, tp, LOCATION_MZONE, 0, 1, nil, e, tp) and Duel.IsExistingMatchingCard(s.otfilter2, tp, 0, LOCATION_ONFIELD, 1, nil, e)
  end
  function s.ottg(e, c)
  	local mi, ma = c:GetTributeRequirement()
  	return mi <= 2 and ma >= 2
  end
  function s.otop(e, tp, eg, ep, ev, re, r, rp, c)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g1 = Duel.SelectMatchingCard(tp, s.otfilter, tp, LOCATION_MZONE, 0, 1, 1, nil, e, tp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g2 = Duel.SelectMatchingCard(tp, s.otfilter2, tp, 0, LOCATION_ONFIELD, 1, 1, nil, e)
  	g1:Merge(g2)
  	Duel.SendtoGrave(g1, REASON_EFFECT)
  	c:SetMaterial(nil)
  end
  function s.drfilter(c)
  	return c:IsRace(RACE_WINDBEAST) and c:IsAbleToDeck() and not c:IsPublic()
  end
  function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(s.drfilter, tp, LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, tp, LOCATION_HAND)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g = Duel.SelectMatchingCard(p, s.drfilter, p, LOCATION_HAND, 0, 1, 2, nil)
  	if g:GetCount() > 0 then
  		Duel.ConfirmCards(1 - p, g)
  		local ct = aux.PlaceCardsOnDeckBottom(p, g)
  		if ct == 0 then
  			return
  		end
  		Duel.BreakEffect()
  		Duel.Draw(p, ct, REASON_EFFECT)
  	end
  end
  
  