Abyss
If this card is used for the Xyz Summon of a "Number" monster, it can be treated as a Level 3 or 4 monster. If all monsters you control are WATER (min. 1): You can Special Summon this card from your hand, and if you do, add 1 Level 3, 4, or 5 Fish monster from your Deck to your hand, except "Abyss Shark". For the rest of this turn, you cannot Special Summon monsters, except WATER monsters, also, double the first battle damage inflicted to your opponent this turn by your "Number" monster battling another monster. You can only use this effect of "Abyss Shark" once per turn.
local SETCARD_ID_0 = 0x48 --Number

local SETCARD_ID_0 = 0x48 --Number
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_SEARCH + CATEGORY_TOHAND)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_HAND)
	e1:SetCountLimit(1, id)
	e1:SetCondition(s.spcon)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--xyzlv
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_SINGLE)
	e2:SetCode(EFFECT_XYZ_LEVEL)
	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e2:SetRange(LOCATION_MZONE)
	e2:SetValue(s.xyzlv)
	e2:SetLabel(3)
	c:RegisterEffect(e2)
	local e3 = e2:Clone()
	e3:SetLabel(4)
	c:RegisterEffect(e3)
end
function s.spfilter(c)
	return not c:IsAttribute(ATTRIBUTE_WATER) or c:IsFacedown()
end
function s.spcon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0) > 0 and not Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_MZONE, 0, 1, nil)
end
function s.thfilter(c)
	return not c:IsCode(id) and c:IsLevelAbove(3) and c:IsLevelBelow(5) and c:IsRace(RACE_FISH) and c:IsAbleToHand()
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 e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false) and Duel.IsExistingMatchingCard(s.thfilter, tp, LOCATION_DECK, 0, 1, nil)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) > 0 then
		local g = Duel.GetMatchingGroup(s.thfilter, tp, LOCATION_DECK, 0, nil)
		if #g > 0 then
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
			local sg = g:Select(tp, 1, 1, nil)
			if #sg > 0 then
				Duel.SendtoHand(sg, nil, REASON_EFFECT)
				Duel.ConfirmCards(1 - tp, sg)
			end
		end
	end
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetTargetRange(1, 0)
	e1:SetTarget(s.splimit)
	e1:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e1, tp)
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e2:SetTargetRange(0, 1)
	e2:SetCondition(s.damcon)
	e2:SetValue(DOUBLE_DAMAGE)
	e2:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e2, tp)
end
function s.splimit(e, c, sump, sumtype, sumpos, targetp, se)
	return not c:IsAttribute(ATTRIBUTE_WATER)
end
function s.damcon(e)
	local tp = e:GetHandlerPlayer()
	local a, d = Duel.GetBattleMonster(tp)
	if a and d and a:IsControler(tp) and a:IsSetCard(SETCARD_ID_0) and a:IsStatus(STATUS_OPPO_BATTLE) and Duel.GetFlagEffect(tp, id) == 0 then
		Duel.RegisterFlagEffect(tp, id, RESET_PHASE + PHASE_END, 0, 1)
		return true
	end
	return false
end
function s.xyzlv(e, c, rc)
	if rc:IsSetCard(SETCARD_ID_0) then
		return c:GetLevel() + 0x10000 * e:GetLabel()
	else
		return c:GetLevel()
	end
end


Abyss
If this card is used for the Xyz Summon of a "Number" monster, it can be treated as a Level 3 or 4 monster. If all monsters you control are WATER (min. 1): You can Special Summon this card from your hand, and if you do, add 1 Level 3, 4, or 5 Fish monster from your Deck to your hand, except "Abyss Shark". For the rest of this turn, you cannot Special Summon monsters, except WATER monsters, also, double the first battle damage inflicted to your opponent this turn by your "Number" monster battling another monster. You can only use this effect of "Abyss Shark" once per turn.
-- Abyss
local SETCARD_ID_0 = 0x48 --Number
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_SEARCH + CATEGORY_TOHAND)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_HAND)
	e1:SetCountLimit(1, id)
	e1:SetCondition(s.spcon)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--xyzlv
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_SINGLE)
	e2:SetCode(EFFECT_XYZ_LEVEL)
	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e2:SetRange(LOCATION_MZONE)
	e2:SetValue(s.xyzlv)
	e2:SetLabel(3)
	c:RegisterEffect(e2)
	local e3 = e2:Clone()
	e3:SetLabel(4)
	c:RegisterEffect(e3)
end
function s.spfilter(c)
	return not c:IsAttribute(ATTRIBUTE_WATER) or c:IsFacedown()
end
function s.spcon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0) > 0 and not Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_MZONE, 0, 1, nil)
end
function s.thfilter(c)
	return not c:IsCode(id) and c:IsLevelAbove(3) and c:IsLevelBelow(5) and c:IsRace(RACE_FISH) and c:IsAbleToHand()
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 e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false) and Duel.IsExistingMatchingCard(s.thfilter, tp, LOCATION_DECK, 0, 1, nil)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) > 0 then
		local g = Duel.GetMatchingGroup(s.thfilter, tp, LOCATION_DECK, 0, nil)
		if #g > 0 then
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
			local sg = g:Select(tp, 1, 1, nil)
			if #sg > 0 then
				Duel.SendtoHand(sg, nil, REASON_EFFECT)
				Duel.ConfirmCards(1 - tp, sg)
			end
		end
	end
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetTargetRange(1, 0)
	e1:SetTarget(s.splimit)
	e1:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e1, tp)
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e2:SetTargetRange(0, 1)
	e2:SetCondition(s.damcon)
	e2:SetValue(DOUBLE_DAMAGE)
	e2:SetReset(RESET_PHASE + PHASE_END)
	Duel.RegisterEffect(e2, tp)
end
function s.splimit(e, c, sump, sumtype, sumpos, targetp, se)
	return not c:IsAttribute(ATTRIBUTE_WATER)
end
function s.damcon(e)
	local tp = e:GetHandlerPlayer()
	local a, d = Duel.GetBattleMonster(tp)
	if a and d and a:IsControler(tp) and a:IsSetCard(SETCARD_ID_0) and a:IsStatus(STATUS_OPPO_BATTLE) and Duel.GetFlagEffect(tp, id) == 0 then
		Duel.RegisterFlagEffect(tp, id, RESET_PHASE + PHASE_END, 0, 1)
		return true
	end
	return false
end
function s.xyzlv(e, c, rc)
	if rc:IsSetCard(SETCARD_ID_0) then
		return c:GetLevel() + 0x10000 * e:GetLabel()
	else
		return c:GetLevel()
	end
end

