nullism / clickingbad

Official Clicking Bad Repository
http://clickingbad.nullism.com
MIT License
232 stars 70 forks source link

Inserted a new formula for calculating item_cost, fixing issue #117 #118

Open jwalt333 opened 10 years ago

jwalt333 commented 10 years ago

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.

DaGeek247 commented 10 years ago

How does this affect current game play? I have five thousand sleazy lawyers, can i sell them all now and gain more money then I payed for them, or do i sell them, get back the original price method, and buy them again with the new price method?

jwalt333 commented 10 years ago

Ummm, @DaGeek247, if you read my update, I'm not too sure how it would affect you as the new formula will make it nearly impossible to buy that many lawyers. Selling and re-buying wouldn't be in your interest as you'd make massive losses, but selling alone would be of short term benefit.

DaGeek247 commented 10 years ago

So I could sell them for short term benefit, but trying to do it twice would incur major losses. Got it.