Parcourir la source

Fix issue with calculation reward

JoostSijm il y a 5 ans
Parent
commit
c37706fb4b
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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