Defender
While you control another "Ice Barrier" monster, monsters your opponent controls cannot declare an attack if their ATK is greater than or equal to this card's DEF.
local SETCARD_ID_0 = 0x2f --Ice

local SETCARD_ID_0 = 0x2f --Ice
local s, id, o = GetID()
function s.initial_effect(c)
	--cannot attack
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetTargetRange(0, LOCATION_MZONE)
	e1:SetTarget(s.tg)
	e1:SetCondition(s.con)
	c:RegisterEffect(e1)
end
function s.filter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
end
function s.con(e)
	return Duel.IsExistingMatchingCard(s.filter, e:GetHandler():GetControler(), LOCATION_MZONE, 0, 1, e:GetHandler())
end
function s.tg(e, c)
	return c:GetAttack() >= e:GetHandler():GetDefense()
end


Defender
While you control another "Ice Barrier" monster, monsters your opponent controls cannot declare an attack if their ATK is greater than or equal to this card's DEF.
-- Defender
local SETCARD_ID_0 = 0x2f --Ice
local s, id, o = GetID()
function s.initial_effect(c)
	--cannot attack
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetTargetRange(0, LOCATION_MZONE)
	e1:SetTarget(s.tg)
	e1:SetCondition(s.con)
	c:RegisterEffect(e1)
end
function s.filter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
end
function s.con(e)
	return Duel.IsExistingMatchingCard(s.filter, e:GetHandler():GetControler(), LOCATION_MZONE, 0, 1, e:GetHandler())
end
function s.tg(e, c)
	return c:GetAttack() >= e:GetHandler():GetDefense()
end

