Commit ebc40c72ad2e67f50336688a2ec51afcde070944
1 parent
667bd98b
随机事件bug
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/adv/Adv.lua
@@ -1588,7 +1588,7 @@ local function doChooseEffect(self, effectStr, room, block, tag, chooseData) | @@ -1588,7 +1588,7 @@ local function doChooseEffect(self, effectStr, room, block, tag, chooseData) | ||
1588 | for _, v in ipairs(diceCsv) do | 1588 | for _, v in ipairs(diceCsv) do |
1589 | local status, okCount = checkChooseCondFunc(self, v.cond, room, block, tag .. " dice", chooseData) | 1589 | local status, okCount = checkChooseCondFunc(self, v.cond, room, block, tag .. " dice", chooseData) |
1590 | pool[#pool + 1] = v.weight + okCount * v.weightUp | 1590 | pool[#pool + 1] = v.weight + okCount * v.weightUp |
1591 | - sum = sum + pool[#pool + 1] | 1591 | + sum = sum + pool[#pool] |
1592 | if sum >= weight and not needEffect then | 1592 | if sum >= weight and not needEffect then |
1593 | -- 达成效果 | 1593 | -- 达成效果 |
1594 | needEffect = v.effect | 1594 | needEffect = v.effect |