name: Wing
card_text: If all monsters you control are Winged Beast monsters and you control at least 2 monsters with different original names: Pay 600 LP; draw 2 cards. You can only activate 1 "Wing Requital" per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Draw
  	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:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	e1:SetCondition(s.drcon)
  	e1:SetCost(s.drcost)
  	e1:SetTarget(s.drtg)
  	e1:SetOperation(s.drop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c, g)
  	return c:IsFacedown() or not c:IsRace(RACE_WINDBEAST)
  end
  function s.drcon(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetFieldGroup(tp, LOCATION_MZONE, 0)
  	return g:GetCount() >= 2 and not g:IsExists(s.cfilter, 1, nil, g) and g:GetClassCount(Card.GetOriginalCodeRule) >= 2
  end
  function s.drcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 600)
  	end
  	Duel.PayLPCost(tp, 600)
  end
  function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsPlayerCanDraw(tp, 2)
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(2)
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 2)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Draw(p, d, REASON_EFFECT)
  end
  
  
source_text: Wing
  If all monsters you control are Winged Beast monsters and you control at least 2 monsters with different original names: Pay 600 LP; draw 2 cards. You can only activate 1 "Wing Requital" per turn.
target_text: -- Wing
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Draw
  	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:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	e1:SetCondition(s.drcon)
  	e1:SetCost(s.drcost)
  	e1:SetTarget(s.drtg)
  	e1:SetOperation(s.drop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c, g)
  	return c:IsFacedown() or not c:IsRace(RACE_WINDBEAST)
  end
  function s.drcon(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetFieldGroup(tp, LOCATION_MZONE, 0)
  	return g:GetCount() >= 2 and not g:IsExists(s.cfilter, 1, nil, g) and g:GetClassCount(Card.GetOriginalCodeRule) >= 2
  end
  function s.drcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 600)
  	end
  	Duel.PayLPCost(tp, 600)
  end
  function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsPlayerCanDraw(tp, 2)
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(2)
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 2)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Draw(p, d, REASON_EFFECT)
  end
  
  