Anahkiasen / cookie-monster

A rehosted, cleaned up and updated version of the CookieMonster plugin.
31 stars 24 forks source link

Achievements unlock too early #54

Open Qhorin opened 10 years ago

Qhorin commented 10 years ago

Achievements are unlocked by CookieMonster's simulateBuy function and never reversed.

As described by @progheal in another thread:

/quote When Cookie Monster try to calculate the benefit of a building or upgrade, it will actually buy it, see how much cps it gained, and then sell it. If the buy action have side effect (eg. gain an achievement like having 100 building, or in this case, buying Chocolate Egg gives you 5% of your bank), that side effect will not be reversed. I think this is the root cause. This is also why the achievements like 100 building will unlock with one fewer building when you use Cookie Monster. A rather special case is the achievement 'Just Wrong' which is unlocked when you sell a grandma; if you haven't unlock this achievement, you will unlock it a little while after you load Cookie Monster. /unquote

Note: The Chocolate Egg side effect has already been addressed in #53