Okay, so we're ignoring level 12 for now, which is fine.
Moving on to level 13...
We can maximize for the 3 contests and select them individually, or we can just grab the 3 contests and burn some extra turns, which is good if you want factoids. If we don't go for bonus factoids, we'll probably maximize equipment, free casts, and MAYBE uneffects, but nothing purchased or from inventory items. There lie major dangers and problems.
For the hedge, we'll probably add a new preference, bcasc_hedgeChoice or something similar. If you set it to one of the six valid choices (traps, gopher, duck, chihuahua, kiwi, or nugglets) then it will use that one. If it isn't set, we'll just do nugglets for the guaranteed success.
We'll call the tower_door function directly. If it works, we move on. If it fails, we abort and let the user fix it.
If we don't have a beehive, we'll backfarm. Hopefully the user doesn't have an AA or BB script that will mess with our choices.
Maximize for meat, limiting the weapon to the right class-type (+melee +shield for muscle, -melee for moxie, no limits for myst), but not doing anything to make sure that the combat actually works. Use maximized Single combat call, abort if the adventure call fails (meaning that we got beaten up, whether or not our AA script cured it). Repeat combat as needed.
If we don't have an electric boning knife, we'll backfarm. Hopefully the user doesn't have an AA or BB script that will mess with our choices.
We now need to check for 4-6 cheap healing items (filthy poultice/gauze garter and red pixel potions) and the Wand. Probably put healing behind a preference which defaults to automation, something like bcasc_dontFightShadow.If we need more healing items, backfarm red pixel potions until we have a total of 5 of those available. If it's all RPP, we only need 4, but we may need 5 if war heals are involved. For the wand, simply try to acquire it. If we can't, abort so that the user can get it.
Normal buMax now. If the user's stats are below 230 or so, get confident. If they're high enough, save the adventure. Also, health needs to be above 200. If it's less than that, buMax and give health some more weight.
If the user hasn't elected to skip automation, fight the shadow using manual code for the fight. Use visit_url calls to throw the items so that we can avoid wasting restores if possible. If we're beaten up after, abort because something went wrong.
Fight the NS with three normal run_combats.
Shatter the prism.
Anything massively off on the planning?