eternaldensity / Sandcastle-Builder

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

Coma doesn't reset department #1479

Open subanark opened 7 years ago

subanark commented 7 years ago

If an item is available for a DORD reward when you coma, it will remain there.

eternaldensity commented 7 years ago

Looking at the code, all boosts should be set to unlocked and then all gui things including the shop should be redrawn, so I'm not sure how that could occur. Do you have a save for testing?

subanark commented 7 years ago

In order for this to occur, you need to play from Coma to getting DoRD without refreshing the page. Then when DoRD activates you could unlock a boost you shouldn't be able to get.

Locked boosts keep the department variable across Coma. Some boosts change this (e.g. DiP rewards). The best one I have is https://docs.google.com/document/d/1v_hTrWasYHTNliOja382DfdV8AmprNvvJ-OIioEn_bY/edit?usp=sharing

Molpy down, then Coma. Cheat yourself DoRD and do a bunch of Molpy.RewardRedacted(1) and you should unlock Monty Haul (asumining you didn't ONG since Coma). Which normally has a 1/3 chance of unlocking on the ONG.

eternaldensity commented 7 years ago

Ah, okay.

It's because the function that checks whether boosts should be in the department never does the reverse. So just zeroing out all the department variables should fix it. Good. Although... wouldn't it also be a problem on Molpy Down too? Or is the DoRD not supposed to reset on Molpy Down? I forget.

subanark commented 7 years ago

Just make sure you keep it set to 1 for the boosts that are available from the start of the game.

eternaldensity commented 7 years ago

Oh yeah, the ones that have department=1 from initialisation and that should never change... Actually that's gonna be a nuisance :(

eternaldensity commented 7 years ago

This is easy to fix: just put a function declaration around all the boost setup, and call it again in the coma code, so then it'll all be guaranteed completely reset.