name: F.A.
card_text: 1 Tuner + 1+ non-Tuner monsters
  Gains ATK equal to its Level x 300. Each time a "F.A." Spell/Trap Card or effect is activated: You can increase this card's Level by 1. This card gains the following effect(s), based on its current Level.
  ● Level 11 or higher: Cannot be destroyed by battle or card effects.
  ● Level 13 or higher: Once per turn: You can target 1 "F.A." monster in your GY; Special Summon it.
external_ids: local SETCARD_ID_0 = 0x107 --F.A.
  
lua: local SETCARD_ID_0 = 0x107 --F.A.
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	c:EnableReviveLimit()
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	--atk up
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetValue(s.atkval)
  	c:RegisterEffect(e1)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_DAMAGE_STEP)
  	e3:SetCode(EVENT_CHAINING)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1, EFFECT_COUNT_CODE_CHAIN)
  	e3:SetCondition(s.lvcon)
  	e3:SetOperation(s.lvop)
  	c:RegisterEffect(e3)
  	--indes
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e4:SetCondition(s.indcon)
  	e4:SetValue(1)
  	c:RegisterEffect(e4)
  	local e5 = e4:Clone()
  	e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	c:RegisterEffect(e5)
  	--special summon
  	local e6 = Effect.CreateEffect(c)
  	e6:SetDescription(aux.Stringid(id, 1))
  	e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e6:SetType(EFFECT_TYPE_IGNITION)
  	e6:SetCountLimit(1)
  	e6:SetRange(LOCATION_MZONE)
  	e6:SetCondition(s.spcon)
  	e6:SetTarget(s.sptg)
  	e6:SetOperation(s.spop)
  	c:RegisterEffect(e6)
  end
  function s.atkval(e, c)
  	return c:GetLevel() * 300
  end
  function s.lvcon(e, tp, eg, ep, ev, re, r, rp)
  	return re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and re:GetHandler():IsSetCard(SETCARD_ID_0)
  end
  function s.lvop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) and c:IsFaceup() then
  		local e4 = Effect.CreateEffect(c)
  		e4:SetType(EFFECT_TYPE_SINGLE)
  		e4:SetCode(EFFECT_UPDATE_LEVEL)
  		e4:SetValue(1)
  		e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  		e4:SetRange(LOCATION_MZONE)
  		e4:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e4)
  	end
  end
  function s.indcon(e)
  	return e:GetHandler():IsLevelAbove(11)
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsLevelAbove(13)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingTarget(s.filter, tp, LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: F.A.
  1 Tuner + 1+ non-Tuner monsters
  Gains ATK equal to its Level x 300. Each time a "F.A." Spell/Trap Card or effect is activated: You can increase this card's Level by 1. This card gains the following effect(s), based on its current Level.
  ● Level 11 or higher: Cannot be destroyed by battle or card effects.
  ● Level 13 or higher: Once per turn: You can target 1 "F.A." monster in your GY; Special Summon it.
target_text: -- F.A.
  local SETCARD_ID_0 = 0x107 --F.A.
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	c:EnableReviveLimit()
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	--atk up
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetValue(s.atkval)
  	c:RegisterEffect(e1)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_DAMAGE_STEP)
  	e3:SetCode(EVENT_CHAINING)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1, EFFECT_COUNT_CODE_CHAIN)
  	e3:SetCondition(s.lvcon)
  	e3:SetOperation(s.lvop)
  	c:RegisterEffect(e3)
  	--indes
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e4:SetCondition(s.indcon)
  	e4:SetValue(1)
  	c:RegisterEffect(e4)
  	local e5 = e4:Clone()
  	e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	c:RegisterEffect(e5)
  	--special summon
  	local e6 = Effect.CreateEffect(c)
  	e6:SetDescription(aux.Stringid(id, 1))
  	e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e6:SetType(EFFECT_TYPE_IGNITION)
  	e6:SetCountLimit(1)
  	e6:SetRange(LOCATION_MZONE)
  	e6:SetCondition(s.spcon)
  	e6:SetTarget(s.sptg)
  	e6:SetOperation(s.spop)
  	c:RegisterEffect(e6)
  end
  function s.atkval(e, c)
  	return c:GetLevel() * 300
  end
  function s.lvcon(e, tp, eg, ep, ev, re, r, rp)
  	return re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and re:GetHandler():IsSetCard(SETCARD_ID_0)
  end
  function s.lvop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) and c:IsFaceup() then
  		local e4 = Effect.CreateEffect(c)
  		e4:SetType(EFFECT_TYPE_SINGLE)
  		e4:SetCode(EFFECT_UPDATE_LEVEL)
  		e4:SetValue(1)
  		e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  		e4:SetRange(LOCATION_MZONE)
  		e4:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e4)
  	end
  end
  function s.indcon(e)
  	return e:GetHandler():IsLevelAbove(11)
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsLevelAbove(13)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingTarget(s.filter, tp, LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  