eternaldensity / Sandcastle-Builder

xkcd: 1190: Time: The Game
Other
79 stars 65 forks source link

Department Rewards continuting work #1414

Closed EPSIL0N closed 8 years ago

EPSIL0N commented 8 years ago

This can be merged whenever the next batch of fixes is ready but I've discovered there is more work that should be done gradually to tidy up the code while assuring we don't re-break what the forced definitions are fixing.

I have added yet more boosts that people have reported that were apparently being missed due to the design of the reward list generation.

Adding .department to a bunch of boost definitions is a working fix but unlike .logic or .photo which set levels the .department (and .kitten) definitions are almost always just true(1) or false(0) and so are not in need of fixed definition in the boosts.js once the real issue is addressed which appears to be that a fair number of the lines in data.js for the Molpy.CheckDoRDRewards function are written so that they set department to 1 or do nothing which leaves it undefined and trips up the list generation. We also have a bunch of lines scattered throughout other files setting .department and they could be consolidated into that single check function and if necessary also made to do both setting 1 and 0.

Additionally efforts could be taken for both Department and Logicat reward schemes to make them more like the photo reward scheme where boosts that are owned and should not be locking to be unlocked again are excluded from the list at generation as well as the change to the buy function that splices boosts out of the list when they are bought if they are not something that will relock, reunlock and need rebuying. As while these new lists are notably shorter than the full list of ~500 boosts, after all these fixes the additional inclusions bring both of the lists to around 50 entries each and we then check at least one of these lists if not both up to 50 times a mNP to tell Mario that of the 115 unique options at last check about five are the common valid choices.

eternaldensity commented 8 years ago

sounds good