Inserted a new formula for calculating item_cost, fixing issue #117 #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've created a new formula to calculate the cost of items, the new formula is:
base_cost^(1 + ((amount + 1) * 0.0075)^2) * (amount + 1)
The old formula slowly decreased the amount added to the new cost when more and more items of the same type were bought, so that the price gap between the 4,999th and 5,000th item was 0.04% as opposed to the increase between the 1st and 2nd item, which is generally more than 150%. Long story short, currently, if people were to buy enough of one item, they would eventually reach a point where there would be no change in price.
With the new formula, the price jump for the first few items is about 100%, 50%, 33%, 25%, and so on for about the first 30 items (reaching a min of about 3.7%) this is due to the last ' ... * (amount + 1)' which causes the large price jump in a way similar to the original formula, after the first 30 items, the main part of the new formula kicks in and we start to see a slow exponential increase, this means that users will never reach the point of "I can buy everything, yays".
So yeah, bitches.