Right now there's something like gameData.printer.output that gets multiplied by a constant whenever an upgrade applies. It should instead be calculated by a function so that balance changes can be retroactive.
This change will likely obsolete the prestige function.
ideally:
qty
upgradeLevel
baseCost
baseOuput
baseUpgradeCost
i.e. rework calculation of cost, output, and upgrade cost. These should take as inputs:
Some base value
The number of already existing inputs
Perhaps in addition to something like baseCost there should be baseCostMultiplier? If so, I think that should be in its own data structure and not in the savegame. Actually, the same could be said for baseCost, baseOutput, and baseUpgradeCost...
Perhaps I should create classes for these money generators and have this stuff all be properties of each object. Then I can have methods where you pass in qty and it spits out income.
Right now there's something like
gameData.printer.output
that gets multiplied by a constant whenever an upgrade applies. It should instead be calculated by a function so that balance changes can be retroactive.This change will likely obsolete the prestige function.
ideally:
i.e. rework calculation of cost, output, and upgrade cost. These should take as inputs:
Perhaps in addition to something like
baseCost
there should bebaseCostMultiplier
? If so, I think that should be in its own data structure and not in the savegame. Actually, the same could be said forbaseCost
,baseOutput
, andbaseUpgradeCost
...