Рыба
This commit is contained in:
1 parent
ee3a493940
commit
19595c3caa
7 files changed
+196
-55
No files matched your search
Binary file not shown.
@@ -30,7 +30,7 @@
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| World1 | 50.8 | 8.6 | 2.6 | 1.6 | 2.0 | −2.0 | **63.6** | 60 |
|
||||
| World2 | 97.4 | 17.9 | 5.2 | 3.2 | 3.9 | −6.0 | **121.7** | 120 |
|
||||
| World3 | 187.8 | 37.6 | 10.3 | 6.5 | 7.9 | −12.0 | **238.1** | 240 |
|
||||
| World3 | 188.9 | 37.6 | 10.3 | 6.5 | 7.9 | −12.0 | **239.2** | 240 |
|
||||
|
||||
До v2, та же модель (4 рыбы/мин): World1: 434.2 ⚪/мин, World2: 1593.6 ⚪/мин, World3: 9736.1 ⚪/мин
|
||||
|
||||
@@ -44,16 +44,16 @@
|
||||
| World2 | Carbon | 1.51 | 19.3 | 5.86 | 0.168 |
|
||||
| World2 | Coral | 1.66 | 20.3 | 6.3 | 0.184 |
|
||||
| World2 | Golden | 1.81 | 21.3 | 6.69 | 0.199 |
|
||||
| World3 | Frost | 2.11 | 40.3 | 7.4 | 0.226 |
|
||||
| World3 | Legend | 2.31 | 42.1 | 7.8 | 0.241 |
|
||||
| World3 | Frost | 2.11 | 40.5 | 7.4 | 0.226 |
|
||||
| World3 | Legend | 2.31 | 42.4 | 7.8 | 0.241 |
|
||||
|
||||
## Маршрут покупок (жадный, модель)
|
||||
|
||||
| Сценарий | первая покупка | Bamboo | Fiberglass | Carbon | Coral | Golden | Frost | Legend |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| Новичок 3/мин | 18 мин | 18 мин | 1 ч 00 мин | 2 ч 40 мин | 4 ч 20 мин | 8 ч 58 мин | 15 ч 38 мин | — |
|
||||
| Обычный 4/мин | 13 мин | 13 мин | 46 мин | 2 ч 00 мин | 3 ч 15 мин | 6 ч 41 мин | 11 ч 46 мин | 21 ч 56 мин |
|
||||
| Опытный 5/мин | 11 мин | 11 мин | 36 мин | 1 ч 37 мин | 2 ч 36 мин | 5 ч 24 мин | 9 ч 28 мин | 17 ч 41 мин |
|
||||
| Обычный 4/мин | 13 мин | 13 мин | 46 мин | 2 ч 00 мин | 3 ч 15 мин | 6 ч 41 мин | 11 ч 45 мин | 21 ч 53 мин |
|
||||
| Опытный 5/мин | 11 мин | 11 мин | 36 мин | 1 ч 37 мин | 2 ч 36 мин | 5 ч 24 мин | 9 ч 27 мин | 17 ч 39 мин |
|
||||
| Платные пропуска 4/мин | 9 мин | 13 мин | 40 мин | 2 ч 00 мин | 3 ч 15 мин | 5 ч 35 мин | 11 ч 00 мин | 21 ч 40 мин |
|
||||
| До v2, 4/мин | — | 1 мин | 4 мин | 12 мин | 17 мин | 25 мин | 48 мин | 1 ч 11 мин |
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|---|---:|---:|---:|---:|---:|
|
||||
| World1 | 44.0 | 10.1 | 3.33 | 20 | 0 |
|
||||
| World2 | 85.9 | 19.8 | 3.33 | 28 | 0 |
|
||||
| World3 | 169.5 | 36.1 | 3.33 | 36 | 0 |
|
||||
| World3 | 170.5 | 36.1 | 3.33 | 36 | 0 |
|
||||
|
||||
## Допущения
|
||||
|
||||
|
||||
@@ -287,22 +287,22 @@
|
||||
"Frost+3"
|
||||
],
|
||||
[
|
||||
1065,
|
||||
1064,
|
||||
"upgrade",
|
||||
"Frost+4"
|
||||
],
|
||||
[
|
||||
1108,
|
||||
1107,
|
||||
"bag",
|
||||
"Chest"
|
||||
],
|
||||
[
|
||||
1219,
|
||||
1218,
|
||||
"upgrade",
|
||||
"Frost+5"
|
||||
],
|
||||
[
|
||||
1328,
|
||||
1326,
|
||||
"bag",
|
||||
"Magic"
|
||||
]
|
||||
@@ -339,17 +339,17 @@
|
||||
"minutes": 720
|
||||
},
|
||||
"World3": {
|
||||
"fish": 139.3,
|
||||
"fish": 140.1,
|
||||
"quests": 28.1,
|
||||
"cons": 12.0,
|
||||
"boss": 10.3,
|
||||
"orders": 6.5,
|
||||
"daily": 7.9,
|
||||
"net": 180.1,
|
||||
"net": 180.9,
|
||||
"minutes": 520
|
||||
}
|
||||
},
|
||||
"coins_left": 13203
|
||||
"coins_left": 13612
|
||||
},
|
||||
"Обычный 4/мин": {
|
||||
"purchases": [
|
||||
@@ -514,7 +514,7 @@
|
||||
"Golden+5"
|
||||
],
|
||||
[
|
||||
706,
|
||||
705,
|
||||
"rod",
|
||||
"Frost"
|
||||
],
|
||||
@@ -524,12 +524,12 @@
|
||||
"Frost+1"
|
||||
],
|
||||
[
|
||||
732,
|
||||
731,
|
||||
"upgrade",
|
||||
"Frost+2"
|
||||
],
|
||||
[
|
||||
761,
|
||||
760,
|
||||
"upgrade",
|
||||
"Frost+3"
|
||||
],
|
||||
@@ -539,32 +539,32 @@
|
||||
"Frost+4"
|
||||
],
|
||||
[
|
||||
835,
|
||||
834,
|
||||
"bag",
|
||||
"Chest"
|
||||
],
|
||||
[
|
||||
920,
|
||||
919,
|
||||
"upgrade",
|
||||
"Frost+5"
|
||||
],
|
||||
[
|
||||
1003,
|
||||
1002,
|
||||
"bag",
|
||||
"Magic"
|
||||
],
|
||||
[
|
||||
1316,
|
||||
1313,
|
||||
"rod",
|
||||
"Legend"
|
||||
],
|
||||
[
|
||||
1334,
|
||||
1331,
|
||||
"upgrade",
|
||||
"Legend+1"
|
||||
],
|
||||
[
|
||||
1376,
|
||||
1373,
|
||||
"upgrade",
|
||||
"Legend+2"
|
||||
]
|
||||
@@ -576,8 +576,8 @@
|
||||
"Carbon": 120,
|
||||
"Coral": 195,
|
||||
"Golden": 401,
|
||||
"Frost": 706,
|
||||
"Legend": 1316
|
||||
"Frost": 705,
|
||||
"Legend": 1313
|
||||
},
|
||||
"income": {
|
||||
"World1": {
|
||||
@@ -601,17 +601,17 @@
|
||||
"minutes": 540
|
||||
},
|
||||
"World3": {
|
||||
"fish": 187.8,
|
||||
"fish": 188.9,
|
||||
"quests": 37.6,
|
||||
"cons": 12.0,
|
||||
"boss": 10.3,
|
||||
"orders": 6.5,
|
||||
"daily": 7.9,
|
||||
"net": 238.1,
|
||||
"net": 239.2,
|
||||
"minutes": 740
|
||||
}
|
||||
},
|
||||
"coins_left": 12083
|
||||
"coins_left": 12883
|
||||
},
|
||||
"Опытный 5/мин": {
|
||||
"purchases": [
|
||||
@@ -771,7 +771,7 @@
|
||||
"Golden+5"
|
||||
],
|
||||
[
|
||||
568,
|
||||
567,
|
||||
"rod",
|
||||
"Frost"
|
||||
],
|
||||
@@ -781,7 +781,7 @@
|
||||
"Frost+1"
|
||||
],
|
||||
[
|
||||
589,
|
||||
588,
|
||||
"upgrade",
|
||||
"Frost+2"
|
||||
],
|
||||
@@ -791,7 +791,7 @@
|
||||
"Frost+3"
|
||||
],
|
||||
[
|
||||
646,
|
||||
645,
|
||||
"upgrade",
|
||||
"Frost+4"
|
||||
],
|
||||
@@ -801,42 +801,42 @@
|
||||
"Chest"
|
||||
],
|
||||
[
|
||||
741,
|
||||
740,
|
||||
"upgrade",
|
||||
"Frost+5"
|
||||
],
|
||||
[
|
||||
808,
|
||||
807,
|
||||
"bag",
|
||||
"Magic"
|
||||
],
|
||||
[
|
||||
1061,
|
||||
1059,
|
||||
"rod",
|
||||
"Legend"
|
||||
],
|
||||
[
|
||||
1076,
|
||||
1073,
|
||||
"upgrade",
|
||||
"Legend+1"
|
||||
],
|
||||
[
|
||||
1110,
|
||||
1107,
|
||||
"upgrade",
|
||||
"Legend+2"
|
||||
],
|
||||
[
|
||||
1165,
|
||||
1162,
|
||||
"upgrade",
|
||||
"Legend+3"
|
||||
],
|
||||
[
|
||||
1243,
|
||||
1240,
|
||||
"upgrade",
|
||||
"Legend+4"
|
||||
],
|
||||
[
|
||||
1346,
|
||||
1343,
|
||||
"upgrade",
|
||||
"Legend+5"
|
||||
]
|
||||
@@ -848,8 +848,8 @@
|
||||
"Carbon": 97,
|
||||
"Coral": 156,
|
||||
"Golden": 324,
|
||||
"Frost": 568,
|
||||
"Legend": 1061
|
||||
"Frost": 567,
|
||||
"Legend": 1059
|
||||
},
|
||||
"income": {
|
||||
"World1": {
|
||||
@@ -873,17 +873,17 @@
|
||||
"minutes": 432
|
||||
},
|
||||
"World3": {
|
||||
"fish": 238.0,
|
||||
"fish": 239.4,
|
||||
"quests": 47.2,
|
||||
"cons": 12.0,
|
||||
"boss": 10.3,
|
||||
"orders": 6.5,
|
||||
"daily": 7.9,
|
||||
"net": 297.9,
|
||||
"net": 299.3,
|
||||
"minutes": 872
|
||||
}
|
||||
},
|
||||
"coins_left": 41290
|
||||
"coins_left": 42506
|
||||
},
|
||||
"Платные пропуска 4/мин": {
|
||||
"purchases": [
|
||||
@@ -1180,17 +1180,17 @@
|
||||
"minutes": 540
|
||||
},
|
||||
"World3": {
|
||||
"fish": 536.0,
|
||||
"fish": 539.2,
|
||||
"quests": 38.7,
|
||||
"cons": 12.0,
|
||||
"boss": 10.3,
|
||||
"orders": 6.5,
|
||||
"daily": 7.9,
|
||||
"net": 587.4,
|
||||
"net": 590.6,
|
||||
"minutes": 740
|
||||
}
|
||||
},
|
||||
"coins_left": 331573
|
||||
"coins_left": 333940
|
||||
}
|
||||
},
|
||||
"income_before_4cpm": {
|
||||
@@ -1287,7 +1287,7 @@
|
||||
"world": "World3",
|
||||
"rod": "Frost",
|
||||
"luck": 2.11,
|
||||
"silver_per_catch": 40.3,
|
||||
"silver_per_catch": 40.5,
|
||||
"epic_plus": 7.4,
|
||||
"mythic": 0.226
|
||||
},
|
||||
@@ -1295,7 +1295,7 @@
|
||||
"world": "World3",
|
||||
"rod": "Legend",
|
||||
"luck": 2.31,
|
||||
"silver_per_catch": 42.1,
|
||||
"silver_per_catch": 42.4,
|
||||
"epic_plus": 7.8,
|
||||
"mythic": 0.241
|
||||
}
|
||||
@@ -1323,7 +1323,7 @@
|
||||
},
|
||||
{
|
||||
"world": "World3",
|
||||
"manual_fish_silver_min": 169.5,
|
||||
"manual_fish_silver_min": 170.5,
|
||||
"auto_silver_min": 36.1,
|
||||
"auto_catches_min": 3.33,
|
||||
"auto_xp_min": 0,
|
||||
|
||||
@@ -324,8 +324,12 @@ Config.Zones = {
|
||||
F({ id = "Wolffish", name = "Морской волк", rarity = "Rare", price = 52, minW = 3.0, maxW = 20, size = 1.7, shape = "long", color = Color3.fromRGB(110, 120, 140), color2 = Color3.fromRGB(60, 65, 80), stripes = 7, teeth = true }),
|
||||
F({ id = "Angler", name = "Удильщик", rarity = "Epic", price = 143, minW = 5.0, maxW = 50, size = 1.6, shape = "angler", color = Color3.fromRGB(60, 50, 70), color2 = Color3.fromRGB(120, 255, 230), glow = true }),
|
||||
F({ id = "IceEel", name = "Ледяная мурена", rarity = "Epic", price = 131, minW = 3.0, maxW = 25, size = 1.9, shape = "eel", color = Color3.fromRGB(150, 210, 245), color2 = Color3.fromRGB(240, 250, 255), glass = true }),
|
||||
F({ id = "Greenland", name = "Полярная акула", rarity = "Legendary", price = 460, minW = 200, maxW = 900, size = 2.6, shape = "shark", color = Color3.fromRGB(80, 90, 100), color2 = Color3.fromRGB(160, 170, 180) }),
|
||||
F({ id = "Leviathan", name = "Ледяной левиафан", rarity = "Mythic", price = 1970, minW = 500, maxW = 3000, size = 2.4, shape = "eel", color = Color3.fromRGB(110, 230, 255), color2 = Color3.fromRGB(200, 120, 255), glow = true, spikes = true }),
|
||||
-- share — доля вида в весе своей редкости: две легендарки и две мифики фьорда делят шанс пополам,
|
||||
-- общий шанс редкости в мире тот же, что был с одной рыбой
|
||||
F({ id = "Greenland", name = "Полярная акула", rarity = "Legendary", price = 460, minW = 200, maxW = 900, size = 2.6, shape = "shark", color = Color3.fromRGB(80, 90, 100), color2 = Color3.fromRGB(160, 170, 180), share = 0.5 }),
|
||||
F({ id = "IcePhoenix", name = "Ледяной феникс", rarity = "Legendary", price = 480, minW = 3.0, maxW = 15, size = 1.6, shape = "classic", color = Color3.fromRGB(80, 200, 255), color2 = Color3.fromRGB(255, 150, 50), glow = true, share = 0.5 }),
|
||||
F({ id = "Leviathan", name = "Ледяной левиафан", rarity = "Mythic", price = 1970, minW = 500, maxW = 3000, size = 2.4, shape = "eel", color = Color3.fromRGB(110, 230, 255), color2 = Color3.fromRGB(200, 120, 255), glow = true, spikes = true, share = 0.5 }),
|
||||
F({ id = "StarChimera", name = "Звёздная химера", rarity = "Mythic", price = 2050, minW = 20, maxW = 120, size = 1.8, shape = "classic", color = Color3.fromRGB(170, 100, 255), color2 = Color3.fromRGB(255, 200, 70), glow = true, share = 0.5 }),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1044,7 +1044,7 @@ local function rollFish(player, data, worldId, luckMult, mods)
|
||||
local weights, total = {}, 0
|
||||
for i, f in ipairs(zone.fish) do
|
||||
local r = Config.Rarities[f.rarity]
|
||||
local w = Config.RarityWeight(f.rarity, beff)
|
||||
local w = Config.RarityWeight(f.rarity, beff) * (f.share or 1)
|
||||
if bait and bait.rareWeight and r.rank >= 3 then
|
||||
w *= bait.rareWeight
|
||||
end
|
||||
|
||||
@@ -584,6 +584,131 @@ local function npc(name, cf, colors, action, actionText)
|
||||
return setNpc(P({ Name = "NpcSpot", CFrame = cf }), name, colors, action, actionText)
|
||||
end
|
||||
|
||||
-- доска «кто водится» с иконками: на доске карточки (название, редкость), а над подписью в каждой
|
||||
-- карточке закреплена настоящая модель рыбы (ViewportFrame на SurfaceGui в мире не рисуется)
|
||||
local BESTIARY_ICONS = { World1 = true, World2 = true, World3 = true }
|
||||
|
||||
local function bestiaryIcons(board, zone)
|
||||
local oldFish = board:FindFirstChild("BestiaryFish")
|
||||
if oldFish then
|
||||
oldFish:Destroy()
|
||||
end
|
||||
local W, H = board.Size.X, board.Size.Y
|
||||
local PPS = 50
|
||||
local sg = Instance.new("SurfaceGui")
|
||||
sg.Name = "BestiaryText"
|
||||
sg.Face = Enum.NormalId.Front
|
||||
sg.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
|
||||
sg.PixelsPerStud = PPS
|
||||
sg.LightInfluence = 0
|
||||
sg.Parent = board
|
||||
local root = Instance.new("Frame")
|
||||
root.Size = UDim2.fromScale(1, 1)
|
||||
root.BackgroundTransparency = 1
|
||||
root.Parent = sg
|
||||
local pad = Instance.new("UIPadding")
|
||||
pad.PaddingLeft, pad.PaddingRight = UDim.new(0.03, 0), UDim.new(0.03, 0)
|
||||
pad.PaddingTop, pad.PaddingBottom = UDim.new(0.035, 0), UDim.new(0.035, 0)
|
||||
pad.Parent = root
|
||||
local title = Instance.new("TextLabel")
|
||||
title.Size = UDim2.fromScale(1, 0.11)
|
||||
title.BackgroundTransparency = 1
|
||||
title.Font = Enum.Font.FredokaOne
|
||||
title.TextScaled = true
|
||||
title.RichText = true
|
||||
title.TextColor3 = Color3.new(1, 1, 1)
|
||||
title.TextStrokeTransparency = 0.4
|
||||
title.Text = ("<font color=\"%s\">%s</font>"):format(board:GetAttribute("BestiaryHex") or "#FFFFFF", board:GetAttribute("BestiaryTitle") or "")
|
||||
title.Parent = root
|
||||
local grid = Instance.new("Frame")
|
||||
grid.Position = UDim2.fromScale(0, 0.13)
|
||||
grid.Size = UDim2.fromScale(1, 0.87)
|
||||
grid.BackgroundTransparency = 1
|
||||
grid.Parent = root
|
||||
-- 12 рыб — сетка 4×3, больше — 5 колонок (неполный ряд прижат влево, как и модели)
|
||||
local cols = #zone.fish <= 12 and 4 or 5
|
||||
local rows = math.ceil(#zone.fish / cols)
|
||||
local GAP = 8
|
||||
local lay = Instance.new("UIGridLayout")
|
||||
lay.CellPadding = UDim2.fromOffset(GAP, GAP)
|
||||
lay.CellSize = UDim2.new(1 / cols, -GAP, 1 / rows, -GAP)
|
||||
lay.SortOrder = Enum.SortOrder.LayoutOrder
|
||||
lay.Parent = grid
|
||||
-- та же раскладка в studs (для моделей): начало — левый верхний угол лицевой грани
|
||||
local gap = GAP / PPS
|
||||
local gx, gw = 0.03 * W, 0.94 * W
|
||||
local gy, gh = 0.035 * H + 0.13 * 0.93 * H, 0.87 * 0.93 * H
|
||||
local cw, ch = gw / cols - gap, gh / rows - gap
|
||||
local fishFolder = Instance.new("Model")
|
||||
fishFolder.Name = "BestiaryFish"
|
||||
fishFolder.Parent = board
|
||||
for i, f in ipairs(zone.fish) do
|
||||
local r = Config.Rarities[f.rarity]
|
||||
local cell = Instance.new("Frame")
|
||||
cell.Name = f.id
|
||||
cell.LayoutOrder = i
|
||||
cell.BackgroundColor3 = r.color:Lerp(Color3.fromRGB(20, 26, 40), 0.72)
|
||||
cell.BackgroundTransparency = 0.15
|
||||
cell.Parent = grid
|
||||
local cr = Instance.new("UICorner")
|
||||
cr.CornerRadius = UDim.new(0.08, 0)
|
||||
cr.Parent = cell
|
||||
local st = Instance.new("UIStroke")
|
||||
st.Color = r.color
|
||||
st.Thickness = 3
|
||||
st.Transparency = 0.15
|
||||
st.Parent = cell
|
||||
local name = Instance.new("TextLabel")
|
||||
name.Position = UDim2.fromScale(0.04, 0.69)
|
||||
name.Size = UDim2.fromScale(0.92, 0.17)
|
||||
name.BackgroundTransparency = 1
|
||||
name.Font = Enum.Font.FredokaOne
|
||||
name.TextScaled = true
|
||||
name.TextColor3 = Color3.new(1, 1, 1)
|
||||
name.TextStrokeTransparency = 0.35
|
||||
name.Text = f.name
|
||||
name.Parent = cell
|
||||
local rar = Instance.new("TextLabel")
|
||||
rar.Position = UDim2.fromScale(0.1, 0.85)
|
||||
rar.Size = UDim2.fromScale(0.8, 0.12)
|
||||
rar.BackgroundTransparency = 1
|
||||
rar.Font = Enum.Font.FredokaOne
|
||||
rar.TextScaled = true
|
||||
rar.TextColor3 = r.color
|
||||
rar.TextStrokeTransparency = 0.5
|
||||
rar.Text = r.name
|
||||
rar.Parent = cell
|
||||
-- модель рыбы над подписью: окно = верхние 68% карточки
|
||||
local ok, model = pcall(Models.buildFish, f.id, nil, 1, true)
|
||||
if ok and model then
|
||||
local c, row = (i - 1) % cols, math.floor((i - 1) / cols)
|
||||
local left = gx + c * (cw + gap)
|
||||
local top = gy + row * (ch + gap)
|
||||
local u, v = left + cw / 2, top + ch * 0.36
|
||||
local _, size = model:GetBoundingBox()
|
||||
local k = math.min(cw * 0.86 / size.X, ch * 0.6 / size.Y)
|
||||
model:ScaleTo(model:GetScale() * k)
|
||||
local cfb, s2 = model:GetBoundingBox()
|
||||
local off = model:GetPivot():PointToObjectSpace(cfb.Position)
|
||||
for _, p in ipairs(model:GetDescendants()) do
|
||||
if p:IsA("BasePart") then
|
||||
p.Anchored = true
|
||||
p.CanCollide = false
|
||||
p.CanQuery = false
|
||||
p.CanTouch = false
|
||||
p.CastShadow = false
|
||||
elseif p:IsA("ParticleEmitter") or p:IsA("PointLight") then
|
||||
p:Destroy()
|
||||
end
|
||||
end
|
||||
-- лицевая грань Front = -Z детали; для зрителя «вправо» = -X: голова (+X) смотрит влево
|
||||
local lx, ly = W / 2 - u, H / 2 - v
|
||||
model:PivotTo(board.CFrame * CFrame.new(lx, ly, -board.Size.Z / 2 - s2.Z / 2 - 0.04) * CFrame.new(-off))
|
||||
model.Parent = fishFolder
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- доска «кто водится»: атрибуты Bestiary (зона), BestiaryTitle, BestiaryHex; текст пишется заново при запуске
|
||||
local function writeBestiary(board)
|
||||
local old = board:FindFirstChild("BestiaryText")
|
||||
@@ -594,6 +719,10 @@ local function writeBestiary(board)
|
||||
if not zone then
|
||||
return
|
||||
end
|
||||
if BESTIARY_ICONS[board:GetAttribute("Bestiary")] then
|
||||
bestiaryIcons(board, zone)
|
||||
return
|
||||
end
|
||||
local lines = { ("<font color=\"%s\">%s</font>"):format(board:GetAttribute("BestiaryHex") or "#FFFFFF", board:GetAttribute("BestiaryTitle") or "") }
|
||||
for _, f in ipairs(zone.fish) do
|
||||
local r = Config.Rarities[f.rarity]
|
||||
|
||||
+11
-3
@@ -64,9 +64,13 @@ def parse(text, legacy=False):
|
||||
rows = re.findall(r'id = "(\w+)",\s*name = "[^"]*",\s*rarity = "(\w+)",\s*price = (\d+),\s*xp = (\d+)', zones)
|
||||
c['fish'] = [dict(id=a, rarity=b, price=int(p), xp=int(x)) for a, b, p, x in rows]
|
||||
else:
|
||||
rows = re.findall(r'id = "(\w+)",\s*name = "[^"]*",\s*rarity = "(\w+)",\s*price = (\d+)', zones)
|
||||
c['fish'] = [dict(id=a, rarity=b, price=int(p)) for a, b, p in rows]
|
||||
assert len(c['fish']) == 36, len(c['fish'])
|
||||
c['fish'] = []
|
||||
for world in WORLDS:
|
||||
rows = re.findall(r'id = "(\w+)",\s*name = "[^"]*",\s*rarity = "(\w+)",\s*price = (\d+)([^\n]*)', block(zones, world + ' = {'))
|
||||
for a, b, p, rest in rows:
|
||||
sh = re.search(r'share = ([\d.]+)', rest)
|
||||
c['fish'].append(dict(id=a, rarity=b, price=int(p), world=world, share=float(sh.group(1)) if sh else 1.0))
|
||||
assert len(c['fish']) == (36 if legacy else 38), len(c['fish'])
|
||||
rods = re.findall(r'\{ id = "(\w+)",\s*name = "[^"]*",\s*price = (\d+),\s*level = (\d+),\s*luck = ([\d.]+),\s*speed = ([\d.]+),\s*zone = ([\d.]+),\s*upgradeCost = (\d+)', block(text, 'Config.Rods = {'))
|
||||
c['rods'] = [dict(id=a, price=int(p), level=int(l), luck=float(lu), speed=float(s), upgradeCost=int(u)) for a, p, l, lu, s, z, u in rods]
|
||||
bags = re.findall(r'\{ id = "(\w+)",\s*name = "[^"]*",\s*price = (\d+),\s*level = (\d+),\s*capacity = (\d+)', block(text, 'Config.Bags = {'))
|
||||
@@ -127,7 +131,10 @@ def eff_luck(c, luck):
|
||||
|
||||
|
||||
def fish_dist(c, world, luck, legacy=False, max_rank=None):
|
||||
if legacy:
|
||||
rows = c['fish'][WORLDS.index(world) * 12:(WORLDS.index(world) + 1) * 12]
|
||||
else:
|
||||
rows = [f for f in c['fish'] if f['world'] == world]
|
||||
ws = []
|
||||
for f in rows:
|
||||
rank = RAR.index(f['rarity']) + 1
|
||||
@@ -138,6 +145,7 @@ def fish_dist(c, world, luck, legacy=False, max_rank=None):
|
||||
be = eff_luck(c, luck)
|
||||
k = c['rarity_luck'][f['rarity']]
|
||||
w = base / max(0.2, 1 + be * k) if rank == 1 else base * max(0.2, 1 + be * k)
|
||||
w *= f.get('share', 1.0)
|
||||
if max_rank and rank > max_rank:
|
||||
w = 0
|
||||
ws.append(w)
|
||||
|
||||
Reference in new issue
Block a user