update
This commit is contained in:
commit
73a2db8bb8
5 files changed
+3679748
No files matched your search
@@ -426,7 +426,11 @@ local function claimCollection(player, worldId, rarity)
|
||||
if rarity == "Master" then
|
||||
local coins = Config.MasteryCoins * world.mult
|
||||
data.coins += coins
|
||||
<<<<<<< HEAD
|
||||
notify(player, ("🏆 «%s» собран! +%d ⚪"):format(world.name, coins), GOLD)
|
||||
=======
|
||||
notify(player, ("🏆 «%s» собран! +%d 💰"):format(world.name, coins), GOLD)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
else
|
||||
local r = Config.CollectionRewards[rarity]
|
||||
if not r then
|
||||
@@ -434,7 +438,11 @@ local function claimCollection(player, worldId, rarity)
|
||||
end
|
||||
data.coins += r.coins * world.mult
|
||||
addXp(player, data, r.xp * world.mult)
|
||||
<<<<<<< HEAD
|
||||
notify(player, ("📖 +%d ⚪ +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN)
|
||||
=======
|
||||
notify(player, ("📖 +%d 💰 +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
end
|
||||
updateStats(player)
|
||||
sendInventory(player)
|
||||
@@ -758,12 +766,17 @@ local function stopFishing(player, tellClient)
|
||||
end
|
||||
end
|
||||
|
||||
<<<<<<< HEAD
|
||||
-- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля) }
|
||||
local function rollFish(player, data, worldId, luckMult, mods)
|
||||
=======
|
||||
local function rollFish(player, data, worldId, luckMult)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
local zone = Config.Zones[worldId]
|
||||
if not zone then
|
||||
return nil
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
mods = mods or {}
|
||||
local bait = mods.bait
|
||||
local base = totalLuck(player, data) + (bait and bait.luck or 0)
|
||||
@@ -771,6 +784,9 @@ local function rollFish(player, data, worldId, luckMult, mods)
|
||||
base += bait.nightLuck - Config.DayNight.nightLuck -- светлячок: ночью +30% вместо обычных +10%
|
||||
end
|
||||
local luck = base * (luckMult or 1)
|
||||
=======
|
||||
local luck = totalLuck(player, data) * (luckMult or 1)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
local bonus = luck - 1
|
||||
local weights, total = {}, 0
|
||||
for i, f in ipairs(zone.fish) do
|
||||
@@ -855,9 +871,12 @@ local function flyBobber(s, tool, target, dur, arc)
|
||||
end
|
||||
end
|
||||
|
||||
<<<<<<< HEAD
|
||||
local autoFishing = {} -- [player] = токен работающей автоловли
|
||||
local setAutoFish, grantFish -- объявлены ниже
|
||||
|
||||
=======
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
local function onCast(player, power)
|
||||
power = math.clamp(tonumber(power) or 0.6, 0, 1)
|
||||
local data = profiles[player]
|
||||
@@ -902,8 +921,12 @@ local function onCast(player, power)
|
||||
|
||||
local stats = Config.RodStats(data.rod, rodLevel(data))
|
||||
local perfect = power >= Config.CastPerfect[1] and power <= Config.CastPerfect[2]
|
||||
<<<<<<< HEAD
|
||||
local bait = Guild.useBait(player, data) -- 1 штука наживки на заброс
|
||||
local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait })
|
||||
=======
|
||||
local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
if not fish then
|
||||
remote:FireClient(player, "CastFail")
|
||||
return
|
||||
@@ -1007,6 +1030,7 @@ local function onCatch(player, success, misses)
|
||||
grantFish(player, data, s.fish, { perfect = s.perfect, misses = misses, fromPos = fromPos })
|
||||
end
|
||||
|
||||
<<<<<<< HEAD
|
||||
-- рыба поймана (руками или автоловлей): в сумку, опыт, коллекция, задания, гильдия, босс.
|
||||
-- ctx: { perfect, misses, fromPos, auto }; у автоловли нет серии и бонусов за точность
|
||||
grantFish = function(player, data, fish, ctx)
|
||||
@@ -1020,6 +1044,15 @@ grantFish = function(player, data, fish, ctx)
|
||||
setCombo(player, streak + 1)
|
||||
end
|
||||
fish.xp = math.floor(fish.xp * Guild.xpMult(data)) -- бонус отдыха: двойной опыт
|
||||
=======
|
||||
-- серия: каждая рыба подряд дороже и даёт больше опыта
|
||||
local fish = s.fish
|
||||
local streak = combo[player] or 0
|
||||
local comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak)
|
||||
fish.value = math.floor(fish.value * comboMult + 0.5)
|
||||
fish.xp = math.floor(fish.xp * comboMult + 0.5)
|
||||
setCombo(player, streak + 1)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
table.insert(data.items, {
|
||||
uid = data.nextUid, id = fish.id, name = fish.name, rarity = fish.rarity,
|
||||
weight = fish.weight, value = fish.value, mutation = fish.mutation,
|
||||
@@ -1045,7 +1078,11 @@ grantFish = function(player, data, fish, ctx)
|
||||
if ctx.fromPos then
|
||||
showFishFlight(player, fish, ctx.fromPos)
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = ctx.auto and 0 or streak + 1, auto = ctx.auto })
|
||||
=======
|
||||
remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = streak + 1 })
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
|
||||
local rank = Config.Rarities[fish.rarity].rank
|
||||
questProgress(player, "catch", 1)
|
||||
@@ -1055,6 +1092,7 @@ grantFish = function(player, data, fish, ctx)
|
||||
if rank >= 3 then
|
||||
questProgress(player, "rare", 1)
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
if not ctx.auto then
|
||||
if ctx.misses == 0 then
|
||||
questProgress(player, "perfect", 1)
|
||||
@@ -1208,7 +1246,18 @@ setAutoFish = function(player, on, reason)
|
||||
stopFishing(player, false)
|
||||
end
|
||||
notify(player, reason or "🎣 Автоловля выключена", Color3.fromRGB(255, 200, 120))
|
||||
=======
|
||||
if misses == 0 then
|
||||
questProgress(player, "perfect", 1)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
end
|
||||
if s.perfect then
|
||||
questProgress(player, "perfectCast", 1)
|
||||
end
|
||||
questProgress(player, "combo", streak + 1, true)
|
||||
|
||||
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
|
||||
bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (misses == 0 and 1 or 0))
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- скупка
|
||||
@@ -1287,7 +1336,11 @@ local function buy(player, kind, id)
|
||||
end
|
||||
local cost = Guild.price(data, Config.UpgradeCost(rod, lvl)) -- скидка ранга гильдии
|
||||
if data.coins < cost then
|
||||
<<<<<<< HEAD
|
||||
notify(player, "Нужно " .. cost .. " ⚪", RED)
|
||||
=======
|
||||
notify(player, "Нужно " .. cost .. " 💰", RED)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
return
|
||||
end
|
||||
data.coins -= cost
|
||||
@@ -1310,9 +1363,14 @@ local function buy(player, kind, id)
|
||||
notify(player, "🔒 Нужен ур. " .. potion.level, RED)
|
||||
return
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
local price = Guild.price(data, potion.price)
|
||||
if data.coins < price then
|
||||
notify(player, "Нужно " .. price .. " ⚪", RED)
|
||||
=======
|
||||
if data.coins < potion.price then
|
||||
notify(player, "Нужно " .. potion.price .. " 💰", RED)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
return
|
||||
end
|
||||
data.coins -= price
|
||||
@@ -1340,9 +1398,14 @@ local function buy(player, kind, id)
|
||||
notify(player, "🔒 Нужен ур. " .. item.level, RED)
|
||||
return
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
local price = Guild.price(data, item.price)
|
||||
if data.coins < price then
|
||||
notify(player, "Нужно " .. price .. " ⚪", RED)
|
||||
=======
|
||||
if data.coins < item.price then
|
||||
notify(player, "Нужно " .. item.price .. " 💰", RED)
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
return
|
||||
end
|
||||
data.coins -= price
|
||||
@@ -1392,11 +1455,14 @@ local function teleportTo(player, worldId)
|
||||
end
|
||||
if data.level < world.level then
|
||||
notify(player, ("🔒 %s: ур. %d"):format(world.name, world.level), RED)
|
||||
<<<<<<< HEAD
|
||||
return
|
||||
end
|
||||
local okRank, why = Guild.canEnter(data, world.id)
|
||||
if not okRank then
|
||||
notify(player, why, RED)
|
||||
=======
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
return
|
||||
end
|
||||
markerName = world.id .. "Spawn"
|
||||
@@ -1495,13 +1561,21 @@ remote.OnServerEvent:Connect(function(player, action, a, b)
|
||||
if nearSeller(player) then
|
||||
sellItems(player, a)
|
||||
else
|
||||
<<<<<<< HEAD
|
||||
notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
=======
|
||||
notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
end
|
||||
elseif action == "SellAll" then
|
||||
if nearSeller(player) then
|
||||
sellItems(player, nil)
|
||||
else
|
||||
<<<<<<< HEAD
|
||||
notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
=======
|
||||
notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
end
|
||||
elseif action == "Teleport" then
|
||||
teleportTo(player, a)
|
||||
@@ -1655,7 +1729,10 @@ local function finishBoss(won)
|
||||
if potion then
|
||||
applyPotion(data, potion.bonus, potion.duration)
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
Guild.onBossWin(p, data)
|
||||
=======
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
updateStats(p)
|
||||
remote:FireClient(p, "BossReward", coins, xp, potion and potion.name)
|
||||
end
|
||||
@@ -1725,8 +1802,11 @@ local function onPlayerAdded(player)
|
||||
end
|
||||
loadPasses(player)
|
||||
ensureChain(data)
|
||||
<<<<<<< HEAD
|
||||
Guild.defaults(data)
|
||||
Guild.onJoin(player, data)
|
||||
=======
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
profiles[player] = data
|
||||
loadedOk[player] = ok
|
||||
local settings = type(data.settings) == "table" and data.settings or {}
|
||||
@@ -1759,10 +1839,13 @@ end
|
||||
Players.PlayerRemoving:Connect(function(player)
|
||||
stopFishing(player, false)
|
||||
combo[player], comboUntil[player] = nil, nil
|
||||
<<<<<<< HEAD
|
||||
autoFishing[player] = nil
|
||||
if profiles[player] then
|
||||
Guild.onLeave(profiles[player])
|
||||
end
|
||||
=======
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
saveData(player)
|
||||
profiles[player] = nil
|
||||
loadedOk[player] = nil
|
||||
@@ -1803,10 +1886,13 @@ task.spawn(function()
|
||||
if data and data.boostUntil > os.time() - 2 then
|
||||
updateStats(p)
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
-- бонус отдыха тратится, пока игрок рыбачит
|
||||
if data and (fishing[p] or autoFishing[p]) then
|
||||
Guild.spendRest(p, data, 1)
|
||||
end
|
||||
=======
|
||||
>>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806
|
||||
-- серия сгорает, если долго нет улова (пока рыба на крючке — ждём)
|
||||
if comboUntil[p] and os.time() > comboUntil[p] and not fishing[p] then
|
||||
breakCombo(p)
|
||||
|
||||
Reference in new issue
Block a user