Bottle randomization refactored to be done on generation of itempool, not with the ItemFactory function. This allows difficulty settings to use different bottle pools more easily as well as allows the pedestal, credits, and spoiler logs to report bottle contents. Expert and insane difficulties deliberately set the same bottle content to all four bottles since the bottle limit is one in those modes so this only guarantees that all racers regardless of play sequence will get the same one free bottle content.
Added back in the normal number of progressive swords and bottles (and in the case of hard armor and shields) to the higher difficulties which will make it easier on average for players to find their earlier pieces of this equipment. Non-progressive alternatives were supported and set not to disrupt the average value of equipment. Hard still ignores progressive setting for armor since it doesn't change when players get armor upgrades (find one, get blue mail) but does allow non-progressive players to get the overflow item from the second armor discovery.
-From KevinCathcart, this adds a new region to the world for the castle courtyard reachable from the exit to the uncle tunnel and from the upper ledge of Hyrule Castle but not the main gate. In effect, this changes nothing if Ganon is not at the uncle passage, and if Ganon is at the uncle passage, either Mirror + pyramid access, Master Sword, or a connecting cave to the upper ledge of Hyrule Castle will be required to access the main gate. This is necessary to fix a very rare softlock in which the player could defeat Agahnim, lose access to the Hyrule Castle main gate, and make the seed impossible.
-From KevinCathcart, adds a "balanced" algorithm that, in theory, fixes the dungeon bias of the v26/v27 algorithm while maintaining the desirable amount of randomness it provides.
-Properly set overflow counts and items for progressive equipment and bottles.
-Fairy fountains can no longer give free fairies on hard or above
-Shields now have hiked prices on hard and above consistent with vt rando
-KevinCathcart's new integer based writebytes functions are added for future backend use.
-Dungeon item counts always displayed in easy mode if not also timed mode
-Timed-OHKO timer amounts updated to modern values (didn't actually measure out the red clock, set it to "large negative number" which should be functionally identical to the -32400 seconds that vt uses)
The itempool definition is moved to the new ItemList file to keep the main clean. Several function calls were adjusted to account for world having two new parameters.
This file contains the definition for the item pool generation function. I'm not going to sugarcoat this; what I wrote is a total mess. This considers all possible combinations between timed modes (two distinct sets of timers), triforce hunt, progressives on/off/random, and all five of the difficulty settings from the vt randomizer. Maybe it would have been better to just hardcode every combination as its own array instead of build smaller arrays and use some semblance of logic to piece them together, but this is what I did. I'm not satisfied at all with the ugly, ugly form of this code and hope to revisit later, but for now, it adds significant improved functionality.
A misplaced parenthesis is fixes, solving an old bug where spoiler logs couldn't be generated if Maps and Compasses weren't placed in dungeons (thanks KevinCathcart)
-KevinCathcart's PoD small key fix for the back
-Per KevinCathcart, swordless mode now inherits open mode specific restrictions (per me, fixes a rare Hyrule Castle softlock scenario)
-Set most flags for hard mode (todo: fix shield prices)
-Stop writing a flag that used to set pyramid respawns (it now messes with Cape quarter magic cost in the spike cave)
-KevinCathcart's checksum fix
-KevinCathcart fix for not placing Maps/Compasses
All filled in for every relevant item! I would like to improve this later in several ways, but for now, it's a lot better than allowing the defaults to be used.
-Fixes a wrong function call that made keysanity fail.
-Restores some logic in "key for key" situations that older algorithms relied upon, should slightly improve neutrality of key distribution even in v26 algorithm.
This is the Great renaming. Renaming to match V27. I've renamed pretty
much all Item locations to match, with a small number kept deliberatly
deferent for clarity.
There is probably more renaming that should be done at the Enterance and
Region levels, but that can be done later.
Updates include:
* Allow acticating tablets with hammer
* Remove 1/4 magic from the normal mode pool
* Incorporate OHKO compatible cape/cane-of-byrna requirements
* Upgrade Mirror Shield, Progressive Shield, and Bug Catching Net to
qualify as advancement items
* Allow Mirror shield as alternative to cape/byrna for Laser Bridge
* Prevent Waterfall Fairy from upgrading Boomerang or Shield
* Change PoD key logic to match VT26.
* Add restrictions on small key placement (to match VT26). I think these
restrictions may be redundant, but I'm adding them just in case any of
them are not.
Also adding pedestal naming for the keys based on the current vt27 work in progress.
This is harmless since before keysanity mode is implemented, these items will never end up on the pedestal.