Shock
You can Tribute this card, then target 1 WATER monster on the field; destroy it, and if you do, add 1 "Ice Barrier" monster from your Deck to your hand.
local SETCARD_ID_0 = 0x2f --Ice

local SETCARD_ID_0 = 0x2f --Ice
local s, id, o = GetID()
function s.initial_effect(c)
	--destroy
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_DESTROY + CATEGORY_TOHAND + CATEGORY_SEARCH)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCost(s.cost)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():IsReleasable()
	end
	Duel.Release(e:GetHandler(), REASON_COST)
end
function s.desfilter(c)
	return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function s.sfilter(c)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc)
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, e:GetHandler()) and Duel.IsExistingMatchingCard(s.sfilter, tp, LOCATION_DECK, 0, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
	local g = Duel.SelectTarget(tp, s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local tc = Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) and s.desfilter(tc) and Duel.Destroy(tc, REASON_EFFECT) ~= 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
		local g = Duel.SelectMatchingCard(tp, s.sfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
		if g:GetCount() > 0 then
			Duel.SendtoHand(g, nil, REASON_EFFECT)
			Duel.ConfirmCards(1 - tp, g)
		end
	end
end


Shock
You can Tribute this card, then target 1 WATER monster on the field; destroy it, and if you do, add 1 "Ice Barrier" monster from your Deck to your hand.
-- Shock
local SETCARD_ID_0 = 0x2f --Ice
local s, id, o = GetID()
function s.initial_effect(c)
	--destroy
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_DESTROY + CATEGORY_TOHAND + CATEGORY_SEARCH)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCost(s.cost)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():IsReleasable()
	end
	Duel.Release(e:GetHandler(), REASON_COST)
end
function s.desfilter(c)
	return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function s.sfilter(c)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc)
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, e:GetHandler()) and Duel.IsExistingMatchingCard(s.sfilter, tp, LOCATION_DECK, 0, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
	local g = Duel.SelectTarget(tp, s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local tc = Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) and s.desfilter(tc) and Duel.Destroy(tc, REASON_EFFECT) ~= 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
		local g = Duel.SelectMatchingCard(tp, s.sfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
		if g:GetCount() > 0 then
			Duel.SendtoHand(g, nil, REASON_EFFECT)
			Duel.ConfirmCards(1 - tp, g)
		end
	end
end

