name: F.A.
card_text: Cannot be Normal Summoned/Set. Must first be Special Summoned (from your hand) by having a Level 7 or higher "F.A." monster on the field, but no "F.A. Dark Dragster" in your Monster Zone. 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. Once per turn: You can target 1 card on the field; reduce this card's Level by 3, and if you do, destroy that target.
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)
  	c:EnableReviveLimit()
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	c:RegisterEffect(e1)
  	--atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetValue(s.atkval)
  	c:RegisterEffect(e2)
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e4:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_DAMAGE_STEP)
  	e4:SetCode(EVENT_CHAINING)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetCountLimit(1, EFFECT_COUNT_CODE_CHAIN)
  	e4:SetCondition(s.lvcon)
  	e4:SetOperation(s.lvop)
  	c:RegisterEffect(e4)
  	--destroy
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 1))
  	e5:SetCategory(CATEGORY_DESTROY)
  	e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e5:SetType(EFFECT_TYPE_IGNITION)
  	e5:SetCountLimit(1)
  	e5:SetRange(LOCATION_MZONE)
  	e5:SetTarget(s.rdtg)
  	e5:SetOperation(s.rdop)
  	c:RegisterEffect(e5)
  end
  function s.spfilter1(c)
  	return c:IsFaceup() and c:IsCode(id)
  end
  function s.spfilter2(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsLevelAbove(7)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 or Duel.IsExistingMatchingCard(s.spfilter1, tp, LOCATION_MZONE, 0, 1, nil) then
  		return false
  	end
  	return Duel.IsExistingMatchingCard(s.spfilter2, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  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.rdtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, nil) and e:GetHandler():IsLevelAbove(4)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.rdop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelBelow(3) then
  		return
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_LEVEL)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  	e1:SetValue(-3)
  	c:RegisterEffect(e1)
  	if tc and tc:IsRelateToEffect(e) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  
source_text: F.A.
  Cannot be Normal Summoned/Set. Must first be Special Summoned (from your hand) by having a Level 7 or higher "F.A." monster on the field, but no "F.A. Dark Dragster" in your Monster Zone. 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. Once per turn: You can target 1 card on the field; reduce this card's Level by 3, and if you do, destroy that target.
target_text: -- F.A.
  local SETCARD_ID_0 = 0x107 --F.A.
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	c:RegisterEffect(e1)
  	--atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetValue(s.atkval)
  	c:RegisterEffect(e2)
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e4:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_DAMAGE_STEP)
  	e4:SetCode(EVENT_CHAINING)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetCountLimit(1, EFFECT_COUNT_CODE_CHAIN)
  	e4:SetCondition(s.lvcon)
  	e4:SetOperation(s.lvop)
  	c:RegisterEffect(e4)
  	--destroy
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 1))
  	e5:SetCategory(CATEGORY_DESTROY)
  	e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e5:SetType(EFFECT_TYPE_IGNITION)
  	e5:SetCountLimit(1)
  	e5:SetRange(LOCATION_MZONE)
  	e5:SetTarget(s.rdtg)
  	e5:SetOperation(s.rdop)
  	c:RegisterEffect(e5)
  end
  function s.spfilter1(c)
  	return c:IsFaceup() and c:IsCode(id)
  end
  function s.spfilter2(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsLevelAbove(7)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 or Duel.IsExistingMatchingCard(s.spfilter1, tp, LOCATION_MZONE, 0, 1, nil) then
  		return false
  	end
  	return Duel.IsExistingMatchingCard(s.spfilter2, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  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.rdtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, nil) and e:GetHandler():IsLevelAbove(4)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.rdop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelBelow(3) then
  		return
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_LEVEL)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  	e1:SetValue(-3)
  	c:RegisterEffect(e1)
  	if tc and tc:IsRelateToEffect(e) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  