Revealer
While you control another "Ice Barrier" monster, your opponent cannot Tribute Summon. You can only use each of the following effects of "Revealer of the Ice Barrier" once per turn. You can discard 1 card; Special Summon 1 "Ice Barrier" Tuner from your Deck, also you cannot Special Summon monsters for the rest of this turn, except WATER monsters. If you would discard, or send a card(s) from your hand to the GY, to activate an "Ice Barrier" monster's effect, you can banish this card from your GY instead of 1 of those cards.
local SETCARD_ID_0 = 0x2f --Ice

local SETCARD_ID_0 = 0x2f --Ice
local s, id, o = GetID()
function s.initial_effect(c)
	--summon limit
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_CANNOT_SUMMON)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetTargetRange(0, 1)
	e1:SetCondition(s.sumcon)
	e1:SetTarget(s.sumlimit)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EFFECT_CANNOT_MSET)
	c:RegisterEffect(e2)
	--spsummon
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 0))
	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e3:SetType(EFFECT_TYPE_IGNITION)
	e3:SetRange(LOCATION_MZONE)
	e3:SetCountLimit(1, id)
	e3:SetCost(s.spcost)
	e3:SetTarget(s.sptg)
	e3:SetOperation(s.spop)
	c:RegisterEffect(e3)
	--change cost
	local e4 = Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_SINGLE)
	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e4:SetCode(id)
	e4:SetRange(LOCATION_GRAVE)
	e4:SetCountLimit(1, id + 1)
	c:RegisterEffect(e4)
end
function s.sumfilter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
end
function s.sumcon(e)
	local tp = e:GetHandlerPlayer()
	return Duel.IsExistingMatchingCard(s.sumfilter, tp, LOCATION_MZONE, 0, 1, e:GetHandler())
end
function s.sumlimit(e, c, tp, sumtp)
	return bit.band(sumtp, SUMMON_TYPE_ADVANCE) == SUMMON_TYPE_ADVANCE
end
function s.costfilter(c, e, tp)
	if c:IsLocation(LOCATION_HAND) then
		return c:IsDiscardable()
	else
		return e:GetHandler():IsSetCard(SETCARD_ID_0) and c:IsAbleToRemove() and c:IsHasEffect(id, tp)
	end
end
function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.costfilter, tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, nil, e, tp)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISCARD)
	local g = Duel.SelectMatchingCard(tp, s.costfilter, tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
	local tc = g:GetFirst()
	local te = tc:IsHasEffect(id, tp)
	if te then
		te:UseCountLimit(tp)
		Duel.Remove(tc, POS_FACEUP, REASON_EFFECT + REASON_REPLACE)
	else
		Duel.SendtoGrave(tc, REASON_COST + REASON_DISCARD)
	end
end
function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_DECK, 0, 1, nil, e, tp)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_DECK)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_DECK, 0, 1, 1, nil, e, tp)
		if g:GetCount() > 0 then
			Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
		end
	end
	local e1 = Effect.CreateEffect(e:GetHandler())
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
	e1:SetTargetRange(1, 0)
	e1:SetTarget(s.splimit)
	e1:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e1, tp)
end
function s.splimit(e, c)
	return not c:IsAttribute(ATTRIBUTE_WATER)
end


Revealer
While you control another "Ice Barrier" monster, your opponent cannot Tribute Summon. You can only use each of the following effects of "Revealer of the Ice Barrier" once per turn. You can discard 1 card; Special Summon 1 "Ice Barrier" Tuner from your Deck, also you cannot Special Summon monsters for the rest of this turn, except WATER monsters. If you would discard, or send a card(s) from your hand to the GY, to activate an "Ice Barrier" monster's effect, you can banish this card from your GY instead of 1 of those cards.
-- Revealer
local SETCARD_ID_0 = 0x2f --Ice
local s, id, o = GetID()
function s.initial_effect(c)
	--summon limit
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_CANNOT_SUMMON)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetTargetRange(0, 1)
	e1:SetCondition(s.sumcon)
	e1:SetTarget(s.sumlimit)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EFFECT_CANNOT_MSET)
	c:RegisterEffect(e2)
	--spsummon
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 0))
	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e3:SetType(EFFECT_TYPE_IGNITION)
	e3:SetRange(LOCATION_MZONE)
	e3:SetCountLimit(1, id)
	e3:SetCost(s.spcost)
	e3:SetTarget(s.sptg)
	e3:SetOperation(s.spop)
	c:RegisterEffect(e3)
	--change cost
	local e4 = Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_SINGLE)
	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e4:SetCode(id)
	e4:SetRange(LOCATION_GRAVE)
	e4:SetCountLimit(1, id + 1)
	c:RegisterEffect(e4)
end
function s.sumfilter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
end
function s.sumcon(e)
	local tp = e:GetHandlerPlayer()
	return Duel.IsExistingMatchingCard(s.sumfilter, tp, LOCATION_MZONE, 0, 1, e:GetHandler())
end
function s.sumlimit(e, c, tp, sumtp)
	return bit.band(sumtp, SUMMON_TYPE_ADVANCE) == SUMMON_TYPE_ADVANCE
end
function s.costfilter(c, e, tp)
	if c:IsLocation(LOCATION_HAND) then
		return c:IsDiscardable()
	else
		return e:GetHandler():IsSetCard(SETCARD_ID_0) and c:IsAbleToRemove() and c:IsHasEffect(id, tp)
	end
end
function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.costfilter, tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, nil, e, tp)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISCARD)
	local g = Duel.SelectMatchingCard(tp, s.costfilter, tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
	local tc = g:GetFirst()
	local te = tc:IsHasEffect(id, tp)
	if te then
		te:UseCountLimit(tp)
		Duel.Remove(tc, POS_FACEUP, REASON_EFFECT + REASON_REPLACE)
	else
		Duel.SendtoGrave(tc, REASON_COST + REASON_DISCARD)
	end
end
function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_DECK, 0, 1, nil, e, tp)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_DECK)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_DECK, 0, 1, 1, nil, e, tp)
		if g:GetCount() > 0 then
			Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
		end
	end
	local e1 = Effect.CreateEffect(e:GetHandler())
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
	e1:SetTargetRange(1, 0)
	e1:SetTarget(s.splimit)
	e1:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e1, tp)
end
function s.splimit(e, c)
	return not c:IsAttribute(ATTRIBUTE_WATER)
end

