name: Nitro
card_text: "Nitro Synchron" + 1 or more non-Tuner monsters
  Once during each of your turns, if you activate a Spell Card, this card gains 1000 ATK during the next attack this turn involving this card, during damage calculation only. If this attacking card destroys an opponent's monster by battle, after damage calculation: You can target 1 face-up Defense Position monster your opponent controls; change that target to Attack Position, then this card can make a second attack in a row, on that monster.
external_ids: local CARD_ID_0 = 20932152 --Quickdraw Synchron
  local CARD_ID_1 = 96182448 --Nitro Synchron
  
lua: local CARD_ID_0 = 20932152 --Quickdraw Synchron
  local CARD_ID_1 = 96182448 --Nitro Synchron
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddMaterialCodeList(c, CARD_ID_1)
  	--synchro summon
  	aux.AddSynchroProcedure(c, s.tfilter, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--atkup
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetCode(EVENT_CHAINING)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCondition(s.atcon)
  	e1:SetOperation(aux.chainreg)
  	c:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_CHAIN_SOLVED)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetOperation(s.atop)
  	c:RegisterEffect(e2)
  	--chain attack
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_POSITION)
  	e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_BATTLED)
  	e3:SetCondition(s.cacon)
  	e3:SetTarget(s.catg)
  	e3:SetOperation(s.caop)
  	c:RegisterEffect(e3)
  end
  s.material_setcode = 0x1017
  function s.tfilter(c)
  	return c:IsCode(CARD_ID_1) or c:IsHasEffect(CARD_ID_0)
  end
  function s.atcon(e, tp, eg, ep, ev, re, r, rp)
  	return ep == tp and Duel.GetTurnPlayer() == tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
  end
  function s.atop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:GetFlagEffect(FLAG_ID_CHAINING) == 0 or c:GetFlagEffect(id) ~= 0 then
  		return
  	end
  	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:SetCondition(s.atkcon)
  	e2:SetValue(1000)
  	e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_DAMAGE_CAL + PHASE_END)
  	c:RegisterEffect(e2)
  	c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.atkcon(e)
  	local c = e:GetHandler()
  	return Duel.GetCurrentPhase() == PHASE_DAMAGE_CAL and c == Duel.GetAttacker()
  end
  function s.cacon(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local bc = c:GetBattleTarget()
  	return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsDefensePos() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
  end
  function s.catg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(1 - tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_POSCHANGE)
  	local g = Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, 1, 0, 0)
  end
  function s.caop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.ChangePosition(tc, POS_FACEUP_ATTACK)
  		Duel.ChainAttack(tc)
  	end
  end
  
  
source_text: Nitro
  "Nitro Synchron" + 1 or more non-Tuner monsters
  Once during each of your turns, if you activate a Spell Card, this card gains 1000 ATK during the next attack this turn involving this card, during damage calculation only. If this attacking card destroys an opponent's monster by battle, after damage calculation: You can target 1 face-up Defense Position monster your opponent controls; change that target to Attack Position, then this card can make a second attack in a row, on that monster.
target_text: -- Nitro
  local CARD_ID_0 = 20932152 --Quickdraw Synchron
  local CARD_ID_1 = 96182448 --Nitro Synchron
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddMaterialCodeList(c, CARD_ID_1)
  	--synchro summon
  	aux.AddSynchroProcedure(c, s.tfilter, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--atkup
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetCode(EVENT_CHAINING)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCondition(s.atcon)
  	e1:SetOperation(aux.chainreg)
  	c:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_CHAIN_SOLVED)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetOperation(s.atop)
  	c:RegisterEffect(e2)
  	--chain attack
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_POSITION)
  	e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_BATTLED)
  	e3:SetCondition(s.cacon)
  	e3:SetTarget(s.catg)
  	e3:SetOperation(s.caop)
  	c:RegisterEffect(e3)
  end
  s.material_setcode = 0x1017
  function s.tfilter(c)
  	return c:IsCode(CARD_ID_1) or c:IsHasEffect(CARD_ID_0)
  end
  function s.atcon(e, tp, eg, ep, ev, re, r, rp)
  	return ep == tp and Duel.GetTurnPlayer() == tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
  end
  function s.atop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:GetFlagEffect(FLAG_ID_CHAINING) == 0 or c:GetFlagEffect(id) ~= 0 then
  		return
  	end
  	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:SetCondition(s.atkcon)
  	e2:SetValue(1000)
  	e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_DAMAGE_CAL + PHASE_END)
  	c:RegisterEffect(e2)
  	c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.atkcon(e)
  	local c = e:GetHandler()
  	return Duel.GetCurrentPhase() == PHASE_DAMAGE_CAL and c == Duel.GetAttacker()
  end
  function s.cacon(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local bc = c:GetBattleTarget()
  	return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsDefensePos() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
  end
  function s.catg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(1 - tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_POSCHANGE)
  	local g = Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, 1, 0, 0)
  end
  function s.caop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.ChangePosition(tc, POS_FACEUP_ATTACK)
  		Duel.ChainAttack(tc)
  	end
  end
  
  