name: Fabled
card_text: 1 "Fabled" Tuner + 1+ non-Tuner monsters
  When this card is Synchro Summoned: You can draw until you have 2 cards in your hand.
external_ids: local SETCARD_ID_0 = 0x35 --Fabled
  
lua: local SETCARD_ID_0 = 0x35 --Fabled
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, aux.FilterBoolFunction(Card.IsSetCard, SETCARD_ID_0), aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--draw
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DRAW)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.con)
  	e1:SetTarget(s.tg)
  	e1:SetOperation(s.op)
  	c:RegisterEffect(e1)
  end
  function s.con(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
  end
  function s.tg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local h = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  		return h < 2 and Duel.IsPlayerCanDraw(tp, 2 - h)
  	end
  	local h = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(2 - h)
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 2 - h)
  end
  function s.op(e, tp, eg, ep, ev, re, r, rp)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	local h = Duel.GetFieldGroupCount(p, LOCATION_HAND, 0)
  	if h >= 2 then
  		return
  	end
  	Duel.Draw(p, 2 - h, REASON_EFFECT)
  end
  
  
source_text: Fabled
  1 "Fabled" Tuner + 1+ non-Tuner monsters
  When this card is Synchro Summoned: You can draw until you have 2 cards in your hand.
target_text: -- Fabled
  local SETCARD_ID_0 = 0x35 --Fabled
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, aux.FilterBoolFunction(Card.IsSetCard, SETCARD_ID_0), aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--draw
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DRAW)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.con)
  	e1:SetTarget(s.tg)
  	e1:SetOperation(s.op)
  	c:RegisterEffect(e1)
  end
  function s.con(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
  end
  function s.tg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local h = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  		return h < 2 and Duel.IsPlayerCanDraw(tp, 2 - h)
  	end
  	local h = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(2 - h)
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 2 - h)
  end
  function s.op(e, tp, eg, ep, ev, re, r, rp)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	local h = Duel.GetFieldGroupCount(p, LOCATION_HAND, 0)
  	if h >= 2 then
  		return
  	end
  	Duel.Draw(p, 2 - h, REASON_EFFECT)
  end
  
  