Closed crokkon closed 5 years ago
same calculations in FutureShockco/drugwars.js: https://github.com/FutureShockco/drugwars.js/blob/f75b14f87549288326967cf5c569982ccd95d320/src/utils.js#L26-L28
@hightouch67 please double check 8220cb445fab43e9559bdc62d888db2203388953, I believe time
shouldn't be divided by 1000 again for the oclvl bonus. Also, shouldn't the rounding toFixed(2) better be applied at the end?
Thanks for pointing it out! I have made the correction fast as I saw this issue.
fixed with 8220cb445fab43e9559bdc62d888db2203388953 + e2c3f40e6bb4f3d1cd5975a697fa21096c5207f0 - closing.
Expected behavior
Operation center bonus ("+0.5% Income per Level") should be added to the shown balances based on the balance at the last update, the production rate and the OC level.
Actual behavior
A fixed 1x 0.5% bonus is added if OC level > 0, plus 0.005 drugs/weapons/alcohol per level (absolute units, not percent).
Steps to reproduce the behavior
see the code: https://github.com/FutureShockco/drugwars.io/blob/aa6b834568158c261affc662e89e46b54173acfb/src/helpers/utils.js#L28-L30
Possible Fix
Assuming the backend actually calculates with +0.5% income per level, this should be changed to