name: Battlin'
card_text: 2 Level 3 monsters
  All monsters your opponent controls must attack, if able. While you control another "Battlin' Boxer" monster, your opponent's monsters cannot target this card for attacks. When an attack is declared involving another "Battlin' Boxer" monster you control: You can detach 2 materials from this card; look at your opponent's hand, then Set 1 Spell from their hand to your field.
external_ids: local SETCARD_ID_0 = 0x1084 --Battlin'
  
lua: local SETCARD_ID_0 = 0x1084 --Battlin'
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 3, 2)
  	c:EnableReviveLimit()
  	--must attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetCode(EFFECT_MUST_ATTACK)
  	c:RegisterEffect(e1)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
  	e3:SetCondition(s.atcon)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.cfcon)
  	e3:SetCost(s.cfcost)
  	e3:SetTarget(s.cftg)
  	e3:SetOperation(s.cfop)
  	c:RegisterEffect(e3)
  end
  function s.atfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.atcon(e)
  	return Duel.IsExistingMatchingCard(s.atfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  function s.cfcon(e, tp, eg, ep, ev, re, r, rp)
  	local a = Duel.GetAttacker()
  	local at = Duel.GetAttackTarget()
  	return (a:IsControler(tp) and a ~= e:GetHandler() and a:IsSetCard(SETCARD_ID_0)) or (at and at:IsControler(tp) and at:IsFaceup() and at ~= e:GetHandler() and at:IsSetCard(SETCARD_ID_0))
  end
  function s.cfcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 2, REASON_COST)
  	end
  	e:GetHandler():RemoveOverlayCard(tp, 2, 2, REASON_COST)
  end
  function s.cftg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 and Duel.GetLocationCount(tp, LOCATION_SZONE) > 0
  	end
  end
  function s.cffilter(c, tp)
  	return c:IsType(TYPE_SPELL) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp, LOCATION_SZONE) > 0)
  end
  function s.cfop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetFieldGroup(tp, 0, LOCATION_HAND)
  	if g:GetCount() == 0 then
  		return
  	end
  	Duel.ConfirmCards(tp, g)
  	local sg = g:Filter(s.cffilter, nil, tp)
  	if sg:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SET)
  		local setg = sg:Select(tp, 1, 1, nil)
  		Duel.SSet(tp, setg:GetFirst())
  	end
  	Duel.ShuffleHand(1 - tp)
  end
  
  
source_text: Battlin'
  2 Level 3 monsters
  All monsters your opponent controls must attack, if able. While you control another "Battlin' Boxer" monster, your opponent's monsters cannot target this card for attacks. When an attack is declared involving another "Battlin' Boxer" monster you control: You can detach 2 materials from this card; look at your opponent's hand, then Set 1 Spell from their hand to your field.
target_text: -- Battlin'
  local SETCARD_ID_0 = 0x1084 --Battlin'
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 3, 2)
  	c:EnableReviveLimit()
  	--must attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetCode(EFFECT_MUST_ATTACK)
  	c:RegisterEffect(e1)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
  	e3:SetCondition(s.atcon)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.cfcon)
  	e3:SetCost(s.cfcost)
  	e3:SetTarget(s.cftg)
  	e3:SetOperation(s.cfop)
  	c:RegisterEffect(e3)
  end
  function s.atfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.atcon(e)
  	return Duel.IsExistingMatchingCard(s.atfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  function s.cfcon(e, tp, eg, ep, ev, re, r, rp)
  	local a = Duel.GetAttacker()
  	local at = Duel.GetAttackTarget()
  	return (a:IsControler(tp) and a ~= e:GetHandler() and a:IsSetCard(SETCARD_ID_0)) or (at and at:IsControler(tp) and at:IsFaceup() and at ~= e:GetHandler() and at:IsSetCard(SETCARD_ID_0))
  end
  function s.cfcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 2, REASON_COST)
  	end
  	e:GetHandler():RemoveOverlayCard(tp, 2, 2, REASON_COST)
  end
  function s.cftg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 and Duel.GetLocationCount(tp, LOCATION_SZONE) > 0
  	end
  end
  function s.cffilter(c, tp)
  	return c:IsType(TYPE_SPELL) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp, LOCATION_SZONE) > 0)
  end
  function s.cfop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetFieldGroup(tp, 0, LOCATION_HAND)
  	if g:GetCount() == 0 then
  		return
  	end
  	Duel.ConfirmCards(tp, g)
  	local sg = g:Filter(s.cffilter, nil, tp)
  	if sg:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SET)
  		local setg = sg:Select(tp, 1, 1, nil)
  		Duel.SSet(tp, setg:GetFirst())
  	end
  	Duel.ShuffleHand(1 - tp)
  end
  
  