Commit 993bb525d93550244812258cc3232c5215adcdca
1 parent
386cd4c1
refactor: 世界线积分,倍率由两位数改为 十以内的小数
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
src/actions/RoleAction.lua
... | ... | @@ -1751,27 +1751,27 @@ function _M.worldLineRoulette(agent, data) |
1751 | 1751 | local rouletteCount = worldChangePoints[ItemWorldLine.RouletteCount] or 0 |
1752 | 1752 | if rouletteCount == 0 then return 1 end |
1753 | 1753 | |
1754 | - local worldline_gift_base_10, worldline_gift_base_1, worldline_gift_magnification_10, worldline_gift_magnification_1 = {}, {}, {}, {} | |
1754 | + local worldline_gift_base_10, worldline_gift_base_1, worldline_gift_magnification_1, worldline_gift_magnification_0 = {}, {}, {}, {} | |
1755 | 1755 | for k, v in pairs(globalCsv.worldline_gift_base_10) do |
1756 | 1756 | worldline_gift_base_10[k] = {v} |
1757 | 1757 | end |
1758 | 1758 | for k, v in pairs(globalCsv.worldline_gift_base_1) do |
1759 | 1759 | worldline_gift_base_1[k] = {v} |
1760 | 1760 | end |
1761 | - for k, v in pairs(globalCsv.worldline_gift_magnification_10) do | |
1762 | - worldline_gift_magnification_10[k] = {v} | |
1763 | - end | |
1764 | 1761 | for k, v in pairs(globalCsv.worldline_gift_magnification_1) do |
1765 | 1762 | worldline_gift_magnification_1[k] = {v} |
1766 | 1763 | end |
1764 | + for k, v in pairs(globalCsv.worldline_gift_magnification_0) do | |
1765 | + worldline_gift_magnification_0[k] = {v} | |
1766 | + end | |
1767 | 1767 | |
1768 | 1768 | local gift_base_10 = (math.randWeight(worldline_gift_base_10, 1) or 0) * 10 |
1769 | 1769 | local gift_base_1 = math.randWeight(worldline_gift_base_1, 1) or 0 |
1770 | 1770 | |
1771 | - local gift_magnification_10 = (math.randWeight(worldline_gift_magnification_10, 1) or 0) * 10 | |
1772 | 1771 | local gift_magnification_1 = math.randWeight(worldline_gift_magnification_1, 1) or 0 |
1772 | + local gift_magnification_0 = (math.randWeight(worldline_gift_magnification_0, 1) or 0) * (0.1) | |
1773 | 1773 | |
1774 | - local points = (gift_base_10 + gift_base_1) * (gift_magnification_10 + gift_magnification_1) | |
1774 | + local points = math.floor((gift_base_10 + gift_base_1) * (gift_magnification_1 + gift_magnification_0)) | |
1775 | 1775 | worldChangePoints[ItemWorldLine.RouletteCount] = worldChangePoints[ItemWorldLine.RouletteCount] - 1 |
1776 | 1776 | worldChangePoints[ItemWorldLine.Points] = worldChangePoints[ItemWorldLine.Points] + points |
1777 | 1777 | role:updateProperty({field = "worldChangePoints", value = worldChangePoints}) | ... | ... |