name: Wall
card_text: Activate by paying any multiple of 1000 Life Points. Monsters your opponent controls cannot attack if their ATK is less than or equal to the amount you paid.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	c:RegisterEffect(e1)
  	--cannot attack
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_ATTACK)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(0, LOCATION_MZONE)
  	e2:SetTarget(s.atktarget)
  	c:RegisterEffect(e2)
  	e1:SetLabelObject(e2)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 1000, true)
  	end
  	local lp = Duel.GetLP(tp)
  	local t = {}
  	local f = math.floor(lp / 1000)
  	local l = 1
  	while l <= f and l <= 255 do
  		t[l] = l * 1000
  		l = l + 1
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 0))
  	local announce = Duel.AnnounceNumber(tp, table.unpack(t))
  	Duel.PayLPCost(tp, announce, true)
  	e:GetLabelObject():SetLabel(announce)
  	e:GetHandler():SetHint(CHINT_NUMBER, announce)
  end
  function s.atktarget(e, c)
  	return c:GetAttack() <= e:GetLabel()
  end
  
  
source_text: Wall
  Activate by paying any multiple of 1000 Life Points. Monsters your opponent controls cannot attack if their ATK is less than or equal to the amount you paid.
target_text: -- Wall
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	c:RegisterEffect(e1)
  	--cannot attack
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_ATTACK)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(0, LOCATION_MZONE)
  	e2:SetTarget(s.atktarget)
  	c:RegisterEffect(e2)
  	e1:SetLabelObject(e2)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 1000, true)
  	end
  	local lp = Duel.GetLP(tp)
  	local t = {}
  	local f = math.floor(lp / 1000)
  	local l = 1
  	while l <= f and l <= 255 do
  		t[l] = l * 1000
  		l = l + 1
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 0))
  	local announce = Duel.AnnounceNumber(tp, table.unpack(t))
  	Duel.PayLPCost(tp, announce, true)
  	e:GetLabelObject():SetLabel(announce)
  	e:GetHandler():SetHint(CHINT_NUMBER, announce)
  end
  function s.atktarget(e, c)
  	return c:GetAttack() <= e:GetLabel()
  end
  
  