浏览代码

Fix issue with calculation reward

JoostSijm 5 年之前
父节点
当前提交
c37706fb4b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      donation.py

+ 2 - 2
donation.py

@@ -72,9 +72,9 @@ def calc_reward(resources):
                 continue
             if player not in player_reward:
                 player_reward[player] = 0
-            player_reward[player] = reward[resource] * amount
+            tmp_reward = reward[resource] * amount
             koef = math.floor(amount / resource_koef[resource])
-            player_reward[player] += round(player_reward[player] / 100 * koef * 2)
+            player_reward[player] += tmp_reward + round(tmp_reward / 100 * koef * 2)
 
     return player_reward