80 Commits

Author SHA1 Message Date
029e8de852 Log teleporter replacements instead of printing to STDOUT 2026-01-24 20:58:20 -06:00
ca9af423db Add pyproject.toml 2026-01-24 13:36:21 -06:00
84adf1dd89 Fix back of Tavern rules 2025-04-03 16:26:01 -05:00
1fcdbba066 Require sword to use quake for killing deadrocks 2025-03-31 15:08:20 -05:00
106eadc26d Add some fixes for TT logic 2025-03-27 05:42:59 -05:00
d6a16236f5 Update base rom 2025-03-26 15:56:45 -05:00
e6d24db03e Include playthrough in JSON spoiler 2025-03-08 18:32:18 -06:00
9679b182ac Update baserom 2025-03-08 00:10:36 -06:00
816ddb63e2 Update baserom 2025-03-06 13:01:28 -06:00
fc12f2627b Update regex strings to be raw strings 2025-03-06 10:44:51 -06:00
1d84a6b348 Add --outputname arg 2025-03-06 10:27:12 -06:00
1df52ecf6e Replace teleporters that can't be placed with red rupees 2025-03-05 19:23:40 -06:00
88224a5aca Add spoiler json output option 2025-03-05 19:06:19 -06:00
8ecf4e530a Add special logic 2025-02-25 19:20:03 -06:00
1c492a9fd3 Massage item pool 2024-11-25 13:38:35 -06:00
cassidy
96c00321dd Merge pull request #10 from KrisDavie/er-br-pendants-fix
fix: Make pendants consistent between in-game, spoiler and memory
2024-03-19 13:37:03 -04:00
KrisDavie
cf7acd2b05 fix: Make pendants consistent between in-game, spoiler and memory 2024-03-17 10:48:09 +01:00
cassidoxa
8a1ac4d451 Fix map reveal typo 2023-11-17 17:49:37 -05:00
cassidoxa
aa0a559381 Update ROM 2023-09-17 14:44:05 -04:00
cassidoxa
64196216a4 Update ROM 2023-09-09 12:23:09 -04:00
cassidoxa
228026dc24 Update ROM 2023-09-08 09:25:21 -04:00
cassidoxa
71610e9aa7 Fix typo 2023-09-07 00:28:00 -04:00
cassidoxa
d4a76cc9be Remove extra unused ganonhunt sign text 2023-09-05 21:18:59 -04:00
cassidoxa
f53c5b7127 Update ROM 2023-09-04 22:39:40 -04:00
cassidoxa
4b9159dd0a Fix Ganon requirement sign 2023-09-04 15:58:49 -04:00
cassidoxa
1862ed0b64 Update ROM for small palette fix 2023-09-03 15:46:44 -04:00
cassidoxa
cb5737a670 Fix completionist
Update ROM
2023-09-02 23:37:43 -04:00
cassidoxa
409bab1f20 Update ROM 2023-08-31 16:40:45 -04:00
cassidoxa
55896cd3d9 Update ROM 2023-08-31 15:22:20 -04:00
cassidoxa
eeba10fd8b Update ROM 2023-08-30 23:46:15 -04:00
cassidoxa
408e9c2fc6 Update ROM 2023-08-29 16:01:23 -04:00
cassidoxa
5b9f7675e8 Update ROM 2023-08-26 23:25:30 -04:00
cassidoxa
e4e0a9f5a1 Add fastrom disable option 2023-08-26 20:31:02 -04:00
cassidoxa
aaaa7b9239 Update ROM 2023-08-26 14:39:42 -04:00
cassidoxa
5a6aa4abed Update ROM 2023-08-26 01:45:50 -04:00
cassidoxa
21a6f3634b Fix Link Face
Update ROM
2023-08-25 01:56:01 -04:00
cassidoxa
ad59be106a Update ROM 2023-08-22 16:24:12 -04:00
cassidoxa
efe5b09c31 Update for new GT/Ganon/Ped system writes 2023-08-21 20:56:41 -04:00
cassidoxa
03d1de90d3 Fix pendants 2023-08-21 12:44:59 -04:00
cassidoxa
4f6437156a Revert 100% locations logic changes 2023-08-20 22:16:28 -04:00
cassidoxa
f7e0a2aa24 Revert "100% Locations logic cleanup"
This reverts commit 6ca3803076.
2023-08-20 21:01:43 -04:00
cassidoxa
69a9988a6a Update rom 2023-08-20 11:50:52 -04:00
cassidoxa
03e6cedc1a Fix league winners 2023-08-19 17:48:55 -04:00
cassidoxa
2c19a205e1 Tournament winners 2023-08-19 16:55:40 -04:00
cassidoxa
4071cbc702 Use vanilla keys in no-logic when keys aren't shuffled outside dungeons 2023-08-18 00:46:57 -04:00
cassidoxa
3226e067be Update rom 2023-08-16 00:12:54 -04:00
cassidoxa
72de30826c Fix item counter HUD for completionist 2023-08-14 14:26:16 -04:00
cassidoxa
2d955b451e Heart colors 2023-08-12 21:04:19 -04:00
cassidoxa
ff4963c056 Text remapping
Fix bombos tablet logic
2023-08-11 20:16:00 -04:00
cassidoxa
b1a33492b3 Merge branch 'AVIANART-alttpr-com' into alttpr-com 2023-08-07 22:43:19 -04:00
cassidoxa
a26b71f23f Merge branch 'alttpr-com' of https://github.com/AVIANART/ALttPEntranceRandomizer into AVIANART-alttpr-com 2023-08-07 22:42:56 -04:00
cassidoxa
da0aa08744 Update ROM 2023-08-07 19:02:27 -04:00
Cody
e41b44aa9e Update Items.py
Fix some typos, update hookshot text
2023-08-07 17:32:41 -04:00
cassidoxa
74196cab7f Fix crystal offsets 2023-08-07 15:14:43 -04:00
cassidoxa
940b7f59fd Free Crystals
Zelda mirror fix
Use free dungeon items always
2023-08-07 13:47:52 -04:00
Cody Bailey
ef38de7827 Make item hint text less ambiguous 2023-07-30 18:17:40 -04:00
cassidoxa
6ca3803076 100% Locations logic cleanup 2023-06-14 16:55:49 -04:00
cassidoxa
07e8577907 Update deprecated collections imports 2023-06-14 16:42:51 -04:00
cassidoxa
c4e6fbb8cd Ganonhunt 2023-06-12 13:52:17 -04:00
cassidoxa
0c871a2239 Update ROM 2023-06-11 00:07:23 -04:00
cassidoxa
6d19f6c8d1 Completionist mode
100% Locations logic fixes
2023-06-09 19:22:42 -04:00
cassidoxa
b24c118572 InitialSram: Fix starting sword level in swordless mode 2023-03-30 15:22:37 -04:00
cassidoxa
edd251bcad Remove LW/DW light cone options and logic
Add dots to ped credits sequence
2023-03-12 17:52:53 -04:00
cassidoxa
5f74519a24 Update base rom 2023-02-12 18:58:50 -05:00
cassidoxa
6586fc3c7f Remove triforce text via community suggestion 2023-01-25 20:05:50 -05:00
cassidoxa
89ffa115b4 New font 2022-12-15 19:49:16 -05:00
cassidoxa
ba4eff1692 Fix Waterfall of Wishing connection not requiring flippers 2022-11-24 20:01:17 -05:00
cassidoxa
1b8592b500 Require 4 keys to go from crystaroller to TR dark maze.
But not the other way around. To prevent some silly edge case I forgot
2022-11-24 19:32:25 -05:00
cassidoxa
0e3aee1211 Add menu boss icon for no logic but not regular key shuffle modes 2022-11-24 19:27:42 -05:00
compiling
cecba98b46 Move Red Shield Shop to LW_walkable_entrances, since you can't walk out with the bomb. 2022-11-24 19:20:19 -05:00
cassidoxa
9581cba352 Merge branch 'inverted-portals-er' into alttpr-com 2022-11-24 19:18:10 -05:00
cassidoxa
298b7e5294 Merge branch 'aga_door_glitched' into alttpr-com 2022-11-24 19:17:16 -05:00
cassidoxa
1abae11178 Fix Aga Tower/SW curtains
Update ROM
2022-11-24 19:07:00 -05:00
cassidoxa
a9364beaa0 Add TR bomb door pre-opening
Update base rom
2022-10-31 15:45:04 -04:00
cassidoxa
58dc7f96c2 Combine starting max ammo and capacity upgrades into single capacity 2022-08-08 17:02:54 -04:00
cassidoxa
a464fee64b Fix Swordless 2022-04-20 22:10:51 -04:00
cassidoxa
89bf67119f Fix cap upgrades 2022-04-20 20:11:32 -04:00
cassidoxa
8795a4b393 Add initial SRAM class and refactor to use it 2022-02-20 00:21:33 -05:00
cassidy
e1afd4374f Remove HC escape exit barriers in glitched modes and vanilla shuffle
Unlock Aga Tower door during escape in glitched modes
2021-12-22 23:20:28 -05:00
cassidy
4b534fe185 Remove diggable portals in inverted 2021-10-21 22:26:47 -04:00
22 changed files with 1256 additions and 3223 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,8 @@
.idea
.vscode
*_Spoiler.txt
*_Spoiler.json
*_Meta.json
*.pyc
*.sfc
*.wixobj
@@ -12,4 +14,4 @@ README.html
*multidata
*multisave
EnemizerCLI/
.mypy_cache/
.mypy_cache/

View File

@@ -10,7 +10,7 @@ from Utils import int16_as_bytes
class World(object):
def __init__(self, players, shuffle, logic, mode, swords, difficulty, difficulty_adjustments, timer, progressive, goal, algorithm, place_dungeon_items, accessibility, shuffle_ganon, quickswap, fastmenu, disable_music, keysanity, retro, custom, customitemarray, boss_shuffle, hints):
def __init__(self, players, shuffle, logic, mode, swords, difficulty, difficulty_adjustments, timer, progressive, goal, place_dungeon_items, accessibility, shuffle_ganon, quickswap, pseudoboots, fastmenu, disable_music, keysanity, retro, boss_shuffle, hints):
self.players = players
self.shuffle = shuffle
self.logic = logic
@@ -21,7 +21,6 @@ class World(object):
self.timer = timer
self.progressive = progressive
self.goal = goal
self.algorithm = algorithm
self.dungeons = []
self.regions = []
self.shops = []
@@ -51,7 +50,8 @@ class World(object):
self.clock_mode = 'off'
self.rupoor_cost = 10
self.aga_randomness = True
self.lock_aga_door_in_escape = False
self.lock_aga_door_in_escape = True if logic == 'noglitches' else False
self.block_side_exits_escape = True if logic == 'noglitches' and shuffle != 'vanilla' else False
self.fix_trock_doors = self.shuffle != 'vanilla' or self.mode == 'inverted'
self.save_and_quit_from_boss = True
self.accessibility = accessibility
@@ -65,12 +65,11 @@ class World(object):
self.can_access_trock_big_chest = None
self.can_access_trock_middle = None
self.quickswap = quickswap
self.pseudoboots = pseudoboots
self.fastmenu = fastmenu
self.disable_music = disable_music
self.keysanity = keysanity
self.retro = retro
self.custom = custom
self.customitemarray = customitemarray
self.can_take_damage = True
self.difficulty_requirements = None
self.fix_fake_world = True
@@ -82,6 +81,9 @@ class World(object):
self.dynamic_locations = []
self.spoiler = Spoiler(self)
self.lamps_needed_for_dark_rooms = 1
self.pseudoboots = {player: False for player in range(1, players + 1)}
self.item_counter_hud = {player: False for player in range(1, players + 1)}
self.fastrom = True
def intialize_regions(self):
for region in self.regions:
@@ -215,7 +217,12 @@ class World(object):
logging.getLogger('').debug('Placed %s at %s', item, location)
else:
raise RuntimeError('Cannot assign item %s to location %s.' % (item, location))
if item.name == 'Teleporter':
from Items import ItemFactory
logging.getLogger('').info('Cannot assign item %s to location %s, replacing with red rupee.' % (item, location))
self.push_item(location, ItemFactory('Rupees (20)', item.player), collect)
else:
raise RuntimeError('Cannot assign item %s to location %s.' % (item, location))
def get_entrances(self):
if self._cached_entrances is None:
@@ -391,6 +398,12 @@ class CollectionState(object):
crystals = ['Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']
return len([crystal for crystal in crystals if self.has(crystal, player)]) >= count
def can_pass_bushes(self, player):
return self.has_sword(player) or self.has('Weak Glove', player) or self.has('Power Glove', player) or self.has('Titans Mitts', player)
def can_pass_pots(self, player):
return self.has('Hammer', player) or self.has('Weak Glove', player) or self.has('Power Glove', player) or self.has('Titans Mitts', player)
def can_lift_rocks(self, player):
return self.has('Power Glove', player) or self.has('Titans Mitts', player)
@@ -468,12 +481,18 @@ class CollectionState(object):
def has_Mirror(self, player):
return self.has('Magic Mirror', player)
def has_TwoWay_Mirror(self, player):
return self.has('Magic Mirror', player, 2)
def has_Boots(self, player):
return self.has('Pegasus Boots', player)
def has_Pearl(self, player):
return self.has('Moon Pearl', player)
def has_Book(self, player):
return self.has('Book of Mudora', player)
def has_fire_source(self, player):
return self.has('Fire Rod', player) or self.has('Lamp', player)
@@ -535,9 +554,12 @@ class CollectionState(object):
elif self.has('Power Glove', item.player):
self.prog_items.add(('Titans Mitts', item.player))
changed = True
else:
elif self.has('Weak Glove', item.player):
self.prog_items.add(('Power Glove', item.player))
changed = True
else:
self.prog_items.add(('Weak Glove', item.player))
changed = True
elif 'Shield' in item.name:
if self.has('Mirror Shield', item.player):
pass
@@ -1062,7 +1084,6 @@ class Spoiler(object):
outfile.write('Difficulty: %s\n' % self.metadata['item_pool'])
outfile.write('Item Functionality: %s\n' % self.metadata['item_functionality'])
outfile.write('Entrance Shuffle: %s\n' % self.metadata['shuffle'])
outfile.write('Filling Algorithm: %s\n' % self.world.algorithm)
outfile.write('Accessibility: %s\n' % self.metadata['accessibility'])
outfile.write('Maps and Compasses in Dungeons: %s\n' % ('Yes' if self.world.place_dungeon_items else 'No'))
outfile.write('L\\R Quickswap enabled: %s\n' % ('Yes' if self.world.quickswap else 'No'))

View File

@@ -23,7 +23,7 @@ def create_dungeons(world, player):
TT = make_dungeon('Thieves Town', 'Blind', ['Thieves Town (Entrance)', 'Thieves Town (Deep)', 'Blind Fight'], ItemFactory('Big Key (Thieves Town)', player), [ItemFactory('Small Key (Thieves Town)', player)], ItemFactory(['Map (Thieves Town)', 'Compass (Thieves Town)'], player))
SW = make_dungeon('Skull Woods', 'Mothula', ['Skull Woods Final Section (Entrance)', 'Skull Woods First Section', 'Skull Woods Second Section', 'Skull Woods Second Section (Drop)', 'Skull Woods Final Section (Mothula)', 'Skull Woods First Section (Right)', 'Skull Woods First Section (Left)', 'Skull Woods First Section (Top)'], ItemFactory('Big Key (Skull Woods)', player), ItemFactory(['Small Key (Skull Woods)'] * 2, player), ItemFactory(['Map (Skull Woods)', 'Compass (Skull Woods)'], player))
SP = make_dungeon('Swamp Palace', 'Arrghus', ['Swamp Palace (Entrance)', 'Swamp Palace (First Room)', 'Swamp Palace (Starting Area)', 'Swamp Palace (Center)', 'Swamp Palace (North)'], ItemFactory('Big Key (Swamp Palace)', player), [ItemFactory('Small Key (Swamp Palace)', player)], ItemFactory(['Map (Swamp Palace)', 'Compass (Swamp Palace)'], player))
IP = make_dungeon('Ice Palace', 'Kholdstare', ['Ice Palace (Entrance)', 'Ice Palace (Main)', 'Ice Palace (East)', 'Ice Palace (East Top)', 'Ice Palace (Kholdstare)'], ItemFactory('Big Key (Ice Palace)', player), ItemFactory(['Small Key (Ice Palace)'] * 2, player), ItemFactory(['Map (Ice Palace)', 'Compass (Ice Palace)'], player))
IP = make_dungeon('Ice Palace', 'Kholdstare', ['Ice Palace (Entrance)', 'Ice Palace (Main)', 'Ice Palace (Back)', 'Ice Palace (East)', 'Ice Palace (East Top)', 'Ice Palace (Kholdstare)'], ItemFactory('Big Key (Ice Palace)', player), ItemFactory(['Small Key (Ice Palace)'] * 2, player), ItemFactory(['Map (Ice Palace)', 'Compass (Ice Palace)'], player))
MM = make_dungeon('Misery Mire', 'Vitreous', ['Misery Mire (Entrance)', 'Misery Mire (Main)', 'Misery Mire (West)', 'Misery Mire (Final Area)', 'Misery Mire (Vitreous)'], ItemFactory('Big Key (Misery Mire)', player), ItemFactory(['Small Key (Misery Mire)'] * 3, player), ItemFactory(['Map (Misery Mire)', 'Compass (Misery Mire)'], player))
TR = make_dungeon('Turtle Rock', 'Trinexx', ['Turtle Rock (Entrance)', 'Turtle Rock (First Section)', 'Turtle Rock (Chain Chomp Room)', 'Turtle Rock (Second Section)', 'Turtle Rock (Big Chest)', 'Turtle Rock (Crystaroller Room)', 'Turtle Rock (Dark Room)', 'Turtle Rock (Eye Bridge)', 'Turtle Rock (Trinexx)'], ItemFactory('Big Key (Turtle Rock)', player), ItemFactory(['Small Key (Turtle Rock)'] * 4, player), ItemFactory(['Map (Turtle Rock)', 'Compass (Turtle Rock)'], player))

View File

@@ -19,6 +19,7 @@ class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
def start():
parser = argparse.ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument('--create_spoiler', help='Output a Spoiler File', action='store_true')
parser.add_argument('--json_spoiler', help='Output a JSON Spoiler File', action='store_true')
parser.add_argument('--logic', default='noglitches', const='noglitches', nargs='?', choices=['noglitches', 'minorglitches', 'nologic'],
help='''\
Select Enforcement of Item Requirements. (default: %(default)s)
@@ -55,7 +56,7 @@ def start():
Palace, to allow for an alternative to firerod.
Vanilla: Swords are in vanilla locations.
''')
parser.add_argument('--goal', default='ganon', const='ganon', nargs='?', choices=['ganon', 'pedestal', 'dungeons', 'triforcehunt', 'crystals'],
parser.add_argument('--goal', default='ganon', const='ganon', nargs='?', choices=['ganon', 'pedestal', 'dungeons', 'triforcehunt', 'ganonhunt', 'crystals', 'all_items', 'completionist'],
help='''\
Select completion goal. (default: %(default)s)
Ganon: Collect all crystals, beat Agahnim 2 then
@@ -64,8 +65,8 @@ def start():
Pedestal: Places the Triforce at the Master Sword Pedestal.
All Dungeons: Collect all crystals, pendants, beat both
Agahnim fights and then defeat Ganon.
Triforce Hunt: Places 30 Triforce Pieces in the world, collect
20 of them to beat the game.
All Items: Requires collecting 216 items to defeat Ganon.
Completionist: Same as above, plus All Dungeons
''')
parser.add_argument('--difficulty', default='normal', const='normal', nargs='?', choices=['normal', 'hard', 'expert'],
help='''\
@@ -81,64 +82,22 @@ def start():
Hard: Reduced functionality.
Expert: Greatly reduced functionality.
''')
parser.add_argument('--timer', default='none', const='normal', nargs='?', choices=['none', 'display', 'timed', 'timed-ohko', 'ohko', 'timed-countdown'],
parser.add_argument('--timer', default='none', const='none', nargs='?', choices=['none', 'ohko'],
help='''\
Select game timer setting. Affects available itempool. (default: %(default)s)
Select One-Hit KO (OHKO) game setting. (default: %(default)s)
None: No timer.
Display: Displays a timer but does not affect
the itempool.
Timed: Starts with clock at zero. Green Clocks
subtract 4 minutes (Total: 20), Blue Clocks
subtract 2 minutes (Total: 10), Red Clocks add
2 minutes (Total: 10). Winner is player with
lowest time at the end.
Timed OHKO: Starts clock at 10 minutes. Green Clocks add
5 minutes (Total: 25). As long as clock is at 0,
Link will die in one hit.
OHKO: Like Timed OHKO, but no clock items are present
and the clock is permenantly at zero.
Timed Countdown: Starts with clock at 40 minutes. Same clocks as
Timed mode. If time runs out, you lose (but can
still keep playing).
OHKO: Link will always die in one hit.
''')
parser.add_argument('--progressive', default='on', const='normal', nargs='?', choices=['on', 'off', 'random'],
parser.add_argument('--progressive', default='on', const='on', nargs='?', choices=['on', 'off', 'random'],
help='''\
Select progressive equipment setting. Affects available itempool. (default: %(default)s)
On: Swords, Shields, Armor, and Gloves will
all be progressive equipment. Each subsequent
item of the same type the player finds will
upgrade that piece of equipment by one stage.
Off: Swords, Shields, Armor, and Gloves will not
be progressive equipment. Higher level items may
be found at any time. Downgrades are not possible.
Random: Swords, Shields, Armor, and Gloves will, per
category, be randomly progressive or not.
Link will die in one hit.
Select progressive bow setting. Affects available itempool. (default: %(default)s)
On: The first bow you find will give you access
to the bow item. The second will give you
Silver Arrows.
Off: Bow and Silver Arrows are separate items.
Random: Bows will randomly be progressive or not.
''')
parser.add_argument('--algorithm', default='balanced', const='balanced', nargs='?', choices=['freshness', 'flood', 'vt21', 'vt22', 'vt25', 'vt26', 'balanced'],
help='''\
Select item filling algorithm. (default: %(default)s
balanced: vt26 derivitive that aims to strike a balance between
the overworld heavy vt25 and the dungeon heavy vt26
algorithm.
vt26: Shuffle items and place them in a random location
that it is not impossible to be in. This includes
dungeon keys and items.
vt25: Shuffle items and place them in a random location
that it is not impossible to be in.
vt21: Unbiased in its selection, but has tendency to put
Ice Rod in Turtle Rock.
vt22: Drops off stale locations after 1/3 of progress
items were placed to try to circumvent vt21\'s
shortcomings.
Freshness: Keep track of stale locations (ones that cannot be
reached yet) and decrease likeliness of selecting
them the more often they were found unreachable.
Flood: Push out items starting from Link\'s House and
slightly biased to placing progression items with
less restrictions.
''')
parser.add_argument('--shuffle', default='full', const='full', nargs='?', choices=['vanilla', 'simple', 'restricted', 'full', 'crossed', 'insanity', 'restricted_legacy', 'full_legacy', 'madness_legacy', 'insanity_legacy', 'dungeonsfull', 'dungeonssimple'],
parser.add_argument('--shuffle', default='vanilla', const='vanilla', nargs='?', choices=['vanilla', 'simple', 'restricted', 'full', 'crossed', 'dungeonsfull', 'dungeonssimple'],
help='''\
Select Entrance Shuffling Algorithm. (default: %(default)s)
Full: Mix cave and dungeon entrances freely while limiting
@@ -151,14 +110,8 @@ def start():
connect remaining entrances.
Crossed: Mix cave and dungeon entrances freely while allowing
caves to cross between worlds.
Insanity: Decouple entrances and exits from each other and
shuffle them freely. Caves that used to be single
entrance will still exit to the same location from
which they are entered.
Vanilla: All entrances are in the same locations they were
in the base game.
Legacy shuffles preserve behavior from older versions of the
entrance randomizer including significant technical limitations.
The dungeon variants only mix up dungeons and keep the rest of
the overworld vanilla.
''')
@@ -195,6 +148,7 @@ def start():
(default: %(default)s)
''')
parser.add_argument('--quickswap', help='Enable quick item swapping with L and R.', action='store_true')
parser.add_argument('--pseudoboots', help='Enable pseduoboots (can dash but no logical checks).', action='store_true')
parser.add_argument('--disablemusic', help='Disables game music.', action='store_true')
parser.add_argument('--keysanity', help='''\
Keys (and other dungeon items) are no longer restricted to
@@ -204,8 +158,6 @@ def start():
Keys are universal, shooting arrows costs rupees,
and a few other little things make this more like Zelda-1.
''', action='store_true')
parser.add_argument('--custom', default=False, help='Not supported.')
parser.add_argument('--customitemarray', default=False, help='Not supported.')
parser.add_argument('--nodungeonitems', help='''\
Remove Maps and Compasses from Itempool, replacing them by
empty slots.
@@ -240,6 +192,14 @@ def start():
Alternatively, can be a ALttP Rom patched with a Link
sprite that will be extracted.
''')
parser.add_argument('--huditemcounter', default=False, help='''\
Displays a (number of items collected) / (total items available) counter
on the HUD.
''', action='store_true')
parser.add_argument('--nofastrom', default=False, help='''\
Displays a (number of items collected) / (total items available) counter
on the HUD.
''', action='store_true')
parser.add_argument('--suppress_rom', help='Do not create an output rom file.', action='store_true')
parser.add_argument('--gui', help='Launch the GUI', action='store_true')
parser.add_argument('--jsonout', action='store_true', help='''\
@@ -258,6 +218,7 @@ def start():
parser.add_argument('--securerandom', default=False, action='store_true')
parser.add_argument('--outputpath')
parser.add_argument('--outputname')
args = parser.parse_args()
if args.outputpath and os.path.isdir(args.outputpath):

File diff suppressed because it is too large Load Diff

250
InitialSram.py Normal file
View File

@@ -0,0 +1,250 @@
from dataclasses import dataclass, field
from BaseClasses import CollectionState
from Utils import count_set_bits
SRAM_SIZE = 0x500
ROOM_DATA = 0x000
OVERWORLD_DATA = 0x280
def _new_default_sram():
sram_buf = [0x00] * 0x500
sram_buf[ROOM_DATA+0x20D] = 0xF0
sram_buf[ROOM_DATA+0x20F] = 0xF0
sram_buf[0x379] = 0x68
sram_buf[0x401] = 0xFF
sram_buf[0x402] = 0xFF
return sram_buf
@dataclass
class InitialSram:
_initial_sram_bytes: list[int] = field(default_factory=_new_default_sram)
def _set_value(self, idx: int, val:int):
if idx > SRAM_SIZE:
raise IndexError('SRAM index out of bounds: {idx}')
if not (-1 < val < 256):
raise ValueError('SRAM value must be between 0 and 255: {val}')
self._initial_sram_bytes[idx] = val
def _or_value(self, idx: int, val:int):
if idx > SRAM_SIZE:
raise IndexError('SRAM index out of bounds: {idx}')
if not (-1 < val < 256):
raise ValueError('SRAM value must be between 0 and 255: {val}')
self._initial_sram_bytes[idx] |= val
def pre_open_aga_curtains(self):
self._or_value(ROOM_DATA+0x61, 0x80)
def pre_open_skullwoods_curtains(self):
self._or_value(ROOM_DATA+0x93, 0x80)
def pre_open_lumberjack(self):
self._or_value(OVERWORLD_DATA+0x02, 0x20)
def pre_open_castle_gate(self):
self._or_value(OVERWORLD_DATA+0x1B, 0x20)
def pre_open_ganons_tower(self):
self._or_value(OVERWORLD_DATA+0x43, 0x20)
def pre_open_pyramid_hole(self):
self._or_value(OVERWORLD_DATA+0x5B, 0x20)
def pre_open_tr_bomb_doors(self):
self._or_value(ROOM_DATA+0x47, 0x80)
self._or_value(ROOM_DATA+0x01AB, 0x80)
def set_starting_equipment(self, world: object, player: int):
equip = [0] * (0x340 + 0x4F)
equip[0x36C] = 0x18
equip[0x36D] = 0x18
equip[0x379] = 0x68
starting_bomb_cap_upgrades = 0
starting_arrow_cap_upgrades = 0
startingstate = CollectionState(world)
if startingstate.has('Bow', player):
equip[0x340] = 3 if startingstate.has('Silver Arrows', player) else 1
equip[0x38E] |= 0x20 # progressive flag to get the correct hint in all cases
if not world.retro[player]:
equip[0x38E] |= 0x80
if startingstate.has('Silver Arrows', player):
equip[0x38E] |= 0x40
if startingstate.has('Titans Mitts', player):
equip[0x354] = 2
elif startingstate.has('Power Glove', player):
equip[0x354] = 1
if startingstate.has('Golden Sword', player):
equip[0x359] = 4
elif startingstate.has('Tempered Sword', player):
equip[0x359] = 3
elif startingstate.has('Master Sword', player):
equip[0x359] = 2
elif startingstate.has('Fighter Sword', player):
equip[0x359] = 1
if startingstate.has('Mirror Shield', player):
equip[0x35A] = 3
elif startingstate.has('Red Shield', player):
equip[0x35A] = 2
elif startingstate.has('Blue Shield', player):
equip[0x35A] = 1
if startingstate.has('Red Mail', player):
equip[0x35B] = 2
elif startingstate.has('Blue Mail', player):
equip[0x35B] = 1
if startingstate.has('Magic Upgrade (1/4)', player):
equip[0x37B] = 2
equip[0x36E] = 0x80
elif startingstate.has('Magic Upgrade (1/2)', player):
equip[0x37B] = 1
equip[0x36E] = 0x80
for item in world.precollected_items:
if item.player != player:
continue
if item.name in ['Bow', 'Silver Arrows', 'Progressive Bow', 'Progressive Bow (Alt)',
'Titans Mitts', 'Power Glove', 'Progressive Glove',
'Golden Sword', 'Tempered Sword', 'Master Sword', 'Fighter Sword', 'Progressive Sword',
'Mirror Shield', 'Red Shield', 'Blue Shield', 'Progressive Shield',
'Red Mail', 'Blue Mail', 'Progressive Armor',
'Magic Upgrade (1/4)', 'Magic Upgrade (1/2)']:
continue
set_table = {'Book of Mudora': (0x34E, 1), 'Hammer': (0x34B, 1), 'Bug Catching Net': (0x34D, 1), 'Hookshot': (0x342, 1), 'Magic Mirror': (0x353, 2),
'Cape': (0x352, 1), 'Lamp': (0x34A, 1), 'Moon Pearl': (0x357, 1), 'Cane of Somaria': (0x350, 1), 'Cane of Byrna': (0x351, 1),
'Fire Rod': (0x345, 1), 'Ice Rod': (0x346, 1), 'Bombos': (0x347, 1), 'Ether': (0x348, 1), 'Quake': (0x349, 1)}
or_table = {'Green Pendant': (0x374, 0x04), 'Red Pendant': (0x374, 0x01), 'Blue Pendant': (0x374, 0x02),
'Crystal 1': (0x37A, 0x02), 'Crystal 2': (0x37A, 0x10), 'Crystal 3': (0x37A, 0x40), 'Crystal 4': (0x37A, 0x20),
'Crystal 5': (0x37A, 0x04), 'Crystal 6': (0x37A, 0x01), 'Crystal 7': (0x37A, 0x08),
'Big Key (Eastern Palace)': (0x367, 0x20), 'Compass (Eastern Palace)': (0x365, 0x20), 'Map (Eastern Palace)': (0x369, 0x20),
'Big Key (Desert Palace)': (0x367, 0x10), 'Compass (Desert Palace)': (0x365, 0x10), 'Map (Desert Palace)': (0x369, 0x10),
'Big Key (Tower of Hera)': (0x366, 0x20), 'Compass (Tower of Hera)': (0x364, 0x20), 'Map (Tower of Hera)': (0x368, 0x20),
'Big Key (Escape)': (0x367, 0xC0), 'Compass (Escape)': (0x365, 0xC0), 'Map (Escape)': (0x369, 0xC0),
'Big Key (Agahnims Tower)': (0x367, 0x08), 'Compass (Agahnims Tower)': (0x365, 0x08), 'Map (Agahnims Tower)': (0x369, 0x08),
'Big Key (Palace of Darkness)': (0x367, 0x02), 'Compass (Palace of Darkness)': (0x365, 0x02), 'Map (Palace of Darkness)': (0x369, 0x02),
'Big Key (Thieves Town)': (0x366, 0x10), 'Compass (Thieves Town)': (0x364, 0x10), 'Map (Thieves Town)': (0x368, 0x10),
'Big Key (Skull Woods)': (0x366, 0x80), 'Compass (Skull Woods)': (0x364, 0x80), 'Map (Skull Woods)': (0x368, 0x80),
'Big Key (Swamp Palace)': (0x367, 0x04), 'Compass (Swamp Palace)': (0x365, 0x04), 'Map (Swamp Palace)': (0x369, 0x04),
'Big Key (Ice Palace)': (0x366, 0x40), 'Compass (Ice Palace)': (0x364, 0x40), 'Map (Ice Palace)': (0x368, 0x40),
'Big Key (Misery Mire)': (0x367, 0x01), 'Compass (Misery Mire)': (0x365, 0x01), 'Map (Misery Mire)': (0x369, 0x01),
'Big Key (Turtle Rock)': (0x366, 0x08), 'Compass (Turtle Rock)': (0x364, 0x08), 'Map (Turtle Rock)': (0x368, 0x08),
'Big Key (Ganons Tower)': (0x366, 0x04), 'Compass (Ganons Tower)': (0x364, 0x04), 'Map (Ganons Tower)': (0x368, 0x04)}
set_or_table = {'Flippers': (0x356, 1, 0x379, 0x02),'Pegasus Boots': (0x355, 1, 0x379, 0x04),
'Shovel': (0x34C, 1, 0x38C, 0x04), 'Ocarina': (0x34C, 3, 0x38C, 0x01),
'Mushroom': (0x344, 1, 0x38C, 0x20 | 0x08), 'Magic Powder': (0x344, 2, 0x38C, 0x10),
'Blue Boomerang': (0x341, 1, 0x38C, 0x80), 'Red Boomerang': (0x341, 2, 0x38C, 0x40)}
keys = {'Small Key (Eastern Palace)': [0x37E], 'Small Key (Desert Palace)': [0x37F],
'Small Key (Tower of Hera)': [0x386],
'Small Key (Agahnims Tower)': [0x380], 'Small Key (Palace of Darkness)': [0x382],
'Small Key (Thieves Town)': [0x387],
'Small Key (Skull Woods)': [0x384], 'Small Key (Swamp Palace)': [0x381],
'Small Key (Ice Palace)': [0x385],
'Small Key (Misery Mire)': [0x383], 'Small Key (Turtle Rock)': [0x388],
'Small Key (Ganons Tower)': [0x389],
'Small Key (Universal)': [0x38B], 'Small Key (Escape)': [0x37C, 0x37D]}
bottles = {'Bottle': 2, 'Bottle (Red Potion)': 3, 'Bottle (Green Potion)': 4, 'Bottle (Blue Potion)': 5,
'Bottle (Fairy)': 6, 'Bottle (Bee)': 7, 'Bottle (Good Bee)': 8}
rupees = {'Rupee (1)': 1, 'Rupees (5)': 5, 'Rupees (20)': 20, 'Rupees (50)': 50, 'Rupees (100)': 100, 'Rupees (300)': 300}
bomb_caps = {'Bomb Upgrade (+5)': 5, 'Bomb Upgrade (+10)': 10}
arrow_caps = {'Arrow Upgrade (+5)': 5, 'Arrow Upgrade (+10)': 10}
bombs = {'Single Bomb': 1, 'Bombs (3)': 3, 'Bombs (10)': 10}
arrows = {'Single Arrow': 1, 'Arrows (10)': 10}
if item.name in set_table:
equip[set_table[item.name][0]] = set_table[item.name][1]
elif item.name in or_table:
equip[or_table[item.name][0]] |= or_table[item.name][1]
elif item.name in set_or_table:
equip[set_or_table[item.name][0]] = set_or_table[item.name][1]
equip[set_or_table[item.name][2]] |= set_or_table[item.name][3]
elif item.name in keys:
for address in keys[item.name]:
equip[address] = min(equip[address] + 1, 99)
elif item.name in bottles:
if equip[0x34F] < world.difficulty_requirements[player].progressive_bottle_limit:
equip[0x35C + equip[0x34F]] = bottles[item.name]
equip[0x34F] += 1
elif item.name in rupees:
equip[0x360:0x362] = list(min(equip[0x360] + (equip[0x361] << 8) + rupees[item.name], 9999).to_bytes(2, byteorder='little', signed=False))
equip[0x362:0x364] = list(min(equip[0x362] + (equip[0x363] << 8) + rupees[item.name], 9999).to_bytes(2, byteorder='little', signed=False))
elif item.name in bomb_caps:
starting_bomb_cap_upgrades += bomb_caps[item.name]
elif item.name in arrow_caps:
starting_arrow_cap_upgrades += arrow_caps[item.name]
elif item.name in bombs:
equip[0x343] += bombs[item.name]
elif item.name in arrows:
if world.retro[player]:
equip[0x38E] |= 0x80
equip[0x377] = 1
else:
equip[0x377] += arrows[item.name]
elif item.name in ['Piece of Heart', 'Boss Heart Container', 'Sanctuary Heart Container']:
if item.name == 'Piece of Heart':
equip[0x36B] = (equip[0x36B] + 1) % 4
if item.name != 'Piece of Heart' or equip[0x36B] == 0:
equip[0x36C] = min(equip[0x36C] + 0x08, 0xA0)
equip[0x36D] = min(equip[0x36D] + 0x08, 0xA0)
else:
raise RuntimeError(f'Unsupported item in starting equipment: {item.name}')
equip[0x370] = min(starting_bomb_cap_upgrades, 50)
equip[0x371] = min(starting_arrow_cap_upgrades, 70)
equip[0x343] = min(equip[0x343], 10)
equip[0x377] = min(equip[0x377], 30)
# Assertion and copy equip to initial_sram_bytes
assert equip[:0x340] == [0] * 0x340
self._initial_sram_bytes[0x340:0x38F] = equip[0x340:0x38F]
# Set counters and highest equipment values
self._initial_sram_bytes[0x471] = count_set_bits(self._initial_sram_bytes[0x37A])
self._initial_sram_bytes[0x429] = count_set_bits(self._initial_sram_bytes[0x374])
self._initial_sram_bytes[0x417] = self._initial_sram_bytes[0x359]
self._initial_sram_bytes[0x422] = self._initial_sram_bytes[0x35A]
self._initial_sram_bytes[0x46E] = self._initial_sram_bytes[0x35B]
if world.swords == "swordless":
self._initial_sram_bytes[0x359] = 0xFF
self._initial_sram_bytes[0x417] = 0x00
def set_starting_rupees(self, rupees: int):
if not (-1 < rupees < 10000):
raise ValueError("Starting rupees must be between 0 and 9999")
self._initial_sram_bytes[0x362] = self._initial_sram_bytes[0x360] = rupees & 0xFF
self._initial_sram_bytes[0x363] = self._initial_sram_bytes[0x361] = rupees >> 8
def set_progress_indicator(self, indicator: int):
self._set_value(0x3C5, indicator)
def set_progress_flags(self, flags: int):
self._set_value(0x3C6, flags)
def set_starting_entrance(self, entrance: int):
self._set_value(0x3C8, entrance)
def set_starting_timer(self, seconds: int):
timer = (seconds * 60).to_bytes(4, "little")
self._initial_sram_bytes[0x454] = timer[0]
self._initial_sram_bytes[0x455] = timer[1]
self._initial_sram_bytes[0x456] = timer[2]
self._initial_sram_bytes[0x457] = timer[3]
def set_swordless_curtains(self):
self._or_value(ROOM_DATA+0x61, 0x80)
self._or_value(ROOM_DATA+0x93, 0x80)
def get_initial_sram(self):
assert len(self._initial_sram_bytes) == SRAM_SIZE
return self._initial_sram_bytes[:]

View File

@@ -28,7 +28,9 @@ def create_inverted_regions(world, player):
"Blind\'s Hideout - Right",
"Blind\'s Hideout - Far Left",
"Blind\'s Hideout - Far Right"]),
create_lw_region(player, 'Northeast Light World', None, ['Zoras River', 'Waterfall of Wishing', 'Potion Shop Outer Rock', 'Northeast Dark World Mirror Spot', 'Northeast Light World Warp']),
create_lw_region(player, 'Northeast Light World', None, ['Zoras River', 'Waterfall Stoop', 'Potion Shop Outer Rock', 'Northeast Dark World Mirror Spot', 'Northeast Light World Warp']),
create_lw_region(player, 'Waterfall Stoop', None, ['Northeast Light World', 'Waterfall of Wishing']),
create_lw_region(player, 'Potion Shop Area', None, ['Potion Shop', 'Potion Shop Inner Bushes', 'Potion Shop Inner Rock', 'Potion Shop Mirror Spot', 'Potion Shop River Drop']),
create_lw_region(player, 'Graveyard Cave Area', None, ['Graveyard Cave', 'Graveyard Cave Inner Bushes', 'Graveyard Cave Mirror Spot']),
create_lw_region(player, 'River', None, ['Light World Pier', 'Potion Shop Pier']),
@@ -630,13 +632,13 @@ location_table = {'Mushroom': (0x180013, False, 'in the woods'),
'Frog': (None, False, None),
'Missing Smith': (None, False, None),
'Dark Blacksmith Ruins': (None, False, None),
'Eastern Palace - Prize': ([0x1209D, 0x53EF8, 0x53EF9, 0x180052, 0x18007C, 0xC6FE], True, 'Eastern Palace'),
'Desert Palace - Prize': ([0x1209E, 0x53F1C, 0x53F1D, 0x180053, 0x180078, 0xC6FF], True, 'Desert Palace'),
'Tower of Hera - Prize': ([0x120A5, 0x53F0A, 0x53F0B, 0x18005A, 0x18007A, 0xC706], True, 'Tower of Hera'),
'Palace of Darkness - Prize': ([0x120A1, 0x53F00, 0x53F01, 0x180056, 0x18007D, 0xC702], True, 'Palace of Darkness'),
'Swamp Palace - Prize': ([0x120A0, 0x53F6C, 0x53F6D, 0x180055, 0x180071, 0xC701], True, 'Swamp Palace'),
'Thieves\' Town - Prize': ([0x120A6, 0x53F36, 0x53F37, 0x18005B, 0x180077, 0xC707], True, 'Thieves\' Town'),
'Skull Woods - Prize': ([0x120A3, 0x53F12, 0x53F13, 0x180058, 0x18007B, 0xC704], True, 'Skull Woods'),
'Ice Palace - Prize': ([0x120A4, 0x53F5A, 0x53F5B, 0x180059, 0x180073, 0xC705], True, 'Ice Palace'),
'Misery Mire - Prize': ([0x120A2, 0x53F48, 0x53F49, 0x180057, 0x180075, 0xC703], True, 'Misery Mire'),
'Turtle Rock - Prize': ([0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708], True, 'Turtle Rock')}
'Eastern Palace - Prize': ([0x1209D, 0x53E76, 0x53E77, 0x180052, 0x180070, 0xC6FE], True, 'Eastern Palace'),
'Desert Palace - Prize': ([0x1209E, 0x53E7A, 0x53E7B, 0x180053, 0x180072, 0xC6FF], True, 'Desert Palace'),
'Tower of Hera - Prize': ([0x120A5, 0x53E78, 0x53E79, 0x18005A, 0x180071, 0xC706], True, 'Tower of Hera'),
'Palace of Darkness - Prize': ([0x120A1, 0x53E7C, 0x53E7D, 0x180056, 0x180073, 0xC702], True, 'Palace of Darkness'),
'Swamp Palace - Prize': ([0x120A0, 0x53E88, 0x53E89, 0x180055, 0x180079, 0xC701], True, 'Swamp Palace'),
'Thieves\' Town - Prize': ([0x120A6, 0x53E82, 0x53E83, 0x18005B, 0x180076, 0xC707], True, 'Thieves\' Town'),
'Skull Woods - Prize': ([0x120A3, 0x53E7E, 0x53E7F, 0x180058, 0x180074, 0xC704], True, 'Skull Woods'),
'Ice Palace - Prize': ([0x120A4, 0x53E86, 0x53E87, 0x180059, 0x180078, 0xC705], True, 'Ice Palace'),
'Misery Mire - Prize': ([0x120A2, 0x53E84, 0x53E85, 0x180057, 0x180077, 0xC703], True, 'Misery Mire'),
'Turtle Rock - Prize': ([0x120A7, 0x53E80, 0x53E81, 0x18005C, 0x180075, 0xC708], True, 'Turtle Rock')}

View File

@@ -13,28 +13,31 @@ from Items import ItemFactory
#This file sets the item pools for various modes. Timed modes and triforce hunt are enforced first, and then extra items are specified per mode to fill in the remaining space.
#Some basic items that various modes require are placed here, including pendants and crystals. Medallion requirements for the two relevant entrances are also decided.
alwaysitems = ['Bombos', 'Book of Mudora', 'Cane of Somaria', 'Ether', 'Fire Rod', 'Flippers', 'Ocarina', 'Hammer', 'Hookshot', 'Ice Rod', 'Lamp',
'Cape', 'Magic Powder', 'Mushroom', 'Pegasus Boots', 'Quake', 'Shovel', 'Bug Catching Net', 'Cane of Byrna', 'Blue Boomerang', 'Red Boomerang']
progressivegloves = ['Progressive Glove'] * 2
basicgloves = ['Power Glove', 'Titans Mitts']
alwaysitems = ['Bombos', 'Book of Mudora', 'Cane of Somaria', 'Ether', 'Fire Rod', 'Flippers', 'Ocarina', 'Hammer', 'Hookshot',
'Ice Rod', 'Lamp', 'Cape', 'Magic Powder', 'Mushroom', 'Pegasus Boots', 'Quake', 'Shovel', 'Bug Catching Net',
'Cane of Byrna', 'Blue Boomerang', 'Red Boomerang']
progressivegloves = ['Progressive Glove'] * 3
normalbottles = ['Bottle', 'Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Fairy)', 'Bottle (Bee)', 'Bottle (Good Bee)']
hardbottles = ['Bottle', 'Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Bee)', 'Bottle (Good Bee)']
normalbaseitems = (['Magic Upgrade (1/2)', 'Single Arrow', 'Sanctuary Heart Container', 'Arrows (10)', 'Bombs (10)'] +
normalbaseitems = (['Sanctuary Heart Container', 'Bombs (10)'] +
['Rupees (300)'] * 4 + ['Boss Heart Container'] * 12 + ['Piece of Heart'] * 16)
expertbaseitems = (['Sanctuary Heart Container', 'Bombs (10)'] +
['Rupees (300)'] * 4 + ['Boss Heart Container'] * 10 + ['Piece of Heart'] * 24)
normalfirst15extra = ['Rupees (100)', 'Rupees (300)', 'Rupees (50)'] + ['Arrows (10)'] * 6 + ['Bombs (3)'] * 6
normalsecond15extra = ['Bombs (3)'] * 10 + ['Rupees (50)'] * 2 + ['Arrows (10)'] * 2 + ['Rupee (1)']
normalthird10extra = ['Rupees (50)'] * 4 + ['Rupees (20)'] * 3 + ['Arrows (10)', 'Rupee (1)', 'Rupees (5)']
normalfourth5extra = ['Arrows (10)'] * 2 + ['Rupees (20)'] * 2 + ['Rupees (5)']
normalfinal25extra = ['Rupees (20)'] * 23 + ['Rupees (5)'] * 2
normalfirst15extra = ['Rupees (100)', 'Rupees (300)', 'Rupees (50)'] + ['Bombs (3)'] * 6
normalsecond15extra = ['Bombs (3)'] * 10 + ['Rupees (50)'] * 2
normalthird10extra = ['Rupees (50)'] * 4 + ['Rupees (20)'] * 3
normalfourth5extra = ['Rupees (20)'] * 2
normalfinal25extra = ['Rupees (20)'] * 21
basecapacity = ['Bomb Upgrade (+10)'] + ['Arrow Upgrade (+10)'] * 3
Difficulty = namedtuple('Difficulty',
['baseitems', 'bottles', 'bottle_count', 'same_bottle', 'progressiveshield',
'basicshield', 'progressivearmor', 'basicarmor', 'swordless',
'progressivesword', 'basicsword', 'basicbow', 'timedohko', 'timedother',
'triforcehunt', 'triforce_pieces_required', 'retro',
'extras', 'progressive_sword_limit', 'progressive_shield_limit',
'progressivearmor', 'swordless', 'magicitems',
'progressivesword', 'basicbow', 'teleporters',
'retro', 'extras', 'progressive_sword_limit', 'progressive_shield_limit',
'progressive_armor_limit', 'progressive_bottle_limit',
'progressive_bow_limit', 'heart_piece_limit', 'boss_heart_container_limit'])
@@ -47,17 +50,13 @@ difficulties = {
bottle_count = 4,
same_bottle = False,
progressiveshield = ['Progressive Shield'] * 3,
basicshield = ['Blue Shield', 'Red Shield', 'Mirror Shield'],
progressivearmor = ['Progressive Armor'] * 2,
basicarmor = ['Blue Mail', 'Red Mail'],
swordless = ['Rupees (20)'] * 4,
progressivesword = ['Progressive Sword'] * 3,
basicsword = ['Master Sword', 'Tempered Sword', 'Golden Sword'],
basicbow = ['Bow', 'Silver Arrows'],
timedohko = ['Green Clock'] * 25,
timedother = ['Green Clock'] * 20 + ['Blue Clock'] * 10 + ['Red Clock'] * 10,
triforcehunt = ['Triforce Piece'] * 30,
triforce_pieces_required = 20,
magicitems = ['Bombos', 'Bombos', 'Cane of Somaria', 'Ether', 'Ether', 'Fire Rod', 'Ice Rod', 'Lamp', 'Cape', 'Cape',
'Quake', 'Quake', 'Cane of Byrna'],
teleporters = 13,
retro = ['Small Key (Universal)'] * 17 + ['Rupees (20)'] * 10,
extras = [normalfirst15extra, normalsecond15extra, normalthird10extra, normalfourth5extra, normalfinal25extra],
progressive_sword_limit = 4,
@@ -74,17 +73,12 @@ difficulties = {
bottle_count = 4,
same_bottle = False,
progressiveshield = ['Progressive Shield'] * 3,
basicshield = ['Blue Shield', 'Red Shield', 'Red Shield'],
progressivearmor = ['Progressive Armor'] * 2,
basicarmor = ['Progressive Armor'] * 2, # neither will count
swordless = ['Rupees (20)'] * 4,
progressivesword = ['Progressive Sword'] * 3,
basicsword = ['Master Sword', 'Master Sword', 'Tempered Sword'],
basicbow = ['Bow'] * 2,
timedohko = ['Green Clock'] * 25,
timedother = ['Green Clock'] * 20 + ['Blue Clock'] * 10 + ['Red Clock'] * 10,
triforcehunt = ['Triforce Piece'] * 30,
triforce_pieces_required = 20,
magicitems = ['Bombos', 'Cane of Somaria', 'Ether', 'Fire Rod', 'Ice Rod', 'Cape', 'Quake', 'Cane of Byrna'],
teleporters = 18,
retro = ['Small Key (Universal)'] * 12 + ['Rupees (5)'] * 15,
extras = [normalfirst15extra, normalsecond15extra, normalthird10extra, normalfourth5extra, normalfinal25extra],
progressive_sword_limit = 3,
@@ -96,22 +90,17 @@ difficulties = {
heart_piece_limit = 16,
),
'expert': Difficulty(
baseitems = normalbaseitems,
baseitems = expertbaseitems,
bottles = hardbottles,
bottle_count = 4,
same_bottle = False,
progressiveshield = ['Progressive Shield'] * 3,
basicshield = ['Progressive Shield'] * 3, #only the first one will upgrade, making this equivalent to two blue shields
progressivearmor = ['Progressive Armor'] * 2, # neither will count
basicarmor = ['Progressive Armor'] * 2, # neither will count
swordless = ['Rupees (20)'] * 4,
progressivesword = ['Progressive Sword'] * 3,
basicsword = ['Fighter Sword', 'Master Sword', 'Master Sword'],
basicbow = ['Bow'] * 2,
timedohko = ['Green Clock'] * 20 + ['Red Clock'] * 5,
timedother = ['Green Clock'] * 20 + ['Blue Clock'] * 10 + ['Red Clock'] * 10,
triforcehunt = ['Triforce Piece'] * 30,
triforce_pieces_required = 20,
magicitems = [],
teleporters = 20,
retro = ['Small Key (Universal)'] * 12 + ['Rupees (5)'] * 15,
extras = [normalfirst15extra, normalsecond15extra, normalthird10extra, normalfourth5extra, normalfinal25extra],
progressive_sword_limit = 2,
@@ -125,35 +114,18 @@ difficulties = {
}
def generate_itempool(world, player):
if (world.difficulty not in ['normal', 'hard', 'expert'] or world.goal not in ['ganon', 'pedestal', 'dungeons', 'triforcehunt', 'crystals']
or world.mode not in ['open', 'standard', 'inverted'] or world.timer not in ['none', 'display', 'timed', 'timed-ohko', 'ohko', 'timed-countdown'] or world.progressive not in ['on', 'off', 'random']):
if (world.difficulty not in ['normal', 'hard', 'expert'] or world.goal not in ['ganon', 'pedestal', 'dungeons', 'crystals', 'all_items', 'completionist']
or world.mode not in ['open', 'standard', 'inverted'] or world.timer not in ['none', 'ohko'] or world.progressive not in ['on', 'off', 'random']):
raise NotImplementedError('Not supported yet')
if world.timer in ['ohko', 'timed-ohko']:
world.can_take_damage = False
if world.goal in ['pedestal', 'triforcehunt']:
if world.goal in ['pedestal']:
world.push_item(world.get_location('Ganon', player), ItemFactory('Nothing', player), False)
else:
world.push_item(world.get_location('Ganon', player), ItemFactory('Triforce', player), False)
if world.goal in ['triforcehunt']:
if world.mode == 'inverted':
region = world.get_region('Light World',player)
else:
region = world.get_region('Hyrule Castle Courtyard', player)
loc = Location(player, "Murahdahla", parent=region)
loc.access_rule = lambda state: state.item_count('Triforce Piece', player) + state.item_count('Power Star', player) > state.world.treasure_hunt_count
region.locations.append(loc)
world.dynamic_locations.append(loc)
world.clear_location_cache()
world.push_item(loc, ItemFactory('Triforce', player), False)
loc.event = True
loc.locked = True
world.get_location('Ganon', player).event = True
world.get_location('Ganon', player).locked = True
world.push_item(world.get_location('Agahnim 1', player), ItemFactory('Beat Agahnim 1', player), False)
@@ -176,11 +148,7 @@ def generate_itempool(world, player):
world.get_location('Floodgate', player).locked = True
# set up item pool
if world.custom:
(pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, treasure_hunt_icon, lamps_needed_for_dark_rooms) = make_custom_item_pool(world.progressive, world.shuffle, world.difficulty, world.timer, world.goal, world.mode, world.swords, world.retro, world.customitemarray)
world.rupoor_cost = min(world.customitemarray[67], 9999)
else:
(pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, treasure_hunt_icon, lamps_needed_for_dark_rooms) = get_pool_core(world.progressive, world.shuffle, world.difficulty, world.timer, world.goal, world.mode, world.swords, world.retro)
(pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, treasure_hunt_icon, lamps_needed_for_dark_rooms) = get_pool_core(world.progressive, world.shuffle, world.difficulty, world.timer, world.goal, world.mode, world.swords, world.retro)
world.itempool += ItemFactory(pool, player)
for item in precollected_items:
world.push_precollected(ItemFactory(item, player))
@@ -202,13 +170,19 @@ def generate_itempool(world, player):
# logic has some branches where having 4 hearts is one possible requirement (of several alternatives)
# rather than making all hearts/heart pieces progression items (which slows down generation considerably)
# We mark one random heart container as an advancement item (or 4 heart pieces in expert mode)
if world.difficulty in ['normal', 'hard'] and not (world.custom and world.customitemarray[30] == 0):
if world.difficulty in ['normal', 'hard']:
[item for item in world.itempool if item.name == 'Boss Heart Container' and item.player == player][0].advancement = True
elif world.difficulty in ['expert'] and not (world.custom and world.customitemarray[29] < 4):
elif world.difficulty in ['expert']:
adv_heart_pieces = [item for item in world.itempool if item.name == 'Piece of Heart' and item.player == player][0:4]
for hp in adv_heart_pieces:
hp.advancement = True
# mark only one copy of each magic item as advancement
magic_items = ['Bombos', 'Cane of Somaria', 'Ether', 'Fire Rod', 'Ice Rod', 'Lamp', 'Cape', 'Quake', 'Cane of Byrna']
for magic_item in magic_items:
for extra_item in [item for item in world.itempool if item.name == magic_item and item.player == player][1:]:
extra_item.advancement = False
# shuffle medallions
mm_medallion = ['Ether', 'Quake', 'Bombos'][random.randint(0, 2)]
tr_medallion = ['Ether', 'Quake', 'Bombos'][random.randint(0, 2)]
@@ -235,7 +209,7 @@ take_any_locations = [
def set_up_take_anys(world, player):
if world.mode == 'inverted' and 'Dark Sanctuary Hint' in take_any_locations:
take_any_locations.remove('Dark Sanctuary Hint')
regions = random.sample(take_any_locations, 5)
old_man_take_any = Region("Old Man Sword Cave", RegionType.Cave, 'the sword cave', player)
@@ -325,7 +299,7 @@ def fill_prizes(world, attempts=15):
def set_up_shops(world, player):
# Changes to basic Shops
# TODO: move hard+ mode changes for sheilds here, utilizing the new shops
# TODO: move hard+ mode changes for shields here, utilizing the new shops
for shop in world.shops:
shop.active = True
@@ -354,31 +328,23 @@ def get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, r
treasure_hunt_icon = None
pool.extend(alwaysitems)
precollected_items.extend(basecapacity)
def want_progressives():
return random.choice([True, False]) if progressive == 'random' else progressive == 'on'
if want_progressives():
pool.extend(progressivegloves)
else:
pool.extend(basicgloves)
pool.extend(progressivegloves)
lamps_needed_for_dark_rooms = 1
# insanity shuffle doesn't have fake LW/DW logic so for now guaranteed Mirror and Moon Pearl at the start
if shuffle == 'insanity_legacy':
placed_items.append(('Link\'s House', 'Magic Mirror'))
placed_items.append(('Sanctuary', 'Moon Pearl'))
else:
pool.extend(['Magic Mirror', 'Moon Pearl'])
pool.extend(['Magic Mirror', 'Magic Mirror', 'Moon Pearl'])
if timer == 'display':
clock_mode = 'stopwatch'
elif timer == 'ohko':
if timer == 'ohko':
clock_mode = 'ohko'
diff = difficulties[difficulty]
pool.extend(diff.baseitems)
pool.extend(diff.magicitems)
# expert+ difficulties produce the same contents for
# all bottles, since only one bottle is available
@@ -389,15 +355,8 @@ def get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, r
thisbottle = random.choice(diff.bottles)
pool.append(thisbottle)
if want_progressives():
pool.extend(diff.progressiveshield)
else:
pool.extend(diff.basicshield)
if want_progressives():
pool.extend(diff.progressivearmor)
else:
pool.extend(diff.basicarmor)
pool.extend(diff.progressiveshield)
pool.extend(diff.progressivearmor)
if swords != 'swordless':
if want_progressives():
@@ -413,20 +372,12 @@ def get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, r
pool.extend(['Bow', 'Silver Arrows'])
elif swords == 'assured':
precollected_items.append('Fighter Sword')
if want_progressives():
pool.extend(diff.progressivesword)
pool.extend(['Rupees (100)'])
else:
pool.extend(diff.basicsword)
pool.extend(['Rupees (100)'])
pool.extend(diff.progressivesword)
pool.extend(['Rupees (100)'])
elif swords == 'vanilla':
swords_to_use = []
if want_progressives():
swords_to_use.extend(diff.progressivesword)
swords_to_use.extend(['Progressive Sword'])
else:
swords_to_use.extend(diff.basicsword)
swords_to_use.extend(['Fighter Sword'])
swords_to_use.extend(diff.progressivesword)
swords_to_use.extend(['Progressive Sword'])
random.shuffle(swords_to_use)
placed_items.append(('Link\'s Uncle', swords_to_use.pop()))
@@ -437,28 +388,12 @@ def get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, r
else:
placed_items.append(('Master Sword Pedestal', 'Triforce'))
else:
if want_progressives():
pool.extend(diff.progressivesword)
pool.extend(['Progressive Sword'])
else:
pool.extend(diff.basicsword)
pool.extend(['Fighter Sword'])
pool.extend(diff.progressivesword)
pool.extend(['Progressive Sword'])
extraitems = total_items_to_place - len(pool) - len(placed_items)
if timer in ['timed', 'timed-countdown']:
pool.extend(diff.timedother)
extraitems -= len(diff.timedother)
clock_mode = 'stopwatch' if timer == 'timed' else 'countdown'
elif timer == 'timed-ohko':
pool.extend(diff.timedohko)
extraitems -= len(diff.timedohko)
clock_mode = 'countdown-ohko'
if goal == 'triforcehunt':
pool.extend(diff.triforcehunt)
extraitems -= len(diff.triforcehunt)
treasure_hunt_count = diff.triforce_pieces_required
treasure_hunt_icon = 'Triforce Piece'
pool.extend(['Teleporter'] * diff.teleporters)
for extra in diff.extras:
if extraitems > 0:
@@ -480,159 +415,16 @@ def get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, r
pool.extend(['Small Key (Universal)'])
return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, treasure_hunt_icon, lamps_needed_for_dark_rooms)
def make_custom_item_pool(progressive, shuffle, difficulty, timer, goal, mode, swords, retro, customitemarray):
pool = []
placed_items = []
precollected_items = []
clock_mode = None
treasure_hunt_count = None
treasure_hunt_icon = None
# Correct for insanely oversized item counts and take initial steps to handle undersized pools.
for x in range(0, 64):
if customitemarray[x] > total_items_to_place:
customitemarray[x] = total_items_to_place
if customitemarray[66] > total_items_to_place:
customitemarray[66] = total_items_to_place
itemtotal = 0
for x in range(0, 65):
itemtotal = itemtotal + customitemarray[x]
itemtotal = itemtotal + customitemarray[66]
itemtotal = itemtotal + customitemarray[68]
pool.extend(['Bow'] * customitemarray[0])
pool.extend(['Silver Arrows']* customitemarray[1])
pool.extend(['Blue Boomerang'] * customitemarray[2])
pool.extend(['Red Boomerang'] * customitemarray[3])
pool.extend(['Hookshot'] * customitemarray[4])
pool.extend(['Mushroom'] * customitemarray[5])
pool.extend(['Magic Powder'] * customitemarray[6])
pool.extend(['Fire Rod'] * customitemarray[7])
pool.extend(['Ice Rod'] * customitemarray[8])
pool.extend(['Bombos'] * customitemarray[9])
pool.extend(['Ether'] * customitemarray[10])
pool.extend(['Quake'] * customitemarray[11])
pool.extend(['Lamp'] * customitemarray[12])
pool.extend(['Hammer'] * customitemarray[13])
pool.extend(['Shovel'] * customitemarray[14])
pool.extend(['Ocarina'] * customitemarray[15])
pool.extend(['Bug Catching Net'] * customitemarray[16])
pool.extend(['Book of Mudora'] * customitemarray[17])
pool.extend(['Cane of Somaria'] * customitemarray[19])
pool.extend(['Cane of Byrna'] * customitemarray[20])
pool.extend(['Cape'] * customitemarray[21])
pool.extend(['Pegasus Boots'] * customitemarray[23])
pool.extend(['Power Glove'] * customitemarray[24])
pool.extend(['Titans Mitts'] * customitemarray[25])
pool.extend(['Progressive Glove'] * customitemarray[26])
pool.extend(['Flippers'] * customitemarray[27])
pool.extend(['Piece of Heart'] * customitemarray[29])
pool.extend(['Boss Heart Container'] * customitemarray[30])
pool.extend(['Sanctuary Heart Container'] * customitemarray[31])
pool.extend(['Master Sword'] * customitemarray[33])
pool.extend(['Tempered Sword'] * customitemarray[34])
pool.extend(['Golden Sword'] * customitemarray[35])
pool.extend(['Blue Shield'] * customitemarray[37])
pool.extend(['Red Shield'] * customitemarray[38])
pool.extend(['Mirror Shield'] * customitemarray[39])
pool.extend(['Progressive Shield'] * customitemarray[40])
pool.extend(['Blue Mail'] * customitemarray[41])
pool.extend(['Red Mail'] * customitemarray[42])
pool.extend(['Progressive Armor'] * customitemarray[43])
pool.extend(['Magic Upgrade (1/2)'] * customitemarray[44])
pool.extend(['Magic Upgrade (1/4)'] * customitemarray[45])
pool.extend(['Bomb Upgrade (+5)'] * customitemarray[46])
pool.extend(['Bomb Upgrade (+10)'] * customitemarray[47])
pool.extend(['Arrow Upgrade (+5)'] * customitemarray[48])
pool.extend(['Arrow Upgrade (+10)'] * customitemarray[49])
pool.extend(['Single Arrow'] * customitemarray[50])
pool.extend(['Arrows (10)'] * customitemarray[51])
pool.extend(['Single Bomb'] * customitemarray[52])
pool.extend(['Bombs (3)'] * customitemarray[53])
pool.extend(['Rupee (1)'] * customitemarray[54])
pool.extend(['Rupees (5)'] * customitemarray[55])
pool.extend(['Rupees (20)'] * customitemarray[56])
pool.extend(['Rupees (50)'] * customitemarray[57])
pool.extend(['Rupees (100)'] * customitemarray[58])
pool.extend(['Rupees (300)'] * customitemarray[59])
pool.extend(['Rupoor'] * customitemarray[60])
pool.extend(['Blue Clock'] * customitemarray[61])
pool.extend(['Green Clock'] * customitemarray[62])
pool.extend(['Red Clock'] * customitemarray[63])
pool.extend(['Triforce Piece'] * customitemarray[64])
pool.extend(['Triforce'] * customitemarray[66])
diff = difficulties[difficulty]
lamps_needed_for_dark_rooms = 1
# expert+ difficulties produce the same contents for
# all bottles, since only one bottle is available
if diff.same_bottle:
thisbottle = random.choice(diff.bottles)
for _ in range(customitemarray[18]):
if not diff.same_bottle:
thisbottle = random.choice(diff.bottles)
pool.append(thisbottle)
if customitemarray[64] > 0 or customitemarray[65] > 0:
treasure_hunt_count = max(min(customitemarray[65], 99), 1) #To display, count must be between 1 and 99.
treasure_hunt_icon = 'Triforce Piece'
# Ensure game is always possible to complete here, force sufficient pieces if the player is unwilling.
if (customitemarray[64] < treasure_hunt_count) and (goal == 'triforcehunt') and (customitemarray[66] == 0):
extrapieces = treasure_hunt_count - customitemarray[64]
pool.extend(['Triforce Piece'] * extrapieces)
itemtotal = itemtotal + extrapieces
if timer in ['display', 'timed', 'timed-countdown']:
clock_mode = 'countdown' if timer == 'timed-countdown' else 'stopwatch'
elif timer == 'timed-ohko':
clock_mode = 'countdown-ohko'
elif timer == 'ohko':
clock_mode = 'ohko'
if goal == 'pedestal':
placed_items.append(('Master Sword Pedestal', 'Triforce'))
itemtotal = itemtotal + 1
if mode == 'standard':
if retro:
key_location = random.choice(['Secret Passage', 'Hyrule Castle - Boomerang Chest', 'Hyrule Castle - Map Chest', 'Hyrule Castle - Zelda\'s Chest', 'Sewers - Dark Cross'])
placed_items.append((key_location, 'Small Key (Universal)'))
pool.extend(['Small Key (Universal)'] * max((customitemarray[68] - 1), 0))
else:
pool.extend(['Small Key (Universal)'] * customitemarray[68])
else:
pool.extend(['Small Key (Universal)'] * customitemarray[68])
pool.extend(['Fighter Sword'] * customitemarray[32])
pool.extend(['Progressive Sword'] * customitemarray[36])
if shuffle == 'insanity_legacy':
placed_items.append(('Link\'s House', 'Magic Mirror'))
placed_items.append(('Sanctuary', 'Moon Pearl'))
pool.extend(['Magic Mirror'] * max((customitemarray[22] -1 ), 0))
pool.extend(['Moon Pearl'] * max((customitemarray[28] - 1), 0))
else:
pool.extend(['Magic Mirror'] * customitemarray[22])
pool.extend(['Moon Pearl'] * customitemarray[28])
if retro:
itemtotal = itemtotal - 28 # Corrects for small keys not being in item pool in Retro Mode
if itemtotal < total_items_to_place:
pool.extend(['Nothing'] * (total_items_to_place - itemtotal))
return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, treasure_hunt_icon, lamps_needed_for_dark_rooms)
# A quick test to ensure all combinations generate the correct amount of items.
def test():
for difficulty in ['normal', 'hard', 'expert']:
for goal in ['ganon', 'triforcehunt', 'pedestal']:
for timer in ['none', 'display', 'timed', 'timed-ohko', 'ohko', 'timed-countdown']:
for goal in ['ganon', 'pedestal']:
for timer in ['none', 'ohko']:
for mode in ['open', 'standard', 'inverted']:
for swords in ['random', 'assured', 'swordless', 'vanilla']:
for progressive in ['on', 'off']:
for shuffle in ['full', 'insanity_legacy']:
for shuffle in ['full']:
for retro in [True, False]:
out = get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, retro)
count = len(out[0]) + len(out[1])

280
Items.py
View File

@@ -23,144 +23,148 @@ def ItemFactory(items, player):
# Format: Name: (Advancement, Priority, Type, ItemCode, Pedestal Hint Text, Pedestal Credit Text, Sick Kid Credit Text, Zora Credit Text, Witch Credit Text, Flute Boy Credit Text, Hint Text)
item_table = {'Bow': (True, False, None, 0x0B, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'the Bow'),
'Progressive Bow': (True, False, None, 0x64, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'a Bow'),
'Book of Mudora': (True, False, None, 0x1D, 'This is a\nparadox?!', 'and the story book', 'the scholarly kid', 'moon runes for sale', 'drugs for literacy', 'book-worm boy can read again', 'the Book'),
'Hammer': (True, False, None, 0x09, 'stop\nhammer time!', 'and m c hammer', 'hammer-smashing kid', 'm c hammer for sale', 'stop... hammer time', 'stop, hammer time', 'the hammer'),
'Hookshot': (True, False, None, 0x0A, 'BOING!!!\nBOING!!!\nBOING!!!', 'and the tickle beam', 'tickle-monster kid', 'tickle beam for sale', 'witch and tickle boy', 'beam boy tickles again', 'the Hookshot'),
'Magic Mirror': (True, False, None, 0x1A, 'Isn\'t your\nreflection so\npretty?', 'the face reflector', 'the narcissistic kid', 'your face for sale', 'trades looking-glass', 'narcissistic boy is happy again', 'the Mirror'),
'Ocarina': (True, False, None, 0x14, 'Save the duck\nand fly to\nfreedom!', 'and the duck call', 'the duck-call kid', 'duck call for sale', 'duck-calls for trade', 'ocarina boy plays again', 'the Flute'),
'Pegasus Boots': (True, False, None, 0x4B, 'Gotta go fast!', 'and the sprint shoes', 'the running-man kid', 'sprint shoe for sale', 'shrooms for speed', 'gotta-go-fast boy runs again', 'the Boots'),
'Power Glove': (True, False, None, 0x1B, 'Now you can\nlift weak\nstuff!', 'and the grey mittens', 'body-building kid', 'lift glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'the glove'),
'Cape': (True, False, None, 0x19, 'Wear this to\nbecome\ninvisible!', 'the camouflage cape', 'red riding-hood kid', 'red hood for sale', 'hood from a hood', 'dapper boy hides again', 'the cape'),
'Mushroom': (True, False, None, 0x29, 'I\'m a fun guy!\n\nI\'m a funghi!', 'and the legal drugs', 'the drug-dealing kid', 'legal drugs for sale', 'shroom swap', 'shroom boy sells drugs again', 'the mushroom'),
'Shovel': (True, False, None, 0x13, 'Can\n You\n Dig it?', 'and the spade', 'archaeologist kid', 'dirt spade for sale', 'can you dig it', 'shovel boy digs again', 'the shovel'),
'Lamp': (True, False, None, 0x12, 'Baby, baby,\nbaby.\nLight my way!', 'and the flashlight', 'light-shining kid', 'flashlight for sale', 'fungus for illumination', 'illuminated boy can see again', 'the lamp'),
'Magic Powder': (True, False, None, 0x0D, 'you can turn\nanti-faeries\ninto faeries', 'and the magic sack', 'the sack-holding kid', 'magic sack for sale', 'the witch and assistant', 'magic boy plays marbles again', 'the powder'),
'Moon Pearl': (True, False, None, 0x1F, ' Bunny Link\n be\n gone!', 'and the jaw breaker', 'fortune-telling kid', 'lunar orb for sale', 'shrooms for moon rock', 'moon boy plays ball again', 'the moon pearl'),
'Cane of Somaria': (True, False, None, 0x15, 'I make blocks\nto hold down\nswitches!', 'and the red blocks', 'the block-making kid', 'block stick for sale', 'block stick for trade', 'cane boy makes blocks again', 'the red cane'),
'Fire Rod': (True, False, None, 0x07, 'I\'m the hot\nrod. I make\nthings burn!', 'and the flamethrower', 'fire-starting kid', 'rage rod for sale', 'fungus for rage-rod', 'firestarter boy burns again', 'the fire rod'),
'Flippers': (True, False, None, 0x1E, 'fancy a swim?', 'and the toewebs', 'the swimming kid', 'finger webs for sale', 'shrooms let you swim', 'swimming boy swims again', 'the flippers'),
'Ice Rod': (True, False, None, 0x08, 'I\'m the cold\nrod. I make\nthings freeze!', 'and the freeze ray', 'the ice-bending kid', 'freeze ray for sale', 'fungus for ice-rod', 'ice-cube boy freezes again', 'the ice rod'),
'Titans Mitts': (True, False, None, 0x1C, 'Now you can\nlift heavy\nstuff!', 'and the golden glove', 'body-building kid', 'carry glove for sale', 'fungus for bling-gloves', 'body-building boy has gold again', 'the mitts'),
'Ether': (True, False, None, 0x10, 'This magic\ncoin freezes\neverything!', 'and the bolt coin', 'coin-collecting kid', 'bolt coin for sale', 'shrooms for bolt-coin', 'medallion boy sees floor again', 'Ether'),
'Bombos': (True, False, None, 0x0F, 'Burn, baby,\nburn! Fear my\nring of fire!', 'and the swirly coin', 'coin-collecting kid', 'swirly coin for sale', 'shrooms for swirly-coin', 'medallion boy melts room again', 'Bombos'),
'Quake': (True, False, None, 0x11, 'Maxing out the\nRichter scale\nis what I do!', 'and the wavy coin', 'coin-collecting kid', 'wavy coin for sale', 'shrooms for wavy-coin', 'medallion boy shakes dirt again', 'Quake'),
'Bottle': (True, False, None, 0x16, 'Now you can\nstore potions\nand stuff!', 'and the terrarium', 'the terrarium kid', 'terrarium for sale', 'special promotion', 'bottle boy has terrarium again', 'a Bottle'),
'Bottle (Red Potion)': (True, False, None, 0x2B, 'Hearty red goop!', 'and the red goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has red goo again', 'a Bottle'),
'Bottle (Green Potion)': (True, False, None, 0x2C, 'Refreshing green goop!', 'and the green goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has green goo again', 'a Bottle'),
'Bottle (Blue Potion)': (True, False, None, 0x2D, 'Delicious blue goop!', 'and the blue goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has blue goo again', 'a Bottle'),
'Bottle (Fairy)': (True, False, None, 0x3D, 'Save me and I will revive you', 'and the captive', 'the tingle kid', 'hostage for sale', 'fairy dust and shrooms', 'bottle boy has friend again', 'a Bottle'),
'Bottle (Bee)': (True, False, None, 0x3C, 'I will sting your foes a few times', 'and the sting buddy', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has mad bee again', 'a Bottle'),
'Bottle (Good Bee)': (True, False, None, 0x48, 'I will sting your foes a whole lot!', 'and the sparkle sting', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has beetor again', 'a Bottle'),
'Master Sword': (True, False, 'Sword', 0x50, 'I beat barries and pigs alike', 'and the master sword', 'sword-wielding kid', 'glow sword for sale', 'fungus for blue slasher', 'sword boy fights again', 'the Master Sword'),
'Tempered Sword': (True, False, 'Sword', 0x02, 'I stole the\nblacksmith\'s\njob!', 'the tempered sword', 'sword-wielding kid', 'flame sword for sale', 'fungus for red slasher', 'sword boy fights again', 'the Tempered Sword'),
'Fighter Sword': (True, False, 'Sword', 0x49, 'A pathetic\nsword rests\nhere!', 'the tiny sword', 'sword-wielding kid', 'tiny sword for sale', 'fungus for tiny slasher', 'sword boy fights again', 'the small sword'),
'Golden Sword': (True, False, 'Sword', 0x03, 'The butter\nsword rests\nhere!', 'and the butter sword', 'sword-wielding kid', 'butter for sale', 'cap churned to butter', 'sword boy fights again', 'the Golden Sword'),
'Progressive Sword': (True, False, 'Sword', 0x5E, 'a better copy\nof your sword\nfor your time', 'the unknown sword', 'sword-wielding kid', 'sword for sale', 'fungus for some slasher', 'sword boy fights again', 'a sword'),
'Progressive Glove': (True, False, None, 0x61, 'a way to lift\nheavier things', 'and the lift upgrade', 'body-building kid', 'some glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'a glove'),
'Silver Arrows': (True, False, None, 0x58, 'Do you fancy\nsilver tipped\narrows?', 'and the ganonsbane', 'ganon-killing kid', 'ganon doom for sale', 'fungus for pork', 'archer boy shines again', 'the silver arrows'),
'Green Pendant': (True, False, 'Crystal', [0x04, 0x38, 0x62, 0x00, 0x69, 0x01], None, None, None, None, None, None, None),
'Red Pendant': (True, False, 'Crystal', [0x02, 0x34, 0x60, 0x00, 0x69, 0x02], None, None, None, None, None, None, None),
'Blue Pendant': (True, False, 'Crystal', [0x01, 0x32, 0x60, 0x00, 0x69, 0x03], None, None, None, None, None, None, None),
'Triforce': (True, False, None, 0x6A, '\n YOU WIN!', 'and the triforce', 'victorious kid', 'victory for sale', 'fungus for the win', 'greedy boy wins game again', 'the Triforce'),
'Power Star': (True, False, None, 0x6B, 'a small victory', 'and the power star', 'star-struck kid', 'star for sale', 'see stars with shroom', 'mario powers up again', 'a Power Star'),
'Triforce Piece': (True, False, None, 0x6C, 'a small victory', 'and the thirdforce', 'triangular kid', 'triangle for sale', 'fungus for triangle', 'wise boy has triangle again', 'a Triforce Piece'),
'Crystal 1': (True, False, 'Crystal', [0x02, 0x34, 0x64, 0x40, 0x7F, 0x06], None, None, None, None, None, None, None),
'Crystal 2': (True, False, 'Crystal', [0x10, 0x34, 0x64, 0x40, 0x79, 0x06], None, None, None, None, None, None, None),
'Crystal 3': (True, False, 'Crystal', [0x40, 0x34, 0x64, 0x40, 0x6C, 0x06], None, None, None, None, None, None, None),
'Crystal 4': (True, False, 'Crystal', [0x20, 0x34, 0x64, 0x40, 0x6D, 0x06], None, None, None, None, None, None, None),
'Crystal 5': (True, False, 'Crystal', [0x04, 0x32, 0x64, 0x40, 0x6E, 0x06], None, None, None, None, None, None, None),
'Crystal 6': (True, False, 'Crystal', [0x01, 0x32, 0x64, 0x40, 0x6F, 0x06], None, None, None, None, None, None, None),
'Crystal 7': (True, False, 'Crystal', [0x08, 0x34, 0x64, 0x40, 0x7C, 0x06], None, None, None, None, None, None, None),
'Single Arrow': (False, False, None, 0x43, 'a lonely arrow\nsits here.', 'and the arrow', 'stick-collecting kid', 'sewing needle for sale', 'fungus for arrow', 'archer boy sews again', 'an arrow'),
'Arrows (10)': (False, False, None, 0x44, 'This will give\nyou ten shots\nwith your bow!', 'and the arrow pack', 'stick-collecting kid', 'sewing kit for sale', 'fungus for arrows', 'archer boy sews again', 'ten arrows'),
'Arrow Upgrade (+10)': (False, False, None, 0x54, 'increase arrow\nstorage, low\nlow price', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'arrow capacity'),
'Arrow Upgrade (+5)': (False, False, None, 0x53, 'increase arrow\nstorage, low\nlow price', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'arrow capacity'),
'Single Bomb': (False, False, None, 0x27, 'I make things\ngo BOOM! But\njust once.', 'and the explosion', 'the bomb-holding kid', 'firecracker for sale', 'blend fungus into bomb', '\'splosion boy explodes again', 'a bomb'),
'Bombs (3)': (False, False, None, 0x28, 'I make things\ngo triple\nBOOM!!!', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'three bombs'),
'Bombs (10)': (False, False, None, 0x31, 'I make things\ngo BOOM! Ten\ntimes!', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'ten bombs'),
'Bomb Upgrade (+10)': (False, False, None, 0x52, 'increase bomb\nstorage, low\nlow price', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'bomb capacity'),
'Bomb Upgrade (+5)': (False, False, None, 0x51, 'increase bomb\nstorage, low\nlow price', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'bomb capacity'),
'Blue Mail': (False, True, None, 0x22, 'Now you\'re a\nblue elf!', 'and the banana hat', 'the protected kid', 'banana hat for sale', 'the clothing store', 'tailor boy banana hatted again', 'the blue mail'),
'Red Mail': (False, True, None, 0x23, 'Now you\'re a\nred elf!', 'and the eggplant hat', 'well-protected kid', 'purple hat for sale', 'the nice clothing store', 'tailor boy fears nothing again', 'the red mail'),
'Progressive Armor': (False, True, None, 0x60, 'time for a\nchange of\nclothes?', 'and the unknown hat', 'the protected kid', 'new hat for sale', 'the clothing store', 'tailor boy has threads again', 'some armor'),
'Blue Boomerang': (True, False, None, 0x0C, 'No matter what\nyou do, blue\nreturns to you', 'and the bluemarang', 'the bat-throwing kid', 'bent stick for sale', 'fungus for puma-stick', 'throwing boy plays fetch again', 'the blue boomerang'),
'Red Boomerang': (True, False, None, 0x2A, 'No matter what\nyou do, red\nreturns to you', 'and the badmarang', 'the bat-throwing kid', 'air foil for sale', 'fungus for return-stick', 'magical boy plays fetch again', 'the red boomerang'),
'Blue Shield': (False, True, None, 0x04, 'Now you can\ndefend against\npebbles!', 'and the stone blocker', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'the blue shield'),
'Red Shield': (False, True, None, 0x05, 'Now you can\ndefend against\nfireballs!', 'and the shot blocker', 'shield-wielding kid', 'fire shield for sale', 'fungus for fire shield', 'shield boy defends again', 'the red shield'),
'Mirror Shield': (True, False, None, 0x06, 'Now you can\ndefend against\nlasers!', 'and the laser blocker', 'shield-wielding kid', 'face shield for sale', 'fungus for face shield', 'shield boy defends again', 'the mirror shield'),
'Progressive Shield': (True, False, None, 0x5F, 'have a better\nblocker in\nfront of you', 'and the new shield', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'a shield'),
'Bug Catching Net': (True, False, None, 0x21, 'Let\'s catch\nsome bees and\nfaeries!', 'and the bee catcher', 'the bug-catching kid', 'stick web for sale', 'fungus for butterflies', 'wrong boy catches bees again', 'the bug net'),
'Cane of Byrna': (True, False, None, 0x18, 'Use this to\nbecome\ninvincible!', 'and the bad cane', 'the spark-making kid', 'spark stick for sale', 'spark-stick for trade', 'cane boy encircles again', 'the blue cane'),
'Boss Heart Container': (False, False, None, 0x3E, 'Maximum health\nincreased!\nYeah!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'a heart'),
'Sanctuary Heart Container': (False, False, None, 0x3F, 'Maximum health\nincreased!\nYeah!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'a heart'),
'Piece of Heart': (False, False, None, 0x17, 'Just a little\npiece of love!', 'and the broken heart', 'the life-giving kid', 'little love for sale', 'fungus for life', 'life boy feels some love again', 'a heart piece'),
'Rupee (1)': (False, False, None, 0x34, 'Just pocket\nchange. Move\nright along.', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'a green rupee'),
'Rupees (5)': (False, False, None, 0x35, 'Just pocket\nchange. Move\nright along.', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'a blue rupee'),
'Rupees (20)': (False, False, None, 0x36, 'Just couch\ncash. Move\nright along.', 'and the couch cash', 'the piggy-bank kid', 'life lesson for sale', 'the witch buying drugs', 'destitute boy has lunch again', 'a red rupee'),
'Rupees (50)': (False, False, None, 0x41, 'A rupee pile!\nOkay?', 'and the rupee pile', 'the well-off kid', 'life lesson for sale', 'buying okay drugs', 'destitute boy has dinner again', 'fifty rupees'),
'Rupees (100)': (False, False, None, 0x40, 'A rupee stash!\nHell yeah!', 'and the rupee stash', 'the kind-of-rich kid', 'life lesson for sale', 'buying good drugs', 'affluent boy goes drinking again', 'one hundred rupees'),
'Rupees (300)': (False, False, None, 0x46, 'A rupee hoard!\nHell yeah!', 'and the rupee hoard', 'the really-rich kid', 'life lesson for sale', 'buying the best drugs', 'fat-cat boy is rich again', 'three hundred rupees'),
'Rupoor': (False, False, None, 0x59, 'a debt collector', 'and the toll-booth', 'the toll-booth kid', 'double loss for sale', 'witch stole your rupees', 'affluent boy steals rupees', 'a rupoor'),
'Red Clock': (False, True, None, 0x5B, 'a waste of time', 'the ruby clock', 'the ruby-time kid', 'red time for sale', 'for ruby time', 'moment boy travels time again', 'a red clock'),
'Blue Clock': (False, True, None, 0x5C, 'a bit of time', 'the sapphire clock', 'sapphire-time kid', 'blue time for sale', 'for sapphire time', 'moment boy time travels again', 'a blue clock'),
'Green Clock': (False, True, None, 0x5D, 'a lot of time', 'the emerald clock', 'the emerald-time kid', 'green time for sale', 'for emerald time', 'moment boy adjusts time again', 'a red clock'),
'Single RNG': (False, True, None, 0x62, 'something you don\'t yet have', None, None, None, None, 'unknown boy somethings again', 'a new mystery'),
'Multi RNG': (False, True, None, 0x63, 'something you may already have', None, None, None, None, 'unknown boy somethings again', 'a total mystery'),
'Magic Upgrade (1/2)': (True, False, None, 0x4E, 'Your magic\npower has been\ndoubled!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'half magic'), # can be required to beat mothula in an open seed in very very rare circumstance
'Magic Upgrade (1/4)': (True, False, None, 0x4F, 'Your magic\npower has been\nquadrupled!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'quarter magic'), # can be required to beat mothula in an open seed in very very rare circumstance
'Small Key (Eastern Palace)': (False, False, 'SmallKey', 0xA2, 'A small key to Armos Knights', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Eastern Palace'),
'Big Key (Eastern Palace)': (False, False, 'BigKey', 0x9D, 'A big key to Armos Knights', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Eastern Palace'),
'Compass (Eastern Palace)': (False, True, 'Compass', 0x8D, 'Now you can find the Armos Knights!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Eastern Palace'),
'Map (Eastern Palace)': (False, True, 'Map', 0x7D, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Eastern Palace'),
'Small Key (Desert Palace)': (False, False, 'SmallKey', 0xA3, 'A small key to the desert', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Desert Palace'),
'Big Key (Desert Palace)': (False, False, 'BigKey', 0x9C, 'A big key to the desert', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Desert Palace'),
'Compass (Desert Palace)': (False, True, 'Compass', 0x8C, 'Now you can find Lanmolas!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Desert Palace'),
'Map (Desert Palace)': (False, True, 'Map', 0x7C, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Desert Palace'),
'Small Key (Tower of Hera)': (False, False, 'SmallKey', 0xAA, 'A small key to Hera', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Tower of Hera'),
'Big Key (Tower of Hera)': (False, False, 'BigKey', 0x95, 'A big key to Hera', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Tower of Hera'),
'Compass (Tower of Hera)': (False, True, 'Compass', 0x85, 'Now you can find Moldorm!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Tower of Hera'),
'Map (Tower of Hera)': (False, True, 'Map', 0x75, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Tower of Hera'),
'Small Key (Escape)': (False, False, 'SmallKey', 0xA0, 'A small key to the castle', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Hyrule Castle'),
'Big Key (Escape)': (False, False, 'BigKey', 0x9F, 'A big key to the castle', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Hyrule Castle'),
'Compass (Escape)': (False, True, 'Compass', 0x8F, 'Now you can find no boss!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Hyrule Castle'),
'Map (Escape)': (False, True, 'Map', 0x7F, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Hyrule Castle'),
'Small Key (Agahnims Tower)': (False, False, 'SmallKey', 0xA4, 'A small key to Agahnim', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Castle Tower'),
'Small Key (Palace of Darkness)': (False, False, 'SmallKey', 0xA6, 'A small key to darkness', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Palace of Darkness'),
'Big Key (Palace of Darkness)': (False, False, 'BigKey', 0x99, 'A big key to darkness', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Palace of Darkness'),
'Compass (Palace of Darkness)': (False, True, 'Compass', 0x89, 'Now you can find Helmasaur King!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Palace of Darkness'),
'Map (Palace of Darkness)': (False, True, 'Map', 0x79, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Palace of Darkness'),
'Small Key (Thieves Town)': (False, False, 'SmallKey', 0xAB, 'A small key to thievery', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Thieves\' Town'),
'Big Key (Thieves Town)': (False, False, 'BigKey', 0x94, 'A big key to thievery', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Thieves\' Town'),
'Compass (Thieves Town)': (False, True, 'Compass', 0x84, 'Now you can find Blind!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Thieves\' Town'),
'Map (Thieves Town)': (False, True, 'Map', 0x74, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Thieves\' Town'),
'Small Key (Skull Woods)': (False, False, 'SmallKey', 0xA8, 'A small key to the woods', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Skull Woods'),
'Big Key (Skull Woods)': (False, False, 'BigKey', 0x97, 'A big key to the woods', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Skull Woods'),
'Compass (Skull Woods)': (False, True, 'Compass', 0x87, 'Now you can find Mothula!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Skull Woods'),
'Map (Skull Woods)': (False, True, 'Map', 0x77, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Skull Woods'),
'Small Key (Swamp Palace)': (False, False, 'SmallKey', 0xA5, 'A small key to the swamp', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Swamp Palace'),
'Big Key (Swamp Palace)': (False, False, 'BigKey', 0x9A, 'A big key to the swamp', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Swamp Palace'),
'Compass (Swamp Palace)': (False, True, 'Compass', 0x8A, 'Now you can find Arrghus!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Swamp Palace'),
'Map (Swamp Palace)': (False, True, 'Map', 0x7A, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Swamp Palace'),
'Small Key (Ice Palace)': (False, False, 'SmallKey', 0xA9, 'A small key to the iceberg', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Ice Palace'),
'Big Key (Ice Palace)': (False, False, 'BigKey', 0x96, 'A big key to the iceberg', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Ice Palace'),
'Compass (Ice Palace)': (False, True, 'Compass', 0x86, 'Now you can find Kholdstare!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Ice Palace'),
'Map (Ice Palace)': (False, True, 'Map', 0x76, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Ice Palace'),
'Small Key (Misery Mire)': (False, False, 'SmallKey', 0xA7, 'A small key to the mire', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Misery Mire'),
'Big Key (Misery Mire)': (False, False, 'BigKey', 0x98, 'A big key to the mire', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Misery Mire'),
'Compass (Misery Mire)': (False, True, 'Compass', 0x88, 'Now you can find Vitreous!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Misery Mire'),
'Map (Misery Mire)': (False, True, 'Map', 0x78, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Misery Mire'),
'Small Key (Turtle Rock)': (False, False, 'SmallKey', 0xAC, 'A small key to the pipe maze', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Turtle Rock'),
'Big Key (Turtle Rock)': (False, False, 'BigKey', 0x93, 'A big key to the pipe maze', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Turtle Rock'),
'Compass (Turtle Rock)': (False, True, 'Compass', 0x83, 'Now you can find Trinexx!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Turtle Rock'),
'Map (Turtle Rock)': (False, True, 'Map', 0x73, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Turtle Rock'),
'Small Key (Ganons Tower)': (False, False, 'SmallKey', 0xAD, 'A small key to the evil tower', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Ganon\'s Tower'),
'Big Key (Ganons Tower)': (False, False, 'BigKey', 0x92, 'A big key to the evil tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Ganon\'s Tower'),
'Compass (Ganons Tower)': (False, True, 'Compass', 0x82, 'Now you can find Agahnim!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a comapss to Ganon\'s Tower'),
'Map (Ganons Tower)': (False, True, 'Map', 0x72, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Ganon\'s Tower'),
'Small Key (Universal)': (False, True, None, 0xAF, 'A small key for any door', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key'),
'Nothing': (False, False, None, 0x5A, 'Some Hot Air', 'and the Nothing', 'the zen kid', 'outright theft', 'shroom theft', 'empty boy is bored again', 'nothing'),
item_table = {'Bow': (True, False, None, 0x0B, 'Bow!\nJoin the archer class!', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'The Bow'),
'Progressive Bow': (True, False, None, 0x64, 'Bow!\nJoin the archer class!', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'A Bow'),
'Book of Mudora': (True, False, None, 0x1D, 'This is a\nparadox?!', 'and the story book', 'the scholarly kid', 'moon runes for sale', 'drugs for literacy', 'book-worm boy can read again', 'The Book'),
'Hammer': (True, False, None, 0x09, 'stop\nhammer time!', 'and m c hammer', 'hammer-smashing kid', 'm c hammer for sale', 'stop... hammer time', 'stop, hammer time', 'The Hammer'),
'Hookshot': (True, False, None, 0x0A, 'Hookshot!\nBOING! BOING!', 'and the tickle beam', 'tickle-monster kid', 'tickle beam for sale', 'witch and tickle boy', 'beam boy tickles again', 'The Hookshot'),
'Magic Mirror': (True, False, None, 0x1A, 'Mirror!\nTake some time to\nreflect on this moment!', 'the face reflector', 'the narcissistic kid', 'your face for sale', 'trades looking-glass', 'narcissistic boy is happy again', 'The Mirror'),
'Ocarina': (True, False, None, 0x14, 'Ocarina!\nA Flute by another name', 'and the duck call', 'the duck-call kid', 'duck call for sale', 'duck-calls for trade', 'ocarina boy plays again', 'The Flute'),
'Pegasus Boots': (True, False, None, 0x4B, 'Pegasus Boots!\nGotta go fast!', 'and the sprint shoes', 'the running-man kid', 'sprint shoe for sale', 'shrooms for speed', 'gotta-go-fast boy runs again', 'The Boots'),
'Power Glove': (True, False, None, 0x1B, 'Glove!\nNow you can\nlift weak stuff!', 'and the grey mittens', 'body-building kid', 'lift glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'The Glove'),
'Cape': (True, False, None, 0x19, 'Cape!\nInvisbility cloak activate!', 'the camouflage cape', 'red riding-hood kid', 'red hood for sale', 'hood from a hood', 'dapper boy hides again', 'The Cape'),
'Mushroom': (True, False, None, 0x29, 'Mushroom!\nDon\'t eat it. Find a witch.', 'and the legal drugs', 'the drug-dealing kid', 'legal drugs for sale', 'shroom swap', 'shroom boy sells drugs again', 'The Mushroom'),
'Shovel': (True, False, None, 0x13, 'Shovel!\nCan you dig it?', 'and the spade', 'archaeologist kid', 'dirt spade for sale', 'can you dig it', 'shovel boy digs again', 'The Shovel'),
'Lamp': (True, False, None, 0x12, 'Lamp!\nYou can see in the dark,\nand light torches.', 'and the flashlight', 'light-shining kid', 'flashlight for sale', 'fungus for illumination', 'illuminated boy can see again', 'The Lamp'),
'Magic Powder': (True, False, None, 0x0D, 'Powder!\nSprinkle it on a dancing pickle!', 'and the magic sack', 'the sack-holding kid', 'magic sack for sale', 'the witch and assistant', 'magic boy plays marbles again', 'The Powder'),
'Moon Pearl': (True, False, None, 0x1F, 'Moon Pearl!\nRabbit Be Gone!', 'and the jaw breaker', 'fortune-telling kid', 'lunar orb for sale', 'shrooms for moon rock', 'moon boy plays ball again', 'The Moon Pearl'),
'Cane of Somaria': (True, False, None, 0x15, 'Cane of Somaria!\nMake blocks, throw blocks', 'and the red blocks', 'the block-making kid', 'block stick for sale', 'block stick for trade', 'cane boy makes blocks again', 'The Red Cane'),
'Fire Rod': (True, False, None, 0x07, 'Fire Rod!\nI\'m burning for you!', 'and the flamethrower', 'fire-starting kid', 'rage rod for sale', 'fungus for rage-rod', 'firestarter boy burns again', 'The Fire Rod'),
'Flippers': (True, False, None, 0x1E, 'Flippers!\nFancy a swim!', 'and the toewebs', 'the swimming kid', 'finger webs for sale', 'shrooms let you swim', 'swimming boy swims again', 'The Flippers'),
'Ice Rod': (True, False, None, 0x08, 'Ice Rod!\nActivate Freeze Ray!', 'and the freeze ray', 'the ice-bending kid', 'freeze ray for sale', 'fungus for ice-rod', 'ice-cube boy freezes again', 'The Ice Rod'),
'Titans Mitts': (True, False, None, 0x1C, 'Mitts!\nLift ALL the rocks!', 'and the golden glove', 'body-building kid', 'carry glove for sale', 'fungus for bling-gloves', 'body-building boy has gold again', 'The Mitts'),
'Ether': (True, False, None, 0x10, 'Ether!\nLet\'s cool things down!', 'and the bolt coin', 'coin-collecting kid', 'bolt coin for sale', 'shrooms for bolt-coin', 'medallion boy sees floor again', 'Ether'),
'Bombos': (True, False, None, 0x0F, 'Bombos!\nExplosions! Fire!\nBurn it all!', 'and the swirly coin', 'coin-collecting kid', 'swirly coin for sale', 'shrooms for swirly-coin', 'medallion boy melts room again', 'Bombos'),
'Quake': (True, False, None, 0x11, 'Quake!\nLet\'s shake the ground!', 'and the wavy coin', 'coin-collecting kid', 'wavy coin for sale', 'shrooms for wavy-coin', 'medallion boy shakes dirt again', 'Quake'),
'Bottle': (True, False, None, 0x16, 'Bottle!\nStore all manner of things!', 'and the terrarium', 'the terrarium kid', 'terrarium for sale', 'special promotion', 'bottle boy has terrarium again', 'A Bottle'),
'Bottle (Red Potion)': (True, False, None, 0x2B, 'Red Potion!\nFill your hearts!', 'and the red goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has red goo again', 'A Bottle'),
'Bottle (Green Potion)': (True, False, None, 0x2C, 'Green Potion!\nRestore your magic!', 'and the green goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has green goo again', 'A Bottle'),
'Bottle (Blue Potion)': (True, False, None, 0x2D, 'Blue Potion!\nHeal and restore!', 'and the blue goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has blue goo again', 'A Bottle'),
'Bottle (Fairy)': (True, False, None, 0x3D, 'Fairy Bottle\nI\'ll save your life!', 'and the captive', 'the tingle kid', 'hostage for sale', 'fairy dust and shrooms', 'bottle boy has friend again', 'A Bottle'),
'Bottle (Bee)': (True, False, None, 0x3C, 'Bee Bottle\nI\'ll sting your enemies a bit!', 'and the sting buddy', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has mad bee again', 'A Bottle'),
'Bottle (Good Bee)': (True, False, None, 0x48, 'Good Bee Bottle\nI\'ll sting your enemies\na whole lot!', 'and the sparkle sting', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has beetor again', 'A Bottle'),
'Master Sword': (True, False, 'Sword', 0x50, 'Master Sword!\nEvil\'s bane!', 'and the master sword', 'sword-wielding kid', 'glow sword for sale', 'fungus for blue slasher', 'sword boy fights again', 'The Master Sword'),
'Tempered Sword': (True, False, 'Sword', 0x02, 'Tempered Sword!\nMore slashy!', 'the tempered sword', 'sword-wielding kid', 'flame sword for sale', 'fungus for red slasher', 'sword boy fights again', 'The Tempered Sword'),
'Sword and Shield': (True, False, 'Sword', 0x00, 'Sword and Shield!\nUncle sword ahoy!', 'the sword and shield', 'sword and shield-wielding kid', 'training set for sale', 'fungus for training set', 'sword and shield boy fights again', 'The Sword and Shield'),
'Fighter Sword': (True, False, 'Sword', 0x49, 'Fighter Sword!\nStarter level slashy!', 'the tiny sword', 'sword-wielding kid', 'tiny sword for sale', 'fungus for tiny slasher', 'sword boy fights again', 'The Small Sword'),
'Golden Sword': (True, False, 'Sword', 0x03, 'Golden Sword!\nBest slashy!', 'and the butter sword', 'sword-wielding kid', 'butter for sale', 'cap churned to butter', 'sword boy fights again', 'The Golden Sword'),
'Progressive Sword': (True, False, 'Sword', 0x5E, 'Sword!\nA better sword for your time!', 'the unknown sword', 'sword-wielding kid', 'sword for sale', 'fungus for some slasher', 'sword boy fights again', 'A sword'),
'Progressive Glove': (True, False, None, 0x61, 'Glove!\nLift more than you can now!', 'and the lift upgrade', 'body-building kid', 'some glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'A Glove'),
'Silver Arrows': (True, False, None, 0x58, 'Silver Arrows!\nDefeat Ganon faster!', 'and the ganonsbane', 'ganon-killing kid', 'ganon doom for sale', 'fungus for pork', 'archer boy shines again', 'The Silver Arrows'),
'Green Pendant': (True, False, 'Crystal', [0x04, 0x38, 0x62, 0x00, 0x69, 0x37], None, None, None, None, None, None, None),
'Blue Pendant': (True, False, 'Crystal', [0x02, 0x34, 0x60, 0x00, 0x69, 0x39], None, None, None, None, None, None, None),
'Red Pendant': (True, False, 'Crystal', [0x01, 0x32, 0x60, 0x00, 0x69, 0x38], None, None, None, None, None, None, None),
'Triforce': (True, False, None, 0x6A, 'Triforce\nGrab me to win!', 'and the triforce', 'victorious kid', 'victory for sale', 'fungus for the win', 'greedy boy wins game again', 'The Triforce'),
'Power Star': (True, False, None, 0x6B, 'Power Star\nA small step\ntowards victory!', 'and the power star', 'star-struck kid', 'star for sale', 'see stars with shroom', 'mario powers up again', 'A Power Star'),
'Triforce Piece': (True, False, None, 0x6C, 'Triforce Piece\nA small step\ntowards victory!', 'and the thirdforce', 'triangular kid', 'triangle for sale', 'fungus for triangle', 'wise boy has triangle again', 'A Triforce Piece'),
'Crystal 1': (True, False, 'Crystal', [0x02, 0x34, 0x64, 0x40, 0x7F, 0x20], None, None, None, None, None, None, None),
'Crystal 2': (True, False, 'Crystal', [0x10, 0x34, 0x64, 0x40, 0x79, 0x20], None, None, None, None, None, None, None),
'Crystal 3': (True, False, 'Crystal', [0x40, 0x34, 0x64, 0x40, 0x6C, 0x20], None, None, None, None, None, None, None),
'Crystal 4': (True, False, 'Crystal', [0x20, 0x34, 0x64, 0x40, 0x6D, 0x20], None, None, None, None, None, None, None),
'Crystal 5': (True, False, 'Crystal', [0x04, 0x32, 0x64, 0x40, 0x6E, 0x20], None, None, None, None, None, None, None),
'Crystal 6': (True, False, 'Crystal', [0x01, 0x32, 0x64, 0x40, 0x6F, 0x20], None, None, None, None, None, None, None),
'Crystal 7': (True, False, 'Crystal', [0x08, 0x34, 0x64, 0x40, 0x7C, 0x20], None, None, None, None, None, None, None),
'Single Arrow': (False, False, None, 0x43, 'Single Arrow!\nDestiny awaits!', 'and the arrow', 'stick-collecting kid', 'sewing needle for sale', 'fungus for arrow', 'archer boy sews again', 'An arrow'),
'Arrows (10)': (False, False, None, 0x44, '10 Arrows\nAn archer\'s bailout!', 'and the arrow pack', 'stick-collecting kid', 'sewing kit for sale', 'fungus for arrows', 'archer boy sews again', 'Ten arrows'),
'Arrow Upgrade (+10)': (False, False, None, 0x54, '10 Arrow Upgrade\nGain 10 more arrow capacity!', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'An arrow capacity upgrade'),
'Arrow Upgrade (+5)': (False, False, None, 0x53, '5 Arrow Upgrade\nGain 5 more arrow capacity!', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'An arrow capacity upgrade'),
'Single Bomb': (False, False, None, 0x27, '1 Bomb\nBoom boom pow!', 'and the explosion', 'the bomb-holding kid', 'firecracker for sale', 'blend fungus into bomb', '\'splosion boy explodes again', 'A bomb'),
'Bombs (3)': (False, False, None, 0x28, '3 Bombs\nExplosions!\nIn a handy 3-pack', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'Three bombs'),
'Bombs (10)': (False, False, None, 0x31, '10 Bombs\nExplosions!\nIn a thrifty 10-pack', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'Ten bombs'),
'Bomb Upgrade (+10)': (False, False, None, 0x52, '10 Bomb Upgrade\nGain 10 more bomb capacity!', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'A bomb capacity upgrade'),
'Bomb Upgrade (+5)': (False, False, None, 0x51, '5 Bomb Upgrade\nGain 5 more bomb capacity!', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'A bomb capacity upgrade'),
'Blue Mail': (False, True, None, 0x22, 'Blue Mail!\nLess damage activate!', 'and the banana hat', 'the protected kid', 'banana hat for sale', 'the clothing store', 'tailor boy banana hatted again', 'The Blue Mail'),
'Red Mail': (False, True, None, 0x23, 'Red Mail!\nEven less damage!', 'and the eggplant hat', 'well-protected kid', 'purple hat for sale', 'the nice clothing store', 'tailor boy fears nothing again', 'The Red Mail'),
'Progressive Armor': (False, True, None, 0x60, 'Upgrade Mail!\nNot the kind you read!', 'and the unknown hat', 'the protected kid', 'new hat for sale', 'the clothing store', 'tailor boy has threads again', 'Some Armor'),
'Blue Boomerang': (True, False, None, 0x0C, 'Blue Boomerang!\nAlways comes back!', 'and the bluemarang', 'the bat-throwing kid', 'bent stick for sale', 'fungus for puma-stick', 'throwing boy plays fetch again', 'The Blue Boomerang'),
'Red Boomerang': (True, False, None, 0x2A, 'Red Boomerang!\nAlways comes back!', 'and the badmarang', 'the bat-throwing kid', 'air foil for sale', 'fungus for return-stick', 'magical boy plays fetch again', 'The Red Boomerang'),
'Blue Shield': (False, True, None, 0x04, 'Blue Shield\nBlock rocks!', 'and the stone blocker', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'The Blue Shield'),
'Red Shield': (False, True, None, 0x05, 'Red Shield\nBlock fireballs!', 'and the shot blocker', 'shield-wielding kid', 'fire shield for sale', 'fungus for fire shield', 'shield boy defends again', 'The Red Shield'),
'Mirror Shield': (True, False, None, 0x06, 'Mirror Shield\nBlock lasers!', 'and the laser blocker', 'shield-wielding kid', 'face shield for sale', 'fungus for face shield', 'shield boy defends again', 'The Mirror Shield'),
'Progressive Shield': (True, False, None, 0x5F, 'Shield\nA better shield for your time!', 'and the new shield', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'A Shield'),
'Bug Catching Net': (True, False, None, 0x21, 'Bug Net!\nCatch all manner\nof things!', 'and the bee catcher', 'the bug-catching kid', 'stick web for sale', 'fungus for butterflies', 'wrong boy catches bees again', 'The Bug Net'),
'Cane of Byrna': (True, False, None, 0x18, 'Cane of Byrna!\nSwirly protection!', 'and the bad cane', 'the spark-making kid', 'spark stick for sale', 'spark-stick for trade', 'cane boy encircles again', 'The Blue Cane'),
'Boss Heart Container': (False, False, None, 0x3E, 'Heart Container!\nHealth Increased!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'A Heart'),
'Sanctuary Heart Container': (False, False, None, 0x3F, 'Heart Container!\nHealth Increased!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'A Heart'),
'Piece of Heart': (False, False, None, 0x17, 'Heart Piece!\nOne step closer\nto more health!', 'and the broken heart', 'the life-giving kid', 'little love for sale', 'fungus for life', 'life boy feels some love again', 'A Heart Piece'),
'Rupee (1)': (False, False, None, 0x34, 'Rupees!\nNeat I guess?', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'A green rupee'),
'Rupees (5)': (False, False, None, 0x35, 'Rupees!\nNeat I guess?', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'A blue rupee'),
'Rupees (20)': (False, False, None, 0x36, 'Rupees!\nThat\'s alright.', 'and the couch cash', 'the piggy-bank kid', 'life lesson for sale', 'the witch buying drugs', 'destitute boy has lunch again', 'A red rupee'),
'Rupees (50)': (False, False, None, 0x41, 'Rupees!\nThat\'s neat!', 'and the rupee pile', 'the well-off kid', 'life lesson for sale', 'buying okay drugs', 'destitute boy has dinner again', 'Fifty rupees'),
'Rupees (100)': (False, False, None, 0x40, 'Rupees!\nThat\'s awesome!', 'and the rupee stash', 'the kind-of-rich kid', 'life lesson for sale', 'buying good drugs', 'affluent boy goes drinking again', 'One hundred rupees'),
'Rupees (300)': (False, False, None, 0x46, 'Rupees!\nThat\'s fantastic!', 'and the rupee hoard', 'the really-rich kid', 'life lesson for sale', 'buying the best drugs', 'fat-cat boy is rich again', 'Three hundred rupees'),
'Rupoor': (False, False, None, 0x59, 'Rupoor!\nI\'ll take your rupees!', 'and the toll-booth', 'the toll-booth kid', 'double loss for sale', 'witch stole your rupees', 'affluent boy steals rupees', 'A rupoor'),
'Red Clock': (False, True, None, 0x5B, 'Red Clock!\nA waste of time.', 'the ruby clock', 'the ruby-time kid', 'red time for sale', 'for ruby time', 'moment boy travels time again', 'A red clock'),
'Blue Clock': (False, True, None, 0x5C, 'Blue Clock!\nA bit of time!', 'the sapphire clock', 'sapphire-time kid', 'blue time for sale', 'for sapphire time', 'moment boy time travels again', 'A blue clock'),
'Green Clock': (False, True, None, 0x5D, 'Green Clock!\nTons of time!', 'the emerald clock', 'the emerald-time kid', 'green time for sale', 'for emerald time', 'moment boy adjusts time again', 'A green clock'),
'Single RNG': (False, True, None, 0x62, 'something you don\'t yet have', None, None, None, None, 'unknown boy somethings again', 'A new mystery'),
'Multi RNG': (False, True, None, 0x63, 'something you may already have', None, None, None, None, 'unknown boy somethings again', 'A total mystery'),
'Magic Upgrade (1/2)': (True, False, None, 0x4E, 'Half Magic!\nDouble your magic power!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'Half magic'), # can be required to beat mothula in an open seed in very very rare circumstance
'Magic Upgrade (1/4)': (True, False, None, 0x4F, 'Quarter Magic!\nMagic is basically free now!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'Quarter magic'), # can be required to beat mothula in an open seed in very very rare circumstance
'Small Key (Eastern Palace)': (False, False, 'SmallKey', 0xA2, 'A Small Key for\nDesert Palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Eastern Palace'),
'Big Key (Eastern Palace)': (False, False, 'BigKey', 0x9D, 'A Big Key for\nEastern Palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Eastern Palace'),
'Compass (Eastern Palace)': (False, True, 'Compass', 0x8D, 'A Compass for\nEastern Palace', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Eastern Palace'),
'Map (Eastern Palace)': (False, True, 'Map', 0x7D, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Eastern Palace'),
'Small Key (Desert Palace)': (False, False, 'SmallKey', 0xA3, 'A Small Key for\nDesert Palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Desert Palace'),
'Big Key (Desert Palace)': (False, False, 'BigKey', 0x9C, 'A Big Key for\nDesert Palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Desert Palace'),
'Compass (Desert Palace)': (False, True, 'Compass', 0x8C, 'A Compass for\nDesert Palace', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Desert Palace'),
'Map (Desert Palace)': (False, True, 'Map', 0x7C, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Desert Palace'),
'Small Key (Tower of Hera)': (False, False, 'SmallKey', 0xAA, 'A Small Key for\nTower of Hera', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Tower of Hera'),
'Big Key (Tower of Hera)': (False, False, 'BigKey', 0x95, 'A Big Key for\nTower of Hera', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Tower of Hera'),
'Compass (Tower of Hera)': (False, True, 'Compass', 0x85, 'A Compass for\nTower of Hera', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Tower of Hera'),
'Map (Tower of Hera)': (False, True, 'Map', 0x75, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Tower of Hera'),
'Small Key (Escape)': (False, False, 'SmallKey', 0xA0, 'A Small Key for\nEscape', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Hyrule Castle'),
'Big Key (Escape)': (False, False, 'BigKey', 0x9F, 'A Big Key for\nEscape', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Hyrule Castle'),
'Compass (Escape)': (False, True, 'Compass', 0x8F, 'A Compass for\nEscape', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Hyrule Castle'),
'Map (Escape)': (False, True, 'Map', 0x7F, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Hyrule Castle'),
'Small Key (Agahnims Tower)': (False, False, 'SmallKey', 0xA4, 'A Small Key for\nAganim\'s Tower', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Castle Tower'),
'Small Key (Palace of Darkness)': (False, False, 'SmallKey', 0xA6, 'A Small Key for\nDark Palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Palace of Darkness'),
'Big Key (Palace of Darkness)': (False, False, 'BigKey', 0x99, 'A Big Key for\nDark Palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Palace of Darkness'),
'Compass (Palace of Darkness)': (False, True, 'Compass', 0x89, 'A Compass for\nDark Palace', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Palace of Darkness'),
'Map (Palace of Darkness)': (False, True, 'Map', 0x79, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Palace of Darkness'),
'Small Key (Thieves Town)': (False, False, 'SmallKey', 0xAB, 'A Small Key for\nThieves Town', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Thieves\' Town'),
'Big Key (Thieves Town)': (False, False, 'BigKey', 0x94, 'A Big Key for\nThieves Town', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Thieves\' Town'),
'Compass (Thieves Town)': (False, True, 'Compass', 0x84, 'A Compass for\nThieves Town', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Thieves\' Town'),
'Map (Thieves Town)': (False, True, 'Map', 0x74, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Thieves\' Town'),
'Small Key (Skull Woods)': (False, False, 'SmallKey', 0xA8, 'A Small Key for\nSkull Woods', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Skull Woods'),
'Big Key (Skull Woods)': (False, False, 'BigKey', 0x97, 'A Big Key for\nSkull Woods', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Skull Woods'),
'Compass (Skull Woods)': (False, True, 'Compass', 0x87, 'A Compass for\nSkull Woods', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Skull Woods'),
'Map (Skull Woods)': (False, True, 'Map', 0x77, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Skull Woods'),
'Small Key (Swamp Palace)': (False, False, 'SmallKey', 0xA5, 'A Small Key for\nSwamp Palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Swamp Palace'),
'Big Key (Swamp Palace)': (False, False, 'BigKey', 0x9A, 'A Big Key for\nSwamp Palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Swamp Palace'),
'Compass (Swamp Palace)': (False, True, 'Compass', 0x8A, 'A compass for\nSwamp Palace', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Swamp Palace'),
'Map (Swamp Palace)': (False, True, 'Map', 0x7A, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Swamp Palace'),
'Small Key (Ice Palace)': (False, False, 'SmallKey', 0xA9, 'A Small Key for\nIce Palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Ice Palace'),
'Big Key (Ice Palace)': (False, False, 'BigKey', 0x96, 'A Big Key for\nIce Palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Ice Palace'),
'Compass (Ice Palace)': (False, True, 'Compass', 0x86, 'A Compass for\nIce Palace', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Ice Palace'),
'Map (Ice Palace)': (False, True, 'Map', 0x76, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Ice Palace'),
'Small Key (Misery Mire)': (False, False, 'SmallKey', 0xA7, 'A Small Key for\nMisery Mire', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Misery Mire'),
'Big Key (Misery Mire)': (False, False, 'BigKey', 0x98, 'A Big Key for\nMisery Mire', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Misery Mire'),
'Compass (Misery Mire)': (False, True, 'Compass', 0x88, 'A Compass for\nMisery Mire', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Misery Mire'),
'Map (Misery Mire)': (False, True, 'Map', 0x78, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Misery Mire'),
'Small Key (Turtle Rock)': (False, False, 'SmallKey', 0xAC, 'A Small Key for\nTurtle Rock', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Turtle Rock'),
'Big Key (Turtle Rock)': (False, False, 'BigKey', 0x93, 'A Big Key for\nTurtle Rock', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Turtle Rock'),
'Compass (Turtle Rock)': (False, True, 'Compass', 0x83, 'A Compass for\nTurtle Rock', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'A compass to Turtle Rock'),
'Map (Turtle Rock)': (False, True, 'Map', 0x73, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Turtle Rock'),
'Small Key (Ganons Tower)': (False, False, 'SmallKey', 0xAD, 'A Small Key for\nGanon\'s Tower', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key to Ganon\'s Tower'),
'Big Key (Ganons Tower)': (False, False, 'BigKey', 0x92, 'A Big Key for\nGanon\'s Tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'A big key to Ganon\'s Tower'),
'Compass (Ganons Tower)': (False, True, 'Compass', 0x82, 'A Compass for\nGanon\'s Tower', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a comapss to Ganon\'s Tower'),
'Map (Ganons Tower)': (False, True, 'Map', 0x72, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'A map to Ganon\'s Tower'),
'Small Key (Universal)': (False, True, None, 0xAF, 'A small key for any door', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key'),
'Small Key (Universal)': (False, True, None, 0xAF, 'A small key for any door', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'A small key'),
'Teleporter': (False, True, None, 0xB8, 'A teleporter', 'and the teleporter', 'the teleporting kid', 'teleportation for sale', 'teleporting fungus', 'teleporter boy warps again', 'A teleporter'),
'IFrames (10)': (False, False, None, 0xB9, 'More invincibility frames', 'and the i-frames', 'the invincible kid', 'invincibility for sale', 'invincible fungus', 'invincble boy damaged again', 'Some invincibility frames'),
'Nothing': (False, False, None, 0x5A, 'Some Hot Air', 'and the Nothing', 'the zen kid', 'outright theft', 'shroom theft', 'empty boy is bored again', 'Nothing'),
'Red Potion': (False, False, None, 0x2E, None, None, None, None, None, None, None),
'Green Potion': (False, False, None, 0x2F, None, None, None, None, None, None, None),
'Blue Potion': (False, False, None, 0x30, None, None, None, None, None, None, None),

93
Main.py
View File

@@ -9,8 +9,7 @@ import time
from BaseClasses import World, CollectionState, Item, Region, Location, Shop
from Regions import create_regions, mark_light_world_regions
from InvertedRegions import create_inverted_regions, mark_dark_world_regions
from EntranceShuffle import link_entrances, link_inverted_entrances
from EntranceShuffle import link_entrances
from Rom import patch_rom, get_enemizer_patch, apply_rom_settings, Sprite, LocalRom, JsonRom
from Rules import set_rules
from Dungeons import create_dungeons, fill_dungeons, fill_dungeons_restrictive
@@ -27,7 +26,7 @@ def main(args, seed=None):
random.use_secure()
# initialize the world
world = World(args.multi, args.shuffle, args.logic, args.mode, args.swords, args.difficulty, args.item_functionality, args.timer, args.progressive, args.goal, args.algorithm, not args.nodungeonitems, args.accessibility, args.shuffleganon, args.quickswap, args.fastmenu, args.disablemusic, args.keysanity, args.retro, args.custom, args.customitemarray, args.shufflebosses, args.hints)
world = World(args.multi, args.shuffle, args.logic, args.mode, args.swords, args.difficulty, args.item_functionality, args.timer, args.progressive, args.goal, not args.nodungeonitems, args.accessibility, args.shuffleganon, args.quickswap, args.pseudoboots, args.fastmenu, args.disablemusic, args.keysanity, args.retro, args.shufflebosses, args.hints)
logger = logging.getLogger('')
if seed is None:
random.seed(None)
@@ -38,6 +37,12 @@ def main(args, seed=None):
if args.securerandom:
world.seed = None
if world.goal in ['all_items', 'completionist'] and world.accessibility != 'locations':
raise Exception("Goals requiring all items must use 'locations' accessibility")
if args.huditemcounter:
world.item_counter_hud = {player: True for player in range(1, world.players + 1)}
if args.nofastrom:
world.fastrom = False
world.crystals_needed_for_ganon = random.randint(0, 7) if args.crystals_ganon == 'random' else int(args.crystals_ganon)
world.crystals_needed_for_gt = random.randint(0, 7) if args.crystals_gt == 'random' else int(args.crystals_gt)
@@ -48,27 +53,16 @@ def main(args, seed=None):
world.difficulty_requirements = difficulties[world.difficulty]
if world.mode != 'inverted':
for player in range(1, world.players + 1):
create_regions(world, player)
create_dungeons(world, player)
else:
for player in range(1, world.players + 1):
create_inverted_regions(world, player)
create_dungeons(world, player)
for player in range(1, world.players + 1):
create_regions(world, player)
create_dungeons(world, player)
logger.info('Shuffling the World about.')
if world.mode != 'inverted':
for player in range(1, world.players + 1):
link_entrances(world, player)
for player in range(1, world.players + 1):
link_entrances(world, player)
mark_light_world_regions(world)
else:
for player in range(1, world.players + 1):
link_inverted_entrances(world, player)
mark_dark_world_regions(world)
mark_light_world_regions(world)
logger.info('Generating Item Pool.')
@@ -86,31 +80,13 @@ def main(args, seed=None):
logger.info('Placing Dungeon Items.')
shuffled_locations = None
if args.algorithm in ['balanced', 'vt26'] or args.keysanity:
shuffled_locations = world.get_unfilled_locations()
random.shuffle(shuffled_locations)
fill_dungeons_restrictive(world, shuffled_locations)
else:
fill_dungeons(world)
shuffled_locations = world.get_unfilled_locations()
random.shuffle(shuffled_locations)
fill_dungeons_restrictive(world, shuffled_locations)
logger.info('Fill the world.')
if args.algorithm == 'flood':
flood_items(world) # different algo, biased towards early game progress items
elif args.algorithm == 'vt21':
distribute_items_cutoff(world, 1)
elif args.algorithm == 'vt22':
distribute_items_cutoff(world, 0.66)
elif args.algorithm == 'freshness':
distribute_items_staleness(world)
elif args.algorithm == 'vt25':
distribute_items_restrictive(world, 0)
elif args.algorithm == 'vt26':
distribute_items_restrictive(world, gt_filler(world), shuffled_locations)
elif args.algorithm == 'balanced':
distribute_items_restrictive(world, gt_filler(world))
distribute_items_restrictive(world, gt_filler(world))
if world.players > 1:
logger.info('Balancing multiworld progression.')
@@ -126,7 +102,10 @@ def main(args, seed=None):
else:
sprite = None
outfilebase = 'ER_%s_%s-%s-%s-%s%s_%s-%s%s%s%s%s_%s' % (world.logic, world.difficulty, world.difficulty_adjustments, world.mode, world.goal, "" if world.timer in ['none', 'display'] else "-" + world.timer, world.shuffle, world.algorithm, "-keysanity" if world.keysanity else "", "-retro" if world.retro else "", "-prog_" + world.progressive if world.progressive in ['off', 'random'] else "", "-nohints" if not world.hints else "", world.seed)
if args.outputname:
outfilebase = 'ER_%s' % (args.outputname)
else:
outfilebase = 'ER_%s_%s-%s-%s-%s%s_%s%s%s%s%s_%s' % (world.logic, world.difficulty, world.difficulty_adjustments, world.mode, world.goal, "" if world.timer in ['none', 'display'] else "-" + world.timer, world.shuffle, "-keysanity" if world.keysanity else "", "-retro" if world.retro else "", "-prog_" + world.progressive if world.progressive in ['off', 'random'] else "", "-nohints" if not world.hints else "", world.seed)
use_enemizer = args.enemizercli and (args.shufflebosses != 'none' or args.shuffleenemies or args.enemy_health != 'default' or args.enemy_health != 'default' or args.enemy_damage or args.shufflepalette or args.shufflepots)
@@ -172,6 +151,12 @@ def main(args, seed=None):
logger.info('Calculating playthrough.')
create_playthrough(world)
if args.json_spoiler:
with open(output_path('%s_Spoiler.json' % outfilebase), 'w') as outfile:
outfile.write(world.spoiler.to_json())
with open(output_path('%s_Meta.json' % outfilebase), 'w') as outfile:
outfile.write(json.dumps(world.spoiler.metadata))
if args.jsonout:
print(json.dumps({**jsonout, 'spoiler': world.spoiler.to_json()}))
elif args.create_spoiler and not args.skip_playthrough:
@@ -189,7 +174,7 @@ def gt_filler(world):
def copy_world(world):
# ToDo: Not good yet
ret = World(world.players, world.shuffle, world.logic, world.mode, world.swords, world.difficulty, world.difficulty_adjustments, world.timer, world.progressive, world.goal, world.algorithm, world.place_dungeon_items, world.accessibility, world.shuffle_ganon, world.quickswap, world.fastmenu, world.disable_music, world.keysanity, world.retro, world.custom, world.customitemarray, world.boss_shuffle, world.hints)
ret = World(world.players, world.shuffle, world.logic, world.mode, world.swords, world.difficulty, world.difficulty_adjustments, world.timer, world.progressive, world.goal, world.place_dungeon_items, world.accessibility, world.shuffle_ganon, world.quickswap, world.pseudoboots, world.fastmenu, world.disable_music, world.keysanity, world.retro, world.boss_shuffle, world.hints)
ret.required_medallions = world.required_medallions.copy()
ret.swamp_patch_required = world.swamp_patch_required.copy()
ret.ganon_at_pyramid = world.ganon_at_pyramid.copy()
@@ -198,8 +183,8 @@ def copy_world(world):
ret.treasure_hunt_count = world.treasure_hunt_count
ret.treasure_hunt_icon = world.treasure_hunt_icon
ret.sewer_light_cone = world.sewer_light_cone
ret.light_world_light_cone = world.light_world_light_cone
ret.dark_world_light_cone = world.dark_world_light_cone
ret.light_world_light_cone = False
ret.dark_world_light_cone = False
ret.seed = world.seed
ret.can_access_trock_eyebridge = world.can_access_trock_eyebridge
ret.can_access_trock_front = world.can_access_trock_front
@@ -212,14 +197,9 @@ def copy_world(world):
ret.crystals_needed_for_ganon = world.crystals_needed_for_ganon
ret.crystals_needed_for_gt = world.crystals_needed_for_gt
if world.mode != 'inverted':
for player in range(1, world.players + 1):
create_regions(ret, player)
create_dungeons(ret, player)
else:
for player in range(1, world.players + 1):
create_inverted_regions(ret, player)
create_dungeons(ret, player)
for player in range(1, world.players + 1):
create_regions(ret, player)
create_dungeons(ret, player)
copy_dynamic_regions_and_locations(world, ret)
@@ -399,10 +379,7 @@ def create_playthrough(world):
old_world.spoiler.paths.update({ str(location) : get_path(state, location.parent_region) for sphere in collection_spheres for location in sphere if location.player == player})
for _, path in dict(old_world.spoiler.paths).items():
if any(exit == 'Pyramid Fairy' for (_, exit) in path):
if world.mode != 'inverted':
old_world.spoiler.paths[str(world.get_region('Big Bomb Shop', player))] = get_path(state, world.get_region('Big Bomb Shop', player))
else:
old_world.spoiler.paths[str(world.get_region('Inverted Big Bomb Shop', player))] = get_path(state, world.get_region('Inverted Big Bomb Shop', player))
old_world.spoiler.paths[str(world.get_region('Big Bomb Shop', player))] = get_path(state, world.get_region('Big Bomb Shop', player))
# we can finally output our playthrough
old_world.spoiler.playthrough = OrderedDict([(str(i + 1), {str(location): str(location.item) for location in sphere}) for i, sphere in enumerate(collection_spheres)])

View File

@@ -10,11 +10,11 @@ def create_regions(world, player):
'Links House', 'Tavern North', 'Chicken House', 'Aginahs Cave', 'Sahasrahlas Hut', 'Kakariko Well Drop', 'Kakariko Well Cave',
'Blacksmiths Hut', 'Bat Cave Drop Ledge', 'Bat Cave Cave', 'Sick Kids House', 'Hobo Bridge', 'Lost Woods Hideout Drop', 'Lost Woods Hideout Stump',
'Lumberjack Tree Tree', 'Lumberjack Tree Cave', 'Mini Moldorm Cave', 'Ice Rod Cave', 'Lake Hylia Central Island Pier',
'Bonk Rock Cave', 'Library', 'Potion Shop', 'Two Brothers House (East)', 'Desert Palace Stairs', 'Eastern Palace', 'Master Sword Meadow',
'Bonk Rock Cave', 'Library', 'Potion Shop Area', 'Two Brothers House (East)', 'Desert Palace Stairs', 'Eastern Palace', 'Master Sword Meadow',
'Sanctuary', 'Sanctuary Grave', 'Death Mountain Entrance Rock', 'Flute Spot 1', 'Dark Desert Teleporter', 'East Hyrule Teleporter', 'South Hyrule Teleporter', 'Kakariko Teleporter',
'Elder House (East)', 'Elder House (West)', 'North Fairy Cave', 'North Fairy Cave Drop', 'Lost Woods Gamble', 'Snitch Lady (East)', 'Snitch Lady (West)', 'Tavern (Front)',
'Bush Covered House', 'Light World Bomb Hut', 'Kakariko Shop', 'Long Fairy Cave', 'Good Bee Cave', '20 Rupee Cave', 'Cave Shop (Lake Hylia)', 'Waterfall of Wishing', 'Hyrule Castle Main Gate',
'Bonk Fairy (Light)', '50 Rupee Cave', 'Fortune Teller (Light)', 'Lake Hylia Fairy', 'Light Hype Fairy', 'Desert Fairy', 'Lumberjack House', 'Lake Hylia Fortune Teller', 'Kakariko Gamble Game', 'Top of Pyramid']),
'Bonk Fairy (Light)', '50 Rupee Cave', 'Fortune Teller (Light)', 'Lake Hylia Fairy', 'Light Hype Fairy', 'Desert Fairy', 'Lumberjack House', 'Lake Hylia Fortune Teller', 'Kakariko Gamble Game', 'Top of Pyramid', 'Two-Way Mirror Spot']),
create_lw_region(player, 'Death Mountain Entrance', None, ['Old Man Cave (West)', 'Death Mountain Entrance Drop']),
create_lw_region(player, 'Lake Hylia Central Island', None, ['Capacity Upgrade', 'Lake Hylia Central Island Teleporter']),
create_cave_region(player, 'Blinds Hideout', 'a bounty of five items', ["Blind\'s Hideout - Top",
@@ -83,6 +83,7 @@ def create_regions(world, player):
create_cave_region(player, 'Bonk Rock Cave', 'a cave with a chest', ['Bonk Rock Cave']),
create_cave_region(player, 'Library', 'the library', ['Library']),
create_cave_region(player, 'Kakariko Gamble Game', 'a game of chance'),
create_lw_region(player, 'Potion Shop Area', None, ['Potion Shop']),
create_cave_region(player, 'Potion Shop', 'the potion shop', ['Potion Shop']),
create_lw_region(player, 'Lake Hylia Island', ['Lake Hylia Island']),
create_cave_region(player, 'Capacity Upgrade', 'the queen of fairies'),
@@ -117,7 +118,7 @@ def create_regions(world, player):
create_cave_region(player, 'Old Man Cave', 'a connector', ['Old Man'], ['Old Man Cave Exit (East)', 'Old Man Cave Exit (West)']),
create_cave_region(player, 'Old Man House', 'a connector', None, ['Old Man House Exit (Bottom)', 'Old Man House Front to Back']),
create_cave_region(player, 'Old Man House Back', 'a connector', None, ['Old Man House Exit (Top)', 'Old Man House Back to Front']),
create_lw_region(player, 'Death Mountain', None, ['Old Man Cave (East)', 'Old Man House (Bottom)', 'Old Man House (Top)', 'Death Mountain Return Cave (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave Peak', 'Spectacle Rock Cave (Bottom)', 'Broken Bridge (West)', 'Death Mountain Teleporter']),
create_lw_region(player, 'Death Mountain', None, ['Old Man Cave (East)', 'Old Man House (Bottom)', 'Old Man House (Top)', 'Death Mountain Return Cave (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave Peak', 'Spectacle Rock Cave (Bottom)', 'Broken Bridge (West)', 'Death Mountain Teleporter', 'Death Mountain Two-Way Mirror Spot']),
create_cave_region(player, 'Death Mountain Return Cave', 'a connector', None, ['Death Mountain Return Cave Exit (West)', 'Death Mountain Return Cave Exit (East)']),
create_lw_region(player, 'Death Mountain Return Ledge', None, ['Death Mountain Return Ledge Drop', 'Death Mountain Return Cave (West)']),
create_cave_region(player, 'Spectacle Rock Cave (Top)', 'a connector', ['Spectacle Rock Cave'], ['Spectacle Rock Cave Drop', 'Spectacle Rock Cave Exit (Top)']),
@@ -234,7 +235,8 @@ def create_regions(world, player):
create_dungeon_region(player, 'Skull Woods Final Section (Entrance)', 'Skull Woods', ['Skull Woods - Bridge Room'], ['Skull Woods Torch Room', 'Skull Woods Final Section Exit']),
create_dungeon_region(player, 'Skull Woods Final Section (Mothula)', 'Skull Woods', ['Skull Woods - Boss', 'Skull Woods - Prize']),
create_dungeon_region(player, 'Ice Palace (Entrance)', 'Ice Palace', None, ['Ice Palace Entrance Room', 'Ice Palace Exit']),
create_dungeon_region(player, 'Ice Palace (Main)', 'Ice Palace', ['Ice Palace - Compass Chest', 'Ice Palace - Freezor Chest',
create_dungeon_region(player, 'Ice Palace (Main)', 'Ice Palace', ['Ice Palace - Compass Chest'], ['Ice Palace (Back)']),
create_dungeon_region(player, 'Ice Palace (Back)', 'Ice Palace', ['Ice Palace - Freezor Chest',
'Ice Palace - Big Chest', 'Ice Palace - Iced T Room'], ['Ice Palace (East)', 'Ice Palace (Kholdstare)']),
create_dungeon_region(player, 'Ice Palace (East)', 'Ice Palace', ['Ice Palace - Spike Room'], ['Ice Palace (East Top)']),
create_dungeon_region(player, 'Ice Palace (East Top)', 'Ice Palace', ['Ice Palace - Big Key Chest', 'Ice Palace - Map Chest']),
@@ -383,8 +385,8 @@ shop_table = {
# slot, item, price, max=0, replacement=None, replacement_price=0
# item = (item, price)
_basic_shop_defaults = [('Red Potion', 150), ('Small Heart', 10), ('Bombs (10)', 50)]
_dark_world_shop_defaults = [('Red Potion', 150), ('Blue Shield', 50), ('Bombs (10)', 50)]
_basic_shop_defaults = [('Red Potion', 150), ('IFrames (10)', 50), ('Bombs (10)', 50)]
_dark_world_shop_defaults = [('Red Potion', 150), ('IFrames (10)', 50), ('Bombs (10)', 50)]
default_shop_contents = {
'Cave Shop (Dark Death Mountain)': _basic_shop_defaults,
'Red Shield Shop': [('Red Shield', 500), ('Bee', 10), ('Arrows (10)', 30)],
@@ -621,13 +623,13 @@ location_table = {'Mushroom': (0x180013, False, 'in the woods'),
'Frog': (None, False, None),
'Missing Smith': (None, False, None),
'Dark Blacksmith Ruins': (None, False, None),
'Eastern Palace - Prize': ([0x1209D, 0x53EF8, 0x53EF9, 0x180052, 0x18007C, 0xC6FE], True, 'Eastern Palace'),
'Desert Palace - Prize': ([0x1209E, 0x53F1C, 0x53F1D, 0x180053, 0x180078, 0xC6FF], True, 'Desert Palace'),
'Tower of Hera - Prize': ([0x120A5, 0x53F0A, 0x53F0B, 0x18005A, 0x18007A, 0xC706], True, 'Tower of Hera'),
'Palace of Darkness - Prize': ([0x120A1, 0x53F00, 0x53F01, 0x180056, 0x18007D, 0xC702], True, 'Palace of Darkness'),
'Swamp Palace - Prize': ([0x120A0, 0x53F6C, 0x53F6D, 0x180055, 0x180071, 0xC701], True, 'Swamp Palace'),
'Thieves\' Town - Prize': ([0x120A6, 0x53F36, 0x53F37, 0x18005B, 0x180077, 0xC707], True, 'Thieves\' Town'),
'Skull Woods - Prize': ([0x120A3, 0x53F12, 0x53F13, 0x180058, 0x18007B, 0xC704], True, 'Skull Woods'),
'Ice Palace - Prize': ([0x120A4, 0x53F5A, 0x53F5B, 0x180059, 0x180073, 0xC705], True, 'Ice Palace'),
'Misery Mire - Prize': ([0x120A2, 0x53F48, 0x53F49, 0x180057, 0x180075, 0xC703], True, 'Misery Mire'),
'Turtle Rock - Prize': ([0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708], True, 'Turtle Rock')}
'Eastern Palace - Prize': ([0x1209D, 0x53E76, 0x53E77, 0x180052, 0x180070, 0xC6FE], True, 'Eastern Palace'),
'Desert Palace - Prize': ([0x1209E, 0x53E7A, 0x53E7B, 0x180053, 0x180072, 0xC6FF], True, 'Desert Palace'),
'Tower of Hera - Prize': ([0x120A5, 0x53E78, 0x53E79, 0x18005A, 0x180071, 0xC706], True, 'Tower of Hera'),
'Palace of Darkness - Prize': ([0x120A1, 0x53E7C, 0x53E7D, 0x180056, 0x180073, 0xC702], True, 'Palace of Darkness'),
'Swamp Palace - Prize': ([0x120A0, 0x53E88, 0x53E89, 0x180055, 0x180079, 0xC701], True, 'Swamp Palace'),
'Thieves\' Town - Prize': ([0x120A6, 0x53E82, 0x53E83, 0x18005B, 0x180076, 0xC707], True, 'Thieves\' Town'),
'Skull Woods - Prize': ([0x120A3, 0x53E7E, 0x53E7F, 0x180058, 0x180074, 0xC704], True, 'Skull Woods'),
'Ice Palace - Prize': ([0x120A4, 0x53E86, 0x53E87, 0x180059, 0x180078, 0xC705], True, 'Ice Palace'),
'Misery Mire - Prize': ([0x120A2, 0x53E84, 0x53E85, 0x180057, 0x180077, 0xC703], True, 'Misery Mire'),
'Turtle Rock - Prize': ([0x120A7, 0x53E80, 0x53E81, 0x18005C, 0x180075, 0xC708], True, 'Turtle Rock')}

180
Rom.py
View File

@@ -14,17 +14,19 @@ from Text import Uncle_texts, Ganon1_texts, TavernMan_texts, Sahasrahla2_texts,
from Text import KingsReturn_texts, Sanctuary_texts, Kakariko_texts, Blacksmiths_texts, DeathMountain_texts, LostWoods_texts, WishingWell_texts, DesertPalace_texts, MountainTower_texts, LinksHouse_texts, Lumberjacks_texts, SickKid_texts, FluteBoy_texts, Zora_texts, MagicShop_texts, Sahasrahla_names
from Utils import output_path, local_path, int16_as_bytes, int32_as_bytes, snes_to_pc
from Items import ItemFactory, item_table
from InitialSram import InitialSram
from EntranceShuffle import door_addresses
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = 'ac23ab12e7c442515d51370642772c3b'
RANDOMIZERBASEHASH = '2d39bc9eec2a496ba18e56a7b3ba41d5'
class JsonRom(object):
def __init__(self):
self.name = None
self.initial_sram = InitialSram()
self.patches = {}
def write_byte(self, address, value):
@@ -45,6 +47,9 @@ class JsonRom(object):
def write_int32(self, address, value):
self.write_bytes(address, int32_as_bytes(value))
def write_initial_sram(self):
self.write_bytes(0x183000, self.initial_sram.get_initial_sram())
def write_to_file(self, file):
with open(file, 'w') as stream:
json.dump([self.patches], stream)
@@ -60,6 +65,7 @@ class LocalRom(object):
def __init__(self, file, patch=True):
self.name = None
self.initial_sram = InitialSram()
with open(file, 'rb') as stream:
self.buffer = read_rom(stream)
if patch:
@@ -86,6 +92,9 @@ class LocalRom(object):
for i, value in enumerate(values):
self.write_int32(startaddress + (i * 2), value)
def write_initial_sram(self):
self.write_bytes(0x183000, self.initial_sram.get_initial_sram())
def write_to_file(self, file):
with open(file, 'wb') as outfile:
outfile.write(self.buffer)
@@ -453,8 +462,7 @@ def patch_rom(world, player, rom):
continue
if not location.crystal:
# Keys in their native dungeon should use the orignal item code for keys
if location.parent_region.dungeon:
if location.parent_region.dungeon and (world.logic == 'nologic' and not world.keysanity):
dungeon = location.parent_region.dungeon
if location.item is not None and location.item.key and dungeon.is_dungeon_item(location.item):
if location.item.type == "BigKey":
@@ -558,11 +566,11 @@ def patch_rom(world, player, rom):
# set open mode:
if world.mode in ['open', 'inverted']:
rom.write_byte(0x180032, 0x01) # open mode
init_open_mode_sram(rom)
if world.mode == 'inverted':
set_inverted_mode(world, rom)
elif world.mode == 'standard':
rom.write_byte(0x180032, 0x00) # standard mode
init_standard_mode_sram(rom)
uncle_location = world.get_location('Link\'s Uncle', player)
if uncle_location.item is None or uncle_location.item.name not in ['Master Sword', 'Tempered Sword', 'Fighter Sword', 'Golden Sword', 'Progressive Sword']:
@@ -580,8 +588,6 @@ def patch_rom(world, player, rom):
# set light cones
rom.write_byte(0x180038, 0x01 if world.sewer_light_cone else 0x00)
rom.write_byte(0x180039, 0x01 if world.light_world_light_cone else 0x00)
rom.write_byte(0x18003A, 0x01 if world.dark_world_light_cone else 0x00)
GREEN_TWENTY_RUPEES = 0x47
TRIFORCE_PIECE = ItemFactory('Triforce Piece', player).code
@@ -792,10 +798,10 @@ def patch_rom(world, player, rom):
# set swordless mode settings
rom.write_byte(0x18003F, 0x01 if world.swords == 'swordless' else 0x00) # hammer can harm ganon
rom.write_byte(0x180040, 0x01 if world.swords == 'swordless' else 0x00) # open curtains
rom.write_byte(0x180041, 0x01 if world.swords == 'swordless' else 0x00) # swordless medallions
rom.write_byte(0x180043, 0xFF if world.swords == 'swordless' else 0x00) # starting sword for link
rom.write_byte(0x180044, 0x01 if world.swords == 'swordless' else 0x00) # hammer activates tablets
if world.swords == 'swordless':
rom.initial_sram.set_swordless_curtains() # open curtains
# set up clocks for timed modes
if world.shuffle == 'vanilla':
@@ -811,34 +817,34 @@ def patch_rom(world, player, rom):
rom.write_int32(0x180200, 0) # red clock adjustment time (in frames, sint32)
rom.write_int32(0x180204, 0) # blue clock adjustment time (in frames, sint32)
rom.write_int32(0x180208, 0) # green clock adjustment time (in frames, sint32)
rom.write_int32(0x18020C, 0) # starting time (in frames, sint32)
rom.initial_sram.set_starting_timer(0) # starting time (in frames, sint32)
elif world.clock_mode == 'ohko':
rom.write_bytes(0x180190, [0x01, 0x02, 0x01]) # ohko timer with resetable timer functionality
rom.write_int32(0x180200, 0) # red clock adjustment time (in frames, sint32)
rom.write_int32(0x180204, 0) # blue clock adjustment time (in frames, sint32)
rom.write_int32(0x180208, 0) # green clock adjustment time (in frames, sint32)
rom.write_int32(0x18020C, 0) # starting time (in frames, sint32)
rom.initial_sram.set_starting_timer(0) # starting time (in frames, sint32)
elif world.clock_mode == 'countdown-ohko':
rom.write_bytes(0x180190, [0x01, 0x02, 0x01]) # ohko timer with resetable timer functionality
rom.write_int32(0x180200, -100 * 60 * 60 * 60) # red clock adjustment time (in frames, sint32)
rom.write_int32(0x180204, 2 * 60 * 60) # blue clock adjustment time (in frames, sint32)
rom.write_int32(0x180208, 4 * 60 * 60) # green clock adjustment time (in frames, sint32)
if world.difficulty_adjustments == 'normal':
rom.write_int32(0x18020C, (10 + ERtimeincrease) * 60 * 60) # starting time (in frames, sint32)
rom.initial_sram.set_starting_timer((10 + ERtimeincrease) * 60) # starting time (in seconds)
else:
rom.write_int32(0x18020C, int((5 + ERtimeincrease / 2) * 60 * 60)) # starting time (in frames, sint32)
rom.initial_sram.set_starting_timer(int((5 + ERtimeincrease / 2) * 60)) # starting time (in seconds)
if world.clock_mode == 'stopwatch':
rom.write_bytes(0x180190, [0x02, 0x01, 0x00]) # set stopwatch mode
rom.write_int32(0x180200, -2 * 60 * 60) # red clock adjustment time (in frames, sint32)
rom.write_int32(0x180204, 2 * 60 * 60) # blue clock adjustment time (in frames, sint32)
rom.write_int32(0x180208, 4 * 60 * 60) # green clock adjustment time (in frames, sint32)
rom.write_int32(0x18020C, 0) # starting time (in frames, sint32)
rom.initial_sram.set_starting_timer(0) # starting time (in frames, sint32)
if world.clock_mode == 'countdown':
rom.write_bytes(0x180190, [0x01, 0x01, 0x00]) # set countdown, with no reset available
rom.write_int32(0x180200, -2 * 60 * 60) # red clock adjustment time (in frames, sint32)
rom.write_int32(0x180204, 2 * 60 * 60) # blue clock adjustment time (in frames, sint32)
rom.write_int32(0x180208, 4 * 60 * 60) # green clock adjustment time (in frames, sint32)
rom.write_int32(0x18020C, (40 + ERtimeincrease) * 60 * 60) # starting time (in frames, sint32)
rom.initial_sram.set_starting_timer((40 + ERtimeincrease) * 60) # starting time (in seconds)
# set up goals for treasure hunt
rom.write_bytes(0x180165, [0x0E, 0x28] if world.treasure_hunt_icon == 'Triforce Piece' else [0x0D, 0x28])
@@ -853,18 +859,17 @@ def patch_rom(world, player, rom):
# assorted fixes
rom.write_byte(0x1800A2, 0x01) # remain in real dark world when dying in dark world dungeon before killing aga1
rom.write_byte(0x180169, 0x01 if world.lock_aga_door_in_escape else 0x00) # Lock or unlock aga tower door during escape sequence.
if world.mode == 'inverted':
rom.write_byte(0x180169, 0x02) # lock aga/ganon tower door with crystals in inverted
rom.write_byte(0x180171, 0x01 if world.ganon_at_pyramid[player] else 0x00) # Enable respawning on pyramid after ganon death
rom.write_byte(0x180173, 0x01) # Bob is enabled
rom.write_byte(0x180168, 0x08) # Spike Cave Damage
rom.write_byte(0x180195, 0x08) # Spike Cave Damage
rom.write_bytes(0x18016B, [0x04, 0x02, 0x01]) #Set spike cave and MM spike room Cape usage
rom.write_bytes(0x18016E, [0x04, 0x08, 0x10]) #Set spike cave and MM spike room Cape usage
rom.write_bytes(0x50563, [0x3F, 0x14]) # disable below ganon chest
rom.write_byte(0x50599, 0x00) # disable below ganon chest
rom.write_bytes(0xE9A5, [0x7E, 0x00, 0x24]) # disable below ganon chest
rom.write_byte(0x18008B, 0x00) # Pyramid Hole not pre-opened
rom.write_byte(0x18008C, 0x01 if world.crystals_needed_for_gt == 0 else 0x00) # Pyramid Hole pre-opened if crystal requirement is 0
if world.crystals_needed_for_gt == 0:
rom.initial_sram.pre_open_ganons_tower()
rom.write_byte(0xF5D73, 0xF0) # bees are catchable
rom.write_byte(0xF5F10, 0xF0) # bees are catchable
rom.write_byte(0x180086, 0x00 if world.aga_randomness else 0x01) # set blue ball and ganon warp randomness
@@ -872,24 +877,10 @@ def patch_rom(world, player, rom):
rom.write_byte(0x1800A1, 0x01) # enable overworld screen transition draining for water level inside swamp
rom.write_byte(0x180174, 0x01 if world.fix_fake_world else 0x00)
rom.write_byte(0x18017E, 0x01) # Fairy fountains only trade in bottles
rom.write_byte(0x180034, 0x0A) # starting max bombs
rom.write_byte(0x180035, 30) # starting max arrows
for x in range(0x183000, 0x18304F):
rom.write_byte(x, 0) # Zero the initial equipment array
rom.write_byte(0x18302C, 0x18) # starting max health
rom.write_byte(0x18302D, 0x18) # starting current health
rom.write_byte(0x183039, 0x68) # starting abilities, bit array
for item in world.precollected_items:
if item.player != player:
continue
if item.name == 'Fighter Sword':
rom.write_byte(0x183000+0x19, 0x01)
rom.write_byte(0x0271A6+0x19, 0x01)
rom.write_byte(0x180043, 0x01) # special starting sword byte
else:
raise RuntimeError("Unsupported pre-collected item: {}".format(item))
if world.pseudoboots[player]:
rom.write_byte(0x18008E, 0x01)
rom.write_byte(0x159A8, 0x04 if world.logic == 'noglitches' else 0x02) # Zelda escape mirror fix
rom.initial_sram.set_starting_equipment(world, player)
rom.write_byte(0x18004A, 0x00 if world.mode != 'inverted' else 0x01) # Inverted mode
rom.write_byte(0x18005D, 0x00) # Hammer always breaks barrier
@@ -903,17 +894,24 @@ def patch_rom(world, player, rom):
rom.write_byte(0x18004D, 0x00) # Escape assist (off)
if world.goal in ['pedestal', 'triforcehunt']:
rom.write_byte(0x18003E, 0x01) # make ganon invincible
rom.write_byte(0x1801A8, 0x01) # make ganon invincible
elif world.goal in ['dungeons']:
rom.write_byte(0x18003E, 0x02) # make ganon invincible until all dungeons are beat
rom.write_byte(0x1801A8, 0x02) # make ganon invincible until all dungeons are beat
elif world.goal in ['crystals']:
rom.write_byte(0x18003E, 0x04) # make ganon invincible until all crystals
rom.write_byte(0x1801A8, 0x04) # make ganon invincible until all crystals
elif world.goal in ['all_items']:
rom.write_byte(0x1801A8, 0x0A) # make ganon invincible until all items
elif world.goal in ['completionist']:
rom.write_byte(0x1801A8, 0x0B) # make ganon invincible until all items and dungeons
elif world.goal in ['ganonhunt']:
rom.write_byte(0x1801A8, 0x05) # make ganon invincible until goal triforce pieces
else:
rom.write_byte(0x18003E, 0x03) # make ganon invincible until all crystals and aga 2 are collected
rom.write_byte(0x1801A8, 0x03) # make ganon invincible until all crystals and aga 2 are collected
rom.write_byte(0x18005E, world.crystals_needed_for_gt)
rom.write_byte(0x18005F, world.crystals_needed_for_ganon)
rom.write_byte(0x18008A, 0x01 if world.mode == "standard" else 0x00) # block HC upstairs doors in rain state in standard mode
rom.write_byte(0x18019A, world.crystals_needed_for_gt)
rom.write_byte(0x1801A6, world.crystals_needed_for_ganon)
rom.write_byte(0x1801A2, 0x00) # Make ped check requirement vanilla
rom.write_byte(0x18008A, 0x01 if world.block_side_exits_escape else 0x00) # block HC upstairs doors in rain state in standard mode
# Bitfield - enable text box to show with free roaming items
#
@@ -927,6 +925,8 @@ def patch_rom(world, player, rom):
rom.write_byte(0x18003B, 0x01 if world.keysanity else 0x00) # maps showing crystals on overworld
rom.write_byte(0x18008E, 0x01 if world.pseudoboots else 0x00)
# compasses showing dungeon count
if world.clock_mode != 'off':
rom.write_byte(0x18003C, 0x00) # Currently must be off if timer is on, because they use same HUD location
@@ -937,13 +937,17 @@ def patch_rom(world, player, rom):
# Bitfield - enable free items to show up in menu
#
# ----dcba
# ---edcba
# e - bosses
# d - Compass
# c - Map
# b - Big Key
# a - Small Key
#
rom.write_byte(0x180045, 0xFF if world.keysanity else 0x00) # free roaming items in menu
hud_bits = 0
hud_bits |= 0x0F if world.keysanity else 0x00
hud_bits |= 0x10 if world.logic == 'nologic' else 0x00
rom.write_byte(0x180045, hud_bits) # free roaming items in menu
# Map reveals
reveal_bytes = {
@@ -955,7 +959,7 @@ def patch_rom(world, player, rom):
"Skull Woods": 0x0080,
"Swamp Palace": 0x0400,
"Ice Palace": 0x0040,
"Misery Mire'": 0x0100,
"Misery Mire": 0x0100,
"Turtle Rock": 0x0008,
}
@@ -1034,16 +1038,23 @@ def patch_rom(world, player, rom):
# fix trock doors for reverse entrances
if world.fix_trock_doors:
rom.write_byte(0xFED31, 0x0E) # preopen bombable exit
rom.write_byte(0xFEE41, 0x0E) # preopen bombable exit
# included unconditionally in base2current
#rom.write_byte(0xFE465, 0x1E) # remove small key door on backside of big key door
rom.initial_sram.pre_open_tr_bomb_doors() # preopen bombable exits
# write total item count and item counter hud mode
item_total = len(world.get_filled_locations()) - 17 # minus non-item locations
rom.write_int16(0x180196, item_total)
if (world.goal not in ['triforcehunt', 'ganonhunt'] or world.treasure_hunt_count == 0) and (world.item_counter_hud[player] or world.goal in ['completionist']):
rom.write_byte(0x180039, 0x01)
else:
rom.write_byte(0xFED31, 0x2A) # preopen bombable exit
rom.write_byte(0xFEE41, 0x2A) # preopen bombable exit
rom.write_byte(0x180039, 0x00)
rom.write_byte(0x187032, 0x01 if world.fastrom else 0x00)
write_strings(rom, world, player)
# write initial sram
rom.write_initial_sram()
# set rom name
# 21 bytes
from Main import __version__
@@ -1122,6 +1133,9 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, spr
rom.write_byte(0x18004B, 0x01 if quickswap else 0x00)
# Reduced Flashing
rom.write_byte(0x18017F, 0x01)
rom.write_byte(0x18021A, 1 if disable_music else 0x00)
# restore Mirror sound effect volumes (for existing seeds that lack it)
@@ -1139,17 +1153,7 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, spr
# set heart color
if color == 'random':
color = random.choice(['red', 'blue', 'green', 'yellow'])
rom.write_byte(0x6FA1E, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA20, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA22, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA24, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA26, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA28, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA2A, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA2C, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA2E, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x6FA30, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color])
rom.write_byte(0x65561, {'red': 0x05, 'blue': 0x0D, 'green': 0x19, 'yellow': 0x09}[color])
rom.write_byte(0x187020, {'red': 0x00, 'blue': 0x01, 'green': 0x02, 'yellow': 0x03}[color])
# write link sprite if required
if sprite is not None:
@@ -1194,7 +1198,7 @@ def write_strings(rom, world, player):
# For hints, first we write hints about entrances, some from the inconvenient list others from all reasonable entrances.
if world.hints:
tt['sign_north_of_links_house'] = '> Randomizer The telepathic tiles can have hints!'
tt['sign_north_of_links_house'] = '> The telepathic tiles can have hints!'
entrances_to_hint = {}
entrances_to_hint.update(InconvenientEntrances)
if world.shuffle_ganon:
@@ -1321,8 +1325,7 @@ def write_strings(rom, world, player):
greenpendant = world.find_items('Green Pendant', player)[0]
tt['sahasrahla_bring_courage'] = 'I lost my family heirloom in %s' % greenpendant.hint_text
tt['sign_ganons_tower'] = ('You need %d crystal to enter.' if world.crystals_needed_for_gt == 1 else 'You need %d crystals to enter.') % world.crystals_needed_for_gt
tt['sign_ganons_tower'] = 'You need to kill 7 deadrocks to enter.'
ganon_crystals_singular = 'You need %d crystal to beat Ganon.'
@@ -1331,13 +1334,18 @@ def write_strings(rom, world, player):
if world.goal == 'ganon':
ganon_crystals_singular = 'To beat Ganon you must collect %d crystal and defeat his minion at the top of his tower.'
ganon_crystals_plural = 'To beat Ganon you must collect %d crystals and defeat his minion at the top of his tower.'
tt['sign_ganon'] = (ganon_crystals_singular if world.crystals_needed_for_ganon == 1 else ganon_crystals_plural) % world.crystals_needed_for_ganon
tt['sign_ganon'] = (ganon_crystals_singular if world.crystals_needed_for_ganon == 1 else ganon_crystals_plural) % world.crystals_needed_for_ganon
if world.goal == 'crystals':
ganon_crystals_singular = 'To beat Ganon you must collect %d crystal.'
ganon_crystals_plural = 'To beat Ganon you must collect %d crystals.'
tt['sign_ganon'] = (ganon_crystals_singular if world.crystals_needed_for_ganon == 1 else ganon_crystals_plural) % world.crystals_needed_for_ganon
if world.goal == 'ganonhunt':
ganon_triforce_singular = 'To beat Ganon you must collect %d triforce pieces and defeat his minion at the top of his tower.'
ganon_triforce_plural = 'To beat Ganon you must collect %d triforce pieces and defeat his minion at the top of his tower.'
if world.goal in ['dungeons']:
tt['sign_ganon'] = 'You need to complete all the dungeons.'
if world.goal in ['completionist']:
tt['sign_ganon'] = 'You need to complete all the dungeons and collect all items.'
tt['uncle_leaving_text'] = Uncle_texts[random.randint(0, len(Uncle_texts) - 1)]
tt['end_triforce'] = "{NOBORDER}\n" + Triforce_texts[random.randint(0, len(Triforce_texts) - 1)]
@@ -1352,6 +1360,11 @@ def write_strings(rom, world, player):
tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.'
tt['sign_ganon'] = 'Go find the Triforce pieces... Ganon is invincible!'
tt['murahdahla'] = "Hello @. I\nam Murahdahla, brother of\nSahasrahla and Aginah. Behold the power of\ninvisibility.\n\n\n\n… … …\n\nWait! you can see me? I knew I should have\nhidden in a hollow tree. If you bring\n%d triforce pieces, I can reassemble it." % world.treasure_hunt_count
elif world.goal in ['ganonhunt']:
tt['ganon_fall_in'] = Ganon1_texts[random.randint(0, len(Ganon1_texts) - 1)]
tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Get the Triforce Pieces.'
tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.'
tt['sign_ganon'] = 'You need %d triforce pieces to beat Ganon.'
elif world.goal in ['pedestal']:
tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Your goal is at the pedestal.'
tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.'
@@ -1377,8 +1390,8 @@ def write_strings(rom, world, player):
# inverted spawn menu changes
if world.mode == 'inverted':
tt['menu_start_2'] = "{MENU}\n{SPEED0}\n≥@'s house\n Dark Chapel\n{CHOICE3}"
tt['menu_start_3'] = "{MENU}\n{SPEED0}\n≥@'s house\n Dark Chapel\n Mountain Cave\n{CHOICE2}"
tt['menu_start_2'] = "{MENU}\n{SPEED0}\n≥@'s House\n Dark Chapel\n{CHOICE3}"
tt['menu_start_3'] = "{MENU}\n{SPEED0}\n≥@'s House\n Dark Chapel\n Mountain Cave\n{CHOICE2}"
tt['intro_main'] = CompressedTextMapper.convert(
"{INTRO}\n Episode III\n{PAUSE3}\n A Link to\n the Past\n"
+ "{PAUSE3}\nInverted\n Randomizer\n{PAUSE3}\nAfter mostly disregarding what happened in the first two games.\n"
@@ -1425,6 +1438,17 @@ def write_strings(rom, world, player):
rom.write_bytes(0x181500, data)
rom.write_bytes(0x76CC0, [byte for p in pointers for byte in [p & 0xFF, p >> 8 & 0xFF]])
def init_open_mode_sram(rom):
rom.initial_sram.pre_open_castle_gate();
rom.initial_sram.set_progress_indicator(0x02);
rom.initial_sram.set_progress_flags(0x14);
rom.initial_sram.set_starting_entrance(0x01);
def init_standard_mode_sram(rom):
rom.initial_sram.set_progress_indicator(0x00);
rom.initial_sram.set_progress_flags(0x0);
rom.initial_sram.set_starting_entrance(0x00);
def set_inverted_mode(world, rom):
rom.write_byte(snes_to_pc(0x0283E0), 0xF0) # residual portals
rom.write_byte(snes_to_pc(0x02B34D), 0xF0)
@@ -1436,6 +1460,12 @@ def set_inverted_mode(world, rom):
rom.write_int16(snes_to_pc(0x02E8D5), 0x07C8)
rom.write_int16(snes_to_pc(0x02E8F7), 0x01F8)
rom.write_byte(snes_to_pc(0x08D40C), 0xD0) # morph proof
rom.write_byte(snes_to_pc(0x1BC428), 0x00) # remove diggable light world portals
rom.write_byte(snes_to_pc(0x1BC43A), 0x00)
rom.write_byte(snes_to_pc(0x1BC590), 0x00)
rom.write_byte(snes_to_pc(0x1BC5A1), 0x00)
rom.write_byte(snes_to_pc(0x1BC5B1), 0x00)
rom.write_byte(snes_to_pc(0x1BC5C7), 0x00)
# the following bytes should only be written in vanilla
# or they'll overwrite the randomizer's shuffles
if world.shuffle == 'vanilla':
@@ -1778,7 +1808,7 @@ HintLocations = ['telepathic_tile_eastern_palace',
'telepathic_tile_castle_tower',
'telepathic_tile_ice_large_room',
'telepathic_tile_turtle_rock',
'telepathic_tile_ice_entrace',
'telepathic_tile_ice_entrance',
'telepathic_tile_ice_stalfos_knights_room',
'telepathic_tile_tower_of_hera_entrance',
'telepathic_tile_south_east_darkworld_cave',

902
Rules.py

File diff suppressed because it is too large Load Diff

518
Text.py
View File

@@ -1,6 +1,7 @@
# -*- coding: UTF-8 -*-
from collections import OrderedDict
import logging
import re
text_addresses = {'Pedestal': (0x180300, 256),
'Triforce': (0x180400, 256),
@@ -21,13 +22,14 @@ text_addresses = {'Pedestal': (0x180300, 256),
Uncle_texts = [
# these ones are er specific
'Good Luck!\nYou will need it.',
'Forward this message to 10 other people or this seed will be awful.',
'I hope you like your seeds bootless and fluteless.',
'10\n9\n8\n7\n6\n5\n4\n3\n2\n1\nGo!',
'I\'m off to visit cousin Fritzl.',
'Don\'t forget to check Antlion Cave.'
] * 2 + [
# these ones are from web randomizer
"We're out of\nWeetabix. To\nthe store!",
"This seed is\nbootless\nuntil boots.",
"Why do we only\nhave one bed?",
@@ -44,7 +46,7 @@ Uncle_texts = [
"I am leaving\nforever.\nGoodbye.",
"Don't worry.\nI got this\ncovered.",
"Race you to\nthe castle!",
"\n hi",
"\n Hi",
"I'M JUST GOING\nOUT FOR A\nPACK OF SMOKES",
"It's dangerous\nto go alone.\nSee ya!",
"ARE YOU A BAD\nENOUGH DUDE TO\nRESCUE ZELDA?",
@@ -66,47 +68,70 @@ Uncle_texts = [
"Get to the\nchop...\ncastle!",
"Come with me\nif you want\nto live",
"I must go\nmy planet\nneeds me",
"Are we in\ngo mode yet?",
"Darn, I\nthought this\nwas combo.",
"Don't check\nanything I\nwouldn't!",
"I know where\nthe bow is!\n",
"This message\nwill self\ndestruct.",
"Time to cast\nMeteo on\nGanon!",
"I have a\nlong, full\nlife ahead!",
"Why did that\nsoda have a\nskull on it?",
"Something\nrandom just\ncame up.",
"I'm bad at\nthis. Can you\ndo it for me?",
"Link!\n Wake up!\n ... Bye!",
"Text me when\nyou hit\ngo mode.",
"Turn off the\nstove before\nyou leave.",
"It's raining.\nI'm taking\nthe umbrella.",
"Count to 30.\nThen come\nfind me.",
"Gonna shuffle\nall the items\nreal quick."
]
Triforce_texts = [
# these ones are er specific
'Product has Hole in center. Bad seller, 0 out of 5.',
'Who stole the fourth triangle?',
'Trifource?\nMore Like Tritrice, am I right?'
'\n Well Done!',
'You just wasted 2 hours of your life.',
'This was meant to be a trapezoid'
] * 2 + [
"\n G G",
"All your base\nare belong\nto us.",
"You have ended\nthe domination\nof Dr. Wily",
" thanks for\n playing!!!",
"\n You Win!",
" Thank you!\n your quest\n is over.",
" A winner\n is\n you!",
"\n WINNER!!",
"\n I'm sorry\n\n but your\nprincess is in\nanother castle",
"\n success!",
'\n Well Done!',
'This was meant to be a trapezoid',
# these ones are from web randomizer
"\n G G",
" All your base\n are belong\n to us.",
" You have ended\n the domination\n of Dr. Wily",
" Thanks for\n playing!!!",
"\n You Win!",
" Thank you!\n Your quest\n is over.",
" A winner\n is you!",
"\n WINNER!!",
"\n I'm sorry\n\nbut our princess is\n in another castle",
"\n Success!",
" Whelp…\n that just\n happened",
" Oh hey…\n it's you",
"\n Wheeeeee!!",
" Time for\n another one?",
"and\n\n scene",
"\n GOT EM!!",
"\nTHE VALUUUE!!!",
"Cool seed,\n\nright?",
"\n We did it!",
" Spam those\n emotes in\n wilds chat",
"\n O M G",
" Hello. Will\n you be my\n friend?",
" Beetorp\n was\n here!",
"The Wind Fish\nwill wake\nsoon. Hoot!",
"meow meow meow\nmeow meow meow\n oh my god!",
"Ahhhhhhhhh\nYa ya yaaaah\nYa ya yaaah",
".done\n\n.comment lol",
"You get to\ndrink from\nthe firehose",
"Do you prefer\n bacon, pork,\n or ham?",
"You get one\nwish. Choose\nwisely, hero!",
"Can you please\nbreak us three\nup? Thanks.",
" Pick us up\n before we\n get dizzy!",
" Oh hey…\n it's you",
"\n Wheeeeee!!",
" Time for\n another one?",
" And\n\n scene",
"\n GOT EM!!",
"\n THE VALUUUE!!!",
" Cool seed,\n\n right?",
"\n We did it!",
" Spam those\n emotes in\n wilds chat",
"\n O M G",
" Hello. Will you\n you be my friend?",
" Beetorp\n was\n here!",
" The Wind Fish\n will wake soon.\n Hoot!",
" Meow Meow Meow\n Meow Meow Meow\n Oh my god!",
" Ahhhhhhhhh\n Ya ya yaaaah\n Ya ya yaaah",
" .done\n\n .comment lol",
" You get to\n drink from\n the firehose",
" Do you prefer\n bacon, pork,\n or ham?",
" You get one\n wish. Choose\n wisely, hero!",
" Can you please\n break us three\n up? Thanks.",
" Pick us up\n before we\n get dizzy!",
" Thank you,\n Mikey. Youre\n 2 minutes late",
" This was a\n 7000 series\n train.",
" I'd buy\n that for\n a rupee!",
" Did you like\n that bow\n placement?",
" I promise the\n next seed will\n be better.",
"\n Honk.",
" Breakfast\n is served!",
]
BombShop2_texts = ['Bombs!\nBombs!\nBiggest!\nBestest!\nGreatest!\nBoomest!']
Sahasrahla2_texts = ['You already got my item, idiot.', 'Why are you still talking to me?', 'This text won\'t change.', 'Have you met my brother, Hasarahshla?']
@@ -145,6 +170,34 @@ Blind_texts = [
"I tried to\ncatch fog,\nbut I mist.",
"Winter is a\ngreat time\nto chill.",
"Do you think\nthe Ice Rod\nis cool?",
"Pyramids?\nI never saw\nthe point.",
"Stone golems\nare created as\nblank slates.",
"Desert humor\nis often dry.\n",
"Ganon is a\nbacon of\ndespair!",
"Butchering\ncows means\nhigh steaks.",
"I can't search\nthe web...\nToo many links",
"I can whistle\nMost pitches\nbut I can't C",
"The Blinds\nStore is\ncurtain death",
"Dark Aga Rooms\nare not a\nbright idea.",
"Best advice\nfor a Goron?\nBe Boulder.",
"Equestrian\nservices are\na stable job.",
"Do I like\ndrills? Just\na bit.",
"I'd shell out\ngood rupees\nfor a conch.",
"Current\naffairs are\nshocking!",
"A lying Goron\ndeals in\nboulderdash.",
"A bread joke?\nEh, it'd be\nhalf baked.",
"I could take\na stab at a\nsword pun.",
"Gloves open\na handful\nof checks",
"Red mail?\nReturn to\nsender.",
"For sale:\nBaby boots,\nNever found",
"SRL or rtGG?\nI prefer the\nLadder",
"Ladders are\nalways up\nto something",
"Zelda's\nfashion is\nvery chic",
"Zombie geese\nare waterfoul.\n",
"I bought some\ncuccos for a\npoultry sum.",
"The stratus of\nclouds is up\nin the air.",
"Tie two ropes\ntogether?!\nI think knot!",
"Time for you\nto go on a\nBlind date!"
]
Ganon1_texts = [
"Start your day\nsmiling with a\ndelicious\nwhole grain\nbreakfast\ncreated for\nyour\nincredible\ninsides.",
@@ -164,13 +217,47 @@ Ganon1_texts = [
"The Hemiptera\nor true bugs\nare an order\nof insects\ncovering 50k\nto 80k species\nlike aphids,\ncicadas, and\nshield bugs.",
"Thanks for\ndropping in.\nThe first\npassengers\nin a hot\nair balloon\nwere a duck,\na sheep,\nand a rooster.",
"You think you\nare so smart?\n\nI bet you\ndidn't know\nyou can't hum\nwhile holding\nyour nose\nclosed.",
"grumble,\n\ngrumble…\ngrumble,\n\ngrumble…\nSeriously, you\nwere supposed\nto bring food.",
"Grumble,\n\ngrumble…\nGrumble,\n\ngrumble…\nSeriously, you\nwere supposed\nto bring food.",
"Join me hero,\nand I shall\nmake your face\nthe greatest\nin the Dark\nWorld!\n\nOr else you\nwill die!",
"Why rule over\na desert full\nof stereotypes\nwhen I can\ncorrupt a\nworld into\npure evil and\nrule over\nthat instead?",
"When I conquer\nthe Light\nWorld, I'll\nhold a parade\nof all my\nmonsters to\ndemonstrate my\nmight to the\npeople!",
"Life, dreams,\nhope...\nWhere'd they\ncome from? And\nwhere are they\nheaded? These\nthings... I am\ngoing to\ndestroy!",
"My minions all\nfailed to\nguard those\nitems?!\n\nWhy am I\nsurrounded by\nincompetent\nfools?!",
]
Ganon_Phase_3_No_Silvers_texts = [
"Did you find\nthe arrows on\nPlanet Zebes?",
"Did you find\nthe arrows?\nI think not.",
"Silver arrows?\nI have never\nheard of them",
"Did you find\nthe arrows on\nThe Moon?",
"Did you find\nthe arrows\nIn dev null?",
"I have sold\nthe arrows for\na green big 20",
"Did you find\nThe arrows in\nCount Dracula?",
"Error 404\nSilver arrows\nnot found.",
"No arrows for\nYou today,\nSorry",
"No arrows?\nCheck your\njunk mail."
"Careful, all\nthat spinning\nmakes me dizzy",
"Did you find\nthe arrows in\nJabu's belly?",
"Silver is not\nan appropriate\narrow material",
"Did you find\nthe arrows in\nNarnia?",
"Are you ready\nTo spin\nTo win?",
"DID YOU FIND\nTHE ARROWS IN\nKEFKA'S TOWER",
"Did you find\nthe arrows in\nRecycle Bin?",
"Silver Arrows?\n\nLUL",
"Imagine\nfinding the\narrows",
"Did you find\nsilvers in\nscenic Ohio?",
"Did you find\nThe arrows in\n*mumblemumble*",
"\nSpin To Win!\n",
"did you find\nthe arrows in\nthe hourglass?",
"Silver Arrows\nare so v30",
"OH, NO, THEY\nACTUALLY SAID\nSILVER MARROW",
"SURELY THE\nLEFTMOST TILES\nWILL STAY UP",
"Did you find\nthe arrows in\nWorld 4-2?",
"You Spin Me\nRight Round\nLike A Record",
"SILLY HERO,\nSILVER IS FOR\nWEREWOLVES!",
"Did you find\nthe silvers in\nganti's ears",
]
TavernMan_texts = [
"What do you\ncall a blind\ndinosaur?\na doyouthink-\nhesaurus.",
"A blind man\nwalks into\na bar.\nAnd a table.\nAnd a chair.",
@@ -252,7 +339,6 @@ junk_texts = [
KingsReturn_texts = [
'Who is this even',
'The Harem'
] * 2 + [
"the return of the king",
"fellowship of the ring",
@@ -391,7 +477,7 @@ class Credits(object):
],
'pedestal': [
SceneSmallCreditLine(19, 'and the master sword'),
SceneSmallAltCreditLine(21, 'sleeps again...'),
SceneSmallAltCreditLine(21, 'sleeps again···'),
SceneLargeCreditLine(23, 'Forever!'),
],
}
@@ -537,11 +623,16 @@ class MultiByteCoreTextMapper(object):
"{IBOX}": [0x6B, 0x02, 0x77, 0x07, 0x7A, 0x03],
"{C:GREEN}": [0x77, 0x07],
"{C:YELLOW}": [0x77, 0x02],
"{C:WHITE}": [0x77, 0x06],
"{C:INV_WHITE}": [0x77, 0x16],
"{C:INV_YELLOW}": [0x77, 0x12],
"{C:INV_GREEN}": [0x77, 0x17],
"{C:RED}": [0x77, 0x01],
"{C:INV_RED}": [0x77, 0x11],
}
@classmethod
def convert(cls, text, pause=True, wrap=14):
text = text.upper()
def convert(cls, text, pause=True, wrap=19):
lines = text.split('\n')
outbuf = bytearray()
lineindex = 0
@@ -551,7 +642,9 @@ class MultiByteCoreTextMapper(object):
while lines:
linespace = wrap
line = lines.pop(0)
if line.startswith('{'):
match = re.search(r'^\{[A-Z0-9_:]+\}$', line)
if match:
if line == '{PAGEBREAK}':
if lineindex % 3 != 0:
# insert a wait for keypress, unless we just did so
@@ -568,9 +661,27 @@ class MultiByteCoreTextMapper(object):
pending_space = False
while words:
word = words.pop(0)
# sanity check: if the word we have is more than 14 characters, we take as much as we can still fit and push the rest back for later
match = re.search(r'^(\{[A-Z0-9_:]+\}).*', word)
if match:
start_command = match.group(1)
outbuf.extend(cls.special_commands[start_command])
word = word.replace(start_command, '')
match = re.search(r'(\{[A-Z0-9_:]+\})\.?$', word)
if match:
end_command = match.group(1)
word = word.replace(end_command, '')
period = word.endswith('.')
else:
end_command, period = None, False
# sanity check: if the word we have is more than 19 characters,
# we take as much as we can still fit and push the rest back for later
if cls.wordlen(word) > wrap:
(word_first, word_rest) = cls.splitword(word, linespace)
if end_command:
word_rest = (word_rest[:-1] + end_command + '.') if period else (word_rest + end_command)
words.insert(0, word_rest)
lines.insert(0, ' '.join(words))
@@ -583,9 +694,16 @@ class MultiByteCoreTextMapper(object):
if cls.wordlen(word) < linespace:
pending_space = True
linespace -= cls.wordlen(word) + 1 if pending_space else 0
outbuf.extend(RawMBTextMapper.convert(word))
word_to_map = word[:-1] if period else word
outbuf.extend(RawMBTextMapper.convert(word_to_map))
if end_command:
outbuf.extend(cls.special_commands[end_command])
if period:
outbuf.extend(RawMBTextMapper.convert('.'))
else:
# ran out of space, push word and lines back and continue with next line
if end_command:
word = (word[:-1] + end_command + '.') if period else (word + end_command)
words.insert(0, word)
lines.insert(0, ' '.join(words))
break
@@ -649,7 +767,7 @@ class CompressedTextMapper(object):
}
@classmethod
def convert(cls, text, pause=True, max_bytes_expanded=0x800, wrap=14):
def convert(cls, text, pause=True, max_bytes_expanded=0x800, wrap=19):
inbuf = MultiByteCoreTextMapper.convert(text, pause, wrap)
# Links name will need 8 bytes in the target buffer
@@ -685,25 +803,29 @@ class CompressedTextMapper(object):
class CharTextMapper(object):
number_offset = None
alpha_offset = 0
alpha_lower_offset = 0
char_map = {}
@classmethod
def map_char(cls, char):
if cls.number_offset is not None:
if 0x30 <= ord(char) <= 0x39:
if 0x30 <= ord(char) <= 0x39:
return ord(char) + cls.number_offset
if 0x41 <= ord(char) <= 0x5A:
return ord(char) + 0x20 + cls.alpha_offset
if 0x61 <= ord(char) <= 0x7A:
return ord(char) + cls.alpha_offset
return ord(char) + cls.alpha_lower_offset
return cls.char_map.get(char, cls.char_map[' '])
@classmethod
def convert(cls, text):
buf = bytearray()
for char in text.lower():
for char in text:
buf.append(cls.map_char(char))
return buf
class RawMBTextMapper(CharTextMapper):
char_map = {' ': 0xFF,
'': 0x99, # Cursor
'': 0xC4,
'': 0xC5,
'?': 0xC6,
@@ -712,22 +834,15 @@ class RawMBTextMapper(CharTextMapper):
'-': 0xC9,
"🡄": 0xCA,
"🡆": 0xCB,
'': 0xCC,
'': 0x9F,
'.': 0xCD,
'~': 0xCE,
'': 0xCE,
':': 0xEA,
'@': [0x6A], # Links name (only works if compressed)
'>': [0x00, 0xD2, 0x00, 0xD3], # Link's face
"'": 0xD8,
'': 0xD8,
'%': 0xDD, # Hylian Bird
'^': 0xDE, # Hylian Ankh
'=': 0xDF, # Hylian Wavy Lines
'': 0xE0,
'': 0xE1,
'': 0xE2,
'': 0xE3,
'': 0xE4, # Cursor
'>': [0x00, 0x9B, 0x00, 0x9C], # Link's face
"'": 0x9D,
'': 0x9D,
'¼': [0x00, 0xE5, 0x00, 0xE7], # ¼ heart
'½': [0x00, 0xE6, 0x00, 0xE7], # ½ heart
'¾': [0x00, 0xE8, 0x00, 0xE9], # ¾ heart
@@ -912,22 +1027,29 @@ class RawMBTextMapper(CharTextMapper):
"": 0x0D,
"": 0x0E,
"": 0x0F,
"": 0x10,
"": 0x11,
"": 0x12,
"": 0x13,
"": 0x14,
"": 0x15,
"": 0x16,
"": 0x17,
"": 0x18,
"": 0x19,
"": 0x1A,
"": 0x1B,
"": 0x1C,
"": 0x1D,
"": 0x1E,
"": 0x1F,
"%": 0x10, # Hylian Bird
"^": 0x11, # Hylian Ankh
"=": 0x12, # Hylian Wavy Lines
"": 0x13,
"": 0x14,
"": 0x15,
"": 0x16,
#"様": 0x10,
#"子": 0x11,
#"湖": 0x12,
#"達": 0x13,
#"彼": 0x14,
#"女": 0x15,
#"言": 0x16,
#"祭": 0x17,
#"早": 0x18,
#"雨": 0x19,
#"剣": 0x1A,
#"盾": 0x1B,
#"解": 0x1C,
#"抜": 0x1D,
#"者": 0x1E,
#"味": 0x1F,
"": 0x20,
"": 0x21,
"": 0x22,
@@ -1153,6 +1275,7 @@ class RawMBTextMapper(CharTextMapper):
"": 0xFE,
"": 0xFF}
alpha_offset = 0x49
alpha_lower_offset = 0x6F
number_offset = 0x70
@classmethod
@@ -1164,7 +1287,7 @@ class RawMBTextMapper(CharTextMapper):
@classmethod
def convert(cls, text):
buf = bytearray()
for char in text.lower():
for char in text:
res = cls.map_char(char)
if isinstance(res, int):
buf.extend([0x00, res])
@@ -1175,61 +1298,70 @@ class RawMBTextMapper(CharTextMapper):
class GoldCreditMapper(CharTextMapper):
char_map = {' ': 0x9F,
',': 0x34,
',': 0x34, # apostrophe/comma top
"'": 0x35,
'-': 0x36,
'.': 0x37,}
alpha_offset = -0x47
alpha_lower_offset = -0x47
class GreenCreditMapper(CharTextMapper):
char_map = {' ': 0x9F,
'·': 0x52}
alpha_offset = -0x29
alpha_lower_offset = -0x29
class RedCreditMapper(CharTextMapper):
char_map = {' ': 0x9F}
alpha_offset = -0x61
alpha_lower_offset = -0x61
class LargeCreditTopMapper(CharTextMapper):
char_map = {' ': 0x9F,
"'": 0x77,
'!': 0x78,
'.': 0xA0,
'#': 0xA1,
'/': 0xA2,
':': 0xA3,
',': 0xA4,
'?': 0xA5,
'=': 0xA6,
'"': 0xA7,
'-': 0xA8,
'·': 0xA9,
'': 0xA9,
'': 0xAA,
'': 0xAB,}
"'": 0xD9,
'"': 0xDA,
'/': 0xDB,
'.': 0xDC,
':': 0xDD,
'_': 0xDE,
'·': 0xDF,
'': 0xDF,
'': 0xE0,
'#': 0xE1,
'@': 0xE2,
'>': 0xE3,
'?': 0xE4,
'!': 0xE5,
'~': 0xE6,
',': 0xE7,
'-': 0xE8,}
alpha_offset = -0x04
alpha_lower_offset = -0x04
number_offset = 0x23
class LargeCreditBottomMapper(CharTextMapper):
char_map = {' ': 0x9F,
"'": 0x9D,
'!': 0x9E,
'.': 0xC0,
'#': 0xC1,
'/': 0xC2,
':': 0xC3,
',': 0xC4,
'?': 0xC5,
'=': 0xC6,
'"': 0xC7,
'-': 0xC8,
'·': 0xC9,
'': 0xC9,
'': 0xCA,
'': 0xCB,}
"'": 0xEC,
'"': 0xED,
'/': 0xEE,
'.': 0xEF,
':': 0xF0,
'_': 0xF1,
'·': 0xF2,
'': 0xF2,
'': 0xF3,
'#': 0xF4,
'@': 0xF5,
'>': 0xF6,
'?': 0xF7,
'!': 0xF8,
'~': 0xF9,
',': 0xFA,
'-': 0xFB,}
alpha_offset = 0x22
alpha_lower_offset = 0x22
number_offset = 0x49
class TextTable(object):
@@ -1301,7 +1433,6 @@ class TextTable(object):
'item_get_pendant_power',
'item_get_pendant_wisdom',
'item_get_mushroom',
'item_get_book',
'item_get_moonpearl',
'item_get_compass',
'item_get_map', #60
@@ -1318,7 +1449,6 @@ class TextTable(object):
'item_get_bottle',
'item_get_big_key',
'item_get_titans_mitts',
'item_get_magic_mirror',
'item_get_fake_mastersword',
'post_item_get_mastersword',
'item_get_red_potion',
@@ -1440,16 +1570,16 @@ class TextTable(object):
def setDefaultText(self):
text = self._text
text['set_cursor'] = bytearray([0xFB, 0xFC, 0x00, 0xF9, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xE4, 0xFE, 0x68])
text['set_cursor2'] = bytearray([0xFB, 0xFC, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xE4, 0xFE, 0x68])
text['set_cursor'] = bytearray([0xFB, 0xFC, 0x00, 0xF9, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0x99, 0xFE, 0x68])
text['set_cursor2'] = bytearray([0xFB, 0xFC, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0x99, 0xFE, 0x68])
text['game_over_menu'] = CompressedTextMapper.convert("{SPEED0}\nSave-Continue\nSave-Quit\nContinue", False)
text['var_test'] = CompressedTextMapper.convert("0= ᚋ, 1= ᚌ\n2= ᚍ, 3= ᚎ", False)
text['follower_no_enter'] = CompressedTextMapper.convert("Can't you take me some place nice.")
text['choice_1_3'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xE4, 0xF8, 0xFF, 0xF9, 0xFF, 0xFE, 0x71])
text['choice_2_3'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xFF, 0xF8, 0xE4, 0xF9, 0xFF, 0xFE, 0x71])
text['choice_3_3'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xFF, 0xF8, 0xFF, 0xF9, 0xE4, 0xFE, 0x71])
text['choice_1_2'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xE4, 0xF8, 0xFF, 0xFE, 0x72])
text['choice_2_2'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xFF, 0xF8, 0xE4, 0xFE, 0x72])
text['choice_1_3'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0x99, 0xF8, 0xFF, 0xF9, 0xFF, 0xFE, 0x71])
text['choice_2_3'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xFF, 0xF8, 0x99, 0xF9, 0xFF, 0xFE, 0x71])
text['choice_3_3'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xFF, 0xF8, 0xFF, 0xF9, 0x99, 0xFE, 0x71])
text['choice_1_2'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0x99, 0xF8, 0xFF, 0xFE, 0x72])
text['choice_2_2'] = bytearray([0xFB, 0xFC, 0x00, 0xF7, 0xFF, 0xF8, 0x99, 0xFE, 0x72])
text['uncle_leaving_text'] = CompressedTextMapper.convert("I'm just going out for a pack of smokes.")
text['uncle_dying_sewer'] = CompressedTextMapper.convert("I've fallen and I can't get up, take this.")
text['tutorial_guard_1'] = CompressedTextMapper.convert("Only adults should travel at night.")
@@ -1462,7 +1592,7 @@ class TextTable(object):
text['tutorial_guard_7'] = CompressedTextMapper.convert("Jeeze! There really are a lot of things.")
text['priest_sanctuary_before_leave'] = CompressedTextMapper.convert("Go be a hero!")
text['sanctuary_enter'] = CompressedTextMapper.convert("YAY!\nYou saved Zelda!")
text['zelda_sanctuary_story'] = CompressedTextMapper.convert("Do you want to hear me say this again?\n{HARP}\nno\n yes\n{CHOICE}")
text['zelda_sanctuary_story'] = CompressedTextMapper.convert("Do you want to hear me say this again?\n{HARP}\nNo\n Yes\n{CHOICE}")
text['priest_sanctuary_before_pendants'] = CompressedTextMapper.convert("Go'on and get them pendants so you can beat up Agahnim.")
text['priest_sanctuary_after_pendants_before_master_sword'] = CompressedTextMapper.convert("Kudos! But seriously, you should be getting the master sword, not having a kegger in here.")
text['priest_sanctuary_dying'] = CompressedTextMapper.convert("They took her to the castle! Take your sword and save her!")
@@ -1476,14 +1606,14 @@ class TextTable(object):
text['zelda_push_throne'] = CompressedTextMapper.convert("Let's push it from the left!")
text['zelda_switch_room_pull'] = CompressedTextMapper.convert("Pull this lever using A.")
text['zelda_save_lets_go'] = CompressedTextMapper.convert("Let's get out of here!")
text['zelda_save_repeat'] = CompressedTextMapper.convert("I like talking, do you?\nno\n yes\n{CHOICE}")
text['zelda_save_repeat'] = CompressedTextMapper.convert("I like talking, do you?\nNo\n Yes\n{CHOICE}")
text['zelda_before_pendants'] = CompressedTextMapper.convert("You need to find all the pendants…\n\n\nNumpty.")
text['zelda_after_pendants_before_master_sword'] = CompressedTextMapper.convert("Very pretty pendants, but really you should be getting that sword in the forest!")
text['telepathic_zelda_right_after_master_sword'] = CompressedTextMapper.convert("{NOBORDER}\n{SPEED6}\nHi @,\nHave you been thinking about me?\narrrrrgghh…\n… … …")
text['zelda_sewers'] = CompressedTextMapper.convert("Just a little further to the Sanctuary.")
text['zelda_switch_room'] = CompressedTextMapper.convert("The Sanctuary!\n\nPull my finger")
text['kakariko_saharalasa_wife'] = CompressedTextMapper.convert("Heya, @!\nLong time no see.\nYou want a master sword?\n\nWell good luck with that.")
text['kakariko_saharalasa_wife_sword_story'] = CompressedTextMapper.convert("It occurs to me that I like toast and jam, but cheese and crackers is better.\nYou like?\ncheese\n jam\n{CHOICE}")
text['kakariko_saharalasa_wife_sword_story'] = CompressedTextMapper.convert("It occurs to me that I like toast and jam, but cheese and crackers is better.\nYou like?\nCheese\n Jam\n{CHOICE}")
text['kakariko_saharalasa_wife_closing'] = CompressedTextMapper.convert("Anywho, I have things to do. You see those 2 ovens?\n\nYeah 2!\nWho has 2 ovens nowadays?")
text['kakariko_saharalasa_after_master_sword'] = CompressedTextMapper.convert("Cool sword!\n\n\n\n\n\n\n\n\nPlease save us")
text['kakariko_alert_guards'] = CompressedTextMapper.convert("GUARDS! HELP!\nThe creeper\n@ is here!")
@@ -1493,7 +1623,7 @@ class TextTable(object):
text['sahasrahla_quest_information'] = CompressedTextMapper.convert(
"{BOTTOM}\n"
+ "Sahasrahla, I am. You would do well to find the 3 pendants from the 3 dungeons in the Light World.\n"
+ "Understand?\nyes\n no\n{CHOICE}")
+ "Understand?\nYes\n No\n{CHOICE}")
text['sahasrahla_bring_courage'] = CompressedTextMapper.convert(
"{BOTTOM}\n"
+ "While you're here, could you do me a solid and get the green pendant from that dungeon?\n"
@@ -1512,12 +1642,12 @@ class TextTable(object):
text['sign_outside_magic_shop'] = CompressedTextMapper.convert("Welcome to the Magic Shoppe")
# 40
text['sign_death_mountain_cave_back'] = CompressedTextMapper.convert("Cave away from sky cabbages")
text['sign_east_of_links_house'] = CompressedTextMapper.convert(" Lake Hylia\n\n Also, a shop")
text['sign_east_of_links_house'] = CompressedTextMapper.convert("↓Lake Hylia\n\n Also, a shop")
text['sign_south_of_lumberjacks'] = CompressedTextMapper.convert("← Kakariko\n Village")
text['sign_east_of_desert'] = CompressedTextMapper.convert("← Desert\n\n It's hot.")
text['sign_east_of_sanctuary'] = CompressedTextMapper.convert("↑→ Potions!\n\nWish waterfall")
text['sign_east_of_castle'] = CompressedTextMapper.convert("→ East Palace\n\n← Castle")
text['sign_north_of_lake'] = CompressedTextMapper.convert("\n Lake Hiriah")
text['sign_north_of_lake'] = CompressedTextMapper.convert("\n Lake Hylia")
text['sign_desert_thief'] = CompressedTextMapper.convert("Don't talk to me or touch my sign!")
text['sign_lumberjacks_house'] = CompressedTextMapper.convert("Lumberjacks, Inc.\nYou see 'em, we saw 'em.")
text['sign_north_kakariko'] = CompressedTextMapper.convert("↓ Kakariko\n Village")
@@ -1531,50 +1661,50 @@ class TextTable(object):
text['potion_shop_no_empty_bottles'] = CompressedTextMapper.convert("Whoa, bucko!\nNo empty bottles.")
text['item_get_lamp'] = CompressedTextMapper.convert("Lamp! You can see in the dark, and light torches.")
text['item_get_boomerang'] = CompressedTextMapper.convert("Boomerang! Press START to select it.")
text['item_get_bow'] = CompressedTextMapper.convert("You're in bow mode now!")
text['item_get_shovel'] = CompressedTextMapper.convert("This is my new mop. My friend George, he gave me this mop. It's a pretty good mop. It's not as good as my old mop. I miss my old mop. But it's still a good mop.")
text['item_get_magic_cape'] = CompressedTextMapper.convert("Finally! we get to play Invisble Man!")
text['item_get_powder'] = CompressedTextMapper.convert("It's the powder. Let's cause some mischief!")
text['item_get_flippers'] = CompressedTextMapper.convert("Splish! Splash! Let's go take a bath!")
text['item_get_power_gloves'] = CompressedTextMapper.convert("Feel the power! You can now lift light rocks! Rock on!")
text['item_get_bow'] = CompressedTextMapper.convert("Bow! Join the archer class!")
text['item_get_shovel'] = CompressedTextMapper.convert("Shovel! Can you dig it?")
text['item_get_magic_cape'] = CompressedTextMapper.convert("Cape! Invisbility cloak activate!")
text['item_get_powder'] = CompressedTextMapper.convert("Powder! Sprinkle it on a dancing pickle!")
text['item_get_flippers'] = CompressedTextMapper.convert("Flippers! Time to swim!")
text['item_get_power_gloves'] = CompressedTextMapper.convert("Gloves! Lift up those rocks!")
text['item_get_pendant_courage'] = CompressedTextMapper.convert("We have the Pendant of Courage! How brave!")
text['item_get_pendant_power'] = CompressedTextMapper.convert("We have the Pendant of Power! How robust!")
text['item_get_pendant_wisdom'] = CompressedTextMapper.convert("We have the Pendant of Wisdom! How astute!")
text['item_get_mushroom'] = CompressedTextMapper.convert("A Mushroom! Don't eat it. Find a witch.")
text['item_get_book'] = CompressedTextMapper.convert("It book! U R now litterit!")
text['item_get_moonpearl'] = CompressedTextMapper.convert("I found a shiny marble! No more hops!")
text['item_get_mushroom'] = CompressedTextMapper.convert("Mushroom! Don't eat it. Find a witch.")
text['item_get_book'] = CompressedTextMapper.convert("This book has a new feature--it can change the state of colored pegs!")
text['item_get_moonpearl'] = CompressedTextMapper.convert("Moon Pearl! Rabbit Be Gone!")
text['item_get_compass'] = CompressedTextMapper.convert("A compass! I can now find the boss.")
# 60
text['item_get_map'] = CompressedTextMapper.convert("Yo! You found a MAP! Press X to see it.")
text['item_get_ice_rod'] = CompressedTextMapper.convert("It's the Ice Rod! Freeze Ray time.")
text['item_get_fire_rod'] = CompressedTextMapper.convert("A Rod that shoots fire? Let's burn all the things!")
text['item_get_ether'] = CompressedTextMapper.convert("We can chill out with this!")
text['item_get_bombos'] = CompressedTextMapper.convert("Let's set everything on fire, and melt things!")
text['item_get_quake'] = CompressedTextMapper.convert("Time to make the earth shake, rattle, and roll!")
text['item_get_ice_rod'] = CompressedTextMapper.convert("Ice Rod! Time to chill out!")
text['item_get_fire_rod'] = CompressedTextMapper.convert("Fire Rod! I'm burning for you!")
text['item_get_ether'] = CompressedTextMapper.convert("Ether! Let's cool things down!")
text['item_get_bombos'] = CompressedTextMapper.convert("Bombos! Explosions, fire, burn it all!")
text['item_get_quake'] = CompressedTextMapper.convert("Quake! Let's shake the ground!")
text['item_get_hammer'] = CompressedTextMapper.convert("STOP!\n\nHammer Time!") # 66
text['item_get_ocarina'] = CompressedTextMapper.convert("Finally! We can play the Song of Time!")
text['item_get_cane_of_somaria'] = CompressedTextMapper.convert("Make blocks!\nThrow blocks!\nsplode Blocks!")
text['item_get_hookshot'] = CompressedTextMapper.convert("BOING!!!\nBOING!!!\nSay no more…")
text['item_get_ocarina'] = CompressedTextMapper.convert("Ocarina! A Flute by another name")
text['item_get_cane_of_somaria'] = CompressedTextMapper.convert("Somaria! Make blocks, throw blocks")
text['item_get_hookshot'] = CompressedTextMapper.convert("Hookshot! Grab all the things!")
text['item_get_bombs'] = CompressedTextMapper.convert("BOMBS! Use A to pick 'em up, throw 'em, get hurt!")
text['item_get_bottle'] = CompressedTextMapper.convert("It's a terrarium. I hope we find a lizard!")
text['item_get_bottle'] = CompressedTextMapper.convert("Bottle! Store all manner of things")
text['item_get_big_key'] = CompressedTextMapper.convert("Yo! You got a Big Key!")
text['item_get_titans_mitts'] = CompressedTextMapper.convert("So, like, you can now lift anything.\nANYTHING!")
text['item_get_magic_mirror'] = CompressedTextMapper.convert("We could stare at this all day or, you know, beat Ganon…")
text['item_get_titans_mitts'] = CompressedTextMapper.convert("Mitts! Lift ALL the rocks!")
text['item_get_magic_mirror'] = CompressedTextMapper.convert("Your Mirror has been upgraded and now works in both worlds!")
text['item_get_fake_mastersword'] = CompressedTextMapper.convert("It's the Master Sword! …or not…\n\n FOOL!")
# 70
text['post_item_get_mastersword'] = CompressedTextMapper.convert("{NOBORDER}\n{SPEED6}\n@, you got the sword!\n{CHANGEMUSIC}\nNow let's go beat up Agahnim!")
text['item_get_red_potion'] = CompressedTextMapper.convert("Red goo to go! Nice!")
text['item_get_green_potion'] = CompressedTextMapper.convert("Green goo to go! Nice!")
text['item_get_blue_potion'] = CompressedTextMapper.convert("Blue goo to go! Nice!")
text['item_get_bug_net'] = CompressedTextMapper.convert("Surprise Net! Let's catch stuff!")
text['item_get_blue_mail'] = CompressedTextMapper.convert("Blue threads? Less damage activated!")
text['item_get_red_mail'] = CompressedTextMapper.convert("You feel the power of the eggplant on your head.")
text['item_get_temperedsword'] = CompressedTextMapper.convert("Nice… I now have a craving for Cheetos.")
text['item_get_mirror_shield'] = CompressedTextMapper.convert("Pit would be proud!")
text['item_get_cane_of_byrna'] = CompressedTextMapper.convert("It's the Blue Cane. You can now protect yourself with lag!")
text['item_get_red_potion'] = CompressedTextMapper.convert("Red Potion! Heal yourself")
text['item_get_green_potion'] = CompressedTextMapper.convert("Green Potion! Magic refill!")
text['item_get_blue_potion'] = CompressedTextMapper.convert("Blue Potion! Heal and restore!")
text['item_get_bug_net'] = CompressedTextMapper.convert("Bug Net! Let's catch stuff!")
text['item_get_blue_mail'] = CompressedTextMapper.convert("Blue Mail! Less damage activated!")
text['item_get_red_mail'] = CompressedTextMapper.convert("Red Mail! Even less damage!")
text['item_get_temperedsword'] = CompressedTextMapper.convert("Tempered Sword! Even more slashy!")
text['item_get_mirror_shield'] = CompressedTextMapper.convert("Mirror Shield! Time to reflect")
text['item_get_cane_of_byrna'] = CompressedTextMapper.convert("Byrna! Swirly protection!")
text['missing_big_key'] = CompressedTextMapper.convert("Something is missing…\nThe Big Key?")
text['missing_magic'] = CompressedTextMapper.convert("Something is missing…\nMagic meter?")
text['item_get_pegasus_boots'] = CompressedTextMapper.convert("Finally, it's bonking time!\nHold A to dash")
text['item_get_pegasus_boots'] = CompressedTextMapper.convert("Pegasus Boots! Finally, it's bonking time!\nHold A to dash")
text['talking_tree_info_start'] = CompressedTextMapper.convert("Whoa! I can talk again!")
text['talking_tree_info_1'] = CompressedTextMapper.convert("Yank on the pitchfork in the center of town, ya heard it here.")
text['talking_tree_info_2'] = CompressedTextMapper.convert("Ganon is such a dingus, no one likes him, ya heard it here.")
@@ -1584,15 +1714,15 @@ class TextTable(object):
text['talking_tree_other'] = CompressedTextMapper.convert("I can breathe!")
text['item_get_pendant_power_alt'] = CompressedTextMapper.convert("We have the Pendant of Power! How robust!")
text['item_get_pendant_wisdom_alt'] = CompressedTextMapper.convert("We have the Pendant of Wisdom! How astute!")
text['game_shooting_choice'] = CompressedTextMapper.convert("20 rupees.\n5 arrows.\nWin rupees!\nWant to play?\nyes\n no\n{CHOICE}")
text['game_shooting_choice'] = CompressedTextMapper.convert("20 rupees.\n5 arrows.\nWin rupees!\nWant to play?\nYes\n No\n{CHOICE}")
text['game_shooting_yes'] = CompressedTextMapper.convert("Let's do this!")
text['game_shooting_no'] = CompressedTextMapper.convert("Where are you going? Straight up!")
text['game_shooting_continue'] = CompressedTextMapper.convert("Keep playing?\nyes\n no\n{CHOICE}")
text['game_shooting_continue'] = CompressedTextMapper.convert("Keep playing?\nYes\n No\n{CHOICE}")
text['pond_of_wishing'] = CompressedTextMapper.convert("-Wishing Pond-\n\n On Vacation")
text['pond_item_select'] = CompressedTextMapper.convert("Pick something\nto throw in.\n{ITEMSELECT}")
text['pond_item_test'] = CompressedTextMapper.convert("You toss this?\nyup\n wrong\n{CHOICE}")
text['pond_item_test'] = CompressedTextMapper.convert("You toss this?\nYup\n Wrong\n{CHOICE}")
text['pond_will_upgrade'] = CompressedTextMapper.convert("You're honest, so I'll give you a present.")
text['pond_item_test_no'] = CompressedTextMapper.convert("You sure?\noh yeah\n um\n{CHOICE}")
text['pond_item_test_no'] = CompressedTextMapper.convert("You sure?\nOh yeah\n Um\n{CHOICE}")
text['pond_item_test_no_no'] = CompressedTextMapper.convert("Well, I don't want it, so take it back.")
text['pond_item_boomerang'] = CompressedTextMapper.convert("I don't much like you, so have this worse Boomerang.")
# 90
@@ -1601,7 +1731,7 @@ class TextTable(object):
text['pond_item_bottle_filled'] = CompressedTextMapper.convert("Bottle Filled!\nMoney Saved!")
text['pond_item_sword'] = CompressedTextMapper.convert("Thank you for the sword, here is a stick of butter.")
text['pond_of_wishing_happiness'] = CompressedTextMapper.convert("Happiness up!\nYou are now\nᚌᚋ happy!")
text['pond_of_wishing_choice'] = CompressedTextMapper.convert("Your wish?\nmore bombs\n more arrows\n{CHOICE}")
text['pond_of_wishing_choice'] = CompressedTextMapper.convert("Your wish?\nMore bombs\n More arrows\n{CHOICE}")
text['pond_of_wishing_bombs'] = CompressedTextMapper.convert("Woo-hoo!\nYou can now\ncarry ᚌᚋ bombs")
text['pond_of_wishing_arrows'] = CompressedTextMapper.convert("Woo-hoo!\nYou can now\nhold ᚌᚋ arrows")
text['pond_of_wishing_full_upgrades'] = CompressedTextMapper.convert("Youhave all I can give you, here are your rupees back.")
@@ -1622,7 +1752,7 @@ class TextTable(object):
text['running_man'] = CompressedTextMapper.convert("Hi, Do you\nknow Veetorp?\n\nYou really\nshould. And\nall the other great guys who made this possible.\nGo thank them.\n\n\nIf you can catch them…")
text['game_race_sign'] = CompressedTextMapper.convert("Why are you reading this sign? Run!!!")
text['sign_bumper_cave'] = CompressedTextMapper.convert("You need Cape, but not Hookshot")
text['sign_catfish'] = CompressedTextMapper.convert("toss rocks\ntoss items\ntoss cookies")
text['sign_catfish'] = CompressedTextMapper.convert("Toss rocks\nToss items\nToss cookies")
text['sign_north_village_of_outcasts'] = CompressedTextMapper.convert("↑ Skull Woods\n\n↓ Steve's Town")
text['sign_south_of_bumper_cave'] = CompressedTextMapper.convert("\n→ Karkats cave")
text['sign_east_of_pyramid'] = CompressedTextMapper.convert("\n→ Dark Palace")
@@ -1630,7 +1760,7 @@ class TextTable(object):
text['sign_east_of_mire'] = CompressedTextMapper.convert("\n← Misery Mire\n no way in.\n no way out.")
text['sign_village_of_outcasts'] = CompressedTextMapper.convert("Have a Trulie Awesome Day!")
# B0
text['sign_before_wishing_pond'] = CompressedTextMapper.convert("waterfall\nup ahead\nmake wishes")
text['sign_before_wishing_pond'] = CompressedTextMapper.convert("Waterfall\nup ahead\nMake wishes")
text['sign_before_catfish_area'] = CompressedTextMapper.convert("→↑ Have you met Woeful Ike?")
text['castle_wall_guard'] = CompressedTextMapper.convert("Looking for a Princess? Look downstairs.")
text['gate_guard'] = CompressedTextMapper.convert("No Lonks Allowed!")
@@ -1644,19 +1774,35 @@ class TextTable(object):
text['telepathic_tile_misery_mire'] = CompressedTextMapper.convert("{NOBORDER}\nLighting 4 torches will open your way forward!")
text['hylian_text_2'] = CompressedTextMapper.convert("%%^= %==%\n ^ =%^=\n==%= ^^%^")
text['desert_entry_translated'] = CompressedTextMapper.convert("Kneel before this stone, and magic will move around you.")
text['telepathic_tile_under_ganon'] = CompressedTextMapper.convert("Secondary tournament winners\n{HARP}\n ~~~2017~~~\nA: Zaen")
text['telepathic_tile_under_ganon'] = CompressedTextMapper.convert(
" ALTTPR League" \
" Winners\n{HARP}\n\n" \
" ~~~Season 5~~~\n OKDUDES: \n GanonsGoneWild\n Telethar\n Hitsuyan1337\n\n" \
" ~~~Season 4~~~\nThe Titan's Mitts:\n SailorNep\n Relkin\n Daaanty\n\n" \
" ~~~Season 3~~~\nPhenandra Drifters:\n Megawott\n Frostbite3030\n Jet082\n\n" \
" ~~~Season 2~~~\n Team すごい:\n IIYoshiII\n Hitsuyan1337\n Ramond\n\n" \
" ~~~Season 1~~~\n Team すごい:\n IIYoshiII\n Thalane\n Hitsuyan1337\n\n" \
)
text['telepathic_tile_palace_of_darkness'] = CompressedTextMapper.convert("{NOBORDER}\nThis is a funny looking Enemizer")
# C0
text['telepathic_tile_desert_bonk_torch_room'] = CompressedTextMapper.convert("{NOBORDER}\nThings can be knocked down, if you fancy yourself a dashing dude.")
text['telepathic_tile_castle_tower'] = CompressedTextMapper.convert("{NOBORDER}\nYou can reflect Agahnim's energy with Sword, Bug-net or Hammer.")
text['telepathic_tile_ice_large_room'] = CompressedTextMapper.convert("{NOBORDER}\nAll right stop collaborate and listen\nIce is back with my brand new invention")
text['telepathic_tile_turtle_rock'] = CompressedTextMapper.convert("{NOBORDER}\nYou shall not pass… without the red cane")
text['telepathic_tile_ice_entrace'] = CompressedTextMapper.convert("{NOBORDER}\nYou can use Fire Rod or Bombos to pass.")
text['telepathic_tile_ice_entrance'] = CompressedTextMapper.convert("{NOBORDER}\nYou can use Fire Rod or Bombos to pass.")
text['telepathic_tile_ice_stalfos_knights_room'] = CompressedTextMapper.convert("{NOBORDER}\nKnock 'em down and then bomb them dead.")
text['telepathic_tile_tower_of_hera_entrance'] = CompressedTextMapper.convert("{NOBORDER}\nThis is a bad place, with a guy who will make you fall…\n\n\na lot.")
text['houlihan_room'] = CompressedTextMapper.convert("Randomizer tournament winners\n{HARP}\n ~~~2018~~~\nS: Andy\n\n ~~~2017~~~\nA: ajneb174\nS: ajneb174")
text['caught_a_bee'] = CompressedTextMapper.convert("Caught a Bee\n ≥ keep\n release\n{CHOICE}")
text['caught_a_fairy'] = CompressedTextMapper.convert("Caught Fairy!\n ≥ keep\n release\n{CHOICE}")
text['houlihan_room'] = CompressedTextMapper.convert(
" Crosskeys\n" \
" Tournament\n" \
" Winners\n{HARP}\n" \
" ~~~2022~~~\n Schulzer\n\n" \
" ~~~2021~~~\n Goomba\n\n" \
" ~~~2020~~~\n Linlinlin\n\n" \
" ~~~2019~~~\n Kohrek\n" \
)
text['caught_a_bee'] = CompressedTextMapper.convert("Caught a Bee\n ≥ Keep\n Release\n{CHOICE}")
text['caught_a_fairy'] = CompressedTextMapper.convert("Caught Fairy!\n ≥ Keep\n Release\n{CHOICE}")
text['no_empty_bottles'] = CompressedTextMapper.convert("Whoa, bucko!\nNo empty bottles.")
text['game_race_boy_time'] = CompressedTextMapper.convert("Your time was\nᚎᚍ min ᚌᚋ sec.")
text['game_race_girl'] = CompressedTextMapper.convert("You have 15 seconds,\nGo… Go… Go…")
@@ -1686,7 +1832,7 @@ class TextTable(object):
text['blacksmiths_still_working'] = CompressedTextMapper.convert("Something this precious takes time… Come back later.")
text['blacksmiths_saving_bows'] = CompressedTextMapper.convert("Thanks!\n\nThanks!")
text['blacksmiths_hammer_anvil'] = CompressedTextMapper.convert("Dernt Take Er Jerbs!")
text['dark_flute_boy_storytime'] = CompressedTextMapper.convert("Hi!\nI'm Stumpy\nI've been chillin' in this world for a while now, but I miss my flute. If I gave you a shovel, would you go digging for it?\nsure\n nahh\n{CHOICE}")
text['dark_flute_boy_storytime'] = CompressedTextMapper.convert("Hi!\nI'm Stumpy\nI've been chillin' in this world for a while now, but I miss my flute. If I gave you a shovel, would you go digging for it?\nSure\n Nahh\n{CHOICE}")
text['dark_flute_boy_get_shovel'] = CompressedTextMapper.convert("Schaweet! Here you go. Happy digging!")
text['dark_flute_boy_no_get_shovel'] = CompressedTextMapper.convert("Oh I see, not good enough for you… FINE!")
text['dark_flute_boy_flute_not_found'] = CompressedTextMapper.convert("Still haven't found the item? Dig in the Light World around here, dingus!")
@@ -1700,7 +1846,7 @@ class TextTable(object):
text['shop_fortune_teller_lw_hint_6'] = CompressedTextMapper.convert("{BOTTOM}\nBy the black cats, Spin, Hammer, or Net to hurt Agahnim")
text['shop_fortune_teller_lw_hint_7'] = CompressedTextMapper.convert("{BOTTOM}\nBy the black cats, You can jump in the well by the blacksmiths")
text['shop_fortune_teller_lw_no_rupees'] = CompressedTextMapper.convert("{BOTTOM}\nThe black cats are hungry, come back with rupees")
text['shop_fortune_teller_lw'] = CompressedTextMapper.convert("{BOTTOM}\nWelcome to the Fortune Shoppe!\nFancy a read?\n ≥I must know\n negative\n{CHOICE}")
text['shop_fortune_teller_lw'] = CompressedTextMapper.convert("{BOTTOM}\nWelcome to the Fortune Shoppe!\nFancy a read?\n ≥I must know\n Negative\n{CHOICE}")
text['shop_fortune_teller_lw_post_hint'] = CompressedTextMapper.convert("{BOTTOM}\nFor ᚋᚌ rupees\nIt is done.\nBe gone!")
text['shop_fortune_teller_lw_no'] = CompressedTextMapper.convert("{BOTTOM}\nWell then, why did you even come in here?")
text['shop_fortune_teller_lw_hint_8'] = CompressedTextMapper.convert("{BOTTOM}\nBy the black cats, why you do?")
@@ -1711,7 +1857,7 @@ class TextTable(object):
text['shop_fortune_teller_lw_hint_13'] = CompressedTextMapper.convert("{BOTTOM}\nBy the black cats, big bombs blow up cracked walls in pyramids")
text['shop_fortune_teller_lw_hint_14'] = CompressedTextMapper.convert("{BOTTOM}\nBy the black cats, you need all the crystals to open Ganon's Tower")
text['shop_fortune_teller_lw_hint_15'] = CompressedTextMapper.convert("{BOTTOM}\nBy the black cats, Silver Arrows will defeat Ganon in his final phase")
text['dark_sanctuary'] = CompressedTextMapper.convert("For 20 rupees I'll tell you something?\nHow about it?\nyes\n no\n{CHOICE}")
text['dark_sanctuary'] = CompressedTextMapper.convert("For 20 rupees I'll tell you something?\nHow about it?\nYes\n No\n{CHOICE}")
text['dark_sanctuary_hint_0'] = CompressedTextMapper.convert("I once was a tea kettle, but then I moved up in the world, and now you can see me as this. Makes you wonder. What I could be next time.")
# 100
text['dark_sanctuary_no'] = CompressedTextMapper.convert("Then go away!")
@@ -1727,8 +1873,8 @@ class TextTable(object):
text['sick_kid_trade'] = CompressedTextMapper.convert("{BOTTOM}\nCool Bottle! Here's something for you.")
text['sick_kid_post_trade'] = CompressedTextMapper.convert("{BOTTOM}\nLeave me alone\nI'm sick. You have my item.")
text['desert_thief_sitting'] = CompressedTextMapper.convert("………………………")
text['desert_thief_following'] = CompressedTextMapper.convert("why……………")
text['desert_thief_question'] = CompressedTextMapper.convert("I was a thief, I open purple chests!\nKeep secret?\nsure thing\n never!\n{CHOICE}")
text['desert_thief_following'] = CompressedTextMapper.convert("Why……………")
text['desert_thief_question'] = CompressedTextMapper.convert("I was a thief, I open purple chests!\nKeep secret?\nSure thing\n Never!\n{CHOICE}")
text['desert_thief_question_yes'] = CompressedTextMapper.convert("Cool, bring me any purple chests you find.")
text['desert_thief_after_item_get'] = CompressedTextMapper.convert("You tell anyone and I will give you such a pinch!")
text['desert_thief_reassure'] = CompressedTextMapper.convert("Bring chests. It's a secret to everyone.")
@@ -1754,10 +1900,10 @@ class TextTable(object):
text['bomb_shop_big_bomb'] = CompressedTextMapper.convert("30 bombs for 100 rupees, 100 rupees 1 BIG bomb. Good deals all day!")
text['bomb_shop_big_bomb_buy'] = CompressedTextMapper.convert("Thanks!\nBoom goes the dynamite!")
text['item_get_big_bomb'] = CompressedTextMapper.convert("YAY! press A to splode it!")
text['kiki_second_extortion'] = CompressedTextMapper.convert("For 100 more, I'll open this place.\nHow about it?\nopen\n nah\n{CHOICE}")
text['kiki_second_extortion'] = CompressedTextMapper.convert("For 100 more, I'll open this place.\nHow about it?\nOpen\n Nah\n{CHOICE}")
text['kiki_second_extortion_no'] = CompressedTextMapper.convert("Heh, good luck getting in.")
text['kiki_second_extortion_yes'] = CompressedTextMapper.convert("Yay! Rupees!\nOkay, let's do this!")
text['kiki_first_extortion'] = CompressedTextMapper.convert("I'm Kiki, I like rupees, may I have 10?\nHow about it?\nyes\n no\n{CHOICE}")
text['kiki_first_extortion'] = CompressedTextMapper.convert("I'm Kiki, I like rupees, may I have 10?\nHow about it?\nYes\n No\n{CHOICE}")
text['kiki_first_extortion_yes'] = CompressedTextMapper.convert("Nice. I'll tag along with you for a bit.")
# 120
text['kiki_first_extortion_no'] = CompressedTextMapper.convert("Pfft. I have no reason to hang. See ya!")
@@ -1816,7 +1962,7 @@ class TextTable(object):
text['pond_of_wishing_good_luck'] = CompressedTextMapper.convert("\n is good luck")
text['pond_of_wishing_meh_luck'] = CompressedTextMapper.convert("\n is meh luck")
# Repurposed to no items in Randomizer
text['pond_of_wishing_bad_luck'] = CompressedTextMapper.convert("Why you come in here and pretend like you have something this fountain wants? Come back with bottles!")
text['pond_of_wishing_bad_luck'] = CompressedTextMapper.convert("Why come in here and pretend like you have something this fountain wants? Come back with bottles!")
text['pond_of_wishing_fortune'] = CompressedTextMapper.convert("by the way, your fortune,")
text['item_get_14_heart'] = CompressedTextMapper.convert("3 more to go\n ¼\nYay!")
text['item_get_24_heart'] = CompressedTextMapper.convert("2 more to go\n ½\nWhee!")
@@ -1830,7 +1976,7 @@ class TextTable(object):
text['death_mountain_bully_with_pearl'] = CompressedTextMapper.convert("I think I forgot how to smile…")
text['shop_darkworld_enter'] = CompressedTextMapper.convert("It's dangerous outside, buy my crap for safety.")
# 160
text['game_chest_village_of_outcasts'] = CompressedTextMapper.convert("Pay 30 rupees, open 2 chests. Are you lucky?\nSo, Play game?\nplay\n never!\n{CHOICE}")
text['game_chest_village_of_outcasts'] = CompressedTextMapper.convert("Pay 30 rupees, open 2 chests. Are you lucky?\nSo, Play game?\nPlay\n Never!\n{CHOICE}")
text['game_chest_no_cash'] = CompressedTextMapper.convert("So, like, you need 30 rupees.\nSilly!")
text['game_chest_not_played'] = CompressedTextMapper.convert("You want to play a game?\nTalk to me.")
text['game_chest_played'] = CompressedTextMapper.convert("You've opened the chests!\nTime to go.")
@@ -1861,28 +2007,28 @@ class TextTable(object):
text['cukeman_2'] = CompressedTextMapper.convert("You found Shabadoo, huh?\nNiiiiice.")
text['potion_shop_no_cash'] = CompressedTextMapper.convert("Yo! I'm not running a charity here.")
text['kakariko_powdered_chicken'] = CompressedTextMapper.convert("Smallhacker…\n\n\nWas hiding, you found me!\n\n\nOkay, you can leave now.")
text['game_chest_south_of_kakariko'] = CompressedTextMapper.convert("Pay 20 rupees, open 1 chest. Are you lucky?\nSo, Play game?\nplay\n never!\n{CHOICE}")
text['game_chest_south_of_kakariko'] = CompressedTextMapper.convert("Pay 20 rupees, open 1 chest. Are you lucky?\nSo, Play game?\nPlay\n Never!\n{CHOICE}")
text['game_chest_play_yes'] = CompressedTextMapper.convert("Good luck then")
# 180
text['game_chest_play_no'] = CompressedTextMapper.convert("Well fine, I didn't want your rupees.")
text['game_chest_lost_woods'] = CompressedTextMapper.convert("Pay 100 rupees open 1 chest. Are you lucky?\nSo, Play game?\nplay\n never!\n{CHOICE}")
text['game_chest_lost_woods'] = CompressedTextMapper.convert("Pay 100 rupees open 1 chest. Are you lucky?\nSo, Play game?\nPlay\n Never!\n{CHOICE}")
text['kakariko_flophouse_man_no_flippers'] = CompressedTextMapper.convert("I really hate mowing my yard.\nI moved my house and everyone else's to avoid it.\n{PAGEBREAK}\nI hope you don't mind.")
text['kakariko_flophouse_man'] = CompressedTextMapper.convert("I really hate mowing my yard.\nI moved my house and everyone else's to avoid it.\n{PAGEBREAK}\nI hope you don't mind.")
text['menu_start_2'] = CompressedTextMapper.convert("{MENU}\n{SPEED0}\n≥@'s house\n Sanctuary\n{CHOICE3}", False)
text['menu_start_3'] = CompressedTextMapper.convert("{MENU}\n{SPEED0}\n≥@'s house\n Sanctuary\n Mountain Cave\n{CHOICE2}", False)
text['menu_pause'] = CompressedTextMapper.convert("{SPEED0}\ncontinue\n save and quit\n{CHOICE3}", False)
text['game_digging_choice'] = CompressedTextMapper.convert("Have 80 Rupees? Want to play digging game?\nyes\n no\n{CHOICE}")
text['menu_start_2'] = CompressedTextMapper.convert("{MENU}\n{SPEED0}\n≥@'s House\n Sanctuary\n{CHOICE3}", False)
text['menu_start_3'] = CompressedTextMapper.convert("{MENU}\n{SPEED0}\n≥@'s House\n Sanctuary\n Mountain Cave\n{CHOICE2}", False)
text['menu_pause'] = CompressedTextMapper.convert("{SPEED0}\nContinue\n Save and Quit\n{CHOICE3}", False)
text['game_digging_choice'] = CompressedTextMapper.convert("Have 80 Rupees? Want to play digging game?\nYes\n No\n{CHOICE}")
text['game_digging_start'] = CompressedTextMapper.convert("Okay, use the shovel with Y!")
text['game_digging_no_cash'] = CompressedTextMapper.convert("Shovel rental is 80 rupees.\nI have all day")
text['game_digging_end_time'] = CompressedTextMapper.convert("Time's up!\nTime for you to go.")
text['game_digging_come_back_later'] = CompressedTextMapper.convert("Come back later, I have to bury things.")
text['game_digging_no_follower'] = CompressedTextMapper.convert("Something is following you. I don't like.")
text['menu_start_4'] = CompressedTextMapper.convert("{MENU}\n{SPEED0}\n≥@'s house\n Mountain Cave\n{CHOICE3}", False)
text['menu_start_4'] = CompressedTextMapper.convert("{MENU}\n{SPEED0}\n≥@'s House\n Mountain Cave\n{CHOICE3}", False)
# Start of new text data
text['ganon_fall_in_alt'] = CompressedTextMapper.convert("You think you\nare ready to\nface me?\n\nI will not die\n\nunless you\ncomplete your\ngoals. Dingus!")
text['ganon_phase_3_alt'] = CompressedTextMapper.convert("Got wax in\nyour ears?\nI cannot die!")
text['ganon_fall_in_alt'] = CompressedTextMapper.convert("You think you are ready to face me?\n\nI will not die unless you complete your goals. Dingus!")
text['ganon_phase_3_alt'] = CompressedTextMapper.convert("Got wax in your ears? I cannot die!")
# 190
text['sign_east_death_mountain_bridge'] = CompressedTextMapper.convert("How did you get up here?")
text['sign_east_death_mountain_bridge'] = CompressedTextMapper.convert("Glitched\ntournament\nwinners\n{HARP}\n~~~HMG 2021~~~\nKrithel\n\n~~~OWG 2019~~~\nGlan\n\n~~~OWG 2018~~~\nChristosOwen\nthe numpty")
text['fish_money'] = CompressedTextMapper.convert("It's a secret to everyone.")
text['sign_ganons_tower'] = CompressedTextMapper.convert("You need all 7 crystals to enter.")
text['sign_ganon'] = CompressedTextMapper.convert("You need all 7 crystals to beat Ganon.")
@@ -1892,4 +2038,4 @@ class TextTable(object):
text['ganon_phase_3_silvers'] = CompressedTextMapper.convert("Oh no! Silver! My one true weakness!")
text['murahdahla'] = CompressedTextMapper.convert("Hello @. I\nam Murahdahla, brother of\nSahasrahla and Aginah. Behold the power of\ninvisibility.\n{PAUSE3}\n… … …\nWait! you can see me? I knew I should have\nhidden in a hollow tree.")
text['end_pad_data'] = bytearray([0xfb])
text['terminator'] = bytearray([0xFF, 0xFF])
text['terminator'] = bytearray([0xFF, 0xFF])

View File

@@ -19,6 +19,12 @@ def snes_to_pc(value):
def is_bundled():
return getattr(sys, 'frozen', False)
def count_set_bits(val):
if val == 0:
return 0
else:
return (val & 1) + count_set_bits(val >> 1)
def local_path(path):
if local_path.cached_path is not None:
return os.path.join(local_path.cached_path, path)
@@ -112,3 +118,6 @@ def make_new_base2current(old_rom='Zelda no Densetsu - Kamigami no Triforce (Jap
basemd5 = hashlib.md5()
basemd5.update(new_rom_data)
return "New Rom Hash: " + basemd5.hexdigest()
if __name__ == '__main__':
print(make_new_base2current(new_rom="../working.sfc"))

View File

@@ -1,7 +1,7 @@
"""Bag class definitions."""
import heapq
from operator import itemgetter
from collections import Set, MutableSet, Hashable
from collections.abc import Set, MutableSet, Hashable
from . import _compat

View File

@@ -1,6 +1,6 @@
"""Class definition for bijection."""
from collections import MutableMapping, Mapping
from collections.abc import MutableMapping, Mapping
class bijection(MutableMapping):

View File

@@ -1,6 +1,7 @@
"""RangeMap class definition."""
from bisect import bisect_left, bisect_right
from collections import namedtuple, Mapping, MappingView, Set
from collections import namedtuple
from collections.abc import Mapping, MappingView, Set
# Used to mark unmapped ranges

View File

@@ -1,7 +1,7 @@
"""Setlist class definitions."""
import random as random_
from collections import (
from collections.abc import (
Sequence,
Set,
MutableSequence,

File diff suppressed because one or more lines are too long

7
pyproject.toml Normal file
View File

@@ -0,0 +1,7 @@
[project]
name = "alttpr-apr-2025"
version = "1.1"
description = "April Fools 2025 Festive Randomizer"
readme = "README.md"
requires-python = ">=3.7"
dependencies = []

8
uv.lock generated Normal file
View File

@@ -0,0 +1,8 @@
version = 1
revision = 3
requires-python = ">=3.7"
[[package]]
name = "alttpr-apr-2025"
version = "1.1"
source = { virtual = "." }