eternaldensity / Sandcastle-Builder

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

(Minor) Mario doesn't open any vaults when at 100 power #1418

Open ocard opened 8 years ago

ocard commented 8 years ago

Really minor bug, line 1767 in UnlockRepeatableBoost at castle.js should ask for (times>=4) rather than >4.

The issue comes up when Mario is exactly at level 100, RunFastFactory at line 5337 in boosts.js awards (100/25 = 4) logicat rewards 25 times, but then in UnlockRepeatableBoost it doesn't unbox any vaults because times == 4. It doesn't buy any vault keys either in the line 1768 loop because 4%4=0. This all means that Mario tries to open all 25 vaults it should but doesn't.

I know this isn't a very significant bug (and I know you guys are way more focused on the lategame stuff rather than this midgame dribble), but thought you guys might like to know about it so you don't get some bug report about it and have to spend the time to figure it out.

https://github.com/eternaldensity/Sandcastle-Builder/blob/master/boosts.js#L5332 https://github.com/eternaldensity/Sandcastle-Builder/blob/master/castle.js#L1767