name: Assault
card_text: Equip only to a Warrior-Type monster that is the only monster you control. It gains 300 ATK. During your Main Phase 1, you can send this equipped card to the Graveyard to allow the equipped monster to attack twice during each Battle Phase this turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_EQUIP)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--Atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_EQUIP)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetValue(300)
  	c:RegisterEffect(e2)
  	--Equip limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_EQUIP_LIMIT)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e3:SetValue(s.eqlimit)
  	c:RegisterEffect(e3)
  	--multi attack
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetType(EFFECT_TYPE_IGNITION)
  	e4:SetRange(LOCATION_SZONE)
  	e4:SetCondition(s.macon)
  	e4:SetCost(s.macost)
  	e4:SetOperation(s.maop)
  	c:RegisterEffect(e4)
  end
  function s.eqlimit(e, c)
  	if e:GetHandler():GetEquipTarget() == c then
  		return true
  	end
  	local g = Duel.GetFieldGroup(e:GetHandlerPlayer(), LOCATION_MZONE, 0)
  	local tc = g:GetFirst()
  	return g:GetCount() == 1 and tc == c and tc:IsRace(RACE_WARRIOR)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetFieldGroup(tp, LOCATION_MZONE, 0)
  	local tc = g:GetFirst()
  	e:SetLabelObject(tc)
  	return g:GetCount() == 1 and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	local tc = e:GetLabelObject()
  	if chkc then
  		return chkc == tc
  	end
  	if chk == 0 then
  		return tc and tc:IsCanBeEffectTarget(e)
  	end
  	Duel.SetTargetCard(tc)
  	Duel.SetOperationInfo(0, CATEGORY_EQUIP, e:GetHandler(), 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local ct = Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0)
  	local tc = Duel.GetFirstTarget()
  	if ct == 1 and e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.Equip(tp, e:GetHandler(), tc)
  	end
  end
  function s.macon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsAbleToEnterBP()
  end
  function s.macost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return c:IsAbleToGraveAsCost()
  	end
  	Duel.SetTargetCard(c:GetEquipTarget())
  	Duel.SendtoGrave(c, REASON_COST)
  end
  function s.maop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_EXTRA_ATTACK)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		e1:SetValue(1)
  		tc:RegisterEffect(e1)
  	end
  end
  
  
source_text: Assault
  Equip only to a Warrior-Type monster that is the only monster you control. It gains 300 ATK. During your Main Phase 1, you can send this equipped card to the Graveyard to allow the equipped monster to attack twice during each Battle Phase this turn.
target_text: -- Assault
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_EQUIP)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--Atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_EQUIP)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetValue(300)
  	c:RegisterEffect(e2)
  	--Equip limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_EQUIP_LIMIT)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e3:SetValue(s.eqlimit)
  	c:RegisterEffect(e3)
  	--multi attack
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetType(EFFECT_TYPE_IGNITION)
  	e4:SetRange(LOCATION_SZONE)
  	e4:SetCondition(s.macon)
  	e4:SetCost(s.macost)
  	e4:SetOperation(s.maop)
  	c:RegisterEffect(e4)
  end
  function s.eqlimit(e, c)
  	if e:GetHandler():GetEquipTarget() == c then
  		return true
  	end
  	local g = Duel.GetFieldGroup(e:GetHandlerPlayer(), LOCATION_MZONE, 0)
  	local tc = g:GetFirst()
  	return g:GetCount() == 1 and tc == c and tc:IsRace(RACE_WARRIOR)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetFieldGroup(tp, LOCATION_MZONE, 0)
  	local tc = g:GetFirst()
  	e:SetLabelObject(tc)
  	return g:GetCount() == 1 and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	local tc = e:GetLabelObject()
  	if chkc then
  		return chkc == tc
  	end
  	if chk == 0 then
  		return tc and tc:IsCanBeEffectTarget(e)
  	end
  	Duel.SetTargetCard(tc)
  	Duel.SetOperationInfo(0, CATEGORY_EQUIP, e:GetHandler(), 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local ct = Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0)
  	local tc = Duel.GetFirstTarget()
  	if ct == 1 and e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.Equip(tp, e:GetHandler(), tc)
  	end
  end
  function s.macon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsAbleToEnterBP()
  end
  function s.macost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return c:IsAbleToGraveAsCost()
  	end
  	Duel.SetTargetCard(c:GetEquipTarget())
  	Duel.SendtoGrave(c, REASON_COST)
  end
  function s.maop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_EXTRA_ATTACK)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		e1:SetValue(1)
  		tc:RegisterEffect(e1)
  	end
  end
  
  