From a78bdc46fef97202df0420ce33c15b30d4801693 Mon Sep 17 00:00:00 2001 From: heyshawtyy <108924601+heyshawtyy@users.noreply.github.com> Date: Sat, 14 Nov 2026 15:35:26 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B8=D0=BA=D0=BE=D0=B2=D0=B8=D0=BD?= =?UTF-8?q?=D0=BA=D0=B8:=2021=20=D0=BD=D0=B5=D0=BE=D0=B1=D1=8B=D1=87=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=80=D1=8B=D0=B1=D0=B0=20=D1=81=20=D1=83=D1=81?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=D0=B8=D1=8F=D0=BC=D0=B8=20=D0=BF=D0=BE=D0=B8?= =?UTF-8?q?=D0=BC=D0=BA=D0=B8,=20=D0=B7=D0=B0=D0=B3=D0=B0=D0=B4=D0=BA?= =?UTF-8?q?=D0=B0=D0=BC=D0=B8,=20=D1=81=D0=B5=D0=BA=D1=80=D0=B5=D1=82?= =?UTF-8?q?=D0=B0=D0=BC=D0=B8=20=D0=B8=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=D0=BC=D0=B8=20=D0=B2=20=D0=B1=D1=83=D1=82=D1=8B?= =?UTF-8?q?=D0=BB=D0=BA=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ReplicatedStorage/FishConfig.lua | 70 +++++++++++++++ src/ServerScriptService/GameServer.server.lua | 89 ++++++++++++++++++- 2 files changed, 156 insertions(+), 3 deletions(-) diff --git a/src/ReplicatedStorage/FishConfig.lua b/src/ReplicatedStorage/FishConfig.lua index 0485c5c..1b3b667 100644 --- a/src/ReplicatedStorage/FishConfig.lua +++ b/src/ReplicatedStorage/FishConfig.lua @@ -330,6 +330,72 @@ Config.Zones = { }, } +---------------------------------------------------------------- диковинки +-- Необычные рыбы поверх обычных. Не участвуют в обычном выборе по редкости и не нужны для мастерства мира: +-- при КАЖДОЙ ручной поимке в мире world, если выполнены условия cond, срабатывает шанс 1 к chance — +-- и вместо выбранной рыбы клюёт диковинка. Автоловля и ловушки их не ловят. +-- cond: night / day; weathers = { Rain = true, … }; perfect (заброс в зелёную зону); hours = { с, до } по игровым +-- часам (через полночь — с > до); event = id события; bait = id наживки; replaces = id рыбы (шанс проверяется, +-- только если выпала она); minCombo = серия не меньше; minLevel. +-- hint — загадка в коллекции, пока не поймана; secret = true — в коллекции даже силуэта нет, только «???»; +-- rumor — слух о секретной рыбе (записка в бутылке). +-- Внешний вид — те же поля, что у обычной рыбы (GameModels.buildFish): shape, color, color2, spots, stripes… +Config.Curios = { + -- 🌊 Тихое озеро + F({ id = "MushCarp", world = "World1", name = "Грибной карп", rarity = "Rare", price = 40, minW = 1, maxW = 6, size = 1.2, shape = "tall", color = Color3.fromRGB(150, 110, 80), color2 = Color3.fromRGB(240, 90, 70), spots = 8, glow = true, + chance = 120, cond = { weathers = { Rain = true, Storm = true } }, hint = "Когда дождь стучит по пням, у меня на спине растёт лес" }), + F({ id = "MoonPerch", world = "World1", name = "Лунный окунь", rarity = "Epic", price = 90, minW = 0.5, maxW = 2, size = 1.0, shape = "classic", color = Color3.fromRGB(200, 215, 240), color2 = Color3.fromRGB(90, 110, 170), stripes = 5, glow = true, spikes = true, + chance = 150, cond = { night = true, perfect = true }, hint = "Ночью лови меня точным броском — я ношу на боках фазы луны" }), + F({ id = "StormPike", world = "World1", name = "Грозовая щука", rarity = "Epic", price = 110, minW = 2, maxW = 12, size = 1.6, shape = "long", color = Color3.fromRGB(70, 80, 120), color2 = Color3.fromRGB(120, 220, 255), stripes = 6, glow = true, + chance = 80, cond = { weathers = { Storm = true } }, hint = "Я прихожу только с громом. Держи удочку крепче — бьюсь током" }), + F({ id = "BarrelFish", world = "World1", name = "Рыба-бочонок", rarity = "Rare", price = 55, minW = 3, maxW = 9, size = 1.2, shape = "puffer", color = Color3.fromRGB(140, 95, 55), color2 = Color3.fromRGB(70, 70, 75), stripes = 3, + chance = 200, cond = { minCombo = 5 }, hint = "Кто ловит без промаха пять раз подряд, тому я выкачусь из воды" }), + F({ id = "KingKaras", world = "World1", name = "Карась-король", rarity = "Legendary", price = 260, minW = 1, maxW = 3, size = 1.3, shape = "tall", color = Color3.fromRGB(230, 190, 70), color2 = Color3.fromRGB(255, 220, 90), glow = true, bigTail = true, + chance = 400, cond = { replaces = "Karas" }, hint = "Среди тысяч простых карасей прячется тот, кто правит ими всеми" }), + F({ id = "BottleFish", world = "World1", name = "Бутылочная рыба", rarity = "Rare", price = 45, minW = 0.3, maxW = 1, size = 0.9, shape = "long", color = Color3.fromRGB(120, 190, 150), color2 = Color3.fromRGB(240, 230, 200), glass = true, + chance = 300, cond = {}, hint = "Я несу чьё-то письмо. Может, оно и тебе адресовано" }), + F({ id = "FrogSom", world = "World1", name = "Лягушачий сом", rarity = "Epic", price = 100, minW = 4, maxW = 20, size = 1.7, shape = "long", color = Color3.fromRGB(90, 140, 60), color2 = Color3.fromRGB(220, 230, 120), spots = 10, whiskers = true, + chance = 120, cond = { weathers = { Fog = true } }, hint = "В тумане у камышей кто-то квакает басом" }), + F({ id = "Hermit", world = "World1", name = "Рыба-отшельник", rarity = "Legendary", price = 240, minW = 0.5, maxW = 2, size = 1.0, shape = "puffer", color = Color3.fromRGB(220, 120, 90), color2 = Color3.fromRGB(240, 220, 190), spikes = true, + chance = 60, cond = { hours = { 2, 3 } }, hint = "Выхожу из домика-ракушки лишь с двух до трёх ночи" }), + F({ id = "Firefly", world = "World1", name = "Светлячковая плотва", rarity = "Rare", price = 38, minW = 0.2, maxW = 1, size = 0.9, shape = "classic", color = Color3.fromRGB(180, 230, 120), color2 = Color3.fromRGB(255, 240, 120), glow = true, spots = 6, + chance = 40, cond = { night = true, bait = "Firefly" }, hint = "Свет тянется к свету. Ночью предложи мне светлячка" }), + F({ id = "OldBoot", world = "World1", name = "Старый сапог с глазами", rarity = "Uncommon", price = 1, minW = 0.8, maxW = 1.5, size = 1.0, shape = "puffer", color = Color3.fromRGB(80, 60, 45), color2 = Color3.fromRGB(50, 40, 30), + chance = 250, cond = {}, secret = true, rumor = "Один рыбак клялся, что на крючке у него моргнул сапог" }), + F({ id = "Ghost", world = "World1", name = "Призрачная рыба", rarity = "Mythic", price = 1200, minW = 1, maxW = 5, size = 1.4, shape = "classic", color = Color3.fromRGB(220, 240, 255), color2 = Color3.fromRGB(160, 200, 255), glass = true, glow = true, bigTail = true, + chance = 600, cond = { night = true, weathers = { Fog = true } }, secret = true, rumor = "Туманной ночью над озером видели рыбу, сквозь которую светят звёзды" }), + F({ id = "LakeHeart", world = "World1", name = "Сердце озера", rarity = "Mythic", price = 2000, minW = 5, maxW = 15, size = 1.8, shape = "jelly", color = Color3.fromRGB(255, 90, 120), color2 = Color3.fromRGB(255, 200, 220), glow = true, glass = true, + chance = 1500, cond = { event = "Stars", perfect = true }, secret = true, rumor = "Когда падают звёзды, бросай точно в центр — озеро может отдать своё сердце" }), + + -- 🏝 Тропический остров + F({ id = "CoconutUrchin", world = "World2", name = "Кокосовый ёж", rarity = "Rare", price = 70, minW = 1, maxW = 4, size = 1.1, shape = "puffer", color = Color3.fromRGB(130, 90, 55), color2 = Color3.fromRGB(230, 220, 200), spikes = true, spots = 3, + chance = 120, cond = { day = true }, hint = "Днём я сплю под пальмой и притворяюсь орехом" }), + F({ id = "PiratePerch", world = "World2", name = "Пиратский окунь", rarity = "Epic", price = 160, minW = 1, maxW = 6, size = 1.2, shape = "classic", color = Color3.fromRGB(60, 60, 70), color2 = Color3.fromRGB(230, 40, 40), stripes = 3, teeth = true, + chance = 150, cond = { minCombo = 8 }, hint = "Йо-хо-хо! Покажи мне серию из восьми — и я отдам тебе сокровище" }), + F({ id = "RainbowParrot", world = "World2", name = "Радужный попугай", rarity = "Legendary", price = 420, minW = 2, maxW = 8, size = 1.3, shape = "classic", color = Color3.fromRGB(80, 230, 200), color2 = Color3.fromRGB(255, 90, 200), spots = 9, glow = true, + chance = 200, cond = { weathers = { Rain = true }, day = true }, hint = "Дождь и солнце вместе — и я раскрашу небо" }), + F({ id = "InkSquid", world = "World2", name = "Чернильный кальмарчик", rarity = "Epic", price = 150, minW = 0.5, maxW = 3, size = 1.2, shape = "jelly", color = Color3.fromRGB(70, 50, 110), color2 = Color3.fromRGB(20, 10, 40), + chance = 120, cond = { night = true }, hint = "Ночью я пишу чернилами по воде" }), + F({ id = "TreasureMimic", world = "World2", name = "Рыба-сундук", rarity = "Mythic", price = 2500, minW = 10, maxW = 40, size = 1.8, shape = "puffer", color = Color3.fromRGB(150, 100, 50), color2 = Color3.fromRGB(255, 205, 60), glow = true, teeth = true, + chance = 1200, cond = { event = "Fair" }, secret = true, rumor = "На рыбной ярмарке кто-то выловил сундук с зубами" }), + + -- ❄ Ледяной фьорд + F({ id = "FrozenCube", world = "World3", name = "Рыба во льду", rarity = "Epic", price = 300, minW = 5, maxW = 30, size = 1.6, shape = "puffer", color = Color3.fromRGB(190, 230, 255), color2 = Color3.fromRGB(240, 250, 255), glass = true, + chance = 200, cond = {}, hint = "Я вмёрз в лёд так давно, что сам забыл, кто я" }), + F({ id = "TrollSom", world = "World3", name = "Снежный тролль-сом", rarity = "Legendary", price = 800, minW = 50, maxW = 300, size = 2.2, shape = "long", color = Color3.fromRGB(220, 225, 235), color2 = Color3.fromRGB(140, 160, 190), whiskers = true, spikes = true, + chance = 150, cond = { weathers = { Storm = true, Rain = true } }, hint = "В метель под лунками бродит лохматый великан" }), + F({ id = "AuroraFish", world = "World3", name = "Рыба северного сияния", rarity = "Legendary", price = 850, minW = 2, maxW = 10, size = 1.4, shape = "classic", color = Color3.fromRGB(90, 255, 180), color2 = Color3.fromRGB(190, 110, 255), glow = true, bigTail = true, + chance = 120, cond = { night = true, perfect = true }, hint = "Ночное небо отражается во мне — бросай точно" }), + F({ id = "Mammoth", world = "World3", name = "Рыба-мамонт", rarity = "Mythic", price = 4000, minW = 500, maxW = 2000, size = 2.6, shape = "sturgeon", color = Color3.fromRGB(130, 95, 70), color2 = Color3.fromRGB(240, 230, 210), whiskers = true, + chance = 1500, cond = { minLevel = 22, night = true }, secret = true, rumor = "Старейшие рыбаки фьорда шепчут о ночном великане с бивнями" }), +} +-- жемчуг за первую поимку каждой диковинки (секретная — больше) +Config.CurioPearls = { first = 3, secret = 10 } +Config.CurioById = {} +for _, f in ipairs(Config.Curios) do + Config.CurioById[f.id] = f +end + ---------------------------------------------------------------- удочки -- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны, -- icon = картинка удочки в хотбаре (Tool.TextureId). @@ -889,6 +955,10 @@ function Config.FindFish(fishId) end end end + local c = Config.CurioById[fishId] + if c then + return c, c.world + end return nil end diff --git a/src/ServerScriptService/GameServer.server.lua b/src/ServerScriptService/GameServer.server.lua index 4dcf8b2..813193c 100644 --- a/src/ServerScriptService/GameServer.server.lua +++ b/src/ServerScriptService/GameServer.server.lua @@ -58,7 +58,8 @@ local function feedCatch(player, fish, world) name = player.DisplayName, userId = player.UserId, fish = fish.name, rarity = fish.rarity, mutation = fish.mutation, value = fish.value, world = world and (world.icon .. " " .. world.name) or nil, - big = r.rank >= F.announceRank or F.announceMutations[fish.mutation or ""] == true, + big = r.rank >= F.announceRank or F.announceMutations[fish.mutation or ""] == true or fish.curio == true, + curio = fish.curio, } feed("catch", info) if r.rank >= F.globalRank or F.globalMutations[fish.mutation or ""] then @@ -973,7 +974,57 @@ local function stopFishing(player, tellClient) end end --- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля), potion = Potions.effect } +-- диковинка вместо обычной рыбы (Config.Curios): все условия выполнены и сработал шанс 1 к chance +local function curioCondOk(player, data, cond, chosen, mods) + if cond.night and not isNight() then + return false + end + if cond.day and isNight() then + return false + end + if cond.weathers and not cond.weathers[workspace:GetAttribute("Weather") or "Clear"] then + return false + end + if cond.perfect and not mods.perfect then + return false + end + if cond.event and not (currentEvent and currentEvent.id == cond.event) then + return false + end + if cond.bait and not (mods.bait and mods.bait.id == cond.bait) then + return false + end + if cond.replaces and chosen.id ~= cond.replaces then + return false + end + if cond.minCombo and (combo[player] or 0) < cond.minCombo then + return false + end + if cond.minLevel and (data.level or 1) < cond.minLevel then + return false + end + if cond.hours then + local h = Config.ClockAt(workspace:GetServerTimeNow(), workspace:GetAttribute("DayStart")) + local a, b = cond.hours[1], cond.hours[2] + local inside = (a <= b) and (h >= a and h < b) or (h >= a or h < b) + if not inside then + return false + end + end + return true +end + +local function pickCurio(player, data, worldId, chosen, mods) + for _, c in ipairs(Config.Curios) do + if c.world == worldId and curioCondOk(player, data, c.cond or {}, chosen, mods) and rng:NextNumber() < 1 / c.chance then + return c + end + end + return nil +end + +-- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля), potion = Potions.effect, +-- manual = ручной заброс (только он может поймать диковинку), perfect = заброс в зелёную зону } -- Удача смягчается к потолку (Config.EffectiveLuck): лучшее снаряжение даёт больше дорогой рыбы, -- но мифическая не становится обычной, а мутации не чаще × Economy.mutationCap local function rollFish(player, data, worldId, luckMult, mods) @@ -1015,6 +1066,10 @@ local function rollFish(player, data, worldId, luckMult, mods) break end end + local curio = mods.manual and pickCurio(player, data, worldId, chosen, mods) or nil + if curio then + chosen = curio + end local mutation = nil local mm = Config.MutationMult(beff, ev("mutation", 1) * (weather().mutation or 1) * (bait and bait.mutation or 1) * (pot.mutation or 1)) for _, m in ipairs(Config.Mutations) do @@ -1033,6 +1088,7 @@ local function rollFish(player, data, worldId, luckMult, mods) value = math.floor(chosen.price * (0.75 + 0.9 * wf) * (mutation and mutation.mult or 1) + 0.5), mutation = mutation and mutation.id or nil, world = worldId, + curio = curio ~= nil or nil, } end @@ -1123,7 +1179,7 @@ local function onCast(player, power) local bait = Guild.useBait(player, data) -- 1 штука наживки на заброс -- зелье: эффект берём на момент заброса, попытку списываем при поклёвке (ниже) local potion = Potions.effect(data) - local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait, potion = potion }) + local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait, potion = potion, manual = true, perfect = perfect }) if not fish then remote:FireClient(player, "CastFail") return @@ -1288,6 +1344,33 @@ grantFish = function(player, data, fish, ctx) local h = player.Character and player.Character:FindFirstChild("HumanoidRootPart") feedCatch(player, fish, h and Config.WorldAt(h.Position)) end + -- диковинка: всем на сервере, а первая поимка — ещё и жемчуг + if fish.curio then + local def = Config.CurioById[fish.id] + for _, p in ipairs(Players:GetPlayers()) do + notify(p, ("✨ %s поймал диковинку: %s!"):format(player.DisplayName, fish.name), Config.Rarities[fish.rarity].color) + end + -- бутылочная рыба несёт записку: подсказку к диковинке, которой у игрока ещё нет (секретные — тоже) + if fish.id == "BottleFish" then + local left = {} + for _, c in ipairs(Config.Curios) do + if not data.discovered[c.id] and c.id ~= "BottleFish" then + table.insert(left, c) + end + end + local c = left[rng:NextInteger(1, math.max(1, #left))] + if c then + notify(player, ("📜 В бутылке записка: «%s»"):format(c.hint or c.rumor or "Здесь водится то, о чём молчат даже старейшины…"), Color3.fromRGB(240, 225, 180)) + end + end + if isNew then + local pearls = def and def.secret and Config.CurioPearls.secret or Config.CurioPearls.first + data.pearls += pearls + notify(player, ("📖 Новая диковинка в коллекции! +%d 🦪"):format(pearls), GOLD) + Telemetry.event(player, "CurioFirst", 1, { fish.id }) + updateStats(player) + end + end local rank = Config.Rarities[fish.rarity].rank -- задания засчитывают только ручную ловлю (автоловля — дополнительный доход, не прогресс)