diff --git a/worlds/smw/Aesthetics.py b/worlds/smw/Aesthetics.py index 73ca6165..16b2b138 100644 --- a/worlds/smw/Aesthetics.py +++ b/worlds/smw/Aesthetics.py @@ -1,3 +1,82 @@ +import json +import pkgutil + +from worlds.AutoWorld import World + +tileset_names = [ + "grass_hills", + "grass_forest", + "grass_rocks", + "grass_clouds", + "grass_mountains", + "cave", + "cave_rocks", + "water", + "mushroom_rocks", + "mushroom_clouds", + "mushroom_forest", + "mushroom_hills", + "mushroom_stars", + "mushroom_cave", + "forest", + "logs", + "clouds", + "castle_pillars", + "castle_windows", + "castle_wall", + "castle_small_windows", + "ghost_house", + "ghost_house_exit", + "ship_exterior", + "ship_interior", + "switch_palace", + "yoshi_house" +] + +map_names = [ + "main", + "yoshi", + "vanilla", + "forest", + "valley", + "special", + "star" +] + +level_palette_index = [ + 0xFF,0x03,0x09,0x01,0x15,0x0A,0x04,0x12,0x19,0x06,0x07,0x12,0x09,0x0F,0x13,0x09, # Levels 000-00F + 0x03,0x07,0xFF,0x15,0x19,0x04,0x04,0xFF,0x17,0xFF,0x14,0x12,0x02,0x05,0xFF,0x11, # Levels 010-01F + 0x12,0x15,0x04,0x02,0x02,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 020-02F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 030-03F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 040-04F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 050-05F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 060-06F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 070-07F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 080-08F + 0xFF,0xFF,0xFF,0x12,0x12,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 090-09F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 0A0-0AF + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x19,0x08,0x09, # Levels 0B0-0BF + 0x02,0x08,0x05,0x04,0x16,0x1A,0x04,0x02,0x0C,0x19,0x19,0x09,0xFF,0x02,0x02,0x02, # Levels 0C0-0CF + 0x04,0x04,0x05,0x12,0x14,0xFF,0x12,0x10,0x05,0xFF,0x19,0x12,0x14,0x0F,0x15,0xFF, # Levels 0D0-0DF + 0x12,0x12,0xFF,0x04,0x15,0xFF,0x19,0x14,0x12,0x05,0x05,0x16,0x15,0x15,0x15,0x12, # Levels 0E0-0EF + 0x16,0x15,0x15,0x09,0x19,0x04,0x04,0x13,0x18,0x15,0x15,0x16,0x15,0x19,0x15,0x04, # Levels 0F0-0FF + 0xFF,0x11,0x08,0x02,0x1A,0x00,0x01,0x15,0xFF,0x05,0x05,0x05,0xFF,0x11,0x12,0x05, # Levels 100-10F + 0x12,0x14,0xFF,0x0D,0x15,0x06,0x05,0x05,0x05,0x0C,0x05,0x19,0x12,0x15,0x0E,0x01, # Levels 110-11F + 0x07,0x19,0x0E,0x0E,0xFF,0x04,0x0E,0x02,0x02,0xFF,0x09,0x04,0x0B,0x02,0xFF,0xFF, # Levels 120-12F + 0x07,0xFF,0x0C,0xFF,0x05,0x0C,0x0C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 130-13F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 140-14F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 150-15F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 160-16F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 170-17F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 180-18F + 0xFF,0xFF,0xFF,0x12,0x12,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 190-19F + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, # Levels 1A0-1AF + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x19,0x19,0x12,0x02,0x05, # Levels 1B0-1BF + 0x02,0x07,0x05,0x05,0x03,0x03,0x00,0xFF,0x0F,0x10,0x05,0x05,0x12,0x11,0x14,0x14, # Levels 1C0-1CF + 0x11,0x12,0x12,0x12,0x11,0x03,0x03,0x19,0x19,0x15,0x16,0x15,0x15,0x15,0xFF,0x05, # Levels 1D0-1DF + 0x10,0x02,0x06,0x06,0x19,0x05,0x16,0x16,0x15,0x15,0x15,0xFF,0x06,0x05,0x05,0x06, # Levels 1E0-1EF + 0x05,0x05,0x12,0x14,0x12,0x05,0xFF,0x19,0x05,0x16,0x15,0x15,0x11,0x05,0x12,0x09 # Levels 1F0-1FF +] mario_palettes = [ [0x5F, 0x63, 0x1D, 0x58, 0x0A, 0x00, 0x1F, 0x39, 0xC4, 0x44, 0x08, 0x4E, 0x70, 0x67, 0xB6, 0x30, 0xDF, 0x35, 0xFF, 0x03], # Mario @@ -145,36 +224,413 @@ valid_ow_palettes = { 0x2D24: [0x00, 0x02, 0x03], # Star Road } -def generate_shuffled_level_music(world, player): +valid_sfxs = [ + [0x01, 1], # Jump + [0x01, 0], # Hit head + [0x02, 0], # Contact/Spinjump on an enemy + [0x03, 0], # Kick item + [0x04, 0], # Go in pipe, get hurt + [0x05, 0], # Midway point + [0x06, 0], # Yoshi gulp + [0x07, 0], # Dry bones collapse + [0x08, 0], # Kill enemy with a spin jump + [0x09, 0], # Fly with cape + [0x0A, 0], # Get powerup + [0x0B, 0], # ON/OFF switch + [0x0C, 0], # Carry item past the goal + [0x0D, 0], # Get cape + [0x0E, 0], # Swim + [0x0F, 0], # Hurt while flying + [0x10, 0], # Magikoopa shoot magic + [0x13, 0], # Enemy stomp #1 + [0x14, 0], # Enemy stomp #2 + [0x15, 0], # Enemy stomp #3 + [0x16, 0], # Enemy stomp #4 + [0x17, 0], # Enemy stomp #5 + [0x18, 0], # Enemy stomp #6 + [0x19, 0], # Enemy stomp #7 + [0x1C, 0], # Yoshi Coin + [0x1E, 0], # P-Balloon + [0x1F, 0], # Koopaling defeated + [0x20, 0], # Yoshi spit + [0x23, 0], # Lemmy/Wendy falling + [0x25, 0], # Blargg roar + [0x26, 0], # Firework whistle + [0x27, 0], # Firework bang + [0x2A, 0], # Peach pops up from the Clown Car + [0x04, 1], # Grinder + [0x01, 3], # Coin + [0x02, 3], # Hit a ? block + [0x03, 3], # Hit a block with a vine inside + [0x04, 3], # Spin jump + [0x05, 3], # 1up + [0x06, 3], # Shatter block + [0x07, 3], # Shoot fireball + [0x08, 3], # Springboard + [0x09, 3], # Bullet bill + [0x0A, 3], # Egg hatch + [0x0B, 3], # Item going into item box + [0x0C, 3], # Item falls from item box + [0x0E, 3], # L/R scroll + [0x0F, 3], # Door + [0x13, 3], # Lose Yoshi + [0x14, 3], # SMW2: New level available + [0x15, 3], # OW tile reveal + [0x16, 3], # OW castle collapse + [0x17, 3], # Fire spit + [0x18, 3], # Thunder + [0x19, 3], # Clap + [0x1A, 3], # Castle bomb + [0x1C, 3], # OW switch palace block ejection + [0x1E, 3], # Whistle + [0x1F, 3], # Yoshi mount + [0x20, 3], # Lemmy/Wendy going in lava + [0x21, 3], # Yoshi's tongue + [0x22, 3], # Message box hit + [0x23, 3], # Landing in a level tile + [0x24, 3], # P-Switch running out + [0x25, 3], # Yoshi defeats an enemy + [0x26, 3], # Swooper + [0x27, 3], # Podoboo + [0x28, 3], # Enemy hurt + [0x29, 3], # Correct + [0x2A, 3], # Wrong + [0x2B, 3], # Firework whistle + [0x2C, 3] # Firework bang +] + +game_sfx_calls = [ + 0x0565E, # Jump + 0x1BABD, # Spin jump + 0x06D41, # Hit head on ceiling + 0x0B4F2, # Hit head on sprite + 0x07EB5, # Shooting a fireball + 0x0507B, # Cape spin + 0x058A8, # Cape smash + 0x075F3, # Taking damage + 0x075E2, # Taking damage while flying + 0x07919, # Something during a boss fight + 0x05AA9, # Swim + 0x1BC04, # Spin jump off water + 0x05BA5, # Jump off a net + 0x05BB2, # Punching a net + 0x06C10, # Entering a door + 0x05254, # Entering a pipe #1 + 0x07439, # Entering a pipe #2 + 0x052A5, # Shot from a diagonal pipe + 0x072E8, # Hit a midway point + 0x07236, # Hit a wrong block + 0x07B7D, # Spawn a powerup during the goal tape + 0x1C342, # Invisible mushroom spawn + 0x04E3F, # Scrolling the screen with L/R + 0x0AAFD, # Pressing a P-Switch + 0x04557, # P-Switch running out + 0x0BAD7, # Climbing door turning + 0x0C109, # Break goal tape + 0x0C548, # Putting item in item box + 0x10012, # Trigger item box + 0x2B34D, # Collecting a coin + 0x07358, # Collecting a Yoshi Coin + 0x0C57A, # Collecting a powerup (generic) + 0x0C59C, # Collecting a feather + 0x0C309, # Collecting a P-Balloon + 0x0E6A9, # Bouncing off a springboard + 0x1117D, # Bouncing off a note block + 0x14DEC, # Bouncing off a wall springboard + 0x1067F, # Block shattering + 0x1081E, # Activate ON/OFF switch #1 + 0x1118C, # Activate ON/OFF switch #2 + 0x12045, # Fireballs hitting a block/sprite + 0x12124, # Fireballs converting an enemy into a coin + 0x12106, # Fireballs defeating a Chuck + 0x18D7D, # Activating a message box + 0x1C209, # Activating a red question block + 0x0A290, # Baby Yoshi swallowing an item #1 + 0x1C037, # Baby Yoshi swallowing an item #2 + 0x0F756, # Yoshi egg hatching + 0x0A2C5, # Yoshi growing #1 + 0x1C06C, # Yoshi growing #2 + 0x0ED5F, # Mounting Yoshi + 0x0F71D, # Yoshi hurt + 0x12481, # Yoshi hurt (projectiles) + 0x0EF0E, # Yoshi flying + 0x06F90, # Yoshi stomping an enemy + 0x06FB6, # Yoshi ground pound (yellow shell) + 0x07024, # Yoshi bounces off a triangle + 0x11BE9, # Yoshi stomping the ground + 0x0F0D3, # Yoshi swallowing a sprite + 0x0F0FD, # Yoshi eating a green berry + 0x1BA7D, # Yoshi sticking out tongue + 0x0F5A1, # Yoshi unable to eat + 0x0F2DF, # Yoshi spitting out an item + 0x0F28F, # Yoshi spitting out flames + 0x0F3EC, # Collecting Yoshi's wings (eaten) + 0x0F6C8, # Collecting Yoshi's wings (touched) + 0x7FE04, # Defeated sprite combo #1 (using Y index) + 0x7FE0E, # Defeated sprite combo #2 (using Y index) + 0x7FE18, # Defeated sprite combo #3 (using Y index) + 0x7FE22, # Defeated sprite combo #4 (using Y index) + 0x7FE2C, # Defeated sprite combo #5 (using Y index) + 0x7FE36, # Defeated sprite combo #6 (using Y index) + 0x7FE40, # Defeated sprite combo #7 (using Y index) + 0x7FE4B, # Defeated sprite combo #1 (using X index) + 0x7FE55, # Defeated sprite combo #2 (using X index) + 0x7FE5F, # Defeated sprite combo #3 (using X index) + 0x7FE69, # Defeated sprite combo #4 (using X index) + 0x7FE73, # Defeated sprite combo #5 (using X index) + 0x7FE7D, # Defeated sprite combo #6 (using X index) + 0x7FE87, # Defeated sprite combo #7 (using X index) + 0x0A728, # Kicking a carryable item + 0x0B12F, # Kicking a stunned and vulnerable enemy + 0x0A8D8, # Performing a spinjump on a immune enemy + 0x0A93F, # Defeating an enemy via spinjump + 0x0999E, # Thrown sprite hitting the ground from the side + 0x192B8, # Creating/Eating block moving + 0x195EC, # Rex stomped + 0x134A7, # Bullet bill blaster shooting + 0x13088, # Bullet bill generator #1 + 0x130DF, # Bullet bill generator #2 + 0x09631, # Bob-omb explosion + 0x15918, # Popping a bubble + 0x15D64, # Sumo bro stomping the ground + 0x15ECC, # Sumo bro lightning spawning flames + 0x1726B, # Bouncing off wiggler + 0x08390, # Banzai bill spawn + 0x0AF17, # Thwomp hitting the ground + 0x0AFFC, # Thwimp hitting the ground + 0x14707, # Chuck running + 0x14381, # Chuck whistling + 0x144F8, # Chuck clapping + 0x14536, # Chuck jumping + 0x145AE, # Chuck splitting + 0x147D2, # Chuck bounce + 0x147F6, # Chuck hurt + 0x147B8, # Chuck defeated + 0x19D55, # Dino torch shooting fire + 0x19FFA, # Blargg attacking + 0x188FF, # Swooper bat swooping + 0x08584, # Bowser statue flame spawn + 0x18ADA, # Bowser statue shooting a flame + 0x13043, # Bowser statue flame from generator + 0x0BF28, # Magikoopa shooting a magic spell + 0x0BC5F, # Magikoopa's magic spell hitting the ground + 0x0D745, # Line guided sprites' motor + 0x0DB70, # Grinder sound + 0x0E0A1, # Podoboo jumping + 0x0E5F2, # Dry bones/Bony beetle collapsing + 0x15474, # Giant wooden pillar hitting the ground + 0x2C9C1, # Spiked columns hitting the ground + 0x19B03, # Reznor shooting a fireball + 0x19A66, # Reznor: Hitting a platform + 0x1D752, # Reznor: Bridge collapsing + 0x19ABB, # Reznor: Defeated + 0x180E9, # Big Boo: Reappearing + 0x18233, # Big Boo: Hurt + 0x181DE, # Big Boo: Defeated + 0x1CEC1, # Wendy/Lemmy: Hitting a dummy + 0x1CECB, # Wendy/Lemmy: Hurt + 0x1CE33, # Wendy/Lemmy: Hurt (correct) + 0x1CE46, # Wendy/Lemmy: Hurt (incorrect) + 0x1CE24, # Wendy/Lemmy: Defeated + 0x1CE7E, # Wendy/Lemmy: Falling into lava + 0x0CF0A, # Ludwig: Jumping + 0x0D059, # Ludwig: Shooting a fireball + 0x10414, # Morton/Roy: Pillar drop + 0x0D299, # Morton/Roy: Ground smash + 0x0D3AB, # Morton/Roy/Ludwig: Hit by a fireball + 0x0D2FD, # Morton/Roy/Ludwig: Bouncing off + 0x0D31E, # Morton/Roy/Ludwig: Bouncing off (immune) + 0x0D334, # Morton/Roy/Ludwig: Bouncing off (immune, going up a wall) + 0x0CFD0, # Morton/Roy/Ludwig: Defeated + 0x0FCCE, # Iggy/Larry: Being hit + 0x0FD40, # Iggy/Larry: Being hit by a fireball + 0x0FB60, # Iggy/Larry: Falling in lava + 0x1A8B2, # Peach emerging from Clown Car + 0x1A8E3, # Peach throwing an item + 0x1B0B8, # Bumping into Clown Car + 0x1B129, # Bowser: Hurt + 0x1AB8C, # Bowser: Slamming the ground (third phase) + 0x1A5D0, # Bowser: Throwing a Mechakoopa + 0x1A603, # Bowser: Dropping a ball + 0x1A7F6, # Bowser: Spawning a flame + 0x1B1A3, # Bowser's ball slam #1 + 0x1B1B1, # Bowser's ball slam #2 + 0x1E016, # Bowser's arena lightning effect + 0x26CAA, # Map: Level tile reveal + 0x26763, # Map: Terrain reveal + 0x21170, # Map: Using a star + 0x2666F, # Map: Castle destruction + 0x272A4, # Map: Switch palace blocks spawning + 0x203CC, # Map: Earthquake + 0x27A78, # Map: Fish jumping + 0x27736, # Map: Valley of bowser thunder + 0x013C0, # Menu: Nintendo presents + 0x01AE3, # Menu: File menu option select + 0x01AF9, # Menu: File menu option change + 0x01BBB, # Menu: Saving game + 0x273FF, # Menu: Map misc menu appearing + 0x27567, # Menu: Something during the map + 0x1767A, # Cutscene: Castle door opening + 0x17683, # Cutscene: Castle door closing + 0x17765, # Cutscene: Ghost house door opening + 0x1776E, # Cutscene: Ghost house door closing + 0x04720, # Cutscene: Detonator fuse + 0x04732, # Cutscene: Bouncing off something + 0x0475F, # Cutscene: Tossing the castle + 0x04798, # Cutscene: Picking up the castle + 0x047AC, # Cutscene: Huff + 0x047D1, # Cutscene: Hitting a castle + 0x1C830, # Cutscene: Shooting a firework + 0x625AF, # Cutscene: Egg shattering + 0x64F2C, # Cutscene: Hitting a hill + 0x6512A, # Cutscene: Castle crashing + 0x65295, # Cutscene: Explosion + 0x652B2, # Cutscene: Castle sinking + 0x652BD, # Cutscene: Castle flying + 0x652D8, # Cutscene: Fake explosion + 0x653E7, # Cutscene: Castle being hit by a hammer + 0x657D8 # Cutscene: Castle being mopped away +] + +def generate_shuffled_sfx(rom, world: World): + # Adjust "hitting sprites in succession" codes + rom.write_bytes(0x0A60B, bytearray([0x22, 0x00, 0xFE, 0x0F, 0xEA, 0xEA])) # jsl $0FFE00 : nop #2 # Thrown sprites combo #1 + rom.write_bytes(0x0A659, bytearray([0x22, 0x47, 0xFE, 0x0F, 0xEA, 0xEA])) # jsl $0FFE47 : nop #2 # Thrown sprites combo #2 + rom.write_bytes(0x0A865, bytearray([0x22, 0x47, 0xFE, 0x0F, 0xEA, 0xEA])) # jsl $0FFE47 : nop #2 # Star combo + rom.write_bytes(0x0AB57, bytearray([0x22, 0x00, 0xFE, 0x0F, 0xEA, 0xEA])) # jsl $0FFE00 : nop #2 # Bouncing off enemies + rom.write_bytes(0x172C0, bytearray([0x22, 0x00, 0xFE, 0x0F, 0xEA, 0xEA])) # jsl $0FFE00 : nop #2 # Star combo (wigglers) + rom.write_bytes(0x1961D, bytearray([0x22, 0x00, 0xFE, 0x0F, 0xEA, 0xEA])) # jsl $0FFE00 : nop #2 # Star combo (rexes) + rom.write_bytes(0x19639, bytearray([0x22, 0x00, 0xFE, 0x0F, 0xEA, 0xEA])) # jsl $0FFE00 : nop #2 # Bouncing off rexes + + COMBO_SFX_ADDR = 0x7FE00 + rom.write_bytes(COMBO_SFX_ADDR + 0x0000, bytearray([0xC0, 0x01])) # COMBO_Y: CPY #$01 + rom.write_bytes(COMBO_SFX_ADDR + 0x0002, bytearray([0xD0, 0x06])) # BNE label_0FFE0A + rom.write_bytes(COMBO_SFX_ADDR + 0x0004, bytearray([0xA9, 0x13])) # LDA #$13 + rom.write_bytes(COMBO_SFX_ADDR + 0x0006, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0009, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x000A, bytearray([0xC0, 0x02])) # label_0FFE0A: CPY #$02 + rom.write_bytes(COMBO_SFX_ADDR + 0x000C, bytearray([0xD0, 0x06])) # BNE label_0FFE14 + rom.write_bytes(COMBO_SFX_ADDR + 0x000E, bytearray([0xA9, 0x14])) # LDA #$14 + rom.write_bytes(COMBO_SFX_ADDR + 0x0010, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0013, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0014, bytearray([0xC0, 0x03])) # label_0FFE14: CPY #$03 + rom.write_bytes(COMBO_SFX_ADDR + 0x0016, bytearray([0xD0, 0x06])) # BNE label_0FFE1E + rom.write_bytes(COMBO_SFX_ADDR + 0x0018, bytearray([0xA9, 0x15])) # LDA #$15 + rom.write_bytes(COMBO_SFX_ADDR + 0x001A, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x001D, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x001E, bytearray([0xC0, 0x04])) # label_0FFE1E: CPY #$04 + rom.write_bytes(COMBO_SFX_ADDR + 0x0020, bytearray([0xD0, 0x06])) # BNE label_0FFE28 + rom.write_bytes(COMBO_SFX_ADDR + 0x0022, bytearray([0xA9, 0x16])) # LDA #$16 + rom.write_bytes(COMBO_SFX_ADDR + 0x0024, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0027, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0028, bytearray([0xC0, 0x05])) # label_0FFE28: CPY #$05 + rom.write_bytes(COMBO_SFX_ADDR + 0x002A, bytearray([0xD0, 0x06])) # BNE label_0FFE32 + rom.write_bytes(COMBO_SFX_ADDR + 0x002C, bytearray([0xA9, 0x17])) # LDA #$17 + rom.write_bytes(COMBO_SFX_ADDR + 0x002E, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0031, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0032, bytearray([0xC0, 0x06])) # label_0FFE32: CPY #$06 + rom.write_bytes(COMBO_SFX_ADDR + 0x0034, bytearray([0xD0, 0x06])) # BNE label_0FFE3C + rom.write_bytes(COMBO_SFX_ADDR + 0x0036, bytearray([0xA9, 0x18])) # LDA #$18 + rom.write_bytes(COMBO_SFX_ADDR + 0x0038, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x003B, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x003C, bytearray([0xC0, 0x07])) # label_0FFE3C: CPY #$07 + rom.write_bytes(COMBO_SFX_ADDR + 0x003E, bytearray([0xD0, 0x06])) # BNE label_0FFE46 + rom.write_bytes(COMBO_SFX_ADDR + 0x0040, bytearray([0xA9, 0x19])) # LDA #$19 + rom.write_bytes(COMBO_SFX_ADDR + 0x0042, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0045, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0046, bytearray([0x6B])) # label_0FFE46: RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0047, bytearray([0xE0, 0x01])) # COMBO_X: CPX #$01 + rom.write_bytes(COMBO_SFX_ADDR + 0x0049, bytearray([0xD0, 0x06])) # BNE label_0FFE51 + rom.write_bytes(COMBO_SFX_ADDR + 0x004B, bytearray([0xA9, 0x13])) # LDA #$13 + rom.write_bytes(COMBO_SFX_ADDR + 0x004D, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0050, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0051, bytearray([0xE0, 0x02])) # label_0FFE51: CPX #$02 + rom.write_bytes(COMBO_SFX_ADDR + 0x0053, bytearray([0xD0, 0x06])) # BNE label_0FFE5B + rom.write_bytes(COMBO_SFX_ADDR + 0x0055, bytearray([0xA9, 0x14])) # LDA #$14 + rom.write_bytes(COMBO_SFX_ADDR + 0x0057, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x005A, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x005B, bytearray([0xE0, 0x03])) # label_0FFE5B: CPX #$03 + rom.write_bytes(COMBO_SFX_ADDR + 0x005D, bytearray([0xD0, 0x06])) # BNE label_0FFE65 + rom.write_bytes(COMBO_SFX_ADDR + 0x005F, bytearray([0xA9, 0x15])) # LDA #$15 + rom.write_bytes(COMBO_SFX_ADDR + 0x0061, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0064, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0065, bytearray([0xE0, 0x04])) # label_0FFE65: CPX #$04 + rom.write_bytes(COMBO_SFX_ADDR + 0x0067, bytearray([0xD0, 0x06])) # BNE label_0FFE6F + rom.write_bytes(COMBO_SFX_ADDR + 0x0069, bytearray([0xA9, 0x16])) # LDA #$16 + rom.write_bytes(COMBO_SFX_ADDR + 0x006B, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x006E, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x006F, bytearray([0xE0, 0x05])) # label_0FFE6F: CPX #$05 + rom.write_bytes(COMBO_SFX_ADDR + 0x0071, bytearray([0xD0, 0x06])) # BNE label_0FFE79 + rom.write_bytes(COMBO_SFX_ADDR + 0x0073, bytearray([0xA9, 0x17])) # LDA #$17 + rom.write_bytes(COMBO_SFX_ADDR + 0x0075, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0078, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0079, bytearray([0xE0, 0x06])) # label_0FFE79: CPX #$06 + rom.write_bytes(COMBO_SFX_ADDR + 0x007B, bytearray([0xD0, 0x06])) # BNE label_0FFE83 + rom.write_bytes(COMBO_SFX_ADDR + 0x007D, bytearray([0xA9, 0x18])) # LDA #$18 + rom.write_bytes(COMBO_SFX_ADDR + 0x007F, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x0082, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x0083, bytearray([0xE0, 0x07])) # label_0FFE83: CPX #$07 + rom.write_bytes(COMBO_SFX_ADDR + 0x0085, bytearray([0xD0, 0x06])) # BNE label_0FFE8D + rom.write_bytes(COMBO_SFX_ADDR + 0x0087, bytearray([0xA9, 0x19])) # LDA #$19 + rom.write_bytes(COMBO_SFX_ADDR + 0x0089, bytearray([0x8D, 0xF9, 0x1D])) # STA $1DF9 + rom.write_bytes(COMBO_SFX_ADDR + 0x008C, bytearray([0x6B])) # RTL + rom.write_bytes(COMBO_SFX_ADDR + 0x008D, bytearray([0x6B])) # label_0FFE8D: RTL + + # Adjust "Hit head on ceiling" code + rom.write_bytes(0x06D41 + 0x00, bytearray([0xA9, 0x01])) # lda #$01 + rom.write_bytes(0x06D41 + 0x02, bytearray([0x8D, 0xF9, 0x1D])) # sta $1DF9 + rom.write_bytes(0x06D41 + 0x05, bytearray([0xEA, 0xEA, 0xEA, 0xEA])) # nop #4 + + # Manually add "Map: Stepping onto a level tile" random SFX + selected_sfx = world.random.choice(valid_sfxs) + rom.write_byte(0x2169F + 0x01, selected_sfx[0]) + rom.write_byte(0x2169F + 0x04, selected_sfx[1] + 0xF9) + + # Disable panning on Bowser's flames + rom.write_bytes(0x1A83D, bytearray([0xEA, 0xEA, 0xEA])) # nop #3 + + # Randomize SFX calls + for address in game_sfx_calls: + # Get random SFX + if world.options.sfx_shuffle != "singularity": + selected_sfx = world.random.choice(valid_sfxs) + # Write randomized SFX num + rom.write_byte(address + 0x01, selected_sfx[0]) + # Write randomized SFX port + rom.write_byte(address + 0x03, selected_sfx[1] + 0xF9) + +def generate_shuffled_level_music(world: World): shuffled_level_music = level_music_value_data.copy() - if world.music_shuffle[player] == "consistent": - world.per_slot_randoms[player].shuffle(shuffled_level_music) - elif world.music_shuffle[player] == "singularity": - single_song = world.per_slot_randoms[player].choice(shuffled_level_music) + if world.options.music_shuffle == "consistent": + world.random.shuffle(shuffled_level_music) + elif world.options.music_shuffle == "singularity": + single_song = world.random.choice(shuffled_level_music) shuffled_level_music = [single_song for i in range(len(shuffled_level_music))] return shuffled_level_music -def generate_shuffled_ow_music(world, player): +def generate_shuffled_ow_music(world: World): shuffled_ow_music = ow_music_value_data.copy() - if world.music_shuffle[player] == "consistent" or world.music_shuffle[player] == "full": - world.per_slot_randoms[player].shuffle(shuffled_ow_music) - elif world.music_shuffle[player] == "singularity": - single_song = world.per_slot_randoms[player].choice(shuffled_ow_music) + if world.options.music_shuffle == "consistent" or world.options.music_shuffle == "full": + world.random.shuffle(shuffled_ow_music) + elif world.options.music_shuffle == "singularity": + single_song = world.random.choice(shuffled_ow_music) shuffled_ow_music = [single_song for i in range(len(shuffled_ow_music))] return shuffled_ow_music -def generate_shuffled_ow_palettes(rom, world, player): - if world.overworld_palette_shuffle[player]: - for address, valid_palettes in valid_ow_palettes.items(): - chosen_palette = world.per_slot_randoms[player].choice(valid_palettes) - rom.write_byte(address, chosen_palette) +def generate_shuffled_ow_palettes(rom, world: World): + if world.options.overworld_palette_shuffle != "on_legacy": + return -def generate_shuffled_header_data(rom, world, player): - if world.music_shuffle[player] != "full" and not world.foreground_palette_shuffle[player] and not world.background_palette_shuffle[player]: + for address, valid_palettes in valid_ow_palettes.items(): + chosen_palette = world.random.choice(valid_palettes) + rom.write_byte(address, chosen_palette) + +def generate_shuffled_header_data(rom, world: World): + if world.options.music_shuffle != "full" and world.options.level_palette_shuffle != "on_legacy": return for level_id in range(0, 0x200): @@ -194,24 +650,425 @@ def generate_shuffled_header_data(rom, world, player): tileset = level_header[4] & 0x0F - if world.music_shuffle[player] == "full": + if world.options.music_shuffle == "full": level_header[2] &= 0x8F - level_header[2] |= (world.per_slot_randoms[player].randint(0, 7) << 5) + level_header[2] |= (world.random.randint(0, 7) << 5) - if (world.foreground_palette_shuffle[player] and tileset in valid_foreground_palettes): - level_header[3] &= 0xF8 - level_header[3] |= world.per_slot_randoms[player].choice(valid_foreground_palettes[tileset]) + if world.options.level_palette_shuffle == "on_legacy": + if tileset in valid_foreground_palettes: + level_header[3] &= 0xF8 + level_header[3] |= world.random.choice(valid_foreground_palettes[tileset]) - if world.background_palette_shuffle[player]: layer2_ptr_list = list(rom.read_bytes(0x2E600 + level_id * 3, 3)) layer2_ptr = (layer2_ptr_list[2] << 16 | layer2_ptr_list[1] << 8 | layer2_ptr_list[0]) if layer2_ptr in valid_background_palettes: level_header[0] &= 0x1F - level_header[0] |= (world.per_slot_randoms[player].choice(valid_background_palettes[layer2_ptr]) << 5) + level_header[0] |= (world.random.choice(valid_background_palettes[layer2_ptr]) << 5) if layer2_ptr in valid_background_colors: level_header[1] &= 0x1F - level_header[1] |= (world.per_slot_randoms[player].choice(valid_background_colors[layer2_ptr]) << 5) + level_header[1] |= (world.random.choice(valid_background_colors[layer2_ptr]) << 5) rom.write_bytes(layer1_ptr, bytes(level_header)) + +def generate_curated_level_palette_data(rom, world: World): + PALETTE_LEVEL_CODE_ADDR = 0x88000 + PALETTE_INDEX_ADDR = 0x8F000 + PALETTE_LEVEL_TILESET_ADDR = 0x8F200 + PALETTE_LEVEL_PTR_ADDR = 0x92000 + PALETTE_LEVEL_DATA_ADDR = 0xA8000 + + addr = pc_to_snes(PALETTE_LEVEL_PTR_ADDR) + snes_level_palette_pointers_1 = bytearray([0xBF, (addr)&0xFF, (addr>>8)&0xFF, (addr>>16)&0xFF]) + snes_level_palette_pointers_2 = bytearray([0xBF, (addr+2)&0xFF, (addr>>8)&0xFF, (addr>>16)&0xFF]) + + # Enable curated palette loader + rom.write_bytes(0x02BED, bytearray([0x5C, 0x00, 0x80, 0x11])) # org $00ABED : jml custom_palettes + rom.write_bytes(0x02330, bytearray([0x5C, 0x02, 0x80, 0x11])) # org $00A318 : jml custom_palettes_original + rom.write_bytes(0x013D7, bytearray([0x20, 0x30, 0xA3])) # org $0093D7 : jmp $A330 + rom.write_bytes(0x014DA, bytearray([0x20, 0x30, 0xA3])) # org $0094DA : jmp $A330 + rom.write_bytes(0x015EC, bytearray([0x20, 0x30, 0xA3])) # org $0095EC : jmp $A330 + rom.write_bytes(0x0165B, bytearray([0x20, 0x30, 0xA3])) # org $00965B : jmp $A330 + rom.write_bytes(0x02DD9, bytearray([0x20, 0x30, 0xA3])) # org $00ADD9 : jmp $A330 + rom.write_bytes(0x02E1F, bytearray([0x20, 0x30, 0xA3])) # org $00AE1F : jmp $A330 + + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0000, bytearray([0x80, 0x09])) # bra custom_palettes + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0002, bytearray([0xC2, 0x30])) # .original rep #$30 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0004, bytearray([0xA9, 0xDD, 0x7F])) # lda #$7FDD + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0007, bytearray([0x5C, 0xF2, 0xAB, 0x00])) # jml $00ABF2 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x000B, bytearray([0xC2, 0x30])) # custom_palettes: rep #$30 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x000D, bytearray([0xA9, 0x70, 0xB1])) # lda #$B170 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0010, bytearray([0x85, 0x0A])) # sta !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0012, bytearray([0x64, 0x0C])) # stz !_ptr+$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0014, bytearray([0xA9, 0x10, 0x00])) # lda.w #$0010 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0017, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0019, bytearray([0xA9, 0x07, 0x00])) # lda #$0007 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x001C, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x001E, bytearray([0xA9, 0x01, 0x00])) # lda #$0001 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0021, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0023, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0026, bytearray([0xAE, 0x0B, 0x01])) # .get_index ldx $010B + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0029, bytearray([0xBF, 0x00, 0xF2, 0x11])) # lda.l level_tilesets,x + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x002D, bytearray([0x29, 0xFF, 0x00])) # and #$00FF + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0030, bytearray([0xEB])) # xba + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0031, bytearray([0x85, 0x00])) # sta !_tileset + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0033, bytearray([0xBF, 0x00, 0xF0, 0x11])) # lda.l level_index,x + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0037, bytearray([0x29, 0xFF, 0x00])) # and #$00FF + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x003A, bytearray([0x05, 0x00])) # ora !_tileset + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x003C, bytearray([0x85, 0x0A])) # sta !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x003E, bytearray([0x0A])) # asl + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x003F, bytearray([0x18])) # clc + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0040, bytearray([0x65, 0x0A])) # adc !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0042, bytearray([0x85, 0x0E])) # sta !_num + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0044, bytearray([0xAA])) # tax + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0045, snes_level_palette_pointers_1) # .back_color lda.l palette_pointers,x + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0049, bytearray([0x85, 0x0A])) # sta !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x004B, snes_level_palette_pointers_2) # lda.l palette_pointers+$02,x + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x004F, bytearray([0x85, 0x0C])) # sta !_ptr+$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0051, bytearray([0xA7, 0x0A])) # lda [!_ptr] + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0053, bytearray([0x8D, 0x01, 0x07])) # sta $0701 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0056, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0058, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x005A, bytearray([0xA9, 0x02, 0x00])) # .background lda.w #$0001*$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x005D, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x005F, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0062, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0064, bytearray([0xA9, 0x01, 0x00])) # lda #$0001 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0067, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0069, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x006C, bytearray([0xA9, 0x42, 0x00])) # .foreground lda.w #$0021*$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x006F, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0071, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0074, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0076, bytearray([0xA9, 0x01, 0x00])) # lda #$0001 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0079, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x007B, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x007E, bytearray([0xA9, 0x52, 0x00])) # .berries lda.w #$0029*$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0081, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0083, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0086, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0088, bytearray([0xA9, 0x02, 0x00])) # lda #$0002 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x008B, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x008D, bytearray([0xA5, 0x0A])) # lda !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x008F, bytearray([0x48])) # pha + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0090, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0093, bytearray([0x68])) # pla + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0094, bytearray([0x85, 0x0A])) # sta !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0096, bytearray([0xA9, 0x32, 0x01])) # lda.w #$0099*$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0099, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x009B, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x009E, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00A0, bytearray([0xA9, 0x02, 0x00])) # lda #$0002 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00A3, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00A5, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00A8, bytearray([0xA9, 0x82, 0x00])) # .global lda.w #$0041*$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00AB, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00AD, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00B0, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00B2, bytearray([0xA9, 0x0B, 0x00])) # lda #$000B + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00B5, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00B7, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00BA, bytearray([0xA5, 0x00])) # .sprite_specific lda !_tileset + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00BC, bytearray([0xC9, 0x00, 0x05])) # cmp #$0500 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00BF, bytearray([0xD0, 0x1D])) # bne .end + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00C1, bytearray([0xAD, 0x2E, 0x19])) # lda $192E + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00C4, bytearray([0x29, 0x0F, 0x00])) # and #$000F + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00C7, bytearray([0xC9, 0x02, 0x00])) # cmp #$0002 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00CA, bytearray([0xD0, 0x12])) # bne .end + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00CC, bytearray([0xA9, 0xC2, 0x01])) # lda.w #$00E1*$02 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00CF, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00D1, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00D4, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00D6, bytearray([0xA9, 0x01, 0x00])) # lda #$0001 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00D9, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00DB, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00DE, bytearray([0xE2, 0x30])) # .end sep #$30 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00E0, bytearray([0x5C, 0xEC, 0xAC, 0x00])) # jml $00ACEC + + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00E4, bytearray([0xA6, 0x04])) # load_colors: ldx !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00E6, bytearray([0xA4, 0x06])) # ldy !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00E8, bytearray([0xA7, 0x0A])) # .x_loop lda [!_ptr] + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00EA, bytearray([0x9D, 0x03, 0x07])) # sta $0703,x + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00ED, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00EF, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F1, bytearray([0xE8])) # inx + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F2, bytearray([0xE8])) # inx + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F3, bytearray([0x88])) # dey + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F4, bytearray([0x10, 0xF2])) # bpl .x_loop + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F6, bytearray([0xA5, 0x04])) # lda !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F8, bytearray([0x18])) # clc + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F9, bytearray([0x69, 0x20, 0x00])) # adc #$0020 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00FC, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00FE, bytearray([0xC6, 0x08])) # dec !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0100, bytearray([0x10, 0xE2])) # bpl load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0102, bytearray([0x60])) # rts + + # Load palette paths + data = pkgutil.get_data(__name__, f"data/palettes/level/palettes.json").decode("utf-8") + tilesets = json.loads(data) + + # Writes the level tileset index to ROM + rom.write_bytes(PALETTE_LEVEL_TILESET_ADDR, bytearray(level_palette_index)) + + # Builds the table in ROM that holds the palette index for each level, including sublevels + for level_id in range(0x200): + tileset_num = level_palette_index[level_id] + if tileset_num != 0xFF: + tileset = tileset_names[tileset_num] + else: + tileset = tileset_names[0x19] + palette = world.random.randint(0, len(tilesets[tileset])-1) + rom.write_bytes(PALETTE_INDEX_ADDR + level_id, bytearray([palette])) + + # Writes the actual level palette data and pointer to said data to the ROM + pal_offset = 0x0000 + tileset_num = 0 + bank_palette_count = 0 + for tileset in tilesets.keys(): + for palette in range(len(tilesets[tileset])): + # Handle bank crossing + if bank_palette_count == 110: + pal_offset = (pal_offset & 0xF8000) + 0x8000 + bank_palette_count = 0 + # Write pointer + data_ptr = pc_to_snes(PALETTE_LEVEL_DATA_ADDR + pal_offset) + rom.write_bytes(PALETTE_LEVEL_PTR_ADDR + ((tileset_num*3)<<8) + (palette*3), bytearray([data_ptr & 0xFF, (data_ptr>>8)&0xFF, (data_ptr>>16)&0xFF])) + # Write data + rom.write_bytes(PALETTE_LEVEL_DATA_ADDR + pal_offset, read_palette_file(tileset, tilesets[tileset][palette], "level")) + pal_offset += 0x128 + bank_palette_count += 1 + tileset_num += 1 + + # Fix eaten berry tiles + EATEN_BERRY_ADDR = 0x68248 + rom.write_byte(EATEN_BERRY_ADDR + 0x01, 0x04) + rom.write_byte(EATEN_BERRY_ADDR + 0x03, 0x04) + rom.write_byte(EATEN_BERRY_ADDR + 0x05, 0x04) + rom.write_byte(EATEN_BERRY_ADDR + 0x07, 0x04) + + # Fix title screen changing background colors + rom.write_bytes(0x1D30, bytearray([0xEA, 0xEA, 0xEA])) + + # Skips level intros automatically + rom.write_byte(0x4896, 0x80) + +def generate_curated_map_palette_data(rom, world: World): + PALETTE_MAP_CODE_ADDR = 0x88200 + PALETTE_UPLOADER_EDIT = 0x88400 + PALETTE_MAP_INDEX_ADDR = 0x8F400 + PALETTE_MAP_PTR_ADDR = 0x90000 + PALETTE_MAP_DATA_ADDR = 0x98000 + + addr = pc_to_snes(PALETTE_MAP_PTR_ADDR) + snes_map_palette_pointers_1 = bytearray([0xBF, (addr)&0xFF, (addr>>8)&0xFF, (addr>>16)&0xFF]) + snes_map_palette_pointers_2 = bytearray([0xBF, (addr+2)&0xFF, (addr>>8)&0xFF, (addr>>16)&0xFF]) + + rom.write_bytes(0x02D25, bytearray([0x5C, 0x09, 0x82, 0x11])) # org $00AD25 : jml map_palettes + + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0000, bytearray([0xC2, 0x30])) # map_og_palettes: rep #$30 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0002, bytearray([0xA0, 0xD8, 0xB3])) # ldy #$B3D8 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0005, bytearray([0x5C, 0x2A, 0xAD, 0x00])) # jml $00AD2A + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0009, bytearray([0xC2, 0x30])) # map_palettes: rep #$30 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x000B, bytearray([0xAD, 0x31, 0x19])) # .prepare_index lda $1931 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x000E, bytearray([0x29, 0x0F, 0x00])) # and #$000F + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0011, bytearray([0x3A])) # dec + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0012, bytearray([0xAA])) # tax + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0013, bytearray([0xEB])) # xba + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0014, bytearray([0x85, 0x0E])) # sta !_num + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0016, bytearray([0xBF, 0x00, 0xF4, 0x11])) # lda.l map_index,x + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x001A, bytearray([0x29, 0xFF, 0x00])) # and #$00FF + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x001D, bytearray([0x05, 0x0E])) # ora !_num + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x001F, bytearray([0x85, 0x0A])) # sta !_ptr + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0021, bytearray([0x0A])) # asl + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0022, bytearray([0x18])) # clc + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0023, bytearray([0x65, 0x0A])) # adc !_ptr + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0025, bytearray([0xAA])) # tax + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0026, snes_map_palette_pointers_1) # lda.l map_palette_pointers,x + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x002A, bytearray([0x85, 0x0A])) # sta !_ptr + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x002C, snes_map_palette_pointers_2) # lda.l map_palette_pointers+$02,x + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0030, bytearray([0x85, 0x0C])) # sta !_ptr+$02 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0032, bytearray([0xA7, 0x0A])) # .load_back_color lda [!_ptr] + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0034, bytearray([0x8D, 0x01, 0x07])) # sta $0701 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0037, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0039, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x003B, bytearray([0xA9, 0x82, 0x00])) # .load_layer_2 lda.w #$0041*$02 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x003E, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0040, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0043, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0045, bytearray([0xA9, 0x03, 0x00])) # lda #$0003 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0048, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x004A, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x004D, bytearray([0xA9, 0x52, 0x00])) # .load_layer_1 lda.w #$0029*$02 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0050, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0052, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0055, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0057, bytearray([0xA9, 0x05, 0x00])) # lda #$0005 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x005A, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x005C, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x005F, bytearray([0xA9, 0x10, 0x00])) # .load_layer_3 lda.w #$0008*$02 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0062, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0064, bytearray([0xA9, 0x07, 0x00])) # lda #$0007 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0067, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0069, bytearray([0xA9, 0x01, 0x00])) # lda #$0001 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x006C, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x006E, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0071, bytearray([0xA9, 0x02, 0x01])) # .load_sprites lda.w #$0081*$02 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0074, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0076, bytearray([0xA9, 0x06, 0x00])) # lda #$0006 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0079, bytearray([0x85, 0x06])) # sta !_x_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x007B, bytearray([0xA9, 0x07, 0x00])) # lda #$0007 + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x007E, bytearray([0x85, 0x08])) # sta !_y_span + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0080, bytearray([0x20, 0xE4, 0x80])) # jsr load_colors + rom.write_bytes(PALETTE_MAP_CODE_ADDR + 0x0083, bytearray([0x5C, 0xA3, 0xAD, 0x00])) # .return jml $00ADA3 + + rom.write_bytes(0x2488, bytearray([0x5C, 0x00, 0x84, 0x11])) # org $00A488 : jml palette_upload + + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0000, bytearray([0xAD, 0x00, 0x01])) # palette_upload: lda $0100 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0003, bytearray([0xC9, 0x0E])) # cmp #$0E + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0005, bytearray([0xF0, 0x0A])) # beq .map + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0007, bytearray([0xAC, 0x80, 0x06])) # .regular ldy $0680 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x000A, bytearray([0xBE, 0x81, 0xA4])) # ldx.w $A47F+2,y + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x000D, bytearray([0x5C, 0x8E, 0xA4, 0x00])) # jml $00A48E + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0011, bytearray([0xAD, 0xD9, 0x13])) # .map lda $13D9 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0014, bytearray([0xC9, 0x0A])) # cmp #$0A + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0016, bytearray([0xD0, 0xEF])) # bne .regular + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0018, bytearray([0xAD, 0xE8, 0x1D])) # lda $1DE8 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x001B, bytearray([0xC9, 0x06])) # cmp #$06 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x001D, bytearray([0xD0, 0xE8])) # bne .regular + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x001F, bytearray([0x9C, 0x03, 0x07])) # stz $0703 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0022, bytearray([0x9C, 0x04, 0x07])) # stz $0704 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0025, bytearray([0x9C, 0x21, 0x21])) # stz $2121 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0028, bytearray([0xA2, 0x06])) # ldx #$06 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x002A, bytearray([0xBD, 0x49, 0x92])) # .loop lda.w $9249,x + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x002D, bytearray([0x9D, 0x20, 0x43])) # sta $4320,x + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0030, bytearray([0xCA])) # dex + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0031, bytearray([0x10, 0xF7])) # bpl .loop + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0033, bytearray([0xA9, 0x04])) # lda #$04 + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0035, bytearray([0x8D, 0x0B, 0x42])) # sta $420B + rom.write_bytes(PALETTE_UPLOADER_EDIT + 0x0038, bytearray([0x5C, 0xCF, 0xA4, 0x00])) # jml $00A4CF + + # Insert this piece of ASM again in case levels are disabled + PALETTE_LEVEL_CODE_ADDR = 0x88000 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00E4, bytearray([0xA6, 0x04])) # load_colors: ldx !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00E6, bytearray([0xA4, 0x06])) # ldy !_x_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00E8, bytearray([0xA7, 0x0A])) # .x_loop lda [!_ptr] + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00EA, bytearray([0x9D, 0x03, 0x07])) # sta $0703,x + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00ED, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00EF, bytearray([0xE6, 0x0A])) # inc !_ptr + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F1, bytearray([0xE8])) # inx + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F2, bytearray([0xE8])) # inx + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F3, bytearray([0x88])) # dey + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F4, bytearray([0x10, 0xF2])) # bpl .x_loop + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F6, bytearray([0xA5, 0x04])) # lda !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F8, bytearray([0x18])) # clc + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00F9, bytearray([0x69, 0x20, 0x00])) # adc #$0020 + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00FC, bytearray([0x85, 0x04])) # sta !_index + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x00FE, bytearray([0xC6, 0x08])) # dec !_y_span + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0100, bytearray([0x10, 0xE2])) # bpl load_colors + rom.write_bytes(PALETTE_LEVEL_CODE_ADDR + 0x0102, bytearray([0x60])) # rts + + # Load palette paths + data = pkgutil.get_data(__name__, f"data/palettes/map/palettes.json").decode("utf-8") + maps = json.loads(data) + + for map_id in range(0x07): + current_map_name = map_names[map_id] + palette = world.random.randint(0, len(maps[current_map_name])-1) + rom.write_bytes(PALETTE_MAP_INDEX_ADDR + map_id, bytearray([palette])) + + # Writes the actual map palette data and pointer to said data to the ROM + pal_offset = 0x0000 + map_num = 0 + bank_palette_count = 0 + for current_map in maps.keys(): + for palette in range(len(maps[current_map])): + # Handle bank crossing + if bank_palette_count == 113: + pal_offset = (pal_offset & 0xF8000) + 0x8000 + bank_palette_count = 0 + # Write pointer + data_ptr = pc_to_snes(PALETTE_MAP_DATA_ADDR + pal_offset) + rom.write_bytes(PALETTE_MAP_PTR_ADDR + ((map_num*3)<<8) + (palette*3), bytearray([data_ptr & 0xFF, (data_ptr>>8)&0xFF, (data_ptr>>16)&0xFF])) + # Write data + rom.write_bytes(PALETTE_MAP_DATA_ADDR + pal_offset, read_palette_file(current_map, maps[current_map][palette], "map")) + # Update map mario palette + chosen_palette = world.options.mario_palette.value + rom.write_bytes(PALETTE_MAP_DATA_ADDR + pal_offset + 206, bytes(ow_mario_palettes[chosen_palette])) + pal_offset += 0x11C + bank_palette_count += 1 + map_num += 1 + + +def pc_to_snes(address): + return ((address << 1) & 0x7F0000) | (address & 0x7FFF) | 0x8000 + +def read_palette_file(tileset, filename, type_): + palette_file = pkgutil.get_data(__name__, f"data/palettes/{type_}/{tileset}/{filename}") + colors = bytearray([]) + + # Copy back colors + colors += bytearray([palette_file[0x200], palette_file[0x201]]) + + if type_ == "level": + # Copy background colors + colors += bytearray([palette_file[(0x01*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x11*2)+(i)] for i in range(14)]) + + # Copy foreground colors + colors += bytearray([palette_file[(0x21*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x31*2)+(i)] for i in range(14)]) + + # Copy berry colors + colors += bytearray([palette_file[(0x29*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x39*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x49*2)+(i)] for i in range(14)]) + + # Copy global colors + colors += bytearray([palette_file[(0x41*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x51*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x61*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x71*2)+(i)] for i in range(14)]) + + # Copy sprite colors + colors += bytearray([palette_file[(0x81*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x91*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xA1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xB1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xC1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xD1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xE1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xF1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xE9*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xF9*2)+(i)] for i in range(14)]) + + elif type_ == "map": + # Copy layer 2 colors + colors += bytearray([palette_file[(0x41*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x51*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x61*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x71*2)+(i)] for i in range(14)]) + + # Copy layer 1 colors + colors += bytearray([palette_file[(0x29*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x39*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x49*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x59*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x69*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x79*2)+(i)] for i in range(14)]) + + # Copy layer 3 colors + colors += bytearray([palette_file[(0x08*2)+(i)] for i in range(16)]) + colors += bytearray([palette_file[(0x18*2)+(i)] for i in range(16)]) + + # Copy sprite colors + colors += bytearray([palette_file[(0x81*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0x91*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xA1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xB1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xC1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xD1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xE1*2)+(i)] for i in range(14)]) + colors += bytearray([palette_file[(0xF1*2)+(i)] for i in range(14)]) + + return colors diff --git a/worlds/smw/Client.py b/worlds/smw/Client.py index 50899abe..eb9b4ec3 100644 --- a/worlds/smw/Client.py +++ b/worlds/smw/Client.py @@ -1,5 +1,4 @@ import logging -import asyncio import time from NetUtils import ClientStatus, color @@ -17,11 +16,19 @@ SRAM_START = 0xE00000 SMW_ROMHASH_START = 0x7FC0 ROMHASH_SIZE = 0x15 -SMW_PROGRESS_DATA = WRAM_START + 0x1F02 -SMW_DRAGON_COINS_DATA = WRAM_START + 0x1F2F -SMW_PATH_DATA = WRAM_START + 0x1EA2 -SMW_EVENT_ROM_DATA = ROM_START + 0x2D608 -SMW_ACTIVE_LEVEL_DATA = ROM_START + 0x37F70 +SMW_PROGRESS_DATA = WRAM_START + 0x1F02 +SMW_DRAGON_COINS_DATA = WRAM_START + 0x1F2F +SMW_PATH_DATA = WRAM_START + 0x1EA2 +SMW_EVENT_ROM_DATA = ROM_START + 0x2D608 +SMW_ACTIVE_LEVEL_DATA = ROM_START + 0x37F70 +SMW_MOON_DATA = WRAM_START + 0x1FEE +SMW_HIDDEN_1UP_DATA = WRAM_START + 0x1F3C +SMW_BONUS_BLOCK_DATA = WRAM_START + 0x1A000 +SMW_BLOCKSANITY_DATA = WRAM_START + 0x1A400 +SMW_BLOCKSANITY_FLAGS = WRAM_START + 0x1A010 +SMW_LEVEL_CLEAR_FLAGS = WRAM_START + 0x1A200 +SMW_SPECIAL_WORLD_CLEAR = WRAM_START + 0x1F1E + SMW_GOAL_DATA = ROM_START + 0x01BFA0 SMW_REQUIRED_BOSSES_DATA = ROM_START + 0x01BFA1 @@ -31,22 +38,32 @@ SMW_RECEIVE_MSG_DATA = ROM_START + 0x01BFA4 SMW_DEATH_LINK_ACTIVE_ADDR = ROM_START + 0x01BFA5 SMW_DRAGON_COINS_ACTIVE_ADDR = ROM_START + 0x01BFA6 SMW_SWAMP_DONUT_GH_ADDR = ROM_START + 0x01BFA7 +SMW_MOON_ACTIVE_ADDR = ROM_START + 0x01BFA8 +SMW_HIDDEN_1UP_ACTIVE_ADDR = ROM_START + 0x01BFA9 +SMW_BONUS_BLOCK_ACTIVE_ADDR = ROM_START + 0x01BFAA +SMW_BLOCKSANITY_ACTIVE_ADDR = ROM_START + 0x01BFAB -SMW_GAME_STATE_ADDR = WRAM_START + 0x100 -SMW_MARIO_STATE_ADDR = WRAM_START + 0x71 -SMW_BOSS_STATE_ADDR = WRAM_START + 0xD9B -SMW_ACTIVE_BOSS_ADDR = WRAM_START + 0x13FC -SMW_CURRENT_LEVEL_ADDR = WRAM_START + 0x13BF -SMW_MESSAGE_BOX_ADDR = WRAM_START + 0x1426 -SMW_BONUS_STAR_ADDR = WRAM_START + 0xF48 -SMW_EGG_COUNT_ADDR = WRAM_START + 0x1F24 -SMW_BOSS_COUNT_ADDR = WRAM_START + 0x1F26 -SMW_NUM_EVENTS_ADDR = WRAM_START + 0x1F2E -SMW_SFX_ADDR = WRAM_START + 0x1DFC -SMW_PAUSE_ADDR = WRAM_START + 0x13D4 -SMW_MESSAGE_QUEUE_ADDR = WRAM_START + 0xC391 -SMW_RECV_PROGRESS_ADDR = WRAM_START + 0x1F2B +SMW_GAME_STATE_ADDR = WRAM_START + 0x100 +SMW_MARIO_STATE_ADDR = WRAM_START + 0x71 +SMW_BOSS_STATE_ADDR = WRAM_START + 0xD9B +SMW_ACTIVE_BOSS_ADDR = WRAM_START + 0x13FC +SMW_CURRENT_LEVEL_ADDR = WRAM_START + 0x13BF +SMW_CURRENT_SUBLEVEL_ADDR = WRAM_START + 0x10B +SMW_MESSAGE_BOX_ADDR = WRAM_START + 0x1426 +SMW_BONUS_STAR_ADDR = WRAM_START + 0xF48 +SMW_EGG_COUNT_ADDR = WRAM_START + 0x1F24 +SMW_BOSS_COUNT_ADDR = WRAM_START + 0x1F26 +SMW_NUM_EVENTS_ADDR = WRAM_START + 0x1F2E +SMW_SFX_ADDR = WRAM_START + 0x1DFC +SMW_PAUSE_ADDR = WRAM_START + 0x13D4 +SMW_MESSAGE_QUEUE_ADDR = WRAM_START + 0xC391 +SMW_ACTIVE_THWIMP_ADDR = WRAM_START + 0x0F3C +SMW_GOAL_ITEM_COUNT = WRAM_START + 0x1A01E + +SMW_RECV_PROGRESS_ADDR = WRAM_START + 0x01F2B + +SMW_BLOCKSANITY_BLOCK_COUNT = 582 SMW_GOAL_LEVELS = [0x28, 0x31, 0x32] SMW_INVALID_MARIO_STATES = [0x05, 0x06, 0x0A, 0x0C, 0x0D] @@ -115,6 +132,9 @@ class SMWSNIClient(SNIClient): if death_link: await ctx.update_death_link(bool(death_link[0] & 0b1)) + if ctx.rom != rom_name: + ctx.current_sublevel_value = 0 + ctx.rom = rom_name return True @@ -176,6 +196,11 @@ class SMWSNIClient(SNIClient): self.trap_queue.append((trap_item, trap_msg)) + def should_show_message(self, ctx, next_item): + return ctx.receive_option == 1 or \ + (ctx.receive_option == 2 and ((next_item.flags & 1) != 0)) or \ + (ctx.receive_option == 3 and ((next_item.flags & 1) != 0 and next_item.item != 0xBC0002)) + async def handle_trap_queue(self, ctx): from SNIClient import snes_buffered_write, snes_flush_writes, snes_read @@ -217,6 +242,13 @@ class SMWSNIClient(SNIClient): self.add_trap_to_queue(next_trap, message) return else: + if next_trap.item == 0xBC001D: + # Special case thwimp trap + # Do not fire if the previous thwimp hasn't reached the player's Y pos + active_thwimp = await snes_read(ctx, SMW_ACTIVE_THWIMP_ADDR, 0x1) + if active_thwimp[0] != 0xFF: + self.add_trap_to_queue(next_trap, message) + return verify_game_state = await snes_read(ctx, SMW_GAME_STATE_ADDR, 0x1) if verify_game_state[0] == 0x14 and len(trap_rom_data[next_trap.item]) > 2: snes_buffered_write(ctx, SMW_SFX_ADDR, bytes([trap_rom_data[next_trap.item][2]])) @@ -236,13 +268,14 @@ class SMWSNIClient(SNIClient): if active_boss[0] != 0x00: return - if ctx.receive_option == 1 or (ctx.receive_option == 2 and ((next_trap.flags & 1) != 0)): + if self.should_show_message(ctx, next_trap): self.add_message_to_queue(message) async def game_watcher(self, ctx): from SNIClient import snes_buffered_write, snes_flush_writes, snes_read - + + boss_state = await snes_read(ctx, SMW_BOSS_STATE_ADDR, 0x1) game_state = await snes_read(ctx, SMW_GAME_STATE_ADDR, 0x1) mario_state = await snes_read(ctx, SMW_MARIO_STATE_ADDR, 0x1) if game_state is None: @@ -259,6 +292,7 @@ class SMWSNIClient(SNIClient): elif game_state[0] < 0x0B: # We haven't loaded a save file ctx.message_queue = [] + ctx.current_sublevel_value = 0 return elif mario_state[0] in SMW_INVALID_MARIO_STATES: # Mario can't come to the phone right now @@ -304,8 +338,18 @@ class SMWSNIClient(SNIClient): progress_data = bytearray(await snes_read(ctx, SMW_PROGRESS_DATA, 0x0F)) dragon_coins_data = bytearray(await snes_read(ctx, SMW_DRAGON_COINS_DATA, 0x0C)) dragon_coins_active = await snes_read(ctx, SMW_DRAGON_COINS_ACTIVE_ADDR, 0x1) - from worlds.smw.Rom import item_rom_data, ability_rom_data, trap_rom_data - from worlds.smw.Levels import location_id_to_level_id, level_info_dict + moon_data = bytearray(await snes_read(ctx, SMW_MOON_DATA, 0x0C)) + moon_active = await snes_read(ctx, SMW_MOON_ACTIVE_ADDR, 0x1) + hidden_1up_data = bytearray(await snes_read(ctx, SMW_HIDDEN_1UP_DATA, 0x0C)) + hidden_1up_active = await snes_read(ctx, SMW_HIDDEN_1UP_ACTIVE_ADDR, 0x1) + bonus_block_data = bytearray(await snes_read(ctx, SMW_BONUS_BLOCK_DATA, 0x0C)) + bonus_block_active = await snes_read(ctx, SMW_BONUS_BLOCK_ACTIVE_ADDR, 0x1) + blocksanity_data = bytearray(await snes_read(ctx, SMW_BLOCKSANITY_DATA, SMW_BLOCKSANITY_BLOCK_COUNT)) + blocksanity_flags = bytearray(await snes_read(ctx, SMW_BLOCKSANITY_FLAGS, 0xC)) + blocksanity_active = await snes_read(ctx, SMW_BLOCKSANITY_ACTIVE_ADDR, 0x1) + level_clear_flags = bytearray(await snes_read(ctx, SMW_LEVEL_CLEAR_FLAGS, 0x60)) + from worlds.smw.Rom import item_rom_data, ability_rom_data, trap_rom_data, icon_rom_data + from worlds.smw.Levels import location_id_to_level_id, level_info_dict, level_blocks_data from worlds import AutoWorldRegister for loc_name, level_data in location_id_to_level_id.items(): loc_id = AutoWorldRegister.world_types[ctx.game].location_name_to_id[loc_name] @@ -327,6 +371,54 @@ class SMWSNIClient(SNIClient): if bit_set: new_checks.append(loc_id) + elif level_data[1] == 3: + # Moon Check + if not moon_active or moon_active[0] == 0: + continue + + progress_byte = (level_data[0] // 8) + progress_bit = 7 - (level_data[0] % 8) + + data = moon_data[progress_byte] + masked_data = data & (1 << progress_bit) + bit_set = (masked_data != 0) + + if bit_set: + new_checks.append(loc_id) + elif level_data[1] == 4: + # Hidden 1-Up Check + if not hidden_1up_active or hidden_1up_active[0] == 0: + continue + + progress_byte = (level_data[0] // 8) + progress_bit = 7 - (level_data[0] % 8) + + data = hidden_1up_data[progress_byte] + masked_data = data & (1 << progress_bit) + bit_set = (masked_data != 0) + + if bit_set: + new_checks.append(loc_id) + elif level_data[1] == 5: + # Bonus Block Check + if not bonus_block_active or bonus_block_active[0] == 0: + continue + + progress_byte = (level_data[0] // 8) + progress_bit = 7 - (level_data[0] % 8) + + data = bonus_block_data[progress_byte] + masked_data = data & (1 << progress_bit) + bit_set = (masked_data != 0) + + if bit_set: + new_checks.append(loc_id) + elif level_data[1] >= 100: + if not blocksanity_active or blocksanity_active[0] == 0: + continue + block_index = level_data[1] - 100 + if blocksanity_data[block_index] != 0: + new_checks.append(loc_id) else: event_id_value = event_id + level_data[1] @@ -360,12 +452,48 @@ class SMWSNIClient(SNIClient): f'New Check: {location} ({len(ctx.locations_checked)}/{len(ctx.missing_locations) + len(ctx.checked_locations)})') await ctx.send_msgs([{"cmd": 'LocationChecks', "locations": [new_check_id]}]) + # Send Current Room for Tracker + current_sublevel_data = await snes_read(ctx, SMW_CURRENT_SUBLEVEL_ADDR, 2) + current_sublevel_value = current_sublevel_data[0] + (current_sublevel_data[1] << 8) + + if game_state[0] != 0x14: + current_sublevel_value = 0 + + if ctx.current_sublevel_value != current_sublevel_value: + ctx.current_sublevel_value = current_sublevel_value + + # Send level id data to tracker + await ctx.send_msgs( + [ + { + "cmd": "Set", + "key": f"smw_curlevelid_{ctx.team}_{ctx.slot}", + "default": 0, + "want_reply": False, + "operations": [ + { + "operation": "replace", + "value": ctx.current_sublevel_value, + } + ], + } + ] + ) + if game_state[0] != 0x14: # Don't receive items or collect locations outside of in-level mode + ctx.current_sublevel_value = 0 + return + + if boss_state[0] in SMW_BOSS_STATES: + # Don't receive items or collect locations inside boss battles return - recv_count = await snes_read(ctx, SMW_RECV_PROGRESS_ADDR, 1) - recv_index = recv_count[0] + recv_count = await snes_read(ctx, SMW_RECV_PROGRESS_ADDR, 2) + if recv_count is None: + # Add a small failsafe in case we get a None. Other SNI games do this... + return + recv_index = recv_count[0] | (recv_count[1] << 8) if recv_index < len(ctx.items_received): item = ctx.items_received[recv_index] @@ -375,7 +503,7 @@ class SMWSNIClient(SNIClient): color(ctx.player_names[item.player], 'yellow'), ctx.location_names[item.location], recv_index, len(ctx.items_received))) - if ctx.receive_option == 1 or (ctx.receive_option == 2 and ((item.flags & 1) != 0)): + if self.should_show_message(ctx, item): if item.item != 0xBC0012 and item.item not in trap_rom_data: # Don't send messages for Boss Tokens item_name = ctx.item_names[item.item] @@ -384,7 +512,7 @@ class SMWSNIClient(SNIClient): receive_message = generate_received_text(item_name, player_name) self.add_message_to_queue(receive_message) - snes_buffered_write(ctx, SMW_RECV_PROGRESS_ADDR, bytes([recv_index])) + snes_buffered_write(ctx, SMW_RECV_PROGRESS_ADDR, bytes([recv_index&0xFF, (recv_index>>8)&0xFF])) if item.item in trap_rom_data: item_name = ctx.item_names[item.item] player_name = ctx.player_names[item.player] @@ -405,6 +533,15 @@ class SMWSNIClient(SNIClient): snes_buffered_write(ctx, SMW_SFX_ADDR, bytes([item_rom_data[item.item][2]])) snes_buffered_write(ctx, WRAM_START + item_rom_data[item.item][0], bytes([new_item_count])) + elif item.item in icon_rom_data: + queue_addr = await snes_read(ctx, WRAM_START + icon_rom_data[item.item][0], 2) + queue_addr = queue_addr[0] + (queue_addr[1] << 8) + queue_addr += 1 + snes_buffered_write(ctx, WRAM_START + icon_rom_data[item.item][0], bytes([queue_addr&0xFF, (queue_addr>>8)&0xFF])) + if (goal[0] == 0 and item.item == 0xBC0012) or (goal[0] == 1 and item.item == 0xBC0002): + goal_item_count = await snes_read(ctx, SMW_GOAL_ITEM_COUNT, 1) + snes_buffered_write(ctx, SMW_GOAL_ITEM_COUNT, bytes([goal_item_count[0] + 1])) + elif item.item in ability_rom_data: # Handle Upgrades for rom_data in ability_rom_data[item.item]: @@ -449,6 +586,12 @@ class SMWSNIClient(SNIClient): path_data = bytearray(await snes_read(ctx, SMW_PATH_DATA, 0x60)) donut_gh_swapped = await snes_read(ctx, SMW_SWAMP_DONUT_GH_ADDR, 0x1) new_dragon_coin = False + new_moon = False + new_hidden_1up = False + new_bonus_block = False + new_blocksanity = False + new_blocksanity_flags = False + for loc_id in ctx.checked_locations: if loc_id not in ctx.locations_checked: ctx.locations_checked.add(loc_id) @@ -470,10 +613,64 @@ class SMWSNIClient(SNIClient): dragon_coins_data[progress_byte] = new_data new_dragon_coin = True + elif level_data[1] == 3: + # Moon Check + + progress_byte = (level_data[0] // 8) + progress_bit = 7 - (level_data[0] % 8) + + data = moon_data[progress_byte] + new_data = data | (1 << progress_bit) + moon_data[progress_byte] = new_data + + new_moon = True + elif level_data[1] == 4: + # Hidden 1-Up Check + progress_byte = (level_data[0] // 8) + progress_bit = 7 - (level_data[0] % 8) + + data = hidden_1up_data[progress_byte] + new_data = data | (1 << progress_bit) + hidden_1up_data[progress_byte] = new_data + + new_hidden_1up = True + elif level_data[1] == 5: + # Bonus block prize Check + + progress_byte = (level_data[0] // 8) + progress_bit = 7 - (level_data[0] % 8) + + data = bonus_block_data[progress_byte] + new_data = data | (1 << progress_bit) + bonus_block_data[progress_byte] = new_data + + new_bonus_block = True + elif level_data[1] >= 100: + # Blocksanity flag Check + block_index = level_data[1] - 100 + blocksanity_data[block_index] = 1 + new_blocksanity = True + + # All blocksanity blocks flag + new_blocksanity_flags = True + for block_id in level_blocks_data[level_data[0]]: + if blocksanity_data[block_id] != 1: + new_blocksanity_flags = False + continue + if new_blocksanity_flags is True: + progress_byte = (level_data[0] // 8) + progress_bit = 7 - (level_data[0] % 8) + data = blocksanity_flags[progress_byte] + new_data = data | (1 << progress_bit) + blocksanity_flags[progress_byte] = new_data else: if level_data[0] in SMW_UNCOLLECTABLE_LEVELS: continue + # Handle map indicators + flag = 1 if level_data[1] == 0 else 2 + level_clear_flags[level_data[0]] |= flag + event_id = event_data[level_data[0]] event_id_value = event_id + level_data[1] @@ -514,7 +711,18 @@ class SMWSNIClient(SNIClient): if new_dragon_coin: snes_buffered_write(ctx, SMW_DRAGON_COINS_DATA, bytes(dragon_coins_data)) + if new_moon: + snes_buffered_write(ctx, SMW_MOON_DATA, bytes(moon_data)) + if new_hidden_1up: + snes_buffered_write(ctx, SMW_HIDDEN_1UP_DATA, bytes(hidden_1up_data)) + if new_bonus_block: + snes_buffered_write(ctx, SMW_BONUS_BLOCK_DATA, bytes(bonus_block_data)) + if new_blocksanity: + snes_buffered_write(ctx, SMW_BLOCKSANITY_DATA, bytes(blocksanity_data)) + if new_blocksanity_flags: + snes_buffered_write(ctx, SMW_BLOCKSANITY_FLAGS, bytes(blocksanity_flags)) if new_events > 0: + snes_buffered_write(ctx, SMW_LEVEL_CLEAR_FLAGS, bytes(level_clear_flags)) snes_buffered_write(ctx, SMW_PROGRESS_DATA, bytes(progress_data)) snes_buffered_write(ctx, SMW_PATH_DATA, bytes(path_data)) old_events = await snes_read(ctx, SMW_NUM_EVENTS_ADDR, 0x1) diff --git a/worlds/smw/Items.py b/worlds/smw/Items.py index 5b6cce5a..eaf58b9b 100644 --- a/worlds/smw/Items.py +++ b/worlds/smw/Items.py @@ -18,6 +18,10 @@ class SMWItem(Item): # Separate tables for each type of item. junk_table = { + ItemName.one_coin: ItemData(0xBC0017, False), + ItemName.five_coins: ItemData(0xBC0018, False), + ItemName.ten_coins: ItemData(0xBC0019, False), + ItemName.fifty_coins: ItemData(0xBC001A, False), ItemName.one_up_mushroom: ItemData(0xBC0001, False), } @@ -36,6 +40,7 @@ upgrade_table = { ItemName.progressive_powerup: ItemData(0xBC000A, True), ItemName.p_balloon: ItemData(0xBC000B, True), ItemName.super_star_active: ItemData(0xBC000D, True), + ItemName.special_world_clear: ItemData(0xBC001B, True), } switch_palace_table = { @@ -46,10 +51,12 @@ switch_palace_table = { } trap_table = { - ItemName.ice_trap: ItemData(0xBC0013, False, True), - ItemName.stun_trap: ItemData(0xBC0014, False, True), - ItemName.literature_trap: ItemData(0xBC0015, False, True), - ItemName.timer_trap: ItemData(0xBC0016, False, True), + ItemName.ice_trap: ItemData(0xBC0013, False, True), + ItemName.stun_trap: ItemData(0xBC0014, False, True), + ItemName.literature_trap: ItemData(0xBC0015, False, True), + ItemName.timer_trap: ItemData(0xBC0016, False, True), + ItemName.reverse_controls_trap: ItemData(0xBC001C, False, True), + ItemName.thwimp_trap: ItemData(0xBC001D, False, True), } event_table = { diff --git a/worlds/smw/Levels.py b/worlds/smw/Levels.py index 3940a08c..7aa9428b 100644 --- a/worlds/smw/Levels.py +++ b/worlds/smw/Levels.py @@ -1,4 +1,5 @@ +from worlds.AutoWorld import World from .Names import LocationName @@ -75,6 +76,103 @@ ow_boss_rooms = [ ] +level_blocks_data = { + 0x01: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], + 0x02: [12, 13], + 0x04: [14, 15, 16, 17, 18, 19], + 0x05: [20, 21, 22, 23, 24, 25], + 0x06: [26, 27, 28, 29], + 0x07: [30, 31, 32, 33, 34, 35, 36, 37, 38, 39], + 0x09: [40, 41, 42, 43, 44, 45, 46, 47, 48, 49], + 0x0A: [50, 51, 52, 53, 54, 55, 56, 57, 58, 59], + 0x0B: [60, 61, 62], + 0x0C: [63, 64, 65, 66, 67, 68], + 0x0D: [69, 70, 71], + 0x0E: [72], + 0x0F: [73, 74, 75, 76], + 0x10: [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111 + ], + 0x11: [112], + 0x13: [113, 114, 115, 116, 117], + 0x15: [118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140 + ], + 0x18: [141, 142], + 0x1A: [143, 144, 145], + 0x1B: [146, 147, 148, 149, 150], + 0x1C: [151, 152, 153, 154], + 0x1D: [155, 156, 157], + 0x1F: [158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168], + 0x20: [169], + 0x21: [170, 171, 172], + 0x22: [173, 174, 175, 176, 177], + 0x23: [178, 179, 180, 181, 182, 183, 184, 185, 186], + 0x24: [187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202 + ], + 0x25: [203, 204, 205, 206, 207, 208], + 0x26: [209, 210, 211, 212], + 0x27: [213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229 + ], + 0x29: [230, 231, 232, 233], + 0x2A: [234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249 + ], + 0x2B: [250, 251, 252, 253, 254], + 0x2D: [255, 256, 257, 258, 259, 260, 261, 262], + 0x2E: [263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279 + ], + 0x2F: [280, 281, 282, 283, 284], + 0x33: [285, 286, 287, 288, 289, 290], + 0x34: [291, 292, 293], + 0x35: [294, 295], + 0x37: [296, 297], + 0x38: [298, 299, 300, 301], + 0x39: [302, 303, 304, 305], + 0x3A: [306, 307, 308, 309, 310, 311, 312, 313, 314], + 0x3B: [315, 316], + 0x3C: [317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330], + 0x3D: [331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341], + 0x3E: [342, 343, 344, 345, 346, 347, 348, 349, 350, 351], + 0x40: [352, 353, 354, 355, 356], + 0x41: [357, 358, 359, 360, 361], + 0x42: [362, 363, 364, 365, 366], + 0x43: [367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379], + 0x44: [380, 381, 382, 383, 384, 385, 386], + 0x46: [387, 388, 389], + 0x47: [390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, + 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416 + ], + 0x49: [417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, + 444, 445, 446 + ], + 0x4A: [447, 448, 449, 450, 451], + 0x4B: [452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, + 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489 + ], + 0x4C: [490], + 0x4E: [491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512 + ], + 0x4F: [513, 514, 515, 516, 517, 518, 519, 520, 521, 522], + 0x50: [523, 524, 525], + 0x51: [526, 527], + 0x54: [528], + 0x56: [529], + 0x59: [530, 531, 532, 533, 534, 535, 536, 537, 538], + 0x5A: [539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, + 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, + 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, + 579, 580, 581 + ] +} + class SMWPath(): thisEndDirection: int otherLevelID: int @@ -330,12 +428,15 @@ switch_palace_levels = [ location_id_to_level_id = { LocationName.yoshis_island_1_exit_1: [0x29, 0], LocationName.yoshis_island_1_dragon: [0x29, 2], + LocationName.yoshis_island_1_moon: [0x29, 3], LocationName.yoshis_island_2_exit_1: [0x2A, 0], LocationName.yoshis_island_2_dragon: [0x2A, 2], LocationName.yoshis_island_3_exit_1: [0x27, 0], LocationName.yoshis_island_3_dragon: [0x27, 2], + LocationName.yoshis_island_3_bonus_block: [0x27, 5], LocationName.yoshis_island_4_exit_1: [0x26, 0], LocationName.yoshis_island_4_dragon: [0x26, 2], + LocationName.yoshis_island_4_hidden_1up: [0x26, 4], LocationName.yoshis_island_castle: [0x25, 0], LocationName.yoshis_island_koopaling: [0x25, 0], LocationName.yellow_switch_palace: [0x14, 0], @@ -343,13 +444,17 @@ location_id_to_level_id = { LocationName.donut_plains_1_exit_1: [0x15, 0], LocationName.donut_plains_1_exit_2: [0x15, 1], LocationName.donut_plains_1_dragon: [0x15, 2], + LocationName.donut_plains_1_hidden_1up: [0x15, 4], LocationName.donut_plains_2_exit_1: [0x09, 0], LocationName.donut_plains_2_exit_2: [0x09, 1], LocationName.donut_plains_2_dragon: [0x09, 2], LocationName.donut_plains_3_exit_1: [0x05, 0], LocationName.donut_plains_3_dragon: [0x05, 2], + LocationName.donut_plains_3_bonus_block: [0x05, 5], LocationName.donut_plains_4_exit_1: [0x06, 0], LocationName.donut_plains_4_dragon: [0x06, 2], + LocationName.donut_plains_4_moon: [0x06, 3], + LocationName.donut_plains_4_hidden_1up: [0x06, 4], LocationName.donut_secret_1_exit_1: [0x0A, 0], LocationName.donut_secret_1_exit_2: [0x0A, 1], LocationName.donut_secret_1_dragon: [0x0A, 2], @@ -360,6 +465,7 @@ location_id_to_level_id = { LocationName.donut_secret_house_exit_1: [0x13, 0], LocationName.donut_secret_house_exit_2: [0x13, 1], LocationName.donut_plains_castle: [0x07, 0], + LocationName.donut_plains_castle_hidden_1up: [0x07, 4], LocationName.donut_plains_koopaling: [0x07, 0], LocationName.green_switch_palace: [0x08, 0], @@ -371,8 +477,10 @@ location_id_to_level_id = { LocationName.vanilla_dome_2_dragon: [0x3C, 2], LocationName.vanilla_dome_3_exit_1: [0x2E, 0], LocationName.vanilla_dome_3_dragon: [0x2E, 2], + LocationName.vanilla_dome_3_moon: [0x2E, 3], LocationName.vanilla_dome_4_exit_1: [0x3D, 0], LocationName.vanilla_dome_4_dragon: [0x3D, 2], + LocationName.vanilla_dome_4_hidden_1up: [0x3D, 4], LocationName.vanilla_secret_1_exit_1: [0x2D, 0], LocationName.vanilla_secret_1_exit_2: [0x2D, 1], LocationName.vanilla_secret_1_dragon: [0x2D, 2], @@ -382,7 +490,9 @@ location_id_to_level_id = { LocationName.vanilla_secret_3_dragon: [0x02, 2], LocationName.vanilla_ghost_house_exit_1: [0x2B, 0], LocationName.vanilla_ghost_house_dragon: [0x2B, 2], + LocationName.vanilla_ghost_house_hidden_1up: [0x2B, 4], LocationName.vanilla_fortress: [0x0B, 0], + LocationName.vanilla_fortress_hidden_1up: [0x0B, 4], LocationName.vanilla_reznor: [0x0B, 0], LocationName.vanilla_dome_castle: [0x40, 0], LocationName.vanilla_dome_koopaling: [0x40, 0], @@ -390,13 +500,16 @@ location_id_to_level_id = { LocationName.butter_bridge_1_exit_1: [0x0C, 0], LocationName.butter_bridge_1_dragon: [0x0C, 2], + LocationName.butter_bridge_1_bonus_block: [0x0C, 5], LocationName.butter_bridge_2_exit_1: [0x0D, 0], LocationName.butter_bridge_2_dragon: [0x0D, 2], LocationName.cheese_bridge_exit_1: [0x0F, 0], LocationName.cheese_bridge_exit_2: [0x0F, 1], LocationName.cheese_bridge_dragon: [0x0F, 2], + LocationName.cheese_bridge_moon: [0x0F, 3], LocationName.cookie_mountain_exit_1: [0x10, 0], LocationName.cookie_mountain_dragon: [0x10, 2], + LocationName.cookie_mountain_hidden_1up: [0x10, 4], LocationName.soda_lake_exit_1: [0x11, 0], LocationName.soda_lake_dragon: [0x11, 2], LocationName.twin_bridges_castle: [0x0E, 0], @@ -410,12 +523,14 @@ location_id_to_level_id = { LocationName.forest_of_illusion_3_exit_1: [0x47, 0], LocationName.forest_of_illusion_3_exit_2: [0x47, 1], LocationName.forest_of_illusion_3_dragon: [0x47, 2], + LocationName.forest_of_illusion_3_hidden_1up: [0x47, 4], LocationName.forest_of_illusion_4_exit_1: [0x43, 0], LocationName.forest_of_illusion_4_exit_2: [0x43, 1], LocationName.forest_of_illusion_4_dragon: [0x43, 2], LocationName.forest_ghost_house_exit_1: [0x41, 0], LocationName.forest_ghost_house_exit_2: [0x41, 1], LocationName.forest_ghost_house_dragon: [0x41, 2], + LocationName.forest_ghost_house_moon: [0x41, 3], LocationName.forest_secret_exit_1: [0x46, 0], LocationName.forest_secret_dragon: [0x46, 2], LocationName.forest_fortress: [0x1F, 0], @@ -427,12 +542,15 @@ location_id_to_level_id = { LocationName.chocolate_island_1_exit_1: [0x22, 0], LocationName.chocolate_island_1_dragon: [0x22, 2], + LocationName.chocolate_island_1_moon: [0x22, 3], LocationName.chocolate_island_2_exit_1: [0x24, 0], LocationName.chocolate_island_2_exit_2: [0x24, 1], LocationName.chocolate_island_2_dragon: [0x24, 2], + LocationName.chocolate_island_2_hidden_1up: [0x24, 4], LocationName.chocolate_island_3_exit_1: [0x23, 0], LocationName.chocolate_island_3_exit_2: [0x23, 1], LocationName.chocolate_island_3_dragon: [0x23, 2], + LocationName.chocolate_island_3_bonus_block: [0x23, 5], LocationName.chocolate_island_4_exit_1: [0x1D, 0], LocationName.chocolate_island_4_dragon: [0x1D, 2], LocationName.chocolate_island_5_exit_1: [0x1C, 0], @@ -442,6 +560,7 @@ location_id_to_level_id = { LocationName.chocolate_fortress: [0x1B, 0], LocationName.chocolate_reznor: [0x1B, 0], LocationName.chocolate_castle: [0x1A, 0], + LocationName.chocolate_castle_hidden_1up: [0x1A, 4], LocationName.chocolate_koopaling: [0x1A, 0], LocationName.sunken_ghost_ship: [0x18, 0], @@ -449,9 +568,11 @@ location_id_to_level_id = { LocationName.valley_of_bowser_1_exit_1: [0x3A, 0], LocationName.valley_of_bowser_1_dragon: [0x3A, 2], + LocationName.valley_of_bowser_1_moon: [0x3A, 3], LocationName.valley_of_bowser_2_exit_1: [0x39, 0], LocationName.valley_of_bowser_2_exit_2: [0x39, 1], LocationName.valley_of_bowser_2_dragon: [0x39, 2], + LocationName.valley_of_bowser_2_hidden_1up: [0x39, 4], LocationName.valley_of_bowser_3_exit_1: [0x37, 0], LocationName.valley_of_bowser_3_dragon: [0x37, 2], LocationName.valley_of_bowser_4_exit_1: [0x33, 0], @@ -464,6 +585,7 @@ location_id_to_level_id = { LocationName.valley_castle: [0x34, 0], LocationName.valley_koopaling: [0x34, 0], LocationName.valley_castle_dragon: [0x34, 2], + LocationName.valley_castle_hidden_1up: [0x34, 4], LocationName.star_road_1_exit_1: [0x58, 0], LocationName.star_road_1_exit_2: [0x58, 1], @@ -479,6 +601,7 @@ location_id_to_level_id = { LocationName.special_zone_1_exit_1: [0x4E, 0], LocationName.special_zone_1_dragon: [0x4E, 2], + LocationName.special_zone_1_hidden_1up: [0x4E, 4], LocationName.special_zone_2_exit_1: [0x4F, 0], LocationName.special_zone_2_dragon: [0x4F, 2], LocationName.special_zone_3_exit_1: [0x50, 0], @@ -493,19 +616,602 @@ location_id_to_level_id = { LocationName.special_zone_7_dragon: [0x4A, 2], LocationName.special_zone_8_exit_1: [0x49, 0], LocationName.special_zone_8_dragon: [0x49, 2], + + LocationName.vanilla_secret_2_yoshi_block_1: [0x01, 100], + LocationName.vanilla_secret_2_green_block_1: [0x01, 101], + LocationName.vanilla_secret_2_powerup_block_1: [0x01, 102], + LocationName.vanilla_secret_2_powerup_block_2: [0x01, 103], + LocationName.vanilla_secret_2_multi_coin_block_1: [0x01, 104], + LocationName.vanilla_secret_2_gray_pow_block_1: [0x01, 105], + LocationName.vanilla_secret_2_coin_block_1: [0x01, 106], + LocationName.vanilla_secret_2_coin_block_2: [0x01, 107], + LocationName.vanilla_secret_2_coin_block_3: [0x01, 108], + LocationName.vanilla_secret_2_coin_block_4: [0x01, 109], + LocationName.vanilla_secret_2_coin_block_5: [0x01, 110], + LocationName.vanilla_secret_2_coin_block_6: [0x01, 111], + LocationName.vanilla_secret_3_powerup_block_1: [0x02, 112], + LocationName.vanilla_secret_3_powerup_block_2: [0x02, 113], + LocationName.donut_ghost_house_vine_block_1: [0x04, 114], + LocationName.donut_ghost_house_directional_coin_block_1: [0x04, 115], + LocationName.donut_ghost_house_life_block_1: [0x04, 116], + LocationName.donut_ghost_house_life_block_2: [0x04, 117], + LocationName.donut_ghost_house_life_block_3: [0x04, 118], + LocationName.donut_ghost_house_life_block_4: [0x04, 119], + LocationName.donut_plains_3_green_block_1: [0x05, 120], + LocationName.donut_plains_3_coin_block_1: [0x05, 121], + LocationName.donut_plains_3_coin_block_2: [0x05, 122], + LocationName.donut_plains_3_vine_block_1: [0x05, 123], + LocationName.donut_plains_3_powerup_block_1: [0x05, 124], + LocationName.donut_plains_3_bonus_block_1: [0x05, 125], + LocationName.donut_plains_4_coin_block_1: [0x06, 126], + LocationName.donut_plains_4_powerup_block_1: [0x06, 127], + LocationName.donut_plains_4_coin_block_2: [0x06, 128], + LocationName.donut_plains_4_yoshi_block_1: [0x06, 129], + LocationName.donut_plains_castle_yellow_block_1: [0x07, 130], + LocationName.donut_plains_castle_coin_block_1: [0x07, 131], + LocationName.donut_plains_castle_powerup_block_1: [0x07, 132], + LocationName.donut_plains_castle_coin_block_2: [0x07, 133], + LocationName.donut_plains_castle_vine_block_1: [0x07, 134], + LocationName.donut_plains_castle_invis_life_block_1: [0x07, 135], + LocationName.donut_plains_castle_coin_block_3: [0x07, 136], + LocationName.donut_plains_castle_coin_block_4: [0x07, 137], + LocationName.donut_plains_castle_coin_block_5: [0x07, 138], + LocationName.donut_plains_castle_green_block_1: [0x07, 139], + LocationName.donut_plains_2_coin_block_1: [0x09, 140], + LocationName.donut_plains_2_coin_block_2: [0x09, 141], + LocationName.donut_plains_2_coin_block_3: [0x09, 142], + LocationName.donut_plains_2_yellow_block_1: [0x09, 143], + LocationName.donut_plains_2_powerup_block_1: [0x09, 144], + LocationName.donut_plains_2_multi_coin_block_1: [0x09, 145], + LocationName.donut_plains_2_flying_block_1: [0x09, 146], + LocationName.donut_plains_2_green_block_1: [0x09, 147], + LocationName.donut_plains_2_yellow_block_2: [0x09, 148], + LocationName.donut_plains_2_vine_block_1: [0x09, 149], + LocationName.donut_secret_1_coin_block_1: [0x0A, 150], + LocationName.donut_secret_1_coin_block_2: [0x0A, 151], + LocationName.donut_secret_1_powerup_block_1: [0x0A, 152], + LocationName.donut_secret_1_coin_block_3: [0x0A, 153], + LocationName.donut_secret_1_powerup_block_2: [0x0A, 154], + LocationName.donut_secret_1_powerup_block_3: [0x0A, 155], + LocationName.donut_secret_1_life_block_1: [0x0A, 156], + LocationName.donut_secret_1_powerup_block_4: [0x0A, 157], + LocationName.donut_secret_1_powerup_block_5: [0x0A, 158], + LocationName.donut_secret_1_key_block_1: [0x0A, 159], + LocationName.vanilla_fortress_powerup_block_1: [0x0B, 160], + LocationName.vanilla_fortress_powerup_block_2: [0x0B, 161], + LocationName.vanilla_fortress_yellow_block_1: [0x0B, 162], + LocationName.butter_bridge_1_powerup_block_1: [0x0C, 163], + LocationName.butter_bridge_1_multi_coin_block_1: [0x0C, 164], + LocationName.butter_bridge_1_multi_coin_block_2: [0x0C, 165], + LocationName.butter_bridge_1_multi_coin_block_3: [0x0C, 166], + LocationName.butter_bridge_1_life_block_1: [0x0C, 167], + LocationName.butter_bridge_1_bonus_block_1: [0x0C, 168], + LocationName.butter_bridge_2_powerup_block_1: [0x0D, 169], + LocationName.butter_bridge_2_green_block_1: [0x0D, 170], + LocationName.butter_bridge_2_yoshi_block_1: [0x0D, 171], + LocationName.twin_bridges_castle_powerup_block_1: [0x0E, 172], + LocationName.cheese_bridge_powerup_block_1: [0x0F, 173], + LocationName.cheese_bridge_powerup_block_2: [0x0F, 174], + LocationName.cheese_bridge_wings_block_1: [0x0F, 175], + LocationName.cheese_bridge_powerup_block_3: [0x0F, 176], + LocationName.cookie_mountain_coin_block_1: [0x10, 177], + LocationName.cookie_mountain_coin_block_2: [0x10, 178], + LocationName.cookie_mountain_coin_block_3: [0x10, 179], + LocationName.cookie_mountain_coin_block_4: [0x10, 180], + LocationName.cookie_mountain_coin_block_5: [0x10, 181], + LocationName.cookie_mountain_coin_block_6: [0x10, 182], + LocationName.cookie_mountain_coin_block_7: [0x10, 183], + LocationName.cookie_mountain_coin_block_8: [0x10, 184], + LocationName.cookie_mountain_coin_block_9: [0x10, 185], + LocationName.cookie_mountain_powerup_block_1: [0x10, 186], + LocationName.cookie_mountain_life_block_1: [0x10, 187], + LocationName.cookie_mountain_vine_block_1: [0x10, 188], + LocationName.cookie_mountain_yoshi_block_1: [0x10, 189], + LocationName.cookie_mountain_coin_block_10: [0x10, 190], + LocationName.cookie_mountain_coin_block_11: [0x10, 191], + LocationName.cookie_mountain_powerup_block_2: [0x10, 192], + LocationName.cookie_mountain_coin_block_12: [0x10, 193], + LocationName.cookie_mountain_coin_block_13: [0x10, 194], + LocationName.cookie_mountain_coin_block_14: [0x10, 195], + LocationName.cookie_mountain_coin_block_15: [0x10, 196], + LocationName.cookie_mountain_coin_block_16: [0x10, 197], + LocationName.cookie_mountain_coin_block_17: [0x10, 198], + LocationName.cookie_mountain_coin_block_18: [0x10, 199], + LocationName.cookie_mountain_coin_block_19: [0x10, 200], + LocationName.cookie_mountain_coin_block_20: [0x10, 201], + LocationName.cookie_mountain_coin_block_21: [0x10, 202], + LocationName.cookie_mountain_coin_block_22: [0x10, 203], + LocationName.cookie_mountain_coin_block_23: [0x10, 204], + LocationName.cookie_mountain_coin_block_24: [0x10, 205], + LocationName.cookie_mountain_coin_block_25: [0x10, 206], + LocationName.cookie_mountain_coin_block_26: [0x10, 207], + LocationName.cookie_mountain_coin_block_27: [0x10, 208], + LocationName.cookie_mountain_coin_block_28: [0x10, 209], + LocationName.cookie_mountain_coin_block_29: [0x10, 210], + LocationName.cookie_mountain_coin_block_30: [0x10, 211], + LocationName.soda_lake_powerup_block_1: [0x11, 212], + LocationName.donut_secret_house_powerup_block_1: [0x13, 213], + LocationName.donut_secret_house_multi_coin_block_1: [0x13, 214], + LocationName.donut_secret_house_life_block_1: [0x13, 215], + LocationName.donut_secret_house_vine_block_1: [0x13, 216], + LocationName.donut_secret_house_directional_coin_block_1: [0x13, 217], + LocationName.donut_plains_1_coin_block_1: [0x15, 218], + LocationName.donut_plains_1_coin_block_2: [0x15, 219], + LocationName.donut_plains_1_yoshi_block_1: [0x15, 220], + LocationName.donut_plains_1_vine_block_1: [0x15, 221], + LocationName.donut_plains_1_green_block_1: [0x15, 222], + LocationName.donut_plains_1_green_block_2: [0x15, 223], + LocationName.donut_plains_1_green_block_3: [0x15, 224], + LocationName.donut_plains_1_green_block_4: [0x15, 225], + LocationName.donut_plains_1_green_block_5: [0x15, 226], + LocationName.donut_plains_1_green_block_6: [0x15, 227], + LocationName.donut_plains_1_green_block_7: [0x15, 228], + LocationName.donut_plains_1_green_block_8: [0x15, 229], + LocationName.donut_plains_1_green_block_9: [0x15, 230], + LocationName.donut_plains_1_green_block_10: [0x15, 231], + LocationName.donut_plains_1_green_block_11: [0x15, 232], + LocationName.donut_plains_1_green_block_12: [0x15, 233], + LocationName.donut_plains_1_green_block_13: [0x15, 234], + LocationName.donut_plains_1_green_block_14: [0x15, 235], + LocationName.donut_plains_1_green_block_15: [0x15, 236], + LocationName.donut_plains_1_green_block_16: [0x15, 237], + LocationName.donut_plains_1_yellow_block_1: [0x15, 238], + LocationName.donut_plains_1_yellow_block_2: [0x15, 239], + LocationName.donut_plains_1_yellow_block_3: [0x15, 240], + LocationName.sunken_ghost_ship_powerup_block_1: [0x18, 241], + LocationName.sunken_ghost_ship_star_block_1: [0x18, 242], + LocationName.chocolate_castle_yellow_block_1: [0x1A, 243], + LocationName.chocolate_castle_yellow_block_2: [0x1A, 244], + LocationName.chocolate_castle_green_block_1: [0x1A, 245], + LocationName.chocolate_fortress_powerup_block_1: [0x1B, 246], + LocationName.chocolate_fortress_powerup_block_2: [0x1B, 247], + LocationName.chocolate_fortress_coin_block_1: [0x1B, 248], + LocationName.chocolate_fortress_coin_block_2: [0x1B, 249], + LocationName.chocolate_fortress_green_block_1: [0x1B, 250], + LocationName.chocolate_island_5_yoshi_block_1: [0x1C, 251], + LocationName.chocolate_island_5_powerup_block_1: [0x1C, 252], + LocationName.chocolate_island_5_life_block_1: [0x1C, 253], + LocationName.chocolate_island_5_yellow_block_1: [0x1C, 254], + LocationName.chocolate_island_4_yellow_block_1: [0x1D, 255], + LocationName.chocolate_island_4_blue_pow_block_1: [0x1D, 256], + LocationName.chocolate_island_4_powerup_block_1: [0x1D, 257], + LocationName.forest_fortress_yellow_block_1: [0x1F, 258], + LocationName.forest_fortress_powerup_block_1: [0x1F, 259], + LocationName.forest_fortress_life_block_1: [0x1F, 260], + LocationName.forest_fortress_life_block_2: [0x1F, 261], + LocationName.forest_fortress_life_block_3: [0x1F, 262], + LocationName.forest_fortress_life_block_4: [0x1F, 263], + LocationName.forest_fortress_life_block_5: [0x1F, 264], + LocationName.forest_fortress_life_block_6: [0x1F, 265], + LocationName.forest_fortress_life_block_7: [0x1F, 266], + LocationName.forest_fortress_life_block_8: [0x1F, 267], + LocationName.forest_fortress_life_block_9: [0x1F, 268], + LocationName.forest_castle_green_block_1: [0x20, 269], + LocationName.chocolate_ghost_house_powerup_block_1: [0x21, 270], + LocationName.chocolate_ghost_house_powerup_block_2: [0x21, 271], + LocationName.chocolate_ghost_house_life_block_1: [0x21, 272], + LocationName.chocolate_island_1_flying_block_1: [0x22, 273], + LocationName.chocolate_island_1_flying_block_2: [0x22, 274], + LocationName.chocolate_island_1_yoshi_block_1: [0x22, 275], + LocationName.chocolate_island_1_green_block_1: [0x22, 276], + LocationName.chocolate_island_1_life_block_1: [0x22, 277], + LocationName.chocolate_island_3_powerup_block_1: [0x23, 278], + LocationName.chocolate_island_3_powerup_block_2: [0x23, 279], + LocationName.chocolate_island_3_powerup_block_3: [0x23, 280], + LocationName.chocolate_island_3_green_block_1: [0x23, 281], + LocationName.chocolate_island_3_bonus_block_1: [0x23, 282], + LocationName.chocolate_island_3_vine_block_1: [0x23, 283], + LocationName.chocolate_island_3_life_block_1: [0x23, 284], + LocationName.chocolate_island_3_life_block_2: [0x23, 285], + LocationName.chocolate_island_3_life_block_3: [0x23, 286], + LocationName.chocolate_island_2_multi_coin_block_1: [0x24, 287], + LocationName.chocolate_island_2_invis_coin_block_1: [0x24, 288], + LocationName.chocolate_island_2_yoshi_block_1: [0x24, 289], + LocationName.chocolate_island_2_coin_block_1: [0x24, 290], + LocationName.chocolate_island_2_coin_block_2: [0x24, 291], + LocationName.chocolate_island_2_multi_coin_block_2: [0x24, 292], + LocationName.chocolate_island_2_powerup_block_1: [0x24, 293], + LocationName.chocolate_island_2_blue_pow_block_1: [0x24, 294], + LocationName.chocolate_island_2_yellow_block_1: [0x24, 295], + LocationName.chocolate_island_2_yellow_block_2: [0x24, 296], + LocationName.chocolate_island_2_green_block_1: [0x24, 297], + LocationName.chocolate_island_2_green_block_2: [0x24, 298], + LocationName.chocolate_island_2_green_block_3: [0x24, 299], + LocationName.chocolate_island_2_green_block_4: [0x24, 300], + LocationName.chocolate_island_2_green_block_5: [0x24, 301], + LocationName.chocolate_island_2_green_block_6: [0x24, 302], + LocationName.yoshis_island_castle_coin_block_1: [0x25, 303], + LocationName.yoshis_island_castle_coin_block_2: [0x25, 304], + LocationName.yoshis_island_castle_powerup_block_1: [0x25, 305], + LocationName.yoshis_island_castle_coin_block_3: [0x25, 306], + LocationName.yoshis_island_castle_coin_block_4: [0x25, 307], + LocationName.yoshis_island_castle_flying_block_1: [0x25, 308], + LocationName.yoshis_island_4_yellow_block_1: [0x26, 309], + LocationName.yoshis_island_4_powerup_block_1: [0x26, 310], + LocationName.yoshis_island_4_multi_coin_block_1: [0x26, 311], + LocationName.yoshis_island_4_star_block_1: [0x26, 312], + LocationName.yoshis_island_3_yellow_block_1: [0x27, 313], + LocationName.yoshis_island_3_yellow_block_2: [0x27, 314], + LocationName.yoshis_island_3_yellow_block_3: [0x27, 315], + LocationName.yoshis_island_3_yellow_block_4: [0x27, 316], + LocationName.yoshis_island_3_yellow_block_5: [0x27, 317], + LocationName.yoshis_island_3_yellow_block_6: [0x27, 318], + LocationName.yoshis_island_3_yellow_block_7: [0x27, 319], + LocationName.yoshis_island_3_yellow_block_8: [0x27, 320], + LocationName.yoshis_island_3_yellow_block_9: [0x27, 321], + LocationName.yoshis_island_3_coin_block_1: [0x27, 322], + LocationName.yoshis_island_3_yoshi_block_1: [0x27, 323], + LocationName.yoshis_island_3_coin_block_2: [0x27, 324], + LocationName.yoshis_island_3_powerup_block_1: [0x27, 325], + LocationName.yoshis_island_3_yellow_block_10: [0x27, 326], + LocationName.yoshis_island_3_yellow_block_11: [0x27, 327], + LocationName.yoshis_island_3_yellow_block_12: [0x27, 328], + LocationName.yoshis_island_3_bonus_block_1: [0x27, 329], + LocationName.yoshis_island_1_flying_block_1: [0x29, 330], + LocationName.yoshis_island_1_yellow_block_1: [0x29, 331], + LocationName.yoshis_island_1_life_block_1: [0x29, 332], + LocationName.yoshis_island_1_powerup_block_1: [0x29, 333], + LocationName.yoshis_island_2_flying_block_1: [0x2A, 334], + LocationName.yoshis_island_2_flying_block_2: [0x2A, 335], + LocationName.yoshis_island_2_flying_block_3: [0x2A, 336], + LocationName.yoshis_island_2_flying_block_4: [0x2A, 337], + LocationName.yoshis_island_2_flying_block_5: [0x2A, 338], + LocationName.yoshis_island_2_flying_block_6: [0x2A, 339], + LocationName.yoshis_island_2_coin_block_1: [0x2A, 340], + LocationName.yoshis_island_2_yellow_block_1: [0x2A, 341], + LocationName.yoshis_island_2_coin_block_2: [0x2A, 342], + LocationName.yoshis_island_2_coin_block_3: [0x2A, 343], + LocationName.yoshis_island_2_yoshi_block_1: [0x2A, 344], + LocationName.yoshis_island_2_coin_block_4: [0x2A, 345], + LocationName.yoshis_island_2_yoshi_block_2: [0x2A, 346], + LocationName.yoshis_island_2_coin_block_5: [0x2A, 347], + LocationName.yoshis_island_2_vine_block_1: [0x2A, 348], + LocationName.yoshis_island_2_yellow_block_2: [0x2A, 349], + LocationName.vanilla_ghost_house_powerup_block_1: [0x2B, 350], + LocationName.vanilla_ghost_house_vine_block_1: [0x2B, 351], + LocationName.vanilla_ghost_house_powerup_block_2: [0x2B, 352], + LocationName.vanilla_ghost_house_multi_coin_block_1: [0x2B, 353], + LocationName.vanilla_ghost_house_blue_pow_block_1: [0x2B, 354], + LocationName.vanilla_secret_1_coin_block_1: [0x2D, 355], + LocationName.vanilla_secret_1_powerup_block_1: [0x2D, 356], + LocationName.vanilla_secret_1_multi_coin_block_1: [0x2D, 357], + LocationName.vanilla_secret_1_vine_block_1: [0x2D, 358], + LocationName.vanilla_secret_1_vine_block_2: [0x2D, 359], + LocationName.vanilla_secret_1_coin_block_2: [0x2D, 360], + LocationName.vanilla_secret_1_coin_block_3: [0x2D, 361], + LocationName.vanilla_secret_1_powerup_block_2: [0x2D, 362], + LocationName.vanilla_dome_3_coin_block_1: [0x2E, 363], + LocationName.vanilla_dome_3_flying_block_1: [0x2E, 364], + LocationName.vanilla_dome_3_flying_block_2: [0x2E, 365], + LocationName.vanilla_dome_3_powerup_block_1: [0x2E, 366], + LocationName.vanilla_dome_3_flying_block_3: [0x2E, 367], + LocationName.vanilla_dome_3_invis_coin_block_1: [0x2E, 368], + LocationName.vanilla_dome_3_powerup_block_2: [0x2E, 369], + LocationName.vanilla_dome_3_multi_coin_block_1: [0x2E, 370], + LocationName.vanilla_dome_3_powerup_block_3: [0x2E, 371], + LocationName.vanilla_dome_3_yoshi_block_1: [0x2E, 372], + LocationName.vanilla_dome_3_powerup_block_4: [0x2E, 373], + LocationName.vanilla_dome_3_pswitch_coin_block_1: [0x2E, 374], + LocationName.vanilla_dome_3_pswitch_coin_block_2: [0x2E, 375], + LocationName.vanilla_dome_3_pswitch_coin_block_3: [0x2E, 376], + LocationName.vanilla_dome_3_pswitch_coin_block_4: [0x2E, 377], + LocationName.vanilla_dome_3_pswitch_coin_block_5: [0x2E, 378], + LocationName.vanilla_dome_3_pswitch_coin_block_6: [0x2E, 379], + LocationName.donut_secret_2_directional_coin_block_1: [0x2F, 380], + LocationName.donut_secret_2_vine_block_1: [0x2F, 381], + LocationName.donut_secret_2_star_block_1: [0x2F, 382], + LocationName.donut_secret_2_powerup_block_1: [0x2F, 383], + LocationName.donut_secret_2_star_block_2: [0x2F, 384], + LocationName.valley_of_bowser_4_yellow_block_1: [0x33, 385], + LocationName.valley_of_bowser_4_powerup_block_1: [0x33, 386], + LocationName.valley_of_bowser_4_vine_block_1: [0x33, 387], + LocationName.valley_of_bowser_4_yoshi_block_1: [0x33, 388], + LocationName.valley_of_bowser_4_life_block_1: [0x33, 389], + LocationName.valley_of_bowser_4_powerup_block_2: [0x33, 390], + LocationName.valley_castle_yellow_block_1: [0x34, 391], + LocationName.valley_castle_yellow_block_2: [0x34, 392], + LocationName.valley_castle_green_block_1: [0x34, 393], + LocationName.valley_fortress_green_block_1: [0x35, 394], + LocationName.valley_fortress_yellow_block_1: [0x35, 395], + LocationName.valley_of_bowser_3_powerup_block_1: [0x37, 396], + LocationName.valley_of_bowser_3_powerup_block_2: [0x37, 397], + LocationName.valley_ghost_house_pswitch_coin_block_1: [0x38, 398], + LocationName.valley_ghost_house_multi_coin_block_1: [0x38, 399], + LocationName.valley_ghost_house_powerup_block_1: [0x38, 400], + LocationName.valley_ghost_house_directional_coin_block_1: [0x38, 401], + LocationName.valley_of_bowser_2_powerup_block_1: [0x39, 402], + LocationName.valley_of_bowser_2_yellow_block_1: [0x39, 403], + LocationName.valley_of_bowser_2_powerup_block_2: [0x39, 404], + LocationName.valley_of_bowser_2_wings_block_1: [0x39, 405], + LocationName.valley_of_bowser_1_green_block_1: [0x3A, 406], + LocationName.valley_of_bowser_1_invis_coin_block_1: [0x3A, 407], + LocationName.valley_of_bowser_1_invis_coin_block_2: [0x3A, 408], + LocationName.valley_of_bowser_1_invis_coin_block_3: [0x3A, 409], + LocationName.valley_of_bowser_1_yellow_block_1: [0x3A, 410], + LocationName.valley_of_bowser_1_yellow_block_2: [0x3A, 411], + LocationName.valley_of_bowser_1_yellow_block_3: [0x3A, 412], + LocationName.valley_of_bowser_1_yellow_block_4: [0x3A, 413], + LocationName.valley_of_bowser_1_vine_block_1: [0x3A, 414], + LocationName.chocolate_secret_powerup_block_1: [0x3B, 415], + LocationName.chocolate_secret_powerup_block_2: [0x3B, 416], + LocationName.vanilla_dome_2_coin_block_1: [0x3C, 417], + LocationName.vanilla_dome_2_powerup_block_1: [0x3C, 418], + LocationName.vanilla_dome_2_coin_block_2: [0x3C, 419], + LocationName.vanilla_dome_2_coin_block_3: [0x3C, 420], + LocationName.vanilla_dome_2_vine_block_1: [0x3C, 421], + LocationName.vanilla_dome_2_invis_life_block_1: [0x3C, 422], + LocationName.vanilla_dome_2_coin_block_4: [0x3C, 423], + LocationName.vanilla_dome_2_coin_block_5: [0x3C, 424], + LocationName.vanilla_dome_2_powerup_block_2: [0x3C, 425], + LocationName.vanilla_dome_2_powerup_block_3: [0x3C, 426], + LocationName.vanilla_dome_2_powerup_block_4: [0x3C, 427], + LocationName.vanilla_dome_2_powerup_block_5: [0x3C, 428], + LocationName.vanilla_dome_2_multi_coin_block_1: [0x3C, 429], + LocationName.vanilla_dome_2_multi_coin_block_2: [0x3C, 430], + LocationName.vanilla_dome_4_powerup_block_1: [0x3D, 431], + LocationName.vanilla_dome_4_powerup_block_2: [0x3D, 432], + LocationName.vanilla_dome_4_coin_block_1: [0x3D, 433], + LocationName.vanilla_dome_4_coin_block_2: [0x3D, 434], + LocationName.vanilla_dome_4_coin_block_3: [0x3D, 435], + LocationName.vanilla_dome_4_life_block_1: [0x3D, 436], + LocationName.vanilla_dome_4_coin_block_4: [0x3D, 437], + LocationName.vanilla_dome_4_coin_block_5: [0x3D, 438], + LocationName.vanilla_dome_4_coin_block_6: [0x3D, 439], + LocationName.vanilla_dome_4_coin_block_7: [0x3D, 440], + LocationName.vanilla_dome_4_coin_block_8: [0x3D, 441], + LocationName.vanilla_dome_1_flying_block_1: [0x3E, 442], + LocationName.vanilla_dome_1_powerup_block_1: [0x3E, 443], + LocationName.vanilla_dome_1_powerup_block_2: [0x3E, 444], + LocationName.vanilla_dome_1_coin_block_1: [0x3E, 445], + LocationName.vanilla_dome_1_life_block_1: [0x3E, 446], + LocationName.vanilla_dome_1_powerup_block_3: [0x3E, 447], + LocationName.vanilla_dome_1_vine_block_1: [0x3E, 448], + LocationName.vanilla_dome_1_star_block_1: [0x3E, 449], + LocationName.vanilla_dome_1_powerup_block_4: [0x3E, 450], + LocationName.vanilla_dome_1_coin_block_2: [0x3E, 451], + LocationName.vanilla_dome_castle_life_block_1: [0x40, 452], + LocationName.vanilla_dome_castle_life_block_2: [0x40, 453], + LocationName.vanilla_dome_castle_powerup_block_1: [0x40, 454], + LocationName.vanilla_dome_castle_life_block_3: [0x40, 455], + LocationName.vanilla_dome_castle_green_block_1: [0x40, 456], + LocationName.forest_ghost_house_coin_block_1: [0x41, 457], + LocationName.forest_ghost_house_powerup_block_1: [0x41, 458], + LocationName.forest_ghost_house_flying_block_1: [0x41, 459], + LocationName.forest_ghost_house_powerup_block_2: [0x41, 460], + LocationName.forest_ghost_house_life_block_1: [0x41, 461], + LocationName.forest_of_illusion_1_powerup_block_1: [0x42, 462], + LocationName.forest_of_illusion_1_yoshi_block_1: [0x42, 463], + LocationName.forest_of_illusion_1_powerup_block_2: [0x42, 464], + LocationName.forest_of_illusion_1_key_block_1: [0x42, 465], + LocationName.forest_of_illusion_1_life_block_1: [0x42, 466], + LocationName.forest_of_illusion_4_multi_coin_block_1: [0x43, 467], + LocationName.forest_of_illusion_4_coin_block_1: [0x43, 468], + LocationName.forest_of_illusion_4_coin_block_2: [0x43, 469], + LocationName.forest_of_illusion_4_coin_block_3: [0x43, 470], + LocationName.forest_of_illusion_4_coin_block_4: [0x43, 471], + LocationName.forest_of_illusion_4_powerup_block_1: [0x43, 472], + LocationName.forest_of_illusion_4_coin_block_5: [0x43, 473], + LocationName.forest_of_illusion_4_coin_block_6: [0x43, 474], + LocationName.forest_of_illusion_4_coin_block_7: [0x43, 475], + LocationName.forest_of_illusion_4_powerup_block_2: [0x43, 476], + LocationName.forest_of_illusion_4_coin_block_8: [0x43, 477], + LocationName.forest_of_illusion_4_coin_block_9: [0x43, 478], + LocationName.forest_of_illusion_4_coin_block_10: [0x43, 479], + LocationName.forest_of_illusion_2_green_block_1: [0x44, 480], + LocationName.forest_of_illusion_2_powerup_block_1: [0x44, 481], + LocationName.forest_of_illusion_2_invis_coin_block_1: [0x44, 482], + LocationName.forest_of_illusion_2_invis_coin_block_2: [0x44, 483], + LocationName.forest_of_illusion_2_invis_life_block_1: [0x44, 484], + LocationName.forest_of_illusion_2_invis_coin_block_3: [0x44, 485], + LocationName.forest_of_illusion_2_yellow_block_1: [0x44, 486], + LocationName.forest_secret_powerup_block_1: [0x46, 487], + LocationName.forest_secret_powerup_block_2: [0x46, 488], + LocationName.forest_secret_life_block_1: [0x46, 489], + LocationName.forest_of_illusion_3_yoshi_block_1: [0x47, 490], + LocationName.forest_of_illusion_3_coin_block_1: [0x47, 491], + LocationName.forest_of_illusion_3_multi_coin_block_1: [0x47, 492], + LocationName.forest_of_illusion_3_coin_block_2: [0x47, 493], + LocationName.forest_of_illusion_3_multi_coin_block_2: [0x47, 494], + LocationName.forest_of_illusion_3_coin_block_3: [0x47, 495], + LocationName.forest_of_illusion_3_coin_block_4: [0x47, 496], + LocationName.forest_of_illusion_3_coin_block_5: [0x47, 497], + LocationName.forest_of_illusion_3_coin_block_6: [0x47, 498], + LocationName.forest_of_illusion_3_coin_block_7: [0x47, 499], + LocationName.forest_of_illusion_3_coin_block_8: [0x47, 500], + LocationName.forest_of_illusion_3_coin_block_9: [0x47, 501], + LocationName.forest_of_illusion_3_coin_block_10: [0x47, 502], + LocationName.forest_of_illusion_3_coin_block_11: [0x47, 503], + LocationName.forest_of_illusion_3_coin_block_12: [0x47, 504], + LocationName.forest_of_illusion_3_coin_block_13: [0x47, 505], + LocationName.forest_of_illusion_3_coin_block_14: [0x47, 506], + LocationName.forest_of_illusion_3_coin_block_15: [0x47, 507], + LocationName.forest_of_illusion_3_coin_block_16: [0x47, 508], + LocationName.forest_of_illusion_3_coin_block_17: [0x47, 509], + LocationName.forest_of_illusion_3_coin_block_18: [0x47, 510], + LocationName.forest_of_illusion_3_coin_block_19: [0x47, 511], + LocationName.forest_of_illusion_3_coin_block_20: [0x47, 512], + LocationName.forest_of_illusion_3_coin_block_21: [0x47, 513], + LocationName.forest_of_illusion_3_coin_block_22: [0x47, 514], + LocationName.forest_of_illusion_3_coin_block_23: [0x47, 515], + LocationName.forest_of_illusion_3_coin_block_24: [0x47, 516], + LocationName.special_zone_8_yoshi_block_1: [0x49, 517], + LocationName.special_zone_8_coin_block_1: [0x49, 518], + LocationName.special_zone_8_coin_block_2: [0x49, 519], + LocationName.special_zone_8_coin_block_3: [0x49, 520], + LocationName.special_zone_8_coin_block_4: [0x49, 521], + LocationName.special_zone_8_coin_block_5: [0x49, 522], + LocationName.special_zone_8_blue_pow_block_1: [0x49, 523], + LocationName.special_zone_8_powerup_block_1: [0x49, 524], + LocationName.special_zone_8_star_block_1: [0x49, 525], + LocationName.special_zone_8_coin_block_6: [0x49, 526], + LocationName.special_zone_8_coin_block_7: [0x49, 527], + LocationName.special_zone_8_coin_block_8: [0x49, 528], + LocationName.special_zone_8_coin_block_9: [0x49, 529], + LocationName.special_zone_8_coin_block_10: [0x49, 530], + LocationName.special_zone_8_coin_block_11: [0x49, 531], + LocationName.special_zone_8_coin_block_12: [0x49, 532], + LocationName.special_zone_8_coin_block_13: [0x49, 533], + LocationName.special_zone_8_coin_block_14: [0x49, 534], + LocationName.special_zone_8_coin_block_15: [0x49, 535], + LocationName.special_zone_8_coin_block_16: [0x49, 536], + LocationName.special_zone_8_coin_block_17: [0x49, 537], + LocationName.special_zone_8_coin_block_18: [0x49, 538], + LocationName.special_zone_8_multi_coin_block_1: [0x49, 539], + LocationName.special_zone_8_coin_block_19: [0x49, 540], + LocationName.special_zone_8_coin_block_20: [0x49, 541], + LocationName.special_zone_8_coin_block_21: [0x49, 542], + LocationName.special_zone_8_coin_block_22: [0x49, 543], + LocationName.special_zone_8_coin_block_23: [0x49, 544], + LocationName.special_zone_8_powerup_block_2: [0x49, 545], + LocationName.special_zone_8_flying_block_1: [0x49, 546], + LocationName.special_zone_7_powerup_block_1: [0x4A, 547], + LocationName.special_zone_7_yoshi_block_1: [0x4A, 548], + LocationName.special_zone_7_coin_block_1: [0x4A, 549], + LocationName.special_zone_7_powerup_block_2: [0x4A, 550], + LocationName.special_zone_7_coin_block_2: [0x4A, 551], + LocationName.special_zone_6_powerup_block_1: [0x4B, 552], + LocationName.special_zone_6_coin_block_1: [0x4B, 553], + LocationName.special_zone_6_coin_block_2: [0x4B, 554], + LocationName.special_zone_6_yoshi_block_1: [0x4B, 555], + LocationName.special_zone_6_life_block_1: [0x4B, 556], + LocationName.special_zone_6_multi_coin_block_1: [0x4B, 557], + LocationName.special_zone_6_coin_block_3: [0x4B, 558], + LocationName.special_zone_6_coin_block_4: [0x4B, 559], + LocationName.special_zone_6_coin_block_5: [0x4B, 560], + LocationName.special_zone_6_coin_block_6: [0x4B, 561], + LocationName.special_zone_6_coin_block_7: [0x4B, 562], + LocationName.special_zone_6_coin_block_8: [0x4B, 563], + LocationName.special_zone_6_coin_block_9: [0x4B, 564], + LocationName.special_zone_6_coin_block_10: [0x4B, 565], + LocationName.special_zone_6_coin_block_11: [0x4B, 566], + LocationName.special_zone_6_coin_block_12: [0x4B, 567], + LocationName.special_zone_6_coin_block_13: [0x4B, 568], + LocationName.special_zone_6_coin_block_14: [0x4B, 569], + LocationName.special_zone_6_coin_block_15: [0x4B, 570], + LocationName.special_zone_6_coin_block_16: [0x4B, 571], + LocationName.special_zone_6_coin_block_17: [0x4B, 572], + LocationName.special_zone_6_coin_block_18: [0x4B, 573], + LocationName.special_zone_6_coin_block_19: [0x4B, 574], + LocationName.special_zone_6_coin_block_20: [0x4B, 575], + LocationName.special_zone_6_coin_block_21: [0x4B, 576], + LocationName.special_zone_6_coin_block_22: [0x4B, 577], + LocationName.special_zone_6_coin_block_23: [0x4B, 578], + LocationName.special_zone_6_coin_block_24: [0x4B, 579], + LocationName.special_zone_6_coin_block_25: [0x4B, 580], + LocationName.special_zone_6_coin_block_26: [0x4B, 581], + LocationName.special_zone_6_coin_block_27: [0x4B, 582], + LocationName.special_zone_6_coin_block_28: [0x4B, 583], + LocationName.special_zone_6_powerup_block_2: [0x4B, 584], + LocationName.special_zone_6_coin_block_29: [0x4B, 585], + LocationName.special_zone_6_coin_block_30: [0x4B, 586], + LocationName.special_zone_6_coin_block_31: [0x4B, 587], + LocationName.special_zone_6_coin_block_32: [0x4B, 588], + LocationName.special_zone_6_coin_block_33: [0x4B, 589], + LocationName.special_zone_5_yoshi_block_1: [0x4C, 590], + LocationName.special_zone_1_vine_block_1: [0x4E, 591], + LocationName.special_zone_1_vine_block_2: [0x4E, 592], + LocationName.special_zone_1_vine_block_3: [0x4E, 593], + LocationName.special_zone_1_vine_block_4: [0x4E, 594], + LocationName.special_zone_1_life_block_1: [0x4E, 595], + LocationName.special_zone_1_vine_block_5: [0x4E, 596], + LocationName.special_zone_1_blue_pow_block_1: [0x4E, 597], + LocationName.special_zone_1_vine_block_6: [0x4E, 598], + LocationName.special_zone_1_powerup_block_1: [0x4E, 599], + LocationName.special_zone_1_pswitch_coin_block_1: [0x4E, 600], + LocationName.special_zone_1_pswitch_coin_block_2: [0x4E, 601], + LocationName.special_zone_1_pswitch_coin_block_3: [0x4E, 602], + LocationName.special_zone_1_pswitch_coin_block_4: [0x4E, 603], + LocationName.special_zone_1_pswitch_coin_block_5: [0x4E, 604], + LocationName.special_zone_1_pswitch_coin_block_6: [0x4E, 605], + LocationName.special_zone_1_pswitch_coin_block_7: [0x4E, 606], + LocationName.special_zone_1_pswitch_coin_block_8: [0x4E, 607], + LocationName.special_zone_1_pswitch_coin_block_9: [0x4E, 608], + LocationName.special_zone_1_pswitch_coin_block_10: [0x4E, 609], + LocationName.special_zone_1_pswitch_coin_block_11: [0x4E, 610], + LocationName.special_zone_1_pswitch_coin_block_12: [0x4E, 611], + LocationName.special_zone_1_pswitch_coin_block_13: [0x4E, 612], + LocationName.special_zone_2_powerup_block_1: [0x4F, 613], + LocationName.special_zone_2_coin_block_1: [0x4F, 614], + LocationName.special_zone_2_coin_block_2: [0x4F, 615], + LocationName.special_zone_2_powerup_block_2: [0x4F, 616], + LocationName.special_zone_2_coin_block_3: [0x4F, 617], + LocationName.special_zone_2_coin_block_4: [0x4F, 618], + LocationName.special_zone_2_powerup_block_3: [0x4F, 619], + LocationName.special_zone_2_multi_coin_block_1: [0x4F, 620], + LocationName.special_zone_2_coin_block_5: [0x4F, 621], + LocationName.special_zone_2_coin_block_6: [0x4F, 622], + LocationName.special_zone_3_powerup_block_1: [0x50, 623], + LocationName.special_zone_3_yoshi_block_1: [0x50, 624], + LocationName.special_zone_3_wings_block_1: [0x50, 625], + LocationName.special_zone_4_powerup_block_1: [0x51, 626], + LocationName.special_zone_4_star_block_1: [0x51, 627], + LocationName.star_road_2_star_block_1: [0x54, 628], + LocationName.star_road_3_key_block_1: [0x56, 629], + LocationName.star_road_4_powerup_block_1: [0x59, 630], + LocationName.star_road_4_green_block_1: [0x59, 631], + LocationName.star_road_4_green_block_2: [0x59, 632], + LocationName.star_road_4_green_block_3: [0x59, 633], + LocationName.star_road_4_green_block_4: [0x59, 634], + LocationName.star_road_4_green_block_5: [0x59, 635], + LocationName.star_road_4_green_block_6: [0x59, 636], + LocationName.star_road_4_green_block_7: [0x59, 637], + LocationName.star_road_4_key_block_1: [0x59, 638], + LocationName.star_road_5_directional_coin_block_1: [0x5A, 639], + LocationName.star_road_5_life_block_1: [0x5A, 640], + LocationName.star_road_5_vine_block_1: [0x5A, 641], + LocationName.star_road_5_yellow_block_1: [0x5A, 642], + LocationName.star_road_5_yellow_block_2: [0x5A, 643], + LocationName.star_road_5_yellow_block_3: [0x5A, 644], + LocationName.star_road_5_yellow_block_4: [0x5A, 645], + LocationName.star_road_5_yellow_block_5: [0x5A, 646], + LocationName.star_road_5_yellow_block_6: [0x5A, 647], + LocationName.star_road_5_yellow_block_7: [0x5A, 648], + LocationName.star_road_5_yellow_block_8: [0x5A, 649], + LocationName.star_road_5_yellow_block_9: [0x5A, 650], + LocationName.star_road_5_yellow_block_10: [0x5A, 651], + LocationName.star_road_5_yellow_block_11: [0x5A, 652], + LocationName.star_road_5_yellow_block_12: [0x5A, 653], + LocationName.star_road_5_yellow_block_13: [0x5A, 654], + LocationName.star_road_5_yellow_block_14: [0x5A, 655], + LocationName.star_road_5_yellow_block_15: [0x5A, 656], + LocationName.star_road_5_yellow_block_16: [0x5A, 657], + LocationName.star_road_5_yellow_block_17: [0x5A, 658], + LocationName.star_road_5_yellow_block_18: [0x5A, 659], + LocationName.star_road_5_yellow_block_19: [0x5A, 660], + LocationName.star_road_5_yellow_block_20: [0x5A, 661], + LocationName.star_road_5_green_block_1: [0x5A, 662], + LocationName.star_road_5_green_block_2: [0x5A, 663], + LocationName.star_road_5_green_block_3: [0x5A, 664], + LocationName.star_road_5_green_block_4: [0x5A, 665], + LocationName.star_road_5_green_block_5: [0x5A, 666], + LocationName.star_road_5_green_block_6: [0x5A, 667], + LocationName.star_road_5_green_block_7: [0x5A, 668], + LocationName.star_road_5_green_block_8: [0x5A, 669], + LocationName.star_road_5_green_block_9: [0x5A, 670], + LocationName.star_road_5_green_block_10: [0x5A, 671], + LocationName.star_road_5_green_block_11: [0x5A, 672], + LocationName.star_road_5_green_block_12: [0x5A, 673], + LocationName.star_road_5_green_block_13: [0x5A, 674], + LocationName.star_road_5_green_block_14: [0x5A, 675], + LocationName.star_road_5_green_block_15: [0x5A, 676], + LocationName.star_road_5_green_block_16: [0x5A, 677], + LocationName.star_road_5_green_block_17: [0x5A, 678], + LocationName.star_road_5_green_block_18: [0x5A, 679], + LocationName.star_road_5_green_block_19: [0x5A, 680], + LocationName.star_road_5_green_block_20: [0x5A, 681] } -def generate_level_list(world, player): +def generate_level_list(world: World): - if not world.level_shuffle[player]: + if not world.options.level_shuffle: out_level_list = full_level_list.copy() out_level_list[0x00] = 0x03 out_level_list[0x11] = 0x28 - if world.bowser_castle_doors[player] == "fast": + if world.options.bowser_castle_doors == "fast": out_level_list[0x41] = 0x82 out_level_list[0x42] = 0x32 - elif world.bowser_castle_doors[player] == "slow": + elif world.options.bowser_castle_doors == "slow": out_level_list[0x41] = 0x31 out_level_list[0x42] = 0x81 @@ -552,7 +1258,7 @@ def generate_level_list(world, player): shuffled_level_list.append(0x16) single_levels_copy = (easy_single_levels_copy.copy() + hard_single_levels_copy.copy()) - if not world.exclude_special_zone[player]: + if not world.options.exclude_special_zone: single_levels_copy.extend(special_zone_levels_copy) world.random.shuffle(single_levels_copy) @@ -619,10 +1325,10 @@ def generate_level_list(world, player): shuffled_level_list.append(castle_fortress_levels_copy.pop(0)) # Front/Back Door - if world.bowser_castle_doors[player] == "fast": + if world.options.bowser_castle_doors == "fast": shuffled_level_list.append(0x82) shuffled_level_list.append(0x32) - elif world.bowser_castle_doors[player] == "slow": + elif world.options.bowser_castle_doors == "slow": shuffled_level_list.append(0x31) shuffled_level_list.append(0x81) else: @@ -646,7 +1352,7 @@ def generate_level_list(world, player): # Special Zone shuffled_level_list.append(0x4D) - if not world.exclude_special_zone[player]: + if not world.options.exclude_special_zone: shuffled_level_list.append(single_levels_copy.pop(0)) shuffled_level_list.append(single_levels_copy.pop(0)) shuffled_level_list.append(single_levels_copy.pop(0)) diff --git a/worlds/smw/Locations.py b/worlds/smw/Locations.py index a8b7f7a4..47e821fc 100644 --- a/worlds/smw/Locations.py +++ b/worlds/smw/Locations.py @@ -1,9 +1,9 @@ import typing from BaseClasses import Location +from worlds.AutoWorld import World from .Names import LocationName - class SMWLocation(Location): game: str = "Super Mario World" @@ -197,6 +197,624 @@ dragon_coin_location_table = { LocationName.special_zone_8_dragon: 0xBC0162, } +moon_location_table = { + LocationName.yoshis_island_1_moon: 0xBC0300, + LocationName.donut_plains_4_moon: 0xBC030B, + LocationName.vanilla_dome_3_moon: 0xBC0318, + LocationName.cheese_bridge_moon: 0xBC0325, + LocationName.forest_ghost_house_moon: 0xBC0332, + LocationName.chocolate_island_1_moon: 0xBC0338, + LocationName.valley_of_bowser_1_moon: 0xBC0345 +} + +hidden_1ups_location_table = { + LocationName.yoshis_island_4_hidden_1up: 0xBC0403, + LocationName.donut_plains_1_hidden_1up: 0xBC0406, + LocationName.donut_plains_4_hidden_1up: 0xBC040B, + LocationName.donut_plains_castle_hidden_1up: 0xBC0412, + LocationName.vanilla_dome_4_hidden_1up: 0xBC0419, + LocationName.vanilla_ghost_house_hidden_1up: 0xBC041E, + LocationName.vanilla_fortress_hidden_1up: 0xBC0420, + LocationName.cookie_mountain_hidden_1up: 0xBC0427, + LocationName.forest_of_illusion_3_hidden_1up: 0xBC042E, + LocationName.chocolate_island_2_hidden_1up: 0xBC0439, + LocationName.chocolate_castle_hidden_1up: 0xBC0443, + LocationName.valley_of_bowser_2_hidden_1up: 0xBC0446, + LocationName.valley_castle_hidden_1up: 0xBC044F, + LocationName.special_zone_1_hidden_1up: 0xBC045B +} +bonus_block_location_table = { + LocationName.yoshis_island_3_bonus_block: 0xBC0502, + LocationName.donut_plains_3_bonus_block: 0xBC050A, + LocationName.butter_bridge_1_bonus_block: 0xBC0523, + LocationName.chocolate_island_3_bonus_block: 0xBC053B +} + +blocksanity_location_table = { + LocationName.vanilla_secret_2_yoshi_block_1: 0xBC0600, + LocationName.vanilla_secret_2_green_block_1: 0xBC0601, + LocationName.vanilla_secret_2_powerup_block_1: 0xBC0602, + LocationName.vanilla_secret_2_powerup_block_2: 0xBC0603, + LocationName.vanilla_secret_2_multi_coin_block_1: 0xBC0604, + LocationName.vanilla_secret_2_gray_pow_block_1: 0xBC0605, + LocationName.vanilla_secret_2_coin_block_1: 0xBC0606, + LocationName.vanilla_secret_2_coin_block_2: 0xBC0607, + LocationName.vanilla_secret_2_coin_block_3: 0xBC0608, + LocationName.vanilla_secret_2_coin_block_4: 0xBC0609, + LocationName.vanilla_secret_2_coin_block_5: 0xBC060A, + LocationName.vanilla_secret_2_coin_block_6: 0xBC060B, + LocationName.vanilla_secret_3_powerup_block_1: 0xBC060C, + LocationName.vanilla_secret_3_powerup_block_2: 0xBC060D, + LocationName.donut_ghost_house_vine_block_1: 0xBC060E, + LocationName.donut_ghost_house_directional_coin_block_1: 0xBC060F, + LocationName.donut_ghost_house_life_block_1: 0xBC0610, + LocationName.donut_ghost_house_life_block_2: 0xBC0611, + LocationName.donut_ghost_house_life_block_3: 0xBC0612, + LocationName.donut_ghost_house_life_block_4: 0xBC0613, + LocationName.donut_plains_3_green_block_1: 0xBC0614, + LocationName.donut_plains_3_coin_block_1: 0xBC0615, + LocationName.donut_plains_3_coin_block_2: 0xBC0616, + LocationName.donut_plains_3_vine_block_1: 0xBC0617, + LocationName.donut_plains_3_powerup_block_1: 0xBC0618, + LocationName.donut_plains_3_bonus_block_1: 0xBC0619, + LocationName.donut_plains_4_coin_block_1: 0xBC061A, + LocationName.donut_plains_4_powerup_block_1: 0xBC061B, + LocationName.donut_plains_4_coin_block_2: 0xBC061C, + LocationName.donut_plains_4_yoshi_block_1: 0xBC061D, + LocationName.donut_plains_castle_yellow_block_1: 0xBC061E, + LocationName.donut_plains_castle_coin_block_1: 0xBC061F, + LocationName.donut_plains_castle_powerup_block_1: 0xBC0620, + LocationName.donut_plains_castle_coin_block_2: 0xBC0621, + LocationName.donut_plains_castle_vine_block_1: 0xBC0622, + LocationName.donut_plains_castle_invis_life_block_1: 0xBC0623, + LocationName.donut_plains_castle_coin_block_3: 0xBC0624, + LocationName.donut_plains_castle_coin_block_4: 0xBC0625, + LocationName.donut_plains_castle_coin_block_5: 0xBC0626, + LocationName.donut_plains_castle_green_block_1: 0xBC0627, + LocationName.donut_plains_2_coin_block_1: 0xBC0628, + LocationName.donut_plains_2_coin_block_2: 0xBC0629, + LocationName.donut_plains_2_coin_block_3: 0xBC062A, + LocationName.donut_plains_2_yellow_block_1: 0xBC062B, + LocationName.donut_plains_2_powerup_block_1: 0xBC062C, + LocationName.donut_plains_2_multi_coin_block_1: 0xBC062D, + LocationName.donut_plains_2_flying_block_1: 0xBC062E, + LocationName.donut_plains_2_green_block_1: 0xBC062F, + LocationName.donut_plains_2_yellow_block_2: 0xBC0630, + LocationName.donut_plains_2_vine_block_1: 0xBC0631, + LocationName.donut_secret_1_coin_block_1: 0xBC0632, + LocationName.donut_secret_1_coin_block_2: 0xBC0633, + LocationName.donut_secret_1_powerup_block_1: 0xBC0634, + LocationName.donut_secret_1_coin_block_3: 0xBC0635, + LocationName.donut_secret_1_powerup_block_2: 0xBC0636, + LocationName.donut_secret_1_powerup_block_3: 0xBC0637, + LocationName.donut_secret_1_life_block_1: 0xBC0638, + LocationName.donut_secret_1_powerup_block_4: 0xBC0639, + LocationName.donut_secret_1_powerup_block_5: 0xBC063A, + LocationName.donut_secret_1_key_block_1: 0xBC063B, + LocationName.vanilla_fortress_powerup_block_1: 0xBC063C, + LocationName.vanilla_fortress_powerup_block_2: 0xBC063D, + LocationName.vanilla_fortress_yellow_block_1: 0xBC063E, + LocationName.butter_bridge_1_powerup_block_1: 0xBC063F, + LocationName.butter_bridge_1_multi_coin_block_1: 0xBC0640, + LocationName.butter_bridge_1_multi_coin_block_2: 0xBC0641, + LocationName.butter_bridge_1_multi_coin_block_3: 0xBC0642, + LocationName.butter_bridge_1_life_block_1: 0xBC0643, + LocationName.butter_bridge_1_bonus_block_1: 0xBC0644, + LocationName.butter_bridge_2_powerup_block_1: 0xBC0645, + LocationName.butter_bridge_2_green_block_1: 0xBC0646, + LocationName.butter_bridge_2_yoshi_block_1: 0xBC0647, + LocationName.twin_bridges_castle_powerup_block_1: 0xBC0648, + LocationName.cheese_bridge_powerup_block_1: 0xBC0649, + LocationName.cheese_bridge_powerup_block_2: 0xBC064A, + LocationName.cheese_bridge_wings_block_1: 0xBC064B, + LocationName.cheese_bridge_powerup_block_3: 0xBC064C, + LocationName.cookie_mountain_coin_block_1: 0xBC064D, + LocationName.cookie_mountain_coin_block_2: 0xBC064E, + LocationName.cookie_mountain_coin_block_3: 0xBC064F, + LocationName.cookie_mountain_coin_block_4: 0xBC0650, + LocationName.cookie_mountain_coin_block_5: 0xBC0651, + LocationName.cookie_mountain_coin_block_6: 0xBC0652, + LocationName.cookie_mountain_coin_block_7: 0xBC0653, + LocationName.cookie_mountain_coin_block_8: 0xBC0654, + LocationName.cookie_mountain_coin_block_9: 0xBC0655, + LocationName.cookie_mountain_powerup_block_1: 0xBC0656, + LocationName.cookie_mountain_life_block_1: 0xBC0657, + LocationName.cookie_mountain_vine_block_1: 0xBC0658, + LocationName.cookie_mountain_yoshi_block_1: 0xBC0659, + LocationName.cookie_mountain_coin_block_10: 0xBC065A, + LocationName.cookie_mountain_coin_block_11: 0xBC065B, + LocationName.cookie_mountain_powerup_block_2: 0xBC065C, + LocationName.cookie_mountain_coin_block_12: 0xBC065D, + LocationName.cookie_mountain_coin_block_13: 0xBC065E, + LocationName.cookie_mountain_coin_block_14: 0xBC065F, + LocationName.cookie_mountain_coin_block_15: 0xBC0660, + LocationName.cookie_mountain_coin_block_16: 0xBC0661, + LocationName.cookie_mountain_coin_block_17: 0xBC0662, + LocationName.cookie_mountain_coin_block_18: 0xBC0663, + LocationName.cookie_mountain_coin_block_19: 0xBC0664, + LocationName.cookie_mountain_coin_block_20: 0xBC0665, + LocationName.cookie_mountain_coin_block_21: 0xBC0666, + LocationName.cookie_mountain_coin_block_22: 0xBC0667, + LocationName.cookie_mountain_coin_block_23: 0xBC0668, + LocationName.cookie_mountain_coin_block_24: 0xBC0669, + LocationName.cookie_mountain_coin_block_25: 0xBC066A, + LocationName.cookie_mountain_coin_block_26: 0xBC066B, + LocationName.cookie_mountain_coin_block_27: 0xBC066C, + LocationName.cookie_mountain_coin_block_28: 0xBC066D, + LocationName.cookie_mountain_coin_block_29: 0xBC066E, + LocationName.cookie_mountain_coin_block_30: 0xBC066F, + LocationName.soda_lake_powerup_block_1: 0xBC0670, + LocationName.donut_secret_house_powerup_block_1: 0xBC0671, + LocationName.donut_secret_house_multi_coin_block_1: 0xBC0672, + LocationName.donut_secret_house_life_block_1: 0xBC0673, + LocationName.donut_secret_house_vine_block_1: 0xBC0674, + LocationName.donut_secret_house_directional_coin_block_1: 0xBC0675, + LocationName.donut_plains_1_coin_block_1: 0xBC0676, + LocationName.donut_plains_1_coin_block_2: 0xBC0677, + LocationName.donut_plains_1_yoshi_block_1: 0xBC0678, + LocationName.donut_plains_1_vine_block_1: 0xBC0679, + LocationName.donut_plains_1_green_block_1: 0xBC067A, + LocationName.donut_plains_1_green_block_2: 0xBC067B, + LocationName.donut_plains_1_green_block_3: 0xBC067C, + LocationName.donut_plains_1_green_block_4: 0xBC067D, + LocationName.donut_plains_1_green_block_5: 0xBC067E, + LocationName.donut_plains_1_green_block_6: 0xBC067F, + LocationName.donut_plains_1_green_block_7: 0xBC0680, + LocationName.donut_plains_1_green_block_8: 0xBC0681, + LocationName.donut_plains_1_green_block_9: 0xBC0682, + LocationName.donut_plains_1_green_block_10: 0xBC0683, + LocationName.donut_plains_1_green_block_11: 0xBC0684, + LocationName.donut_plains_1_green_block_12: 0xBC0685, + LocationName.donut_plains_1_green_block_13: 0xBC0686, + LocationName.donut_plains_1_green_block_14: 0xBC0687, + LocationName.donut_plains_1_green_block_15: 0xBC0688, + LocationName.donut_plains_1_green_block_16: 0xBC0689, + LocationName.donut_plains_1_yellow_block_1: 0xBC068A, + LocationName.donut_plains_1_yellow_block_2: 0xBC068B, + LocationName.donut_plains_1_yellow_block_3: 0xBC068C, + LocationName.sunken_ghost_ship_powerup_block_1: 0xBC068D, + LocationName.sunken_ghost_ship_star_block_1: 0xBC068E, + LocationName.chocolate_castle_yellow_block_1: 0xBC068F, + LocationName.chocolate_castle_yellow_block_2: 0xBC0690, + LocationName.chocolate_castle_green_block_1: 0xBC0691, + LocationName.chocolate_fortress_powerup_block_1: 0xBC0692, + LocationName.chocolate_fortress_powerup_block_2: 0xBC0693, + LocationName.chocolate_fortress_coin_block_1: 0xBC0694, + LocationName.chocolate_fortress_coin_block_2: 0xBC0695, + LocationName.chocolate_fortress_green_block_1: 0xBC0696, + LocationName.chocolate_island_5_yoshi_block_1: 0xBC0697, + LocationName.chocolate_island_5_powerup_block_1: 0xBC0698, + LocationName.chocolate_island_5_life_block_1: 0xBC0699, + LocationName.chocolate_island_5_yellow_block_1: 0xBC069A, + LocationName.chocolate_island_4_yellow_block_1: 0xBC069B, + LocationName.chocolate_island_4_blue_pow_block_1: 0xBC069C, + LocationName.chocolate_island_4_powerup_block_1: 0xBC069D, + LocationName.forest_fortress_yellow_block_1: 0xBC069E, + LocationName.forest_fortress_powerup_block_1: 0xBC069F, + LocationName.forest_fortress_life_block_1: 0xBC06A0, + LocationName.forest_fortress_life_block_2: 0xBC06A1, + LocationName.forest_fortress_life_block_3: 0xBC06A2, + LocationName.forest_fortress_life_block_4: 0xBC06A3, + LocationName.forest_fortress_life_block_5: 0xBC06A4, + LocationName.forest_fortress_life_block_6: 0xBC06A5, + LocationName.forest_fortress_life_block_7: 0xBC06A6, + LocationName.forest_fortress_life_block_8: 0xBC06A7, + LocationName.forest_fortress_life_block_9: 0xBC06A8, + LocationName.forest_castle_green_block_1: 0xBC06A9, + LocationName.chocolate_ghost_house_powerup_block_1: 0xBC06AA, + LocationName.chocolate_ghost_house_powerup_block_2: 0xBC06AB, + LocationName.chocolate_ghost_house_life_block_1: 0xBC06AC, + LocationName.chocolate_island_1_flying_block_1: 0xBC06AD, + LocationName.chocolate_island_1_flying_block_2: 0xBC06AE, + LocationName.chocolate_island_1_yoshi_block_1: 0xBC06AF, + LocationName.chocolate_island_1_green_block_1: 0xBC06B0, + LocationName.chocolate_island_1_life_block_1: 0xBC06B1, + LocationName.chocolate_island_3_powerup_block_1: 0xBC06B2, + LocationName.chocolate_island_3_powerup_block_2: 0xBC06B3, + LocationName.chocolate_island_3_powerup_block_3: 0xBC06B4, + LocationName.chocolate_island_3_green_block_1: 0xBC06B5, + LocationName.chocolate_island_3_bonus_block_1: 0xBC06B6, + LocationName.chocolate_island_3_vine_block_1: 0xBC06B7, + LocationName.chocolate_island_3_life_block_1: 0xBC06B8, + LocationName.chocolate_island_3_life_block_2: 0xBC06B9, + LocationName.chocolate_island_3_life_block_3: 0xBC06BA, + LocationName.chocolate_island_2_multi_coin_block_1: 0xBC06BB, + LocationName.chocolate_island_2_invis_coin_block_1: 0xBC06BC, + LocationName.chocolate_island_2_yoshi_block_1: 0xBC06BD, + LocationName.chocolate_island_2_coin_block_1: 0xBC06BE, + LocationName.chocolate_island_2_coin_block_2: 0xBC06BF, + LocationName.chocolate_island_2_multi_coin_block_2: 0xBC06C0, + LocationName.chocolate_island_2_powerup_block_1: 0xBC06C1, + LocationName.chocolate_island_2_blue_pow_block_1: 0xBC06C2, + LocationName.chocolate_island_2_yellow_block_1: 0xBC06C3, + LocationName.chocolate_island_2_yellow_block_2: 0xBC06C4, + LocationName.chocolate_island_2_green_block_1: 0xBC06C5, + LocationName.chocolate_island_2_green_block_2: 0xBC06C6, + LocationName.chocolate_island_2_green_block_3: 0xBC06C7, + LocationName.chocolate_island_2_green_block_4: 0xBC06C8, + LocationName.chocolate_island_2_green_block_5: 0xBC06C9, + LocationName.chocolate_island_2_green_block_6: 0xBC06CA, + LocationName.yoshis_island_castle_coin_block_1: 0xBC06CB, + LocationName.yoshis_island_castle_coin_block_2: 0xBC06CC, + LocationName.yoshis_island_castle_powerup_block_1: 0xBC06CD, + LocationName.yoshis_island_castle_coin_block_3: 0xBC06CE, + LocationName.yoshis_island_castle_coin_block_4: 0xBC06CF, + LocationName.yoshis_island_castle_flying_block_1: 0xBC06D0, + LocationName.yoshis_island_4_yellow_block_1: 0xBC06D1, + LocationName.yoshis_island_4_powerup_block_1: 0xBC06D2, + LocationName.yoshis_island_4_multi_coin_block_1: 0xBC06D3, + LocationName.yoshis_island_4_star_block_1: 0xBC06D4, + LocationName.yoshis_island_3_yellow_block_1: 0xBC06D5, + LocationName.yoshis_island_3_yellow_block_2: 0xBC06D6, + LocationName.yoshis_island_3_yellow_block_3: 0xBC06D7, + LocationName.yoshis_island_3_yellow_block_4: 0xBC06D8, + LocationName.yoshis_island_3_yellow_block_5: 0xBC06D9, + LocationName.yoshis_island_3_yellow_block_6: 0xBC06DA, + LocationName.yoshis_island_3_yellow_block_7: 0xBC06DB, + LocationName.yoshis_island_3_yellow_block_8: 0xBC06DC, + LocationName.yoshis_island_3_yellow_block_9: 0xBC06DD, + LocationName.yoshis_island_3_coin_block_1: 0xBC06DE, + LocationName.yoshis_island_3_yoshi_block_1: 0xBC06DF, + LocationName.yoshis_island_3_coin_block_2: 0xBC06E0, + LocationName.yoshis_island_3_powerup_block_1: 0xBC06E1, + LocationName.yoshis_island_3_yellow_block_10: 0xBC06E2, + LocationName.yoshis_island_3_yellow_block_11: 0xBC06E3, + LocationName.yoshis_island_3_yellow_block_12: 0xBC06E4, + LocationName.yoshis_island_3_bonus_block_1: 0xBC06E5, + LocationName.yoshis_island_1_flying_block_1: 0xBC06E6, + LocationName.yoshis_island_1_yellow_block_1: 0xBC06E7, + LocationName.yoshis_island_1_life_block_1: 0xBC06E8, + LocationName.yoshis_island_1_powerup_block_1: 0xBC06E9, + LocationName.yoshis_island_2_flying_block_1: 0xBC06EA, + LocationName.yoshis_island_2_flying_block_2: 0xBC06EB, + LocationName.yoshis_island_2_flying_block_3: 0xBC06EC, + LocationName.yoshis_island_2_flying_block_4: 0xBC06ED, + LocationName.yoshis_island_2_flying_block_5: 0xBC06EE, + LocationName.yoshis_island_2_flying_block_6: 0xBC06EF, + LocationName.yoshis_island_2_coin_block_1: 0xBC06F0, + LocationName.yoshis_island_2_yellow_block_1: 0xBC06F1, + LocationName.yoshis_island_2_coin_block_2: 0xBC06F2, + LocationName.yoshis_island_2_coin_block_3: 0xBC06F3, + LocationName.yoshis_island_2_yoshi_block_1: 0xBC06F4, + LocationName.yoshis_island_2_coin_block_4: 0xBC06F5, + LocationName.yoshis_island_2_yoshi_block_2: 0xBC06F6, + LocationName.yoshis_island_2_coin_block_5: 0xBC06F7, + LocationName.yoshis_island_2_vine_block_1: 0xBC06F8, + LocationName.yoshis_island_2_yellow_block_2: 0xBC06F9, + LocationName.vanilla_ghost_house_powerup_block_1: 0xBC06FA, + LocationName.vanilla_ghost_house_vine_block_1: 0xBC06FB, + LocationName.vanilla_ghost_house_powerup_block_2: 0xBC06FC, + LocationName.vanilla_ghost_house_multi_coin_block_1: 0xBC06FD, + LocationName.vanilla_ghost_house_blue_pow_block_1: 0xBC06FE, + LocationName.vanilla_secret_1_coin_block_1: 0xBC06FF, + LocationName.vanilla_secret_1_powerup_block_1: 0xBC0700, + LocationName.vanilla_secret_1_multi_coin_block_1: 0xBC0701, + LocationName.vanilla_secret_1_vine_block_1: 0xBC0702, + LocationName.vanilla_secret_1_vine_block_2: 0xBC0703, + LocationName.vanilla_secret_1_coin_block_2: 0xBC0704, + LocationName.vanilla_secret_1_coin_block_3: 0xBC0705, + LocationName.vanilla_secret_1_powerup_block_2: 0xBC0706, + LocationName.vanilla_dome_3_coin_block_1: 0xBC0707, + LocationName.vanilla_dome_3_flying_block_1: 0xBC0708, + LocationName.vanilla_dome_3_flying_block_2: 0xBC0709, + LocationName.vanilla_dome_3_powerup_block_1: 0xBC070A, + LocationName.vanilla_dome_3_flying_block_3: 0xBC070B, + LocationName.vanilla_dome_3_invis_coin_block_1: 0xBC070C, + LocationName.vanilla_dome_3_powerup_block_2: 0xBC070D, + LocationName.vanilla_dome_3_multi_coin_block_1: 0xBC070E, + LocationName.vanilla_dome_3_powerup_block_3: 0xBC070F, + LocationName.vanilla_dome_3_yoshi_block_1: 0xBC0710, + LocationName.vanilla_dome_3_powerup_block_4: 0xBC0711, + LocationName.vanilla_dome_3_pswitch_coin_block_1: 0xBC0712, + LocationName.vanilla_dome_3_pswitch_coin_block_2: 0xBC0713, + LocationName.vanilla_dome_3_pswitch_coin_block_3: 0xBC0714, + LocationName.vanilla_dome_3_pswitch_coin_block_4: 0xBC0715, + LocationName.vanilla_dome_3_pswitch_coin_block_5: 0xBC0716, + LocationName.vanilla_dome_3_pswitch_coin_block_6: 0xBC0717, + LocationName.donut_secret_2_directional_coin_block_1: 0xBC0718, + LocationName.donut_secret_2_vine_block_1: 0xBC0719, + LocationName.donut_secret_2_star_block_1: 0xBC071A, + LocationName.donut_secret_2_powerup_block_1: 0xBC071B, + LocationName.donut_secret_2_star_block_2: 0xBC071C, + LocationName.valley_of_bowser_4_yellow_block_1: 0xBC071D, + LocationName.valley_of_bowser_4_powerup_block_1: 0xBC071E, + LocationName.valley_of_bowser_4_vine_block_1: 0xBC071F, + LocationName.valley_of_bowser_4_yoshi_block_1: 0xBC0720, + LocationName.valley_of_bowser_4_life_block_1: 0xBC0721, + LocationName.valley_of_bowser_4_powerup_block_2: 0xBC0722, + LocationName.valley_castle_yellow_block_1: 0xBC0723, + LocationName.valley_castle_yellow_block_2: 0xBC0724, + LocationName.valley_castle_green_block_1: 0xBC0725, + LocationName.valley_fortress_green_block_1: 0xBC0726, + LocationName.valley_fortress_yellow_block_1: 0xBC0727, + LocationName.valley_of_bowser_3_powerup_block_1: 0xBC0728, + LocationName.valley_of_bowser_3_powerup_block_2: 0xBC0729, + LocationName.valley_ghost_house_pswitch_coin_block_1: 0xBC072A, + LocationName.valley_ghost_house_multi_coin_block_1: 0xBC072B, + LocationName.valley_ghost_house_powerup_block_1: 0xBC072C, + LocationName.valley_ghost_house_directional_coin_block_1: 0xBC072D, + LocationName.valley_of_bowser_2_powerup_block_1: 0xBC072E, + LocationName.valley_of_bowser_2_yellow_block_1: 0xBC072F, + LocationName.valley_of_bowser_2_powerup_block_2: 0xBC0730, + LocationName.valley_of_bowser_2_wings_block_1: 0xBC0731, + LocationName.valley_of_bowser_1_green_block_1: 0xBC0732, + LocationName.valley_of_bowser_1_invis_coin_block_1: 0xBC0733, + LocationName.valley_of_bowser_1_invis_coin_block_2: 0xBC0734, + LocationName.valley_of_bowser_1_invis_coin_block_3: 0xBC0735, + LocationName.valley_of_bowser_1_yellow_block_1: 0xBC0736, + LocationName.valley_of_bowser_1_yellow_block_2: 0xBC0737, + LocationName.valley_of_bowser_1_yellow_block_3: 0xBC0738, + LocationName.valley_of_bowser_1_yellow_block_4: 0xBC0739, + LocationName.valley_of_bowser_1_vine_block_1: 0xBC073A, + LocationName.chocolate_secret_powerup_block_1: 0xBC073B, + LocationName.chocolate_secret_powerup_block_2: 0xBC073C, + LocationName.vanilla_dome_2_coin_block_1: 0xBC073D, + LocationName.vanilla_dome_2_powerup_block_1: 0xBC073E, + LocationName.vanilla_dome_2_coin_block_2: 0xBC073F, + LocationName.vanilla_dome_2_coin_block_3: 0xBC0740, + LocationName.vanilla_dome_2_vine_block_1: 0xBC0741, + LocationName.vanilla_dome_2_invis_life_block_1: 0xBC0742, + LocationName.vanilla_dome_2_coin_block_4: 0xBC0743, + LocationName.vanilla_dome_2_coin_block_5: 0xBC0744, + LocationName.vanilla_dome_2_powerup_block_2: 0xBC0745, + LocationName.vanilla_dome_2_powerup_block_3: 0xBC0746, + LocationName.vanilla_dome_2_powerup_block_4: 0xBC0747, + LocationName.vanilla_dome_2_powerup_block_5: 0xBC0748, + LocationName.vanilla_dome_2_multi_coin_block_1: 0xBC0749, + LocationName.vanilla_dome_2_multi_coin_block_2: 0xBC074A, + LocationName.vanilla_dome_4_powerup_block_1: 0xBC074B, + LocationName.vanilla_dome_4_powerup_block_2: 0xBC074C, + LocationName.vanilla_dome_4_coin_block_1: 0xBC074D, + LocationName.vanilla_dome_4_coin_block_2: 0xBC074E, + LocationName.vanilla_dome_4_coin_block_3: 0xBC074F, + LocationName.vanilla_dome_4_life_block_1: 0xBC0750, + LocationName.vanilla_dome_4_coin_block_4: 0xBC0751, + LocationName.vanilla_dome_4_coin_block_5: 0xBC0752, + LocationName.vanilla_dome_4_coin_block_6: 0xBC0753, + LocationName.vanilla_dome_4_coin_block_7: 0xBC0754, + LocationName.vanilla_dome_4_coin_block_8: 0xBC0755, + LocationName.vanilla_dome_1_flying_block_1: 0xBC0756, + LocationName.vanilla_dome_1_powerup_block_1: 0xBC0757, + LocationName.vanilla_dome_1_powerup_block_2: 0xBC0758, + LocationName.vanilla_dome_1_coin_block_1: 0xBC0759, + LocationName.vanilla_dome_1_life_block_1: 0xBC075A, + LocationName.vanilla_dome_1_powerup_block_3: 0xBC075B, + LocationName.vanilla_dome_1_vine_block_1: 0xBC075C, + LocationName.vanilla_dome_1_star_block_1: 0xBC075D, + LocationName.vanilla_dome_1_powerup_block_4: 0xBC075E, + LocationName.vanilla_dome_1_coin_block_2: 0xBC075F, + LocationName.vanilla_dome_castle_life_block_1: 0xBC0760, + LocationName.vanilla_dome_castle_life_block_2: 0xBC0761, + LocationName.vanilla_dome_castle_powerup_block_1: 0xBC0762, + LocationName.vanilla_dome_castle_life_block_3: 0xBC0763, + LocationName.vanilla_dome_castle_green_block_1: 0xBC0764, + LocationName.forest_ghost_house_coin_block_1: 0xBC0765, + LocationName.forest_ghost_house_powerup_block_1: 0xBC0766, + LocationName.forest_ghost_house_flying_block_1: 0xBC0767, + LocationName.forest_ghost_house_powerup_block_2: 0xBC0768, + LocationName.forest_ghost_house_life_block_1: 0xBC0769, + LocationName.forest_of_illusion_1_powerup_block_1: 0xBC076A, + LocationName.forest_of_illusion_1_yoshi_block_1: 0xBC076B, + LocationName.forest_of_illusion_1_powerup_block_2: 0xBC076C, + LocationName.forest_of_illusion_1_key_block_1: 0xBC076D, + LocationName.forest_of_illusion_1_life_block_1: 0xBC076E, + LocationName.forest_of_illusion_4_multi_coin_block_1: 0xBC076F, + LocationName.forest_of_illusion_4_coin_block_1: 0xBC0770, + LocationName.forest_of_illusion_4_coin_block_2: 0xBC0771, + LocationName.forest_of_illusion_4_coin_block_3: 0xBC0772, + LocationName.forest_of_illusion_4_coin_block_4: 0xBC0773, + LocationName.forest_of_illusion_4_powerup_block_1: 0xBC0774, + LocationName.forest_of_illusion_4_coin_block_5: 0xBC0775, + LocationName.forest_of_illusion_4_coin_block_6: 0xBC0776, + LocationName.forest_of_illusion_4_coin_block_7: 0xBC0777, + LocationName.forest_of_illusion_4_powerup_block_2: 0xBC0778, + LocationName.forest_of_illusion_4_coin_block_8: 0xBC0779, + LocationName.forest_of_illusion_4_coin_block_9: 0xBC077A, + LocationName.forest_of_illusion_4_coin_block_10: 0xBC077B, + LocationName.forest_of_illusion_2_green_block_1: 0xBC077C, + LocationName.forest_of_illusion_2_powerup_block_1: 0xBC077D, + LocationName.forest_of_illusion_2_invis_coin_block_1: 0xBC077E, + LocationName.forest_of_illusion_2_invis_coin_block_2: 0xBC077F, + LocationName.forest_of_illusion_2_invis_life_block_1: 0xBC0780, + LocationName.forest_of_illusion_2_invis_coin_block_3: 0xBC0781, + LocationName.forest_of_illusion_2_yellow_block_1: 0xBC0782, + LocationName.forest_secret_powerup_block_1: 0xBC0783, + LocationName.forest_secret_powerup_block_2: 0xBC0784, + LocationName.forest_secret_life_block_1: 0xBC0785, + LocationName.forest_of_illusion_3_yoshi_block_1: 0xBC0786, + LocationName.forest_of_illusion_3_coin_block_1: 0xBC0787, + LocationName.forest_of_illusion_3_multi_coin_block_1: 0xBC0788, + LocationName.forest_of_illusion_3_coin_block_2: 0xBC0789, + LocationName.forest_of_illusion_3_multi_coin_block_2: 0xBC078A, + LocationName.forest_of_illusion_3_coin_block_3: 0xBC078B, + LocationName.forest_of_illusion_3_coin_block_4: 0xBC078C, + LocationName.forest_of_illusion_3_coin_block_5: 0xBC078D, + LocationName.forest_of_illusion_3_coin_block_6: 0xBC078E, + LocationName.forest_of_illusion_3_coin_block_7: 0xBC078F, + LocationName.forest_of_illusion_3_coin_block_8: 0xBC0790, + LocationName.forest_of_illusion_3_coin_block_9: 0xBC0791, + LocationName.forest_of_illusion_3_coin_block_10: 0xBC0792, + LocationName.forest_of_illusion_3_coin_block_11: 0xBC0793, + LocationName.forest_of_illusion_3_coin_block_12: 0xBC0794, + LocationName.forest_of_illusion_3_coin_block_13: 0xBC0795, + LocationName.forest_of_illusion_3_coin_block_14: 0xBC0796, + LocationName.forest_of_illusion_3_coin_block_15: 0xBC0797, + LocationName.forest_of_illusion_3_coin_block_16: 0xBC0798, + LocationName.forest_of_illusion_3_coin_block_17: 0xBC0799, + LocationName.forest_of_illusion_3_coin_block_18: 0xBC079A, + LocationName.forest_of_illusion_3_coin_block_19: 0xBC079B, + LocationName.forest_of_illusion_3_coin_block_20: 0xBC079C, + LocationName.forest_of_illusion_3_coin_block_21: 0xBC079D, + LocationName.forest_of_illusion_3_coin_block_22: 0xBC079E, + LocationName.forest_of_illusion_3_coin_block_23: 0xBC079F, + LocationName.forest_of_illusion_3_coin_block_24: 0xBC07A0, + LocationName.special_zone_8_yoshi_block_1: 0xBC07A1, + LocationName.special_zone_8_coin_block_1: 0xBC07A2, + LocationName.special_zone_8_coin_block_2: 0xBC07A3, + LocationName.special_zone_8_coin_block_3: 0xBC07A4, + LocationName.special_zone_8_coin_block_4: 0xBC07A5, + LocationName.special_zone_8_coin_block_5: 0xBC07A6, + LocationName.special_zone_8_blue_pow_block_1: 0xBC07A7, + LocationName.special_zone_8_powerup_block_1: 0xBC07A8, + LocationName.special_zone_8_star_block_1: 0xBC07A9, + LocationName.special_zone_8_coin_block_6: 0xBC07AA, + LocationName.special_zone_8_coin_block_7: 0xBC07AB, + LocationName.special_zone_8_coin_block_8: 0xBC07AC, + LocationName.special_zone_8_coin_block_9: 0xBC07AD, + LocationName.special_zone_8_coin_block_10: 0xBC07AE, + LocationName.special_zone_8_coin_block_11: 0xBC07AF, + LocationName.special_zone_8_coin_block_12: 0xBC07B0, + LocationName.special_zone_8_coin_block_13: 0xBC07B1, + LocationName.special_zone_8_coin_block_14: 0xBC07B2, + LocationName.special_zone_8_coin_block_15: 0xBC07B3, + LocationName.special_zone_8_coin_block_16: 0xBC07B4, + LocationName.special_zone_8_coin_block_17: 0xBC07B5, + LocationName.special_zone_8_coin_block_18: 0xBC07B6, + LocationName.special_zone_8_multi_coin_block_1: 0xBC07B7, + LocationName.special_zone_8_coin_block_19: 0xBC07B8, + LocationName.special_zone_8_coin_block_20: 0xBC07B9, + LocationName.special_zone_8_coin_block_21: 0xBC07BA, + LocationName.special_zone_8_coin_block_22: 0xBC07BB, + LocationName.special_zone_8_coin_block_23: 0xBC07BC, + LocationName.special_zone_8_powerup_block_2: 0xBC07BD, + LocationName.special_zone_8_flying_block_1: 0xBC07BE, + LocationName.special_zone_7_powerup_block_1: 0xBC07BF, + LocationName.special_zone_7_yoshi_block_1: 0xBC07C0, + LocationName.special_zone_7_coin_block_1: 0xBC07C1, + LocationName.special_zone_7_powerup_block_2: 0xBC07C2, + LocationName.special_zone_7_coin_block_2: 0xBC07C3, + LocationName.special_zone_6_powerup_block_1: 0xBC07C4, + LocationName.special_zone_6_coin_block_1: 0xBC07C5, + LocationName.special_zone_6_coin_block_2: 0xBC07C6, + LocationName.special_zone_6_yoshi_block_1: 0xBC07C7, + LocationName.special_zone_6_life_block_1: 0xBC07C8, + LocationName.special_zone_6_multi_coin_block_1: 0xBC07C9, + LocationName.special_zone_6_coin_block_3: 0xBC07CA, + LocationName.special_zone_6_coin_block_4: 0xBC07CB, + LocationName.special_zone_6_coin_block_5: 0xBC07CC, + LocationName.special_zone_6_coin_block_6: 0xBC07CD, + LocationName.special_zone_6_coin_block_7: 0xBC07CE, + LocationName.special_zone_6_coin_block_8: 0xBC07CF, + LocationName.special_zone_6_coin_block_9: 0xBC07D0, + LocationName.special_zone_6_coin_block_10: 0xBC07D1, + LocationName.special_zone_6_coin_block_11: 0xBC07D2, + LocationName.special_zone_6_coin_block_12: 0xBC07D3, + LocationName.special_zone_6_coin_block_13: 0xBC07D4, + LocationName.special_zone_6_coin_block_14: 0xBC07D5, + LocationName.special_zone_6_coin_block_15: 0xBC07D6, + LocationName.special_zone_6_coin_block_16: 0xBC07D7, + LocationName.special_zone_6_coin_block_17: 0xBC07D8, + LocationName.special_zone_6_coin_block_18: 0xBC07D9, + LocationName.special_zone_6_coin_block_19: 0xBC07DA, + LocationName.special_zone_6_coin_block_20: 0xBC07DB, + LocationName.special_zone_6_coin_block_21: 0xBC07DC, + LocationName.special_zone_6_coin_block_22: 0xBC07DD, + LocationName.special_zone_6_coin_block_23: 0xBC07DE, + LocationName.special_zone_6_coin_block_24: 0xBC07DF, + LocationName.special_zone_6_coin_block_25: 0xBC07E0, + LocationName.special_zone_6_coin_block_26: 0xBC07E1, + LocationName.special_zone_6_coin_block_27: 0xBC07E2, + LocationName.special_zone_6_coin_block_28: 0xBC07E3, + LocationName.special_zone_6_powerup_block_2: 0xBC07E4, + LocationName.special_zone_6_coin_block_29: 0xBC07E5, + LocationName.special_zone_6_coin_block_30: 0xBC07E6, + LocationName.special_zone_6_coin_block_31: 0xBC07E7, + LocationName.special_zone_6_coin_block_32: 0xBC07E8, + LocationName.special_zone_6_coin_block_33: 0xBC07E9, + LocationName.special_zone_5_yoshi_block_1: 0xBC07EA, + LocationName.special_zone_1_vine_block_1: 0xBC07EB, + LocationName.special_zone_1_vine_block_2: 0xBC07EC, + LocationName.special_zone_1_vine_block_3: 0xBC07ED, + LocationName.special_zone_1_vine_block_4: 0xBC07EE, + LocationName.special_zone_1_life_block_1: 0xBC07EF, + LocationName.special_zone_1_vine_block_5: 0xBC07F0, + LocationName.special_zone_1_blue_pow_block_1: 0xBC07F1, + LocationName.special_zone_1_vine_block_6: 0xBC07F2, + LocationName.special_zone_1_powerup_block_1: 0xBC07F3, + LocationName.special_zone_1_pswitch_coin_block_1: 0xBC07F4, + LocationName.special_zone_1_pswitch_coin_block_2: 0xBC07F5, + LocationName.special_zone_1_pswitch_coin_block_3: 0xBC07F6, + LocationName.special_zone_1_pswitch_coin_block_4: 0xBC07F7, + LocationName.special_zone_1_pswitch_coin_block_5: 0xBC07F8, + LocationName.special_zone_1_pswitch_coin_block_6: 0xBC07F9, + LocationName.special_zone_1_pswitch_coin_block_7: 0xBC07FA, + LocationName.special_zone_1_pswitch_coin_block_8: 0xBC07FB, + LocationName.special_zone_1_pswitch_coin_block_9: 0xBC07FC, + LocationName.special_zone_1_pswitch_coin_block_10: 0xBC07FD, + LocationName.special_zone_1_pswitch_coin_block_11: 0xBC07FE, + LocationName.special_zone_1_pswitch_coin_block_12: 0xBC07FF, + LocationName.special_zone_1_pswitch_coin_block_13: 0xBC0800, + LocationName.special_zone_2_powerup_block_1: 0xBC0801, + LocationName.special_zone_2_coin_block_1: 0xBC0802, + LocationName.special_zone_2_coin_block_2: 0xBC0803, + LocationName.special_zone_2_powerup_block_2: 0xBC0804, + LocationName.special_zone_2_coin_block_3: 0xBC0805, + LocationName.special_zone_2_coin_block_4: 0xBC0806, + LocationName.special_zone_2_powerup_block_3: 0xBC0807, + LocationName.special_zone_2_multi_coin_block_1: 0xBC0808, + LocationName.special_zone_2_coin_block_5: 0xBC0809, + LocationName.special_zone_2_coin_block_6: 0xBC080A, + LocationName.special_zone_3_powerup_block_1: 0xBC080B, + LocationName.special_zone_3_yoshi_block_1: 0xBC080C, + LocationName.special_zone_3_wings_block_1: 0xBC080D, + LocationName.special_zone_4_powerup_block_1: 0xBC080E, + LocationName.special_zone_4_star_block_1: 0xBC080F, + LocationName.star_road_2_star_block_1: 0xBC0810, + LocationName.star_road_3_key_block_1: 0xBC0811, + LocationName.star_road_4_powerup_block_1: 0xBC0812, + LocationName.star_road_4_green_block_1: 0xBC0813, + LocationName.star_road_4_green_block_2: 0xBC0814, + LocationName.star_road_4_green_block_3: 0xBC0815, + LocationName.star_road_4_green_block_4: 0xBC0816, + LocationName.star_road_4_green_block_5: 0xBC0817, + LocationName.star_road_4_green_block_6: 0xBC0818, + LocationName.star_road_4_green_block_7: 0xBC0819, + LocationName.star_road_4_key_block_1: 0xBC081A, + LocationName.star_road_5_directional_coin_block_1: 0xBC081B, + LocationName.star_road_5_life_block_1: 0xBC081C, + LocationName.star_road_5_vine_block_1: 0xBC081D, + LocationName.star_road_5_yellow_block_1: 0xBC081E, + LocationName.star_road_5_yellow_block_2: 0xBC081F, + LocationName.star_road_5_yellow_block_3: 0xBC0820, + LocationName.star_road_5_yellow_block_4: 0xBC0821, + LocationName.star_road_5_yellow_block_5: 0xBC0822, + LocationName.star_road_5_yellow_block_6: 0xBC0823, + LocationName.star_road_5_yellow_block_7: 0xBC0824, + LocationName.star_road_5_yellow_block_8: 0xBC0825, + LocationName.star_road_5_yellow_block_9: 0xBC0826, + LocationName.star_road_5_yellow_block_10: 0xBC0827, + LocationName.star_road_5_yellow_block_11: 0xBC0828, + LocationName.star_road_5_yellow_block_12: 0xBC0829, + LocationName.star_road_5_yellow_block_13: 0xBC082A, + LocationName.star_road_5_yellow_block_14: 0xBC082B, + LocationName.star_road_5_yellow_block_15: 0xBC082C, + LocationName.star_road_5_yellow_block_16: 0xBC082D, + LocationName.star_road_5_yellow_block_17: 0xBC082E, + LocationName.star_road_5_yellow_block_18: 0xBC082F, + LocationName.star_road_5_yellow_block_19: 0xBC0830, + LocationName.star_road_5_yellow_block_20: 0xBC0831, + LocationName.star_road_5_green_block_1: 0xBC0832, + LocationName.star_road_5_green_block_2: 0xBC0833, + LocationName.star_road_5_green_block_3: 0xBC0834, + LocationName.star_road_5_green_block_4: 0xBC0835, + LocationName.star_road_5_green_block_5: 0xBC0836, + LocationName.star_road_5_green_block_6: 0xBC0837, + LocationName.star_road_5_green_block_7: 0xBC0838, + LocationName.star_road_5_green_block_8: 0xBC0839, + LocationName.star_road_5_green_block_9: 0xBC083A, + LocationName.star_road_5_green_block_10: 0xBC083B, + LocationName.star_road_5_green_block_11: 0xBC083C, + LocationName.star_road_5_green_block_12: 0xBC083D, + LocationName.star_road_5_green_block_13: 0xBC083E, + LocationName.star_road_5_green_block_14: 0xBC083F, + LocationName.star_road_5_green_block_15: 0xBC0840, + LocationName.star_road_5_green_block_16: 0xBC0841, + LocationName.star_road_5_green_block_17: 0xBC0842, + LocationName.star_road_5_green_block_18: 0xBC0843, + LocationName.star_road_5_green_block_19: 0xBC0844, + LocationName.star_road_5_green_block_20: 0xBC0845 +} + bowser_location_table = { LocationName.bowser: 0xBC0200, } @@ -208,6 +826,10 @@ yoshi_house_location_table = { all_locations = { **level_location_table, **dragon_coin_location_table, + **moon_location_table, + **hidden_1ups_location_table, + **bonus_block_location_table, + **blocksanity_location_table, **bowser_location_table, **yoshi_house_location_table, } @@ -234,20 +856,149 @@ special_zone_dragon_coin_names = [ LocationName.special_zone_8_dragon, ] +special_zone_hidden_1up_names = [ + LocationName.special_zone_1_hidden_1up +] + +special_zone_blocksanity_names = [ + LocationName.special_zone_8_yoshi_block_1, + LocationName.special_zone_8_coin_block_1, + LocationName.special_zone_8_coin_block_2, + LocationName.special_zone_8_coin_block_3, + LocationName.special_zone_8_coin_block_4, + LocationName.special_zone_8_coin_block_5, + LocationName.special_zone_8_blue_pow_block_1, + LocationName.special_zone_8_powerup_block_1, + LocationName.special_zone_8_star_block_1, + LocationName.special_zone_8_coin_block_6, + LocationName.special_zone_8_coin_block_7, + LocationName.special_zone_8_coin_block_8, + LocationName.special_zone_8_coin_block_9, + LocationName.special_zone_8_coin_block_10, + LocationName.special_zone_8_coin_block_11, + LocationName.special_zone_8_coin_block_12, + LocationName.special_zone_8_coin_block_13, + LocationName.special_zone_8_coin_block_14, + LocationName.special_zone_8_coin_block_15, + LocationName.special_zone_8_coin_block_16, + LocationName.special_zone_8_coin_block_17, + LocationName.special_zone_8_coin_block_18, + LocationName.special_zone_8_multi_coin_block_1, + LocationName.special_zone_8_coin_block_19, + LocationName.special_zone_8_coin_block_20, + LocationName.special_zone_8_coin_block_21, + LocationName.special_zone_8_coin_block_22, + LocationName.special_zone_8_coin_block_23, + LocationName.special_zone_8_powerup_block_2, + LocationName.special_zone_8_flying_block_1, + LocationName.special_zone_7_powerup_block_1, + LocationName.special_zone_7_yoshi_block_1, + LocationName.special_zone_7_coin_block_1, + LocationName.special_zone_7_powerup_block_2, + LocationName.special_zone_7_coin_block_2, + LocationName.special_zone_6_powerup_block_1, + LocationName.special_zone_6_coin_block_1, + LocationName.special_zone_6_coin_block_2, + LocationName.special_zone_6_yoshi_block_1, + LocationName.special_zone_6_life_block_1, + LocationName.special_zone_6_multi_coin_block_1, + LocationName.special_zone_6_coin_block_3, + LocationName.special_zone_6_coin_block_4, + LocationName.special_zone_6_coin_block_5, + LocationName.special_zone_6_coin_block_6, + LocationName.special_zone_6_coin_block_7, + LocationName.special_zone_6_coin_block_8, + LocationName.special_zone_6_coin_block_9, + LocationName.special_zone_6_coin_block_10, + LocationName.special_zone_6_coin_block_11, + LocationName.special_zone_6_coin_block_12, + LocationName.special_zone_6_coin_block_13, + LocationName.special_zone_6_coin_block_14, + LocationName.special_zone_6_coin_block_15, + LocationName.special_zone_6_coin_block_16, + LocationName.special_zone_6_coin_block_17, + LocationName.special_zone_6_coin_block_18, + LocationName.special_zone_6_coin_block_19, + LocationName.special_zone_6_coin_block_20, + LocationName.special_zone_6_coin_block_21, + LocationName.special_zone_6_coin_block_22, + LocationName.special_zone_6_coin_block_23, + LocationName.special_zone_6_coin_block_24, + LocationName.special_zone_6_coin_block_25, + LocationName.special_zone_6_coin_block_26, + LocationName.special_zone_6_coin_block_27, + LocationName.special_zone_6_coin_block_28, + LocationName.special_zone_6_powerup_block_2, + LocationName.special_zone_6_coin_block_29, + LocationName.special_zone_6_coin_block_30, + LocationName.special_zone_6_coin_block_31, + LocationName.special_zone_6_coin_block_32, + LocationName.special_zone_6_coin_block_33, + LocationName.special_zone_5_yoshi_block_1, + LocationName.special_zone_1_vine_block_1, + LocationName.special_zone_1_vine_block_2, + LocationName.special_zone_1_vine_block_3, + LocationName.special_zone_1_vine_block_4, + LocationName.special_zone_1_life_block_1, + LocationName.special_zone_1_vine_block_5, + LocationName.special_zone_1_blue_pow_block_1, + LocationName.special_zone_1_vine_block_6, + LocationName.special_zone_1_powerup_block_1, + LocationName.special_zone_1_pswitch_coin_block_1, + LocationName.special_zone_1_pswitch_coin_block_2, + LocationName.special_zone_1_pswitch_coin_block_3, + LocationName.special_zone_1_pswitch_coin_block_4, + LocationName.special_zone_1_pswitch_coin_block_5, + LocationName.special_zone_1_pswitch_coin_block_6, + LocationName.special_zone_1_pswitch_coin_block_7, + LocationName.special_zone_1_pswitch_coin_block_8, + LocationName.special_zone_1_pswitch_coin_block_9, + LocationName.special_zone_1_pswitch_coin_block_10, + LocationName.special_zone_1_pswitch_coin_block_11, + LocationName.special_zone_1_pswitch_coin_block_12, + LocationName.special_zone_1_pswitch_coin_block_13, + LocationName.special_zone_2_powerup_block_1, + LocationName.special_zone_2_coin_block_1, + LocationName.special_zone_2_coin_block_2, + LocationName.special_zone_2_powerup_block_2, + LocationName.special_zone_2_coin_block_3, + LocationName.special_zone_2_coin_block_4, + LocationName.special_zone_2_powerup_block_3, + LocationName.special_zone_2_multi_coin_block_1, + LocationName.special_zone_2_coin_block_5, + LocationName.special_zone_2_coin_block_6, + LocationName.special_zone_3_powerup_block_1, + LocationName.special_zone_3_yoshi_block_1, + LocationName.special_zone_3_wings_block_1, + LocationName.special_zone_4_powerup_block_1, + LocationName.special_zone_4_star_block_1 +] + location_table = {} -def setup_locations(world, player: int): +def setup_locations(world: World): location_table = {**level_location_table} - # Dragon Coins here - if world.dragon_coin_checks[player].value: - location_table.update({**dragon_coin_location_table}) + if world.options.dragon_coin_checks: + location_table.update(dragon_coin_location_table) - if world.goal[player] == "yoshi_egg_hunt": - location_table.update({**yoshi_house_location_table}) + if world.options.moon_checks: + location_table.update(moon_location_table) + + if world.options.hidden_1up_checks: + location_table.update(hidden_1ups_location_table) + + if world.options.bonus_block_checks: + location_table.update(bonus_block_location_table) + + if world.options.blocksanity: + location_table.update(blocksanity_location_table) + + if world.options.goal == "yoshi_egg_hunt": + location_table.update(yoshi_house_location_table) else: - location_table.update({**bowser_location_table}) + location_table.update(bowser_location_table) return location_table diff --git a/worlds/smw/Names/ItemName.py b/worlds/smw/Names/ItemName.py index fecb1868..e6eced41 100644 --- a/worlds/smw/Names/ItemName.py +++ b/worlds/smw/Names/ItemName.py @@ -1,5 +1,9 @@ # Junk Definitions one_up_mushroom = "1-Up Mushroom" +one_coin = "1 coin" +five_coins = "5 coins" +ten_coins = "10 coins" +fifty_coins = "50 coins" # Collectable Definitions yoshi_egg = "Yoshi Egg" @@ -22,11 +26,16 @@ green_switch_palace = "Green Switch Palace" red_switch_palace = "Red Switch Palace" blue_switch_palace = "Blue Switch Palace" +# Special Zone clear flag definition +special_world_clear = "Special Zone Clear" + # Trap Definitions -ice_trap = "Ice Trap" -stun_trap = "Stun Trap" -literature_trap = "Literature Trap" -timer_trap = "Timer Trap" +ice_trap = "Ice Trap" +stun_trap = "Stun Trap" +literature_trap = "Literature Trap" +timer_trap = "Timer Trap" +reverse_controls_trap = "Reverse Trap" +thwimp_trap = "Thwimp Trap" # Other Definitions victory = "The Princess" diff --git a/worlds/smw/Names/LocationName.py b/worlds/smw/Names/LocationName.py index cc01b05e..847b724f 100644 --- a/worlds/smw/Names/LocationName.py +++ b/worlds/smw/Names/LocationName.py @@ -4,12 +4,15 @@ yoshis_house_tile = "Yoshi's House - Tile" yoshis_island_1_exit_1 = "Yoshi's Island 1 - Normal Exit" yoshis_island_1_dragon = "Yoshi's Island 1 - Dragon Coins" +yoshis_island_1_moon = "Yoshi's Island 1 - 3-Up Moon" yoshis_island_2_exit_1 = "Yoshi's Island 2 - Normal Exit" yoshis_island_2_dragon = "Yoshi's Island 2 - Dragon Coins" yoshis_island_3_exit_1 = "Yoshi's Island 3 - Normal Exit" yoshis_island_3_dragon = "Yoshi's Island 3 - Dragon Coins" +yoshis_island_3_bonus_block = "Yoshi's Island 3 - 1-Up from Bonus Block" yoshis_island_4_exit_1 = "Yoshi's Island 4 - Normal Exit" yoshis_island_4_dragon = "Yoshi's Island 4 - Dragon Coins" +yoshis_island_4_hidden_1up = "Yoshi's Island 4 - Hidden 1-Up" yoshis_island_castle = "#1 Iggy's Castle - Normal Exit" yoshis_island_koopaling = "#1 Iggy's Castle - Boss" @@ -18,13 +21,17 @@ yellow_switch_palace = "Yellow Switch Palace" donut_plains_1_exit_1 = "Donut Plains 1 - Normal Exit" donut_plains_1_exit_2 = "Donut Plains 1 - Secret Exit" donut_plains_1_dragon = "Donut Plains 1 - Dragon Coins" +donut_plains_1_hidden_1up = "Donut Plains 1 - Hidden 1-Up" donut_plains_2_exit_1 = "Donut Plains 2 - Normal Exit" donut_plains_2_exit_2 = "Donut Plains 2 - Secret Exit" donut_plains_2_dragon = "Donut Plains 2 - Dragon Coins" donut_plains_3_exit_1 = "Donut Plains 3 - Normal Exit" donut_plains_3_dragon = "Donut Plains 3 - Dragon Coins" +donut_plains_3_bonus_block = "Donut Plains 3 - 1-Up from Bonus Block" donut_plains_4_exit_1 = "Donut Plains 4 - Normal Exit" donut_plains_4_dragon = "Donut Plains 4 - Dragon Coins" +donut_plains_4_moon = "Donut Plains 4 - 3-Up Moon" +donut_plains_4_hidden_1up = "Donut Plains 4 - Hidden 1-Up" donut_secret_1_exit_1 = "Donut Secret 1 - Normal Exit" donut_secret_1_exit_2 = "Donut Secret 1 - Secret Exit" donut_secret_1_dragon = "Donut Secret 1 - Dragon Coins" @@ -35,6 +42,7 @@ donut_ghost_house_exit_2 = "Donut Ghost House - Secret Exit" donut_secret_house_exit_1 = "Donut Secret House - Normal Exit" donut_secret_house_exit_2 = "Donut Secret House - Secret Exit" donut_plains_castle = "#2 Morton's Castle - Normal Exit" +donut_plains_castle_hidden_1up = "#2 Morton's Castle - Hidden 1-Up" donut_plains_koopaling = "#2 Morton's Castle - Boss" green_switch_palace = "Green Switch Palace" @@ -47,8 +55,10 @@ vanilla_dome_2_exit_2 = "Vanilla Dome 2 - Secret Exit" vanilla_dome_2_dragon = "Vanilla Dome 2 - Dragon Coins" vanilla_dome_3_exit_1 = "Vanilla Dome 3 - Normal Exit" vanilla_dome_3_dragon = "Vanilla Dome 3 - Dragon Coins" +vanilla_dome_3_moon = "Vanilla Dome 3 - 3-Up Moon" vanilla_dome_4_exit_1 = "Vanilla Dome 4 - Normal Exit" vanilla_dome_4_dragon = "Vanilla Dome 4 - Dragon Coins" +vanilla_dome_4_hidden_1up = "Vanilla Dome 4 - Hidden 1-Up" vanilla_secret_1_exit_1 = "Vanilla Secret 1 - Normal Exit" vanilla_secret_1_exit_2 = "Vanilla Secret 1 - Secret Exit" vanilla_secret_1_dragon = "Vanilla Secret 1 - Dragon Coins" @@ -58,7 +68,9 @@ vanilla_secret_3_exit_1 = "Vanilla Secret 3 - Normal Exit" vanilla_secret_3_dragon = "Vanilla Secret 3 - Dragon Coins" vanilla_ghost_house_exit_1 = "Vanilla Ghost House - Normal Exit" vanilla_ghost_house_dragon = "Vanilla Ghost House - Dragon Coins" +vanilla_ghost_house_hidden_1up = "Vanilla Ghost House - Hidden 1-Up" vanilla_fortress = "Vanilla Fortress - Normal Exit" +vanilla_fortress_hidden_1up = "Vanilla Fortress - Hidden 1-Up" vanilla_reznor = "Vanilla Fortress - Boss" vanilla_dome_castle = "#3 Lemmy's Castle - Normal Exit" vanilla_dome_koopaling = "#3 Lemmy's Castle - Boss" @@ -67,13 +79,16 @@ red_switch_palace = "Red Switch Palace" butter_bridge_1_exit_1 = "Butter Bridge 1 - Normal Exit" butter_bridge_1_dragon = "Butter Bridge 1 - Dragon Coins" +butter_bridge_1_bonus_block = "Butter Bridge 1 - 1-Up from Bonus Block" butter_bridge_2_exit_1 = "Butter Bridge 2 - Normal Exit" butter_bridge_2_dragon = "Butter Bridge 2 - Dragon Coins" cheese_bridge_exit_1 = "Cheese Bridge - Normal Exit" cheese_bridge_exit_2 = "Cheese Bridge - Secret Exit" cheese_bridge_dragon = "Cheese Bridge - Dragon Coins" +cheese_bridge_moon = "Cheese Bridge - 3-Up Moon" cookie_mountain_exit_1 = "Cookie Mountain - Normal Exit" cookie_mountain_dragon = "Cookie Mountain - Dragon Coins" +cookie_mountain_hidden_1up = "Cookie Mountain - Hidden 1-Up" soda_lake_exit_1 = "Soda Lake - Normal Exit" soda_lake_dragon = "Soda Lake - Dragon Coins" twin_bridges_castle = "#4 Ludwig's Castle - Normal Exit" @@ -87,12 +102,14 @@ forest_of_illusion_2_dragon = "Forest of Illusion 2 - Dragon Coins" forest_of_illusion_3_exit_1 = "Forest of Illusion 3 - Normal Exit" forest_of_illusion_3_exit_2 = "Forest of Illusion 3 - Secret Exit" forest_of_illusion_3_dragon = "Forest of Illusion 3 - Dragon Coins" +forest_of_illusion_3_hidden_1up = "Forest of Illusion 3 - Hidden 1-Up" forest_of_illusion_4_exit_1 = "Forest of Illusion 4 - Normal Exit" forest_of_illusion_4_exit_2 = "Forest of Illusion 4 - Secret Exit" forest_of_illusion_4_dragon = "Forest of Illusion 4 - Dragon Coins" forest_ghost_house_exit_1 = "Forest Ghost House - Normal Exit" forest_ghost_house_exit_2 = "Forest Ghost House - Secret Exit" forest_ghost_house_dragon = "Forest Ghost House - Dragon Coins" +forest_ghost_house_moon = "Forest Ghost House - 3-Up Moon" forest_secret_exit_1 = "Forest Secret - Normal Exit" forest_secret_dragon = "Forest Secret - Dragon Coins" forest_fortress = "Forest Fortress - Normal Exit" @@ -105,12 +122,15 @@ blue_switch_palace = "Blue Switch Palace" chocolate_island_1_exit_1 = "Chocolate Island 1 - Normal Exit" chocolate_island_1_dragon = "Chocolate Island 1 - Dragon Coins" +chocolate_island_1_moon = "Chocolate Island 1 - 3-Up Moon" chocolate_island_2_exit_1 = "Chocolate Island 2 - Normal Exit" chocolate_island_2_exit_2 = "Chocolate Island 2 - Secret Exit" chocolate_island_2_dragon = "Chocolate Island 2 - Dragon Coins" +chocolate_island_2_hidden_1up = "Chocolate Island 2 - Hidden 1-Up" chocolate_island_3_exit_1 = "Chocolate Island 3 - Normal Exit" chocolate_island_3_exit_2 = "Chocolate Island 3 - Secret Exit" chocolate_island_3_dragon = "Chocolate Island 3 - Dragon Coins" +chocolate_island_3_bonus_block = "Chocolate Island 3 - 1-Up from Bonus Block" chocolate_island_4_exit_1 = "Chocolate Island 4 - Normal Exit" chocolate_island_4_dragon = "Chocolate Island 4 - Dragon Coins" chocolate_island_5_exit_1 = "Chocolate Island 5 - Normal Exit" @@ -120,6 +140,7 @@ chocolate_secret_exit_1 = "Chocolate Secret - Normal Exit" chocolate_fortress = "Chocolate Fortress - Normal Exit" chocolate_reznor = "Chocolate Fortress - Boss" chocolate_castle = "#6 Wendy's Castle - Normal Exit" +chocolate_castle_hidden_1up = "#6 Wendy's Castle - Hidden 1-Up" chocolate_koopaling = "#6 Wendy's Castle - Boss" sunken_ghost_ship = "Sunken Ghost Ship - Normal Exit" @@ -127,9 +148,11 @@ sunken_ghost_ship_dragon = "Sunken Ghost Ship - Dragon Coins" valley_of_bowser_1_exit_1 = "Valley of Bowser 1 - Normal Exit" valley_of_bowser_1_dragon = "Valley of Bowser 1 - Dragon Coins" +valley_of_bowser_1_moon = "Valley of Bowser 1 - 3-Up Moon" valley_of_bowser_2_exit_1 = "Valley of Bowser 2 - Normal Exit" valley_of_bowser_2_exit_2 = "Valley of Bowser 2 - Secret Exit" valley_of_bowser_2_dragon = "Valley of Bowser 2 - Dragon Coins" +valley_of_bowser_2_hidden_1up = "Valley of Bowser 2 - Hidden 1-Up" valley_of_bowser_3_exit_1 = "Valley of Bowser 3 - Normal Exit" valley_of_bowser_3_dragon = "Valley of Bowser 3 - Dragon Coins" valley_of_bowser_4_exit_1 = "Valley of Bowser 4 - Normal Exit" @@ -141,6 +164,7 @@ valley_fortress = "Valley Fortress - Normal Exit" valley_reznor = "Valley Fortress - Boss" valley_castle = "#7 Larry's Castle - Normal Exit" valley_castle_dragon = "#7 Larry's Castle - Dragon Coins" +valley_castle_hidden_1up = "#7 Larry's Castle - Hidden 1-Up" valley_koopaling = "#7 Larry's Castle - Boss" front_door = "Front Door" @@ -161,6 +185,7 @@ star_road_5_exit_2 = "Star Road 5 - Secret Exit" special_zone_1_exit_1 = "Gnarly - Normal Exit" special_zone_1_dragon = "Gnarly - Dragon Coins" +special_zone_1_hidden_1up = "Gnarly - Hidden 1-Up" special_zone_2_exit_1 = "Tubular - Normal Exit" special_zone_2_dragon = "Tubular - Dragon Coins" special_zone_3_exit_1 = "Way Cool - Normal Exit" @@ -362,3 +387,586 @@ special_zone_7_region = "Outrageous" special_zone_8_tile = "Funky - Tile" special_zone_8_region = "Funky" special_complete = "Special Zone - Star Road - Complete" + +vanilla_secret_2_yoshi_block_1 = "Vanilla Secret 2 - Yoshi Block #1" +vanilla_secret_2_green_block_1 = "Vanilla Secret 2 - Green Switch Palace Block #1" +vanilla_secret_2_powerup_block_1 = "Vanilla Secret 2 - Powerup Block #1" +vanilla_secret_2_powerup_block_2 = "Vanilla Secret 2 - Powerup Block #2" +vanilla_secret_2_multi_coin_block_1 = "Vanilla Secret 2 - Multi Coin Block #1" +vanilla_secret_2_gray_pow_block_1 = "Vanilla Secret 2 - Gray P-Switch Block #1" +vanilla_secret_2_coin_block_1 = "Vanilla Secret 2 - Coin Block #1" +vanilla_secret_2_coin_block_2 = "Vanilla Secret 2 - Coin Block #2" +vanilla_secret_2_coin_block_3 = "Vanilla Secret 2 - Coin Block #3" +vanilla_secret_2_coin_block_4 = "Vanilla Secret 2 - Coin Block #4" +vanilla_secret_2_coin_block_5 = "Vanilla Secret 2 - Coin Block #5" +vanilla_secret_2_coin_block_6 = "Vanilla Secret 2 - Coin Block #6" +vanilla_secret_3_powerup_block_1 = "Vanilla Secret 3 - Powerup Block #1" +vanilla_secret_3_powerup_block_2 = "Vanilla Secret 3 - Powerup Block #2" +donut_ghost_house_vine_block_1 = "Donut Ghost House - Vine|P-Switch Block #1" +donut_ghost_house_directional_coin_block_1 = "Donut Ghost House - Directional Coin Block #1" +donut_ghost_house_life_block_1 = "Donut Ghost House - 1-Up Mushroom Block #1" +donut_ghost_house_life_block_2 = "Donut Ghost House - 1-Up Mushroom Block #2" +donut_ghost_house_life_block_3 = "Donut Ghost House - 1-Up Mushroom Block #3" +donut_ghost_house_life_block_4 = "Donut Ghost House - 1-Up Mushroom Block #4" +donut_plains_3_green_block_1 = "Donut Plains 3 - Green Switch Palace Block #1" +donut_plains_3_coin_block_1 = "Donut Plains 3 - Coin Block #1" +donut_plains_3_coin_block_2 = "Donut Plains 3 - Coin Block #2" +donut_plains_3_vine_block_1 = "Donut Plains 3 - Vine Block #1" +donut_plains_3_powerup_block_1 = "Donut Plains 3 - Powerup Block #1" +donut_plains_3_bonus_block_1 = "Donut Plains 3 - Bonus Block #1" +donut_plains_4_coin_block_1 = "Donut Plains 4 - Coin Block #1" +donut_plains_4_powerup_block_1 = "Donut Plains 4 - Powerup Block #1" +donut_plains_4_coin_block_2 = "Donut Plains 4 - Coin Block #2" +donut_plains_4_yoshi_block_1 = "Donut Plains 4 - Yoshi Block #1" +donut_plains_castle_yellow_block_1 = "#2 Morton's Castle - Yellow Switch Palace Block #1" +donut_plains_castle_coin_block_1 = "#2 Morton's Castle - Coin Block #1" +donut_plains_castle_powerup_block_1 = "#2 Morton's Castle - Powerup Block #1" +donut_plains_castle_coin_block_2 = "#2 Morton's Castle - Coin Block #2" +donut_plains_castle_vine_block_1 = "#2 Morton's Castle - Vine Block #1" +donut_plains_castle_invis_life_block_1 = "#2 Morton's Castle - Invisible 1-Up Mushroom Block #1" +donut_plains_castle_coin_block_3 = "#2 Morton's Castle - Coin Block #3" +donut_plains_castle_coin_block_4 = "#2 Morton's Castle - Coin Block #4" +donut_plains_castle_coin_block_5 = "#2 Morton's Castle - Coin Block #5" +donut_plains_castle_green_block_1 = "#2 Morton's Castle - Green Switch Palace Block #1" +donut_plains_2_coin_block_1 = "Donut Plains 2 - Coin Block #1" +donut_plains_2_coin_block_2 = "Donut Plains 2 - Coin Block #2" +donut_plains_2_coin_block_3 = "Donut Plains 2 - Coin Block #3" +donut_plains_2_yellow_block_1 = "Donut Plains 2 - Yellow Switch Palace Block #1" +donut_plains_2_powerup_block_1 = "Donut Plains 2 - Powerup Block #1" +donut_plains_2_multi_coin_block_1 = "Donut Plains 2 - Multi Coin Block #1" +donut_plains_2_flying_block_1 = "Donut Plains 2 - Flying Question Block #1" +donut_plains_2_green_block_1 = "Donut Plains 2 - Green Switch Palace Block #1" +donut_plains_2_yellow_block_2 = "Donut Plains 2 - Yellow Switch Palace Block #2" +donut_plains_2_vine_block_1 = "Donut Plains 2 - Vine Block #1" +donut_secret_1_coin_block_1 = "Donut Secret 1 - Coin Block #1" +donut_secret_1_coin_block_2 = "Donut Secret 1 - Coin Block #2" +donut_secret_1_powerup_block_1 = "Donut Secret 1 - Powerup Block #1" +donut_secret_1_coin_block_3 = "Donut Secret 1 - Coin Block #3" +donut_secret_1_powerup_block_2 = "Donut Secret 1 - Powerup Block #2" +donut_secret_1_powerup_block_3 = "Donut Secret 1 - Powerup Block #3" +donut_secret_1_life_block_1 = "Donut Secret 1 - 1-Up Mushroom Block #1" +donut_secret_1_powerup_block_4 = "Donut Secret 1 - Powerup Block #4" +donut_secret_1_powerup_block_5 = "Donut Secret 1 - Powerup Block #5" +donut_secret_1_key_block_1 = "Donut Secret 1 - Key Block #1" +vanilla_fortress_powerup_block_1 = "Vanilla Fortress - Powerup Block #1" +vanilla_fortress_powerup_block_2 = "Vanilla Fortress - Powerup Block #2" +vanilla_fortress_yellow_block_1 = "Vanilla Fortress - Yellow Switch Palace Block #1" +butter_bridge_1_powerup_block_1 = "Butter Bridge 1 - Powerup Block #1" +butter_bridge_1_multi_coin_block_1 = "Butter Bridge 1 - Multi Coin Block #1" +butter_bridge_1_multi_coin_block_2 = "Butter Bridge 1 - Multi Coin Block #2" +butter_bridge_1_multi_coin_block_3 = "Butter Bridge 1 - Multi Coin Block #3" +butter_bridge_1_life_block_1 = "Butter Bridge 1 - 1-Up Mushroom Block #1" +butter_bridge_1_bonus_block_1 = "Butter Bridge 1 - Bonus Block #1" +butter_bridge_2_powerup_block_1 = "Butter Bridge 2 - Powerup Block #1" +butter_bridge_2_green_block_1 = "Butter Bridge 2 - Green Switch Palace Block #1" +butter_bridge_2_yoshi_block_1 = "Butter Bridge 2 - Yoshi Block #1" +twin_bridges_castle_powerup_block_1 = "#4 Ludwig Castle - Powerup Block #1" +cheese_bridge_powerup_block_1 = "Cheese Bridge Area - Powerup Block #1" +cheese_bridge_powerup_block_2 = "Cheese Bridge Area - Powerup Block #2" +cheese_bridge_wings_block_1 = "Cheese Bridge Area - Wings Block #1" +cheese_bridge_powerup_block_3 = "Cheese Bridge Area - Powerup Block #3" +cookie_mountain_coin_block_1 = "Cookie Mountain - Coin Block #1" +cookie_mountain_coin_block_2 = "Cookie Mountain - Coin Block #2" +cookie_mountain_coin_block_3 = "Cookie Mountain - Coin Block #3" +cookie_mountain_coin_block_4 = "Cookie Mountain - Coin Block #4" +cookie_mountain_coin_block_5 = "Cookie Mountain - Coin Block #5" +cookie_mountain_coin_block_6 = "Cookie Mountain - Coin Block #6" +cookie_mountain_coin_block_7 = "Cookie Mountain - Coin Block #7" +cookie_mountain_coin_block_8 = "Cookie Mountain - Coin Block #8" +cookie_mountain_coin_block_9 = "Cookie Mountain - Coin Block #9" +cookie_mountain_powerup_block_1 = "Cookie Mountain - Powerup Block #1" +cookie_mountain_life_block_1 = "Cookie Mountain - 1-Up Mushroom Block #1" +cookie_mountain_vine_block_1 = "Cookie Mountain - Vine Block #1" +cookie_mountain_yoshi_block_1 = "Cookie Mountain - Yoshi Block #1" +cookie_mountain_coin_block_10 = "Cookie Mountain - Coin Block #10" +cookie_mountain_coin_block_11 = "Cookie Mountain - Coin Block #11" +cookie_mountain_powerup_block_2 = "Cookie Mountain - Powerup Block #2" +cookie_mountain_coin_block_12 = "Cookie Mountain - Coin Block #12" +cookie_mountain_coin_block_13 = "Cookie Mountain - Coin Block #13" +cookie_mountain_coin_block_14 = "Cookie Mountain - Coin Block #14" +cookie_mountain_coin_block_15 = "Cookie Mountain - Coin Block #15" +cookie_mountain_coin_block_16 = "Cookie Mountain - Coin Block #16" +cookie_mountain_coin_block_17 = "Cookie Mountain - Coin Block #17" +cookie_mountain_coin_block_18 = "Cookie Mountain - Coin Block #18" +cookie_mountain_coin_block_19 = "Cookie Mountain - Coin Block #19" +cookie_mountain_coin_block_20 = "Cookie Mountain - Coin Block #20" +cookie_mountain_coin_block_21 = "Cookie Mountain - Coin Block #21" +cookie_mountain_coin_block_22 = "Cookie Mountain - Coin Block #22" +cookie_mountain_coin_block_23 = "Cookie Mountain - Coin Block #23" +cookie_mountain_coin_block_24 = "Cookie Mountain - Coin Block #24" +cookie_mountain_coin_block_25 = "Cookie Mountain - Coin Block #25" +cookie_mountain_coin_block_26 = "Cookie Mountain - Coin Block #26" +cookie_mountain_coin_block_27 = "Cookie Mountain - Coin Block #27" +cookie_mountain_coin_block_28 = "Cookie Mountain - Coin Block #28" +cookie_mountain_coin_block_29 = "Cookie Mountain - Coin Block #29" +cookie_mountain_coin_block_30 = "Cookie Mountain - Coin Block #30" +soda_lake_powerup_block_1 = "Soda Lake - Powerup Block #1" +donut_secret_house_powerup_block_1 = "Donut Secret House - Powerup Block #1" +donut_secret_house_multi_coin_block_1 = "Donut Secret House - Multi Coin Block #1" +donut_secret_house_life_block_1 = "Donut Secret House - 1-Up Mushroom Block #1" +donut_secret_house_vine_block_1 = "Donut Secret House - Vine Block #1" +donut_secret_house_directional_coin_block_1 = "Donut Secret House - Directional Coin Block #1" +donut_plains_1_coin_block_1 = "Donut Plains 1 - Coin Block #1" +donut_plains_1_coin_block_2 = "Donut Plains 1 - Coin Block #2" +donut_plains_1_yoshi_block_1 = "Donut Plains 1 - Yoshi Block #1" +donut_plains_1_vine_block_1 = "Donut Plains 1 - Vine Block #1" +donut_plains_1_green_block_1 = "Donut Plains 1 - Green Switch Palace Block #1" +donut_plains_1_green_block_2 = "Donut Plains 1 - Green Switch Palace Block #2" +donut_plains_1_green_block_3 = "Donut Plains 1 - Green Switch Palace Block #3" +donut_plains_1_green_block_4 = "Donut Plains 1 - Green Switch Palace Block #4" +donut_plains_1_green_block_5 = "Donut Plains 1 - Green Switch Palace Block #5" +donut_plains_1_green_block_6 = "Donut Plains 1 - Green Switch Palace Block #6" +donut_plains_1_green_block_7 = "Donut Plains 1 - Green Switch Palace Block #7" +donut_plains_1_green_block_8 = "Donut Plains 1 - Green Switch Palace Block #8" +donut_plains_1_green_block_9 = "Donut Plains 1 - Green Switch Palace Block #9" +donut_plains_1_green_block_10 = "Donut Plains 1 - Green Switch Palace Block #10" +donut_plains_1_green_block_11 = "Donut Plains 1 - Green Switch Palace Block #11" +donut_plains_1_green_block_12 = "Donut Plains 1 - Green Switch Palace Block #12" +donut_plains_1_green_block_13 = "Donut Plains 1 - Green Switch Palace Block #13" +donut_plains_1_green_block_14 = "Donut Plains 1 - Green Switch Palace Block #14" +donut_plains_1_green_block_15 = "Donut Plains 1 - Green Switch Palace Block #15" +donut_plains_1_green_block_16 = "Donut Plains 1 - Green Switch Palace Block #16" +donut_plains_1_yellow_block_1 = "Donut Plains 1 - Yellow Switch Palace Block #1" +donut_plains_1_yellow_block_2 = "Donut Plains 1 - Yellow Switch Palace Block #2" +donut_plains_1_yellow_block_3 = "Donut Plains 1 - Yellow Switch Palace Block #3" +sunken_ghost_ship_powerup_block_1 = "Sunken Ghost Ship - Powerup Block #1" +sunken_ghost_ship_star_block_1 = "Sunken Ghost Ship - Star Block #1" +chocolate_castle_yellow_block_1 = "#6 Wendy's Castle - Yellow Switch Palace Block #1" +chocolate_castle_yellow_block_2 = "#6 Wendy's Castle - Yellow Switch Palace Block #2" +chocolate_castle_green_block_1 = "#6 Wendy's Castle - Green Switch Palace Block #1" +chocolate_fortress_powerup_block_1 = "Chocolate Fortress - Powerup Block #1" +chocolate_fortress_powerup_block_2 = "Chocolate Fortress - Powerup Block #2" +chocolate_fortress_coin_block_1 = "Chocolate Fortress - Coin Block #1" +chocolate_fortress_coin_block_2 = "Chocolate Fortress - Coin Block #2" +chocolate_fortress_green_block_1 = "Chocolate Fortress - Green Switch Palace Block #1" +chocolate_island_5_yoshi_block_1 = "Chocolate Island 5 - Yoshi Block #1" +chocolate_island_5_powerup_block_1 = "Chocolate Island 5 - Powerup Block #1" +chocolate_island_5_life_block_1 = "Chocolate Island 5 - 1-Up Mushroom Block #1" +chocolate_island_5_yellow_block_1 = "Chocolate Island 5 - Yellow Switch Palace Block #1" +chocolate_island_4_yellow_block_1 = "Chocolate Island 4 - Yellow Switch Palace Block #1" +chocolate_island_4_blue_pow_block_1 = "Chocolate Island 4 - Blue P-Switch Block #1" +chocolate_island_4_powerup_block_1 = "Chocolate Island 4 - Powerup Block #1" +forest_fortress_yellow_block_1 = "Forest Fortress - Yellow Switch Palace Block #1" +forest_fortress_powerup_block_1 = "Forest Fortress - Powerup Block #1" +forest_fortress_life_block_1 = "Forest Fortress - 1-Up Mushroom Block #1" +forest_fortress_life_block_2 = "Forest Fortress - 1-Up Mushroom Block #2" +forest_fortress_life_block_3 = "Forest Fortress - 1-Up Mushroom Block #3" +forest_fortress_life_block_4 = "Forest Fortress - 1-Up Mushroom Block #4" +forest_fortress_life_block_5 = "Forest Fortress - 1-Up Mushroom Block #5" +forest_fortress_life_block_6 = "Forest Fortress - 1-Up Mushroom Block #6" +forest_fortress_life_block_7 = "Forest Fortress - 1-Up Mushroom Block #7" +forest_fortress_life_block_8 = "Forest Fortress - 1-Up Mushroom Block #8" +forest_fortress_life_block_9 = "Forest Fortress - 1-Up Mushroom Block #9" +forest_castle_green_block_1 = "#5 Roy's Castle - Green Switch Palace Block #1" +chocolate_ghost_house_powerup_block_1 = "Choco Ghost House - Powerup Block #1" +chocolate_ghost_house_powerup_block_2 = "Choco Ghost House - Powerup Block #2" +chocolate_ghost_house_life_block_1 = "Choco Ghost House - 1-Up Mushroom Block #1" +chocolate_island_1_flying_block_1 = "Chocolate Island 1 - Flying Question Block #1" +chocolate_island_1_flying_block_2 = "Chocolate Island 1 - Flying Question Block #2" +chocolate_island_1_yoshi_block_1 = "Chocolate Island 1 - Yoshi Block #1" +chocolate_island_1_green_block_1 = "Chocolate Island 1 - Green|Yellow Switch Palace Block #1" +chocolate_island_1_life_block_1 = "Chocolate Island 1 - 1-Up Mushroom Block #1" +chocolate_island_3_powerup_block_1 = "Chocolate Island 3 - Powerup Block #1" +chocolate_island_3_powerup_block_2 = "Chocolate Island 3 - Powerup Block #2" +chocolate_island_3_powerup_block_3 = "Chocolate Island 3 - Powerup Block #3" +chocolate_island_3_green_block_1 = "Chocolate Island 3 - Green Switch Palace Block #1" +chocolate_island_3_bonus_block_1 = "Chocolate Island 3 - Bonus Block #1" +chocolate_island_3_vine_block_1 = "Chocolate Island 3 - Vine Block #1" +chocolate_island_3_life_block_1 = "Chocolate Island 3 - 1-Up Mushroom Block #1" +chocolate_island_3_life_block_2 = "Chocolate Island 3 - 1-Up Mushroom Block #2" +chocolate_island_3_life_block_3 = "Chocolate Island 3 - 1-Up Mushroom Block #3" +chocolate_island_2_multi_coin_block_1 = "Chocolate Island 2 - Multi Coin Block #1" +chocolate_island_2_invis_coin_block_1 = "Chocolate Island 2 - Invisible Coin Block #1" +chocolate_island_2_yoshi_block_1 = "Chocolate Island 2 - Yoshi Block #1" +chocolate_island_2_coin_block_1 = "Chocolate Island 2 - Coin Block #1" +chocolate_island_2_coin_block_2 = "Chocolate Island 2 - Coin Block #2" +chocolate_island_2_multi_coin_block_2 = "Chocolate Island 2 - Multi Coin Block #2" +chocolate_island_2_powerup_block_1 = "Chocolate Island 2 - Powerup Block #1" +chocolate_island_2_blue_pow_block_1 = "Chocolate Island 2 - Blue P-Switch Block #1" +chocolate_island_2_yellow_block_1 = "Chocolate Island 2 - Yellow Switch Palace Block #1" +chocolate_island_2_yellow_block_2 = "Chocolate Island 2 - Yellow Switch Palace Block #2" +chocolate_island_2_green_block_1 = "Chocolate Island 2 - Green Switch Palace Block #1" +chocolate_island_2_green_block_2 = "Chocolate Island 2 - Green Switch Palace Block #2" +chocolate_island_2_green_block_3 = "Chocolate Island 2 - Green Switch Palace Block #3" +chocolate_island_2_green_block_4 = "Chocolate Island 2 - Green Switch Palace Block #4" +chocolate_island_2_green_block_5 = "Chocolate Island 2 - Green Switch Palace Block #5" +chocolate_island_2_green_block_6 = "Chocolate Island 2 - Green Switch Palace Block #6" +yoshis_island_castle_coin_block_1 = "#1 Iggy's Castle - Coin Block #1" +yoshis_island_castle_coin_block_2 = "#1 Iggy's Castle - Coin Block #2" +yoshis_island_castle_powerup_block_1 = "#1 Iggy's Castle - Powerup Block #1" +yoshis_island_castle_coin_block_3 = "#1 Iggy's Castle - Coin Block #3" +yoshis_island_castle_coin_block_4 = "#1 Iggy's Castle - Coin Block #4" +yoshis_island_castle_flying_block_1 = "#1 Iggy's Castle - Flying Question Block #1" +yoshis_island_4_yellow_block_1 = "Yoshi's Island 4 - Yellow Switch Palace Block #1" +yoshis_island_4_powerup_block_1 = "Yoshi's Island 4 - Powerup Block #1" +yoshis_island_4_multi_coin_block_1 = "Yoshi's Island 4 - Multi Coin Block #1" +yoshis_island_4_star_block_1 = "Yoshi's Island 4 - Star Block #1" +yoshis_island_3_yellow_block_1 = "Yoshi's Island 3 - Yellow Switch Palace Block #1" +yoshis_island_3_yellow_block_2 = "Yoshi's Island 3 - Yellow Switch Palace Block #2" +yoshis_island_3_yellow_block_3 = "Yoshi's Island 3 - Yellow Switch Palace Block #3" +yoshis_island_3_yellow_block_4 = "Yoshi's Island 3 - Yellow Switch Palace Block #4" +yoshis_island_3_yellow_block_5 = "Yoshi's Island 3 - Yellow Switch Palace Block #5" +yoshis_island_3_yellow_block_6 = "Yoshi's Island 3 - Yellow Switch Palace Block #6" +yoshis_island_3_yellow_block_7 = "Yoshi's Island 3 - Yellow Switch Palace Block #7" +yoshis_island_3_yellow_block_8 = "Yoshi's Island 3 - Yellow Switch Palace Block #8" +yoshis_island_3_yellow_block_9 = "Yoshi's Island 3 - Yellow Switch Palace Block #9" +yoshis_island_3_coin_block_1 = "Yoshi's Island 3 - Coin Block #1" +yoshis_island_3_yoshi_block_1 = "Yoshi's Island 3 - Yoshi Block #1" +yoshis_island_3_coin_block_2 = "Yoshi's Island 3 - Coin Block #2" +yoshis_island_3_powerup_block_1 = "Yoshi's Island 3 - Powerup Block #1" +yoshis_island_3_yellow_block_10 = "Yoshi's Island 3 - Yellow Switch Palace Block #10" +yoshis_island_3_yellow_block_11 = "Yoshi's Island 3 - Yellow Switch Palace Block #11" +yoshis_island_3_yellow_block_12 = "Yoshi's Island 3 - Yellow Switch Palace Block #12" +yoshis_island_3_bonus_block_1 = "Yoshi's Island 3 - Bonus Block #1" +yoshis_island_1_flying_block_1 = "Yoshi's Island 1 - Flying Question Block #1" +yoshis_island_1_yellow_block_1 = "Yoshi's Island 1 - Yellow Switch Palace Block #1" +yoshis_island_1_life_block_1 = "Yoshi's Island 1 - 1-Up Mushroom Block #1" +yoshis_island_1_powerup_block_1 = "Yoshi's Island 1 - Powerup Block #1" +yoshis_island_2_flying_block_1 = "Yoshi's Island 2 - Flying Question Block #1" +yoshis_island_2_flying_block_2 = "Yoshi's Island 2 - Flying Question Block #2" +yoshis_island_2_flying_block_3 = "Yoshi's Island 2 - Flying Question Block #3" +yoshis_island_2_flying_block_4 = "Yoshi's Island 2 - Flying Question Block #4" +yoshis_island_2_flying_block_5 = "Yoshi's Island 2 - Flying Question Block #5" +yoshis_island_2_flying_block_6 = "Yoshi's Island 2 - Flying Question Block #6" +yoshis_island_2_coin_block_1 = "Yoshi's Island 2 - Coin Block #1" +yoshis_island_2_yellow_block_1 = "Yoshi's Island 2 - Yellow Switch Palace Block #1" +yoshis_island_2_coin_block_2 = "Yoshi's Island 2 - Coin Block #2" +yoshis_island_2_coin_block_3 = "Yoshi's Island 2 - Coin Block #3" +yoshis_island_2_yoshi_block_1 = "Yoshi's Island 2 - Yoshi Block #1" +yoshis_island_2_coin_block_4 = "Yoshi's Island 2 - Coin Block #4" +yoshis_island_2_yoshi_block_2 = "Yoshi's Island 2 - Yoshi Block #2" +yoshis_island_2_coin_block_5 = "Yoshi's Island 2 - Coin Block #5" +yoshis_island_2_vine_block_1 = "Yoshi's Island 2 - Vine Block #1" +yoshis_island_2_yellow_block_2 = "Yoshi's Island 2 - Yellow Switch Palace Block #2" +vanilla_ghost_house_powerup_block_1 = "Vanilla Ghost House - Powerup Block #1" +vanilla_ghost_house_vine_block_1 = "Vanilla Ghost House - Vine Block #1" +vanilla_ghost_house_powerup_block_2 = "Vanilla Ghost House - Powerup Block #2" +vanilla_ghost_house_multi_coin_block_1 = "Vanilla Ghost House - Multi Coin Block #1" +vanilla_ghost_house_blue_pow_block_1 = "Vanilla Ghost House - Blue P-Switch Block #1" +vanilla_secret_1_coin_block_1 = "Vanilla Secret 1 - Coin Block #1" +vanilla_secret_1_powerup_block_1 = "Vanilla Secret 1 - Powerup Block #1" +vanilla_secret_1_multi_coin_block_1 = "Vanilla Secret 1 - Multi Coin Block #1" +vanilla_secret_1_vine_block_1 = "Vanilla Secret 1 - Vine Block #1" +vanilla_secret_1_vine_block_2 = "Vanilla Secret 1 - Vine Block #2" +vanilla_secret_1_coin_block_2 = "Vanilla Secret 1 - Coin Block #2" +vanilla_secret_1_coin_block_3 = "Vanilla Secret 1 - Coin Block #3" +vanilla_secret_1_powerup_block_2 = "Vanilla Secret 1 - Powerup Block #2" +vanilla_dome_3_coin_block_1 = "Vanilla Dome 3 - Coin Block #1" +vanilla_dome_3_flying_block_1 = "Vanilla Dome 3 - Flying Question Block #1" +vanilla_dome_3_flying_block_2 = "Vanilla Dome 3 - Flying Question Block #2" +vanilla_dome_3_powerup_block_1 = "Vanilla Dome 3 - Powerup Block #1" +vanilla_dome_3_flying_block_3 = "Vanilla Dome 3 - Flying Question Block #3" +vanilla_dome_3_invis_coin_block_1 = "Vanilla Dome 3 - Invisible Coin Block #1" +vanilla_dome_3_powerup_block_2 = "Vanilla Dome 3 - Powerup Block #2" +vanilla_dome_3_multi_coin_block_1 = "Vanilla Dome 3 - Multi Coin Block #1" +vanilla_dome_3_powerup_block_3 = "Vanilla Dome 3 - Powerup Block #3" +vanilla_dome_3_yoshi_block_1 = "Vanilla Dome 3 - Yoshi Block #1" +vanilla_dome_3_powerup_block_4 = "Vanilla Dome 3 - Powerup Block #4" +vanilla_dome_3_pswitch_coin_block_1 = "Vanilla Dome 3 - P-Switch Coin Block #1" +vanilla_dome_3_pswitch_coin_block_2 = "Vanilla Dome 3 - P-Switch Coin Block #2" +vanilla_dome_3_pswitch_coin_block_3 = "Vanilla Dome 3 - P-Switch Coin Block #3" +vanilla_dome_3_pswitch_coin_block_4 = "Vanilla Dome 3 - P-Switch Coin Block #4" +vanilla_dome_3_pswitch_coin_block_5 = "Vanilla Dome 3 - P-Switch Coin Block #5" +vanilla_dome_3_pswitch_coin_block_6 = "Vanilla Dome 3 - P-Switch Coin Block #6" +donut_secret_2_directional_coin_block_1 = "Donut Secret 2 - Directional Coin Block #1" +donut_secret_2_vine_block_1 = "Donut Secret 2 - Vine Block #1" +donut_secret_2_star_block_1 = "Donut Secret 2 - Star Block #1" +donut_secret_2_powerup_block_1 = "Donut Secret 2 - Powerup Block #1" +donut_secret_2_star_block_2 = "Donut Secret 2 - Star Block #2" +valley_of_bowser_4_yellow_block_1 = "Valley of Bowser 4 - Yellow Switch Palace Block #1" +valley_of_bowser_4_powerup_block_1 = "Valley of Bowser 4 - Powerup Block #1" +valley_of_bowser_4_vine_block_1 = "Valley of Bowser 4 - Vine Block #1" +valley_of_bowser_4_yoshi_block_1 = "Valley of Bowser 4 - Yoshi Block #1" +valley_of_bowser_4_life_block_1 = "Valley of Bowser 4 - 1-Up Mushroom Block #1" +valley_of_bowser_4_powerup_block_2 = "Valley of Bowser 4 - Powerup Block #2" +valley_castle_yellow_block_1 = "#7 Larry's Castle - Yellow Switch Palace Block #1" +valley_castle_yellow_block_2 = "#7 Larry's Castle - Yellow Switch Palace Block #2" +valley_castle_green_block_1 = "#7 Larry's Castle - Green Switch Palace Block #1" +valley_fortress_green_block_1 = "Valley Fortress - Green Switch Palace Block #1" +valley_fortress_yellow_block_1 = "Valley Fortress - Yellow Switch Palace Block #1" +valley_of_bowser_3_powerup_block_1 = "Valley of Bowser 3 - Powerup Block #1" +valley_of_bowser_3_powerup_block_2 = "Valley of Bowser 3 - Powerup Block #2" +valley_ghost_house_pswitch_coin_block_1 = "Valley Ghost House - P-Switch Coin Block #1" +valley_ghost_house_multi_coin_block_1 = "Valley Ghost House - Multi Coin Block #1" +valley_ghost_house_powerup_block_1 = "Valley Ghost House - Powerup Block #1" +valley_ghost_house_directional_coin_block_1 = "Valley Ghost House - Directional Coin Block #1" +valley_of_bowser_2_powerup_block_1 = "Valley of Bowser 2 - Powerup Block #1" +valley_of_bowser_2_yellow_block_1 = "Valley of Bowser 2 - Yellow Switch Palace Block #1" +valley_of_bowser_2_powerup_block_2 = "Valley of Bowser 2 - Powerup Block #2" +valley_of_bowser_2_wings_block_1 = "Valley of Bowser 2 - Wings Block #1" +valley_of_bowser_1_green_block_1 = "Valley of Bowser 1 - Green Switch Palace Block #1" +valley_of_bowser_1_invis_coin_block_1 = "Valley of Bowser 1 - Invisible Coin Block #1" +valley_of_bowser_1_invis_coin_block_2 = "Valley of Bowser 1 - Invisible Coin Block #2" +valley_of_bowser_1_invis_coin_block_3 = "Valley of Bowser 1 - Invisible Coin Block #3" +valley_of_bowser_1_yellow_block_1 = "Valley of Bowser 1 - Yellow Switch Palace Block #1" +valley_of_bowser_1_yellow_block_2 = "Valley of Bowser 1 - Yellow Switch Palace Block #2" +valley_of_bowser_1_yellow_block_3 = "Valley of Bowser 1 - Yellow Switch Palace Block #3" +valley_of_bowser_1_yellow_block_4 = "Valley of Bowser 1 - Yellow Switch Palace Block #4" +valley_of_bowser_1_vine_block_1 = "Valley of Bowser 1 - Vine Block #1" +chocolate_secret_powerup_block_1 = "Chocolate Secret - Powerup Block #1" +chocolate_secret_powerup_block_2 = "Chocolate Secret - Powerup Block #2" +vanilla_dome_2_coin_block_1 = "Vanilla Dome 2 - Coin Block #1" +vanilla_dome_2_powerup_block_1 = "Vanilla Dome 2 - Powerup Block #1" +vanilla_dome_2_coin_block_2 = "Vanilla Dome 2 - Coin Block #2" +vanilla_dome_2_coin_block_3 = "Vanilla Dome 2 - Coin Block #3" +vanilla_dome_2_vine_block_1 = "Vanilla Dome 2 - Vine Block #1" +vanilla_dome_2_invis_life_block_1 = "Vanilla Dome 2 - Invisible 1-Up Mushroom Block #1" +vanilla_dome_2_coin_block_4 = "Vanilla Dome 2 - Coin Block #4" +vanilla_dome_2_coin_block_5 = "Vanilla Dome 2 - Coin Block #5" +vanilla_dome_2_powerup_block_2 = "Vanilla Dome 2 - Powerup Block #2" +vanilla_dome_2_powerup_block_3 = "Vanilla Dome 2 - Powerup Block #3" +vanilla_dome_2_powerup_block_4 = "Vanilla Dome 2 - Powerup Block #4" +vanilla_dome_2_powerup_block_5 = "Vanilla Dome 2 - Powerup Block #5" +vanilla_dome_2_multi_coin_block_1 = "Vanilla Dome 2 - Multi Coin Block #1" +vanilla_dome_2_multi_coin_block_2 = "Vanilla Dome 2 - Multi Coin Block #2" +vanilla_dome_4_powerup_block_1 = "Vanilla Dome 4 - Powerup Block #1" +vanilla_dome_4_powerup_block_2 = "Vanilla Dome 4 - Powerup Block #2" +vanilla_dome_4_coin_block_1 = "Vanilla Dome 4 - Coin Block #1" +vanilla_dome_4_coin_block_2 = "Vanilla Dome 4 - Coin Block #2" +vanilla_dome_4_coin_block_3 = "Vanilla Dome 4 - Coin Block #3" +vanilla_dome_4_life_block_1 = "Vanilla Dome 4 - 1-Up Mushroom Block #1" +vanilla_dome_4_coin_block_4 = "Vanilla Dome 4 - Coin Block #4" +vanilla_dome_4_coin_block_5 = "Vanilla Dome 4 - Coin Block #5" +vanilla_dome_4_coin_block_6 = "Vanilla Dome 4 - Coin Block #6" +vanilla_dome_4_coin_block_7 = "Vanilla Dome 4 - Coin Block #7" +vanilla_dome_4_coin_block_8 = "Vanilla Dome 4 - Coin Block #8" +vanilla_dome_1_flying_block_1 = "Vanilla Dome 1 - Flying Question Block #1" +vanilla_dome_1_powerup_block_1 = "Vanilla Dome 1 - Powerup Block #1" +vanilla_dome_1_powerup_block_2 = "Vanilla Dome 1 - Powerup Block #2" +vanilla_dome_1_coin_block_1 = "Vanilla Dome 1 - Coin Block #1" +vanilla_dome_1_life_block_1 = "Vanilla Dome 1 - 1-Up Mushroom Block #1" +vanilla_dome_1_powerup_block_3 = "Vanilla Dome 1 - Powerup Block #3" +vanilla_dome_1_vine_block_1 = "Vanilla Dome 1 - Vine Block #1" +vanilla_dome_1_star_block_1 = "Vanilla Dome 1 - Star Block #1" +vanilla_dome_1_powerup_block_4 = "Vanilla Dome 1 - Powerup Block #4" +vanilla_dome_1_coin_block_2 = "Vanilla Dome 1 - Coin Block #2" +vanilla_dome_castle_life_block_1 = "#3 Lemmy's Castle - 1-Up Mushroom Block #1" +vanilla_dome_castle_life_block_2 = "#3 Lemmy's Castle - 1-Up Mushroom Block #2" +vanilla_dome_castle_powerup_block_1 = "#3 Lemmy's Castle - Powerup Block #1" +vanilla_dome_castle_life_block_3 = "#3 Lemmy's Castle - 1-Up Mushroom Block #3" +vanilla_dome_castle_green_block_1 = "#3 Lemmy's Castle - Green Switch Palace Block #1" +forest_ghost_house_coin_block_1 = "Forest Ghost House - Coin Block #1" +forest_ghost_house_powerup_block_1 = "Forest Ghost House - Powerup Block #1" +forest_ghost_house_flying_block_1 = "Forest Ghost House - Flying Question Block #1" +forest_ghost_house_powerup_block_2 = "Forest Ghost House - Powerup Block #2" +forest_ghost_house_life_block_1 = "Forest Ghost House - 1-Up Mushroom Block #1" +forest_of_illusion_1_powerup_block_1 = "Forest of Illusion 1 - Powerup Block #1" +forest_of_illusion_1_yoshi_block_1 = "Forest of Illusion 1 - Yoshi Block #1" +forest_of_illusion_1_powerup_block_2 = "Forest of Illusion 1 - Powerup Block #2" +forest_of_illusion_1_key_block_1 = "Forest of Illusion 1 - Key Block #1" +forest_of_illusion_1_life_block_1 = "Forest of Illusion 1 - 1-Up Mushroom Block #1" +forest_of_illusion_4_multi_coin_block_1 = "Forest of Illusion 4 - Multi Coin Block #1" +forest_of_illusion_4_coin_block_1 = "Forest of Illusion 4 - Coin Block #1" +forest_of_illusion_4_coin_block_2 = "Forest of Illusion 4 - Coin Block #2" +forest_of_illusion_4_coin_block_3 = "Forest of Illusion 4 - Coin Block #3" +forest_of_illusion_4_coin_block_4 = "Forest of Illusion 4 - Coin Block #4" +forest_of_illusion_4_powerup_block_1 = "Forest of Illusion 4 - Powerup Block #1" +forest_of_illusion_4_coin_block_5 = "Forest of Illusion 4 - Coin Block #5" +forest_of_illusion_4_coin_block_6 = "Forest of Illusion 4 - Coin Block #6" +forest_of_illusion_4_coin_block_7 = "Forest of Illusion 4 - Coin Block #7" +forest_of_illusion_4_powerup_block_2 = "Forest of Illusion 4 - Powerup Block #2" +forest_of_illusion_4_coin_block_8 = "Forest of Illusion 4 - Coin Block #8" +forest_of_illusion_4_coin_block_9 = "Forest of Illusion 4 - Coin Block #9" +forest_of_illusion_4_coin_block_10 = "Forest of Illusion 4 - Coin Block #10" +forest_of_illusion_2_green_block_1 = "Forest of Illusion 2 - Green Switch Palace Block #1" +forest_of_illusion_2_powerup_block_1 = "Forest of Illusion 2 - Powerup Block #1" +forest_of_illusion_2_invis_coin_block_1 = "Forest of Illusion 2 - Invisible Coin Block #1" +forest_of_illusion_2_invis_coin_block_2 = "Forest of Illusion 2 - Invisible Coin Block #2" +forest_of_illusion_2_invis_life_block_1 = "Forest of Illusion 2 - Invisible 1-Up Mushroom Block #1" +forest_of_illusion_2_invis_coin_block_3 = "Forest of Illusion 2 - Invisible Coin Block #3" +forest_of_illusion_2_yellow_block_1 = "Forest of Illusion 2 - Yellow Switch Palace Block #1" +forest_secret_powerup_block_1 = "Forest Secret Area - Powerup Block #1" +forest_secret_powerup_block_2 = "Forest Secret Area - Powerup Block #2" +forest_secret_life_block_1 = "Forest Secret Area - 1-Up Mushroom Block #1" +forest_of_illusion_3_yoshi_block_1 = "Forest of Illusion 3 - Yoshi Block #1" +forest_of_illusion_3_coin_block_1 = "Forest of Illusion 3 - Coin Block #1" +forest_of_illusion_3_multi_coin_block_1 = "Forest of Illusion 3 - Multi Coin Block #1" +forest_of_illusion_3_coin_block_2 = "Forest of Illusion 3 - Coin Block #2" +forest_of_illusion_3_multi_coin_block_2 = "Forest of Illusion 3 - Multi Coin Block #2" +forest_of_illusion_3_coin_block_3 = "Forest of Illusion 3 - Coin Block #3" +forest_of_illusion_3_coin_block_4 = "Forest of Illusion 3 - Coin Block #4" +forest_of_illusion_3_coin_block_5 = "Forest of Illusion 3 - Coin Block #5" +forest_of_illusion_3_coin_block_6 = "Forest of Illusion 3 - Coin Block #6" +forest_of_illusion_3_coin_block_7 = "Forest of Illusion 3 - Coin Block #7" +forest_of_illusion_3_coin_block_8 = "Forest of Illusion 3 - Coin Block #8" +forest_of_illusion_3_coin_block_9 = "Forest of Illusion 3 - Coin Block #9" +forest_of_illusion_3_coin_block_10 = "Forest of Illusion 3 - Coin Block #10" +forest_of_illusion_3_coin_block_11 = "Forest of Illusion 3 - Coin Block #11" +forest_of_illusion_3_coin_block_12 = "Forest of Illusion 3 - Coin Block #12" +forest_of_illusion_3_coin_block_13 = "Forest of Illusion 3 - Coin Block #13" +forest_of_illusion_3_coin_block_14 = "Forest of Illusion 3 - Coin Block #14" +forest_of_illusion_3_coin_block_15 = "Forest of Illusion 3 - Coin Block #15" +forest_of_illusion_3_coin_block_16 = "Forest of Illusion 3 - Coin Block #16" +forest_of_illusion_3_coin_block_17 = "Forest of Illusion 3 - Coin Block #17" +forest_of_illusion_3_coin_block_18 = "Forest of Illusion 3 - Coin Block #18" +forest_of_illusion_3_coin_block_19 = "Forest of Illusion 3 - Coin Block #19" +forest_of_illusion_3_coin_block_20 = "Forest of Illusion 3 - Coin Block #20" +forest_of_illusion_3_coin_block_21 = "Forest of Illusion 3 - Coin Block #21" +forest_of_illusion_3_coin_block_22 = "Forest of Illusion 3 - Coin Block #22" +forest_of_illusion_3_coin_block_23 = "Forest of Illusion 3 - Coin Block #23" +forest_of_illusion_3_coin_block_24 = "Forest of Illusion 3 - Coin Block #24" +special_zone_8_yoshi_block_1 = "Funky - Yoshi Block #1" +special_zone_8_coin_block_1 = "Funky - Coin Block #1" +special_zone_8_coin_block_2 = "Funky - Coin Block #2" +special_zone_8_coin_block_3 = "Funky - Coin Block #3" +special_zone_8_coin_block_4 = "Funky - Coin Block #4" +special_zone_8_coin_block_5 = "Funky - Coin Block #5" +special_zone_8_blue_pow_block_1 = "Funky - Blue P-Switch Block #1" +special_zone_8_powerup_block_1 = "Funky - Powerup Block #1" +special_zone_8_star_block_1 = "Funky - Star Block #1" +special_zone_8_coin_block_6 = "Funky - Coin Block #6" +special_zone_8_coin_block_7 = "Funky - Coin Block #7" +special_zone_8_coin_block_8 = "Funky - Coin Block #8" +special_zone_8_coin_block_9 = "Funky - Coin Block #9" +special_zone_8_coin_block_10 = "Funky - Coin Block #10" +special_zone_8_coin_block_11 = "Funky - Coin Block #11" +special_zone_8_coin_block_12 = "Funky - Coin Block #12" +special_zone_8_coin_block_13 = "Funky - Coin Block #13" +special_zone_8_coin_block_14 = "Funky - Coin Block #14" +special_zone_8_coin_block_15 = "Funky - Coin Block #15" +special_zone_8_coin_block_16 = "Funky - Coin Block #16" +special_zone_8_coin_block_17 = "Funky - Coin Block #17" +special_zone_8_coin_block_18 = "Funky - Coin Block #18" +special_zone_8_multi_coin_block_1 = "Funky - Multi Coin Block #1" +special_zone_8_coin_block_19 = "Funky - Coin Block #19" +special_zone_8_coin_block_20 = "Funky - Coin Block #20" +special_zone_8_coin_block_21 = "Funky - Coin Block #21" +special_zone_8_coin_block_22 = "Funky - Coin Block #22" +special_zone_8_coin_block_23 = "Funky - Coin Block #23" +special_zone_8_powerup_block_2 = "Funky - Powerup Block #2" +special_zone_8_flying_block_1 = "Funky - Flying Question Block #1" +special_zone_7_powerup_block_1 = "Outrageous - Powerup Block #1" +special_zone_7_yoshi_block_1 = "Outrageous - Yoshi Block #1" +special_zone_7_coin_block_1 = "Outrageous - Coin Block #1" +special_zone_7_powerup_block_2 = "Outrageous - Powerup Block #2" +special_zone_7_coin_block_2 = "Outrageous - Coin Block #2" +special_zone_6_powerup_block_1 = "Mondo - Powerup Block #1" +special_zone_6_coin_block_1 = "Mondo - Coin Block #1" +special_zone_6_coin_block_2 = "Mondo - Coin Block #2" +special_zone_6_yoshi_block_1 = "Mondo - Yoshi Block #1" +special_zone_6_life_block_1 = "Mondo - 1-Up Mushroom Block #1" +special_zone_6_multi_coin_block_1 = "Mondo - Multi Coin Block #1" +special_zone_6_coin_block_3 = "Mondo - Coin Block #3" +special_zone_6_coin_block_4 = "Mondo - Coin Block #4" +special_zone_6_coin_block_5 = "Mondo - Coin Block #5" +special_zone_6_coin_block_6 = "Mondo - Coin Block #6" +special_zone_6_coin_block_7 = "Mondo - Coin Block #7" +special_zone_6_coin_block_8 = "Mondo - Coin Block #8" +special_zone_6_coin_block_9 = "Mondo - Coin Block #9" +special_zone_6_coin_block_10 = "Mondo - Coin Block #10" +special_zone_6_coin_block_11 = "Mondo - Coin Block #11" +special_zone_6_coin_block_12 = "Mondo - Coin Block #12" +special_zone_6_coin_block_13 = "Mondo - Coin Block #13" +special_zone_6_coin_block_14 = "Mondo - Coin Block #14" +special_zone_6_coin_block_15 = "Mondo - Coin Block #15" +special_zone_6_coin_block_16 = "Mondo - Coin Block #16" +special_zone_6_coin_block_17 = "Mondo - Coin Block #17" +special_zone_6_coin_block_18 = "Mondo - Coin Block #18" +special_zone_6_coin_block_19 = "Mondo - Coin Block #19" +special_zone_6_coin_block_20 = "Mondo - Coin Block #20" +special_zone_6_coin_block_21 = "Mondo - Coin Block #21" +special_zone_6_coin_block_22 = "Mondo - Coin Block #22" +special_zone_6_coin_block_23 = "Mondo - Coin Block #23" +special_zone_6_coin_block_24 = "Mondo - Coin Block #24" +special_zone_6_coin_block_25 = "Mondo - Coin Block #25" +special_zone_6_coin_block_26 = "Mondo - Coin Block #26" +special_zone_6_coin_block_27 = "Mondo - Coin Block #27" +special_zone_6_coin_block_28 = "Mondo - Coin Block #28" +special_zone_6_powerup_block_2 = "Mondo - Powerup Block #2" +special_zone_6_coin_block_29 = "Mondo - Coin Block #29" +special_zone_6_coin_block_30 = "Mondo - Coin Block #30" +special_zone_6_coin_block_31 = "Mondo - Coin Block #31" +special_zone_6_coin_block_32 = "Mondo - Coin Block #32" +special_zone_6_coin_block_33 = "Mondo - Coin Block #33" +special_zone_5_yoshi_block_1 = "Groovy - Yoshi Block #1" +special_zone_1_vine_block_1 = "Gnarly - Vine Block #1" +special_zone_1_vine_block_2 = "Gnarly - Vine Block #2" +special_zone_1_vine_block_3 = "Gnarly - Vine Block #3" +special_zone_1_vine_block_4 = "Gnarly - Vine Block #4" +special_zone_1_life_block_1 = "Gnarly - 1-Up Mushroom Block #1" +special_zone_1_vine_block_5 = "Gnarly - Vine Block #5" +special_zone_1_blue_pow_block_1 = "Gnarly - Blue P-Switch Block #1" +special_zone_1_vine_block_6 = "Gnarly - Vine Block #6" +special_zone_1_powerup_block_1 = "Gnarly - Powerup Block #1" +special_zone_1_pswitch_coin_block_1 = "Gnarly - P-Switch Coin Block #1" +special_zone_1_pswitch_coin_block_2 = "Gnarly - P-Switch Coin Block #2" +special_zone_1_pswitch_coin_block_3 = "Gnarly - P-Switch Coin Block #3" +special_zone_1_pswitch_coin_block_4 = "Gnarly - P-Switch Coin Block #4" +special_zone_1_pswitch_coin_block_5 = "Gnarly - P-Switch Coin Block #5" +special_zone_1_pswitch_coin_block_6 = "Gnarly - P-Switch Coin Block #6" +special_zone_1_pswitch_coin_block_7 = "Gnarly - P-Switch Coin Block #7" +special_zone_1_pswitch_coin_block_8 = "Gnarly - P-Switch Coin Block #8" +special_zone_1_pswitch_coin_block_9 = "Gnarly - P-Switch Coin Block #9" +special_zone_1_pswitch_coin_block_10 = "Gnarly - P-Switch Coin Block #10" +special_zone_1_pswitch_coin_block_11 = "Gnarly - P-Switch Coin Block #11" +special_zone_1_pswitch_coin_block_12 = "Gnarly - P-Switch Coin Block #12" +special_zone_1_pswitch_coin_block_13 = "Gnarly - P-Switch Coin Block #13" +special_zone_2_powerup_block_1 = "Tubular - Powerup Block #1" +special_zone_2_coin_block_1 = "Tubular - Coin Block #1" +special_zone_2_coin_block_2 = "Tubular - Coin Block #2" +special_zone_2_powerup_block_2 = "Tubular - Powerup Block #2" +special_zone_2_coin_block_3 = "Tubular - Coin Block #3" +special_zone_2_coin_block_4 = "Tubular - Coin Block #4" +special_zone_2_powerup_block_3 = "Tubular - Powerup Block #3" +special_zone_2_multi_coin_block_1 = "Tubular - Multi Coin Block #1" +special_zone_2_coin_block_5 = "Tubular - Coin Block #5" +special_zone_2_coin_block_6 = "Tubular - Coin Block #6" +special_zone_3_powerup_block_1 = "Way Cool - Powerup Block #1" +special_zone_3_yoshi_block_1 = "Way Cool - Yoshi Block #1" +special_zone_3_wings_block_1 = "Way Cool - Wings Block #1" +special_zone_4_powerup_block_1 = "Awesome - Powerup Block #1" +special_zone_4_star_block_1 = "Awesome - Star Block #1" +star_road_2_star_block_1 = "Star Road 2 - Star Block #1" +star_road_3_key_block_1 = "Star Road 3 - Key Block #1" +star_road_4_powerup_block_1 = "Star Road 4 - Powerup Block #1" +star_road_4_green_block_1 = "Star Road 4 - Green Switch Palace Block #1" +star_road_4_green_block_2 = "Star Road 4 - Green Switch Palace Block #2" +star_road_4_green_block_3 = "Star Road 4 - Green Switch Palace Block #3" +star_road_4_green_block_4 = "Star Road 4 - Green Switch Palace Block #4" +star_road_4_green_block_5 = "Star Road 4 - Green Switch Palace Block #5" +star_road_4_green_block_6 = "Star Road 4 - Green Switch Palace Block #6" +star_road_4_green_block_7 = "Star Road 4 - Green Switch Palace Block #7" +star_road_4_key_block_1 = "Star Road 4 - Key Block #1" +star_road_5_directional_coin_block_1 = "Star Road 5 - Directional Coin Block #1" +star_road_5_life_block_1 = "Star Road 5 - 1-Up Mushroom Block #1" +star_road_5_vine_block_1 = "Star Road 5 - Vine Block #1" +star_road_5_yellow_block_1 = "Star Road 5 - Yellow Switch Palace Block #1" +star_road_5_yellow_block_2 = "Star Road 5 - Yellow Switch Palace Block #2" +star_road_5_yellow_block_3 = "Star Road 5 - Yellow Switch Palace Block #3" +star_road_5_yellow_block_4 = "Star Road 5 - Yellow Switch Palace Block #4" +star_road_5_yellow_block_5 = "Star Road 5 - Yellow Switch Palace Block #5" +star_road_5_yellow_block_6 = "Star Road 5 - Yellow Switch Palace Block #6" +star_road_5_yellow_block_7 = "Star Road 5 - Yellow Switch Palace Block #7" +star_road_5_yellow_block_8 = "Star Road 5 - Yellow Switch Palace Block #8" +star_road_5_yellow_block_9 = "Star Road 5 - Yellow Switch Palace Block #9" +star_road_5_yellow_block_10 = "Star Road 5 - Yellow Switch Palace Block #10" +star_road_5_yellow_block_11 = "Star Road 5 - Yellow Switch Palace Block #11" +star_road_5_yellow_block_12 = "Star Road 5 - Yellow Switch Palace Block #12" +star_road_5_yellow_block_13 = "Star Road 5 - Yellow Switch Palace Block #13" +star_road_5_yellow_block_14 = "Star Road 5 - Yellow Switch Palace Block #14" +star_road_5_yellow_block_15 = "Star Road 5 - Yellow Switch Palace Block #15" +star_road_5_yellow_block_16 = "Star Road 5 - Yellow Switch Palace Block #16" +star_road_5_yellow_block_17 = "Star Road 5 - Yellow Switch Palace Block #17" +star_road_5_yellow_block_18 = "Star Road 5 - Yellow Switch Palace Block #18" +star_road_5_yellow_block_19 = "Star Road 5 - Yellow Switch Palace Block #19" +star_road_5_yellow_block_20 = "Star Road 5 - Yellow Switch Palace Block #20" +star_road_5_green_block_1 = "Star Road 5 - Green Switch Palace Block #1" +star_road_5_green_block_2 = "Star Road 5 - Green Switch Palace Block #2" +star_road_5_green_block_3 = "Star Road 5 - Green Switch Palace Block #3" +star_road_5_green_block_4 = "Star Road 5 - Green Switch Palace Block #4" +star_road_5_green_block_5 = "Star Road 5 - Green Switch Palace Block #5" +star_road_5_green_block_6 = "Star Road 5 - Green Switch Palace Block #6" +star_road_5_green_block_7 = "Star Road 5 - Green Switch Palace Block #7" +star_road_5_green_block_8 = "Star Road 5 - Green Switch Palace Block #8" +star_road_5_green_block_9 = "Star Road 5 - Green Switch Palace Block #9" +star_road_5_green_block_10 = "Star Road 5 - Green Switch Palace Block #10" +star_road_5_green_block_11 = "Star Road 5 - Green Switch Palace Block #11" +star_road_5_green_block_12 = "Star Road 5 - Green Switch Palace Block #12" +star_road_5_green_block_13 = "Star Road 5 - Green Switch Palace Block #13" +star_road_5_green_block_14 = "Star Road 5 - Green Switch Palace Block #14" +star_road_5_green_block_15 = "Star Road 5 - Green Switch Palace Block #15" +star_road_5_green_block_16 = "Star Road 5 - Green Switch Palace Block #16" +star_road_5_green_block_17 = "Star Road 5 - Green Switch Palace Block #17" +star_road_5_green_block_18 = "Star Road 5 - Green Switch Palace Block #18" +star_road_5_green_block_19 = "Star Road 5 - Green Switch Palace Block #19" +star_road_5_green_block_20 = "Star Road 5 - Green Switch Palace Block #20" diff --git a/worlds/smw/Names/TextBox.py b/worlds/smw/Names/TextBox.py index cecf0886..2302a5f8 100644 --- a/worlds/smw/Names/TextBox.py +++ b/worlds/smw/Names/TextBox.py @@ -1,5 +1,5 @@ -from BaseClasses import MultiWorld +from worlds.AutoWorld import World import math @@ -63,21 +63,23 @@ def generate_text_box(input_string): return out_bytes -def generate_goal_text(world: MultiWorld, player: int): +def generate_goal_text(world: World): out_array = bytearray() - if world.goal[player] == "yoshi_egg_hunt": - required_yoshi_eggs = max(math.floor( - world.number_of_yoshi_eggs[player].value * (world.percentage_of_yoshi_eggs[player].value / 100.0)), 1) + if world.options.goal == "yoshi_egg_hunt": + required_yoshi_eggs = world.required_egg_count + actual_yoshi_eggs = world.actual_egg_count out_array += bytearray([0x9F, 0x9F]) out_array += string_to_bytes(" You must acquire") out_array[-1] += 0x80 - out_array += string_to_bytes(f' {required_yoshi_eggs:02} Yoshi Eggs,') + out_array += string_to_bytes(f' {required_yoshi_eggs:03} of {actual_yoshi_eggs:03}') + out_array[-1] += 0x80 + out_array += string_to_bytes(f' Yoshi Eggs,') out_array[-1] += 0x80 out_array += string_to_bytes("then return here.") out_array[-1] += 0x80 - out_array += bytearray([0x9F, 0x9F, 0x9F]) + out_array += bytearray([0x9F, 0x9F]) else: - bosses_required = world.bosses_required[player].value + bosses_required = world.options.bosses_required.value out_array += bytearray([0x9F, 0x9F]) out_array += string_to_bytes(" You must defeat") out_array[-1] += 0x80 diff --git a/worlds/smw/Options.py b/worlds/smw/Options.py index 60135896..ab7fcccd 100644 --- a/worlds/smw/Options.py +++ b/worlds/smw/Options.py @@ -1,6 +1,6 @@ -import typing +from dataclasses import dataclass -from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList +from Options import Choice, Range, Toggle, DeathLink, DefaultOnToggle, PerGameCommonOptions class Goal(Choice): @@ -27,11 +27,13 @@ class BossesRequired(Range): class NumberOfYoshiEggs(Range): """ - How many Yoshi Eggs are in the pool for Yoshi Egg Hunt + Maximum possible number of Yoshi Eggs that will be in the item pool + If fewer available locations exist in the pool than this number, the number of available locations will be used instead. + Required Percentage of Yoshi Eggs will be calculated based off of that number. """ - display_name = "Total Number of Yoshi Eggs" + display_name = "Max Number of Yoshi Eggs" range_start = 1 - range_end = 80 + range_end = 255 default = 50 @@ -52,6 +54,40 @@ class DragonCoinChecks(Toggle): display_name = "Dragon Coin Checks" +class MoonChecks(Toggle): + """ + Whether collecting a 3-Up Moon in a level will grant a check + """ + display_name = "3up Moon Checks" + + +class Hidden1UpChecks(Toggle): + """ + Whether collecting a hidden 1-Up mushroom in a level will grant a check + These checks are considered cryptic as there's no actual indicator that they're in their respective places + Enable this option at your own risk + """ + display_name = "Hidden 1-Up Checks" + + +class BonusBlockChecks(Toggle): + """ + Whether collecting a 1-Up mushroom from a Bonus Block in a level will grant a check + """ + display_name = "Bonus Block Checks" + + +class Blocksanity(Toggle): + """ + Whether hitting a block with an item or coin inside will grant a check + Note that some blocks are excluded due to how the option and the game works! + Exclusion list: + * Blocks in Top Secret Area & Front Door/Bowser Castle + * Blocks that are unreachable unless you glitch your way in + """ + display_name = "Blocksanity" + + class BowserCastleDoors(Choice): """ How the doors of Bowser's Castle behave @@ -127,16 +163,6 @@ class SwapDonutGhostHouseExits(Toggle): display_name = "Swap Donut GH Exits" -class DisplaySentItemPopups(Choice): - """ - What messages to display in-game for items sent - """ - display_name = "Display Sent Item Popups" - option_none = 0 - option_all = 1 - default = 1 - - class DisplayReceivedItemPopups(Choice): """ What messages to display in-game for items received @@ -145,7 +171,18 @@ class DisplayReceivedItemPopups(Choice): option_none = 0 option_all = 1 option_progression = 2 - default = 2 + option_progression_minus_yoshi_eggs = 3 + default = 3 + + +class JunkFillPercentage(Range): + """ + Replace a percentage of non-required Yoshi Eggs in the item pool with random junk items (only applicable on Yoshi Egg Hunt goal) + """ + display_name = "Junk Fill Percentage" + range_start = 0 + range_end = 100 + default = 0 class TrapFillPercentage(Range): @@ -197,6 +234,20 @@ class TimerTrapWeight(BaseTrapWeight): display_name = "Timer Trap Weight" +class ReverseTrapWeight(BaseTrapWeight): + """ + Likelihood of a receiving a trap which causes the controls to be reversed in the current level + """ + display_name = "Reverse Trap Weight" + + +class ThwimpTrapWeight(BaseTrapWeight): + """ + Likelihood of a receiving a trap which causes a Thwimp to spawn above the player + """ + display_name = "Thwimp Trap Weight" + + class Autosave(DefaultOnToggle): """ Whether a save prompt will appear after every level @@ -239,6 +290,21 @@ class MusicShuffle(Choice): default = 0 +class SFXShuffle(Choice): + """ + Shuffles almost every instance of sound effect playback + Archipelago elements that play sound effects aren't randomized + None: No SFX are shuffled + Full: Each individual SFX call has a random SFX + Singularity: The entire game uses one SFX for every SFX call + """ + display_name = "Sound Effect Shuffle" + option_none = 0 + option_full = 1 + option_singularity = 2 + default = 0 + + class MarioPalette(Choice): """ Mario palette color @@ -255,25 +321,32 @@ class MarioPalette(Choice): default = 0 -class ForegroundPaletteShuffle(Toggle): +class LevelPaletteShuffle(Choice): """ - Whether to shuffle level foreground palettes + Whether to shuffle level palettes + Off: Do not shuffle palettes + On Legacy: Uses only the palette sets from the original game + On Curated: Uses custom, hand-crafted palette sets """ - display_name = "Foreground Palette Shuffle" + display_name = "Level Palette Shuffle" + option_off = 0 + option_on_legacy = 1 + option_on_curated = 2 + default = 0 -class BackgroundPaletteShuffle(Toggle): - """ - Whether to shuffle level background palettes - """ - display_name = "Background Palette Shuffle" - - -class OverworldPaletteShuffle(Toggle): +class OverworldPaletteShuffle(Choice): """ Whether to shuffle overworld palettes + Off: Do not shuffle palettes + On Legacy: Uses only the palette sets from the original game + On Curated: Uses custom, hand-crafted palette sets """ display_name = "Overworld Palette Shuffle" + option_off = 0 + option_on_legacy = 1 + option_on_curated = 2 + default = 0 class StartingLifeCount(Range): @@ -286,34 +359,39 @@ class StartingLifeCount(Range): default = 5 - -smw_options: typing.Dict[str, type(Option)] = { - "death_link": DeathLink, - "goal": Goal, - "bosses_required": BossesRequired, - "number_of_yoshi_eggs": NumberOfYoshiEggs, - "percentage_of_yoshi_eggs": PercentageOfYoshiEggs, - "dragon_coin_checks": DragonCoinChecks, - "bowser_castle_doors": BowserCastleDoors, - "bowser_castle_rooms": BowserCastleRooms, - "level_shuffle": LevelShuffle, - "exclude_special_zone": ExcludeSpecialZone, - "boss_shuffle": BossShuffle, - "swap_donut_gh_exits": SwapDonutGhostHouseExits, - #"display_sent_item_popups": DisplaySentItemPopups, - "display_received_item_popups": DisplayReceivedItemPopups, - "trap_fill_percentage": TrapFillPercentage, - "ice_trap_weight": IceTrapWeight, - "stun_trap_weight": StunTrapWeight, - "literature_trap_weight": LiteratureTrapWeight, - "timer_trap_weight": TimerTrapWeight, - "autosave": Autosave, - "early_climb": EarlyClimb, - "overworld_speed": OverworldSpeed, - "music_shuffle": MusicShuffle, - "mario_palette": MarioPalette, - "foreground_palette_shuffle": ForegroundPaletteShuffle, - "background_palette_shuffle": BackgroundPaletteShuffle, - "overworld_palette_shuffle": OverworldPaletteShuffle, - "starting_life_count": StartingLifeCount, -} +@dataclass +class SMWOptions(PerGameCommonOptions): + death_link: DeathLink + goal: Goal + bosses_required: BossesRequired + max_yoshi_egg_cap: NumberOfYoshiEggs + percentage_of_yoshi_eggs: PercentageOfYoshiEggs + dragon_coin_checks: DragonCoinChecks + moon_checks: MoonChecks + hidden_1up_checks: Hidden1UpChecks + bonus_block_checks: BonusBlockChecks + blocksanity: Blocksanity + bowser_castle_doors: BowserCastleDoors + bowser_castle_rooms: BowserCastleRooms + level_shuffle: LevelShuffle + exclude_special_zone: ExcludeSpecialZone + boss_shuffle: BossShuffle + swap_donut_gh_exits: SwapDonutGhostHouseExits + display_received_item_popups: DisplayReceivedItemPopups + junk_fill_percentage: JunkFillPercentage + trap_fill_percentage: TrapFillPercentage + ice_trap_weight: IceTrapWeight + stun_trap_weight: StunTrapWeight + literature_trap_weight: LiteratureTrapWeight + timer_trap_weight: TimerTrapWeight + reverse_trap_weight: ReverseTrapWeight + thwimp_trap_weight: ThwimpTrapWeight + autosave: Autosave + early_climb: EarlyClimb + overworld_speed: OverworldSpeed + music_shuffle: MusicShuffle + sfx_shuffle: SFXShuffle + mario_palette: MarioPalette + level_palette_shuffle: LevelPaletteShuffle + overworld_palette_shuffle: OverworldPaletteShuffle + starting_life_count: StartingLifeCount diff --git a/worlds/smw/Regions.py b/worlds/smw/Regions.py index 885f209a..2f8a128a 100644 --- a/worlds/smw/Regions.py +++ b/worlds/smw/Regions.py @@ -1,467 +1,470 @@ import typing -from BaseClasses import MultiWorld, Region, Entrance +from BaseClasses import CollectionState, MultiWorld, Region, Entrance from .Locations import SMWLocation from .Levels import level_info_dict from .Names import LocationName, ItemName from worlds.generic.Rules import add_rule, set_rule +from worlds.AutoWorld import World -def create_regions(world, player: int, active_locations): - menu_region = create_region(world, player, active_locations, 'Menu', None) +def create_regions(world: World, active_locations): + multiworld: MultiWorld = world.multiworld + player: int = world.player - yoshis_island_region = create_region(world, player, active_locations, LocationName.yoshis_island_region, None) + menu_region = create_region(multiworld, player, active_locations, 'Menu', None) + yoshis_island_region = create_region(multiworld, player, active_locations, LocationName.yoshis_island_region, None) - yoshis_house_tile = create_region(world, player, active_locations, LocationName.yoshis_house_tile, None) + yoshis_house_tile = create_region(multiworld, player, active_locations, LocationName.yoshis_house_tile, None) yoshis_house_region_locations = [] - if world.goal[player] == "yoshi_egg_hunt": + if world.options.goal == "yoshi_egg_hunt": yoshis_house_region_locations.append(LocationName.yoshis_house) - yoshis_house_region = create_region(world, player, active_locations, LocationName.yoshis_house, + yoshis_house_region = create_region(multiworld, player, active_locations, LocationName.yoshis_house, yoshis_house_region_locations) - yoshis_island_1_tile = create_region(world, player, active_locations, LocationName.yoshis_island_1_tile, None) - yoshis_island_1_region = create_region(world, player, active_locations, LocationName.yoshis_island_1_region, None) - yoshis_island_1_exit_1 = create_region(world, player, active_locations, LocationName.yoshis_island_1_exit_1, + yoshis_island_1_tile = create_region(multiworld, player, active_locations, LocationName.yoshis_island_1_tile, None) + yoshis_island_1_region = create_region(multiworld, player, active_locations, LocationName.yoshis_island_1_region, None) + yoshis_island_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.yoshis_island_1_exit_1, [LocationName.yoshis_island_1_exit_1]) - yoshis_island_2_tile = create_region(world, player, active_locations, LocationName.yoshis_island_2_tile, None) - yoshis_island_2_region = create_region(world, player, active_locations, LocationName.yoshis_island_2_region, None) - yoshis_island_2_exit_1 = create_region(world, player, active_locations, LocationName.yoshis_island_2_exit_1, + yoshis_island_2_tile = create_region(multiworld, player, active_locations, LocationName.yoshis_island_2_tile, None) + yoshis_island_2_region = create_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, None) + yoshis_island_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.yoshis_island_2_exit_1, [LocationName.yoshis_island_2_exit_1]) - yoshis_island_3_tile = create_region(world, player, active_locations, LocationName.yoshis_island_3_tile, None) - yoshis_island_3_region = create_region(world, player, active_locations, LocationName.yoshis_island_3_region, None) - yoshis_island_3_exit_1 = create_region(world, player, active_locations, LocationName.yoshis_island_3_exit_1, + yoshis_island_3_tile = create_region(multiworld, player, active_locations, LocationName.yoshis_island_3_tile, None) + yoshis_island_3_region = create_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, None) + yoshis_island_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.yoshis_island_3_exit_1, [LocationName.yoshis_island_3_exit_1]) - yoshis_island_4_tile = create_region(world, player, active_locations, LocationName.yoshis_island_4_tile, None) - yoshis_island_4_region = create_region(world, player, active_locations, LocationName.yoshis_island_4_region, None) - yoshis_island_4_exit_1 = create_region(world, player, active_locations, LocationName.yoshis_island_4_exit_1, + yoshis_island_4_tile = create_region(multiworld, player, active_locations, LocationName.yoshis_island_4_tile, None) + yoshis_island_4_region = create_region(multiworld, player, active_locations, LocationName.yoshis_island_4_region, None) + yoshis_island_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.yoshis_island_4_exit_1, [LocationName.yoshis_island_4_exit_1]) - yoshis_island_castle_tile = create_region(world, player, active_locations, LocationName.yoshis_island_castle_tile, None) - yoshis_island_castle_region = create_region(world, player, active_locations, LocationName.yoshis_island_castle_region, None) - yoshis_island_castle = create_region(world, player, active_locations, LocationName.yoshis_island_castle, + yoshis_island_castle_tile = create_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_tile, None) + yoshis_island_castle_region = create_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_region, None) + yoshis_island_castle = create_region(multiworld, player, active_locations, LocationName.yoshis_island_castle, [LocationName.yoshis_island_castle, LocationName.yoshis_island_koopaling]) - yellow_switch_palace_tile = create_region(world, player, active_locations, LocationName.yellow_switch_palace_tile, None) - yellow_switch_palace = create_region(world, player, active_locations, LocationName.yellow_switch_palace, + yellow_switch_palace_tile = create_region(multiworld, player, active_locations, LocationName.yellow_switch_palace_tile, None) + yellow_switch_palace = create_region(multiworld, player, active_locations, LocationName.yellow_switch_palace, [LocationName.yellow_switch_palace]) - donut_plains_1_tile = create_region(world, player, active_locations, LocationName.donut_plains_1_tile, None) - donut_plains_1_region = create_region(world, player, active_locations, LocationName.donut_plains_1_region, None) - donut_plains_1_exit_1 = create_region(world, player, active_locations, LocationName.donut_plains_1_exit_1, + donut_plains_1_tile = create_region(multiworld, player, active_locations, LocationName.donut_plains_1_tile, None) + donut_plains_1_region = create_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, None) + donut_plains_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_plains_1_exit_1, [LocationName.donut_plains_1_exit_1]) - donut_plains_1_exit_2 = create_region(world, player, active_locations, LocationName.donut_plains_1_exit_2, + donut_plains_1_exit_2 = create_region(multiworld, player, active_locations, LocationName.donut_plains_1_exit_2, [LocationName.donut_plains_1_exit_2]) - donut_plains_2_tile = create_region(world, player, active_locations, LocationName.donut_plains_2_tile, None) - donut_plains_2_region = create_region(world, player, active_locations, LocationName.donut_plains_2_region, None) - donut_plains_2_exit_1 = create_region(world, player, active_locations, LocationName.donut_plains_2_exit_1, + donut_plains_2_tile = create_region(multiworld, player, active_locations, LocationName.donut_plains_2_tile, None) + donut_plains_2_region = create_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, None) + donut_plains_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_plains_2_exit_1, [LocationName.donut_plains_2_exit_1]) - donut_plains_2_exit_2 = create_region(world, player, active_locations, LocationName.donut_plains_2_exit_2, + donut_plains_2_exit_2 = create_region(multiworld, player, active_locations, LocationName.donut_plains_2_exit_2, [LocationName.donut_plains_2_exit_2]) - donut_plains_3_tile = create_region(world, player, active_locations, LocationName.donut_plains_3_tile, None) - donut_plains_3_region = create_region(world, player, active_locations, LocationName.donut_plains_3_region, None) - donut_plains_3_exit_1 = create_region(world, player, active_locations, LocationName.donut_plains_3_exit_1, + donut_plains_3_tile = create_region(multiworld, player, active_locations, LocationName.donut_plains_3_tile, None) + donut_plains_3_region = create_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, None) + donut_plains_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_plains_3_exit_1, [LocationName.donut_plains_3_exit_1]) - donut_plains_4_tile = create_region(world, player, active_locations, LocationName.donut_plains_4_tile, None) - donut_plains_4_region = create_region(world, player, active_locations, LocationName.donut_plains_4_region, None) - donut_plains_4_exit_1 = create_region(world, player, active_locations, LocationName.donut_plains_4_exit_1, + donut_plains_4_tile = create_region(multiworld, player, active_locations, LocationName.donut_plains_4_tile, None) + donut_plains_4_region = create_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, None) + donut_plains_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_plains_4_exit_1, [LocationName.donut_plains_4_exit_1]) - donut_secret_1_tile = create_region(world, player, active_locations, LocationName.donut_secret_1_tile, None) - donut_secret_1_region = create_region(world, player, active_locations, LocationName.donut_secret_1_region, None) - donut_secret_1_exit_1 = create_region(world, player, active_locations, LocationName.donut_secret_1_exit_1, + donut_secret_1_tile = create_region(multiworld, player, active_locations, LocationName.donut_secret_1_tile, None) + donut_secret_1_region = create_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, None) + donut_secret_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_secret_1_exit_1, [LocationName.donut_secret_1_exit_1]) - donut_secret_1_exit_2 = create_region(world, player, active_locations, LocationName.donut_secret_1_exit_2, + donut_secret_1_exit_2 = create_region(multiworld, player, active_locations, LocationName.donut_secret_1_exit_2, [LocationName.donut_secret_1_exit_2]) - donut_secret_2_tile = create_region(world, player, active_locations, LocationName.donut_secret_2_tile, None) - donut_secret_2_region = create_region(world, player, active_locations, LocationName.donut_secret_2_region, None) - donut_secret_2_exit_1 = create_region(world, player, active_locations, LocationName.donut_secret_2_exit_1, + donut_secret_2_tile = create_region(multiworld, player, active_locations, LocationName.donut_secret_2_tile, None) + donut_secret_2_region = create_region(multiworld, player, active_locations, LocationName.donut_secret_2_region, None) + donut_secret_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_secret_2_exit_1, [LocationName.donut_secret_2_exit_1]) - donut_ghost_house_tile = create_region(world, player, active_locations, LocationName.donut_ghost_house_tile, None) - donut_ghost_house_region = create_region(world, player, active_locations, LocationName.donut_ghost_house_region, None) - donut_ghost_house_exit_1 = create_region(world, player, active_locations, LocationName.donut_ghost_house_exit_1, + donut_ghost_house_tile = create_region(multiworld, player, active_locations, LocationName.donut_ghost_house_tile, None) + donut_ghost_house_region = create_region(multiworld, player, active_locations, LocationName.donut_ghost_house_region, None) + donut_ghost_house_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_ghost_house_exit_1, [LocationName.donut_ghost_house_exit_1]) - donut_ghost_house_exit_2 = create_region(world, player, active_locations, LocationName.donut_ghost_house_exit_2, + donut_ghost_house_exit_2 = create_region(multiworld, player, active_locations, LocationName.donut_ghost_house_exit_2, [LocationName.donut_ghost_house_exit_2]) - donut_secret_house_tile = create_region(world, player, active_locations, LocationName.donut_secret_house_tile, None) - donut_secret_house_region = create_region(world, player, active_locations, LocationName.donut_secret_house_region, None) - donut_secret_house_exit_1 = create_region(world, player, active_locations, LocationName.donut_secret_house_exit_1, + donut_secret_house_tile = create_region(multiworld, player, active_locations, LocationName.donut_secret_house_tile, None) + donut_secret_house_region = create_region(multiworld, player, active_locations, LocationName.donut_secret_house_region, None) + donut_secret_house_exit_1 = create_region(multiworld, player, active_locations, LocationName.donut_secret_house_exit_1, [LocationName.donut_secret_house_exit_1]) - donut_secret_house_exit_2 = create_region(world, player, active_locations, LocationName.donut_secret_house_exit_2, + donut_secret_house_exit_2 = create_region(multiworld, player, active_locations, LocationName.donut_secret_house_exit_2, [LocationName.donut_secret_house_exit_2]) - donut_plains_castle_tile = create_region(world, player, active_locations, LocationName.donut_plains_castle_tile, None) - donut_plains_castle_region = create_region(world, player, active_locations, LocationName.donut_plains_castle_region, None) - donut_plains_castle = create_region(world, player, active_locations, LocationName.donut_plains_castle, + donut_plains_castle_tile = create_region(multiworld, player, active_locations, LocationName.donut_plains_castle_tile, None) + donut_plains_castle_region = create_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, None) + donut_plains_castle = create_region(multiworld, player, active_locations, LocationName.donut_plains_castle, [LocationName.donut_plains_castle, LocationName.donut_plains_koopaling]) - green_switch_palace_tile = create_region(world, player, active_locations, LocationName.green_switch_palace_tile, None) - green_switch_palace = create_region(world, player, active_locations, LocationName.green_switch_palace, + green_switch_palace_tile = create_region(multiworld, player, active_locations, LocationName.green_switch_palace_tile, None) + green_switch_palace = create_region(multiworld, player, active_locations, LocationName.green_switch_palace, [LocationName.green_switch_palace]) - donut_plains_top_secret_tile = create_region(world, player, active_locations, LocationName.donut_plains_top_secret_tile, None) - donut_plains_top_secret = create_region(world, player, active_locations, LocationName.donut_plains_top_secret, None) + donut_plains_top_secret_tile = create_region(multiworld, player, active_locations, LocationName.donut_plains_top_secret_tile, None) + donut_plains_top_secret = create_region(multiworld, player, active_locations, LocationName.donut_plains_top_secret, None) - vanilla_dome_1_tile = create_region(world, player, active_locations, LocationName.vanilla_dome_1_tile, None) - vanilla_dome_1_region = create_region(world, player, active_locations, LocationName.vanilla_dome_1_region, None) - vanilla_dome_1_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_dome_1_exit_1, + vanilla_dome_1_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_tile, None) + vanilla_dome_1_region = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, None) + vanilla_dome_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_exit_1, [LocationName.vanilla_dome_1_exit_1]) - vanilla_dome_1_exit_2 = create_region(world, player, active_locations, LocationName.vanilla_dome_1_exit_2, + vanilla_dome_1_exit_2 = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_exit_2, [LocationName.vanilla_dome_1_exit_2]) - vanilla_dome_2_tile = create_region(world, player, active_locations, LocationName.vanilla_dome_2_tile, None) - vanilla_dome_2_region = create_region(world, player, active_locations, LocationName.vanilla_dome_2_region, None) - vanilla_dome_2_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_dome_2_exit_1, + vanilla_dome_2_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_tile, None) + vanilla_dome_2_region = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, None) + vanilla_dome_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_exit_1, [LocationName.vanilla_dome_2_exit_1]) - vanilla_dome_2_exit_2 = create_region(world, player, active_locations, LocationName.vanilla_dome_2_exit_2, + vanilla_dome_2_exit_2 = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_exit_2, [LocationName.vanilla_dome_2_exit_2]) - vanilla_dome_3_tile = create_region(world, player, active_locations, LocationName.vanilla_dome_3_tile, None) - vanilla_dome_3_region = create_region(world, player, active_locations, LocationName.vanilla_dome_3_region, None) - vanilla_dome_3_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_dome_3_exit_1, + vanilla_dome_3_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_tile, None) + vanilla_dome_3_region = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, None) + vanilla_dome_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_exit_1, [LocationName.vanilla_dome_3_exit_1]) - vanilla_dome_4_tile = create_region(world, player, active_locations, LocationName.vanilla_dome_4_tile, None) - vanilla_dome_4_region = create_region(world, player, active_locations, LocationName.vanilla_dome_4_region, None) - vanilla_dome_4_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_dome_4_exit_1, + vanilla_dome_4_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_tile, None) + vanilla_dome_4_region = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, None) + vanilla_dome_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_exit_1, [LocationName.vanilla_dome_4_exit_1]) - vanilla_secret_1_tile = create_region(world, player, active_locations, LocationName.vanilla_secret_1_tile, None) - vanilla_secret_1_region = create_region(world, player, active_locations, LocationName.vanilla_secret_1_region, None) - vanilla_secret_1_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_secret_1_exit_1, + vanilla_secret_1_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_tile, None) + vanilla_secret_1_region = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, None) + vanilla_secret_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_exit_1, [LocationName.vanilla_secret_1_exit_1]) - vanilla_secret_1_exit_2 = create_region(world, player, active_locations, LocationName.vanilla_secret_1_exit_2, + vanilla_secret_1_exit_2 = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_exit_2, [LocationName.vanilla_secret_1_exit_2]) - vanilla_secret_2_tile = create_region(world, player, active_locations, LocationName.vanilla_secret_2_tile, None) - vanilla_secret_2_region = create_region(world, player, active_locations, LocationName.vanilla_secret_2_region, None) - vanilla_secret_2_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_secret_2_exit_1, + vanilla_secret_2_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_tile, None) + vanilla_secret_2_region = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, None) + vanilla_secret_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_exit_1, [LocationName.vanilla_secret_2_exit_1]) - vanilla_secret_3_tile = create_region(world, player, active_locations, LocationName.vanilla_secret_3_tile, None) - vanilla_secret_3_region = create_region(world, player, active_locations, LocationName.vanilla_secret_3_region, None) - vanilla_secret_3_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_secret_3_exit_1, + vanilla_secret_3_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_3_tile, None) + vanilla_secret_3_region = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_3_region, None) + vanilla_secret_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_secret_3_exit_1, [LocationName.vanilla_secret_3_exit_1]) - vanilla_ghost_house_tile = create_region(world, player, active_locations, LocationName.vanilla_ghost_house_tile, None) - vanilla_ghost_house_region = create_region(world, player, active_locations, LocationName.vanilla_ghost_house_region, None) - vanilla_ghost_house_exit_1 = create_region(world, player, active_locations, LocationName.vanilla_ghost_house_exit_1, + vanilla_ghost_house_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_tile, None) + vanilla_ghost_house_region = create_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, None) + vanilla_ghost_house_exit_1 = create_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_exit_1, [LocationName.vanilla_ghost_house_exit_1]) - vanilla_fortress_tile = create_region(world, player, active_locations, LocationName.vanilla_fortress_tile, None) - vanilla_fortress_region = create_region(world, player, active_locations, LocationName.vanilla_fortress_region, None) - vanilla_fortress = create_region(world, player, active_locations, LocationName.vanilla_fortress, + vanilla_fortress_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_fortress_tile, None) + vanilla_fortress_region = create_region(multiworld, player, active_locations, LocationName.vanilla_fortress_region, None) + vanilla_fortress = create_region(multiworld, player, active_locations, LocationName.vanilla_fortress, [LocationName.vanilla_fortress, LocationName.vanilla_reznor]) - vanilla_dome_castle_tile = create_region(world, player, active_locations, LocationName.vanilla_dome_castle_tile, None) - vanilla_dome_castle_region = create_region(world, player, active_locations, LocationName.vanilla_dome_castle_region, None) - vanilla_dome_castle = create_region(world, player, active_locations, LocationName.vanilla_dome_castle, + vanilla_dome_castle_tile = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle_tile, None) + vanilla_dome_castle_region = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle_region, None) + vanilla_dome_castle = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle, [LocationName.vanilla_dome_castle, LocationName.vanilla_dome_koopaling]) - red_switch_palace_tile = create_region(world, player, active_locations, LocationName.red_switch_palace_tile, None) - red_switch_palace = create_region(world, player, active_locations, LocationName.red_switch_palace, + red_switch_palace_tile = create_region(multiworld, player, active_locations, LocationName.red_switch_palace_tile, None) + red_switch_palace = create_region(multiworld, player, active_locations, LocationName.red_switch_palace, [LocationName.red_switch_palace]) - butter_bridge_1_tile = create_region(world, player, active_locations, LocationName.butter_bridge_1_tile, None) - butter_bridge_1_region = create_region(world, player, active_locations, LocationName.butter_bridge_1_region, None) - butter_bridge_1_exit_1 = create_region(world, player, active_locations, LocationName.butter_bridge_1_exit_1, + butter_bridge_1_tile = create_region(multiworld, player, active_locations, LocationName.butter_bridge_1_tile, None) + butter_bridge_1_region = create_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, None) + butter_bridge_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.butter_bridge_1_exit_1, [LocationName.butter_bridge_1_exit_1]) - butter_bridge_2_tile = create_region(world, player, active_locations, LocationName.butter_bridge_2_tile, None) - butter_bridge_2_region = create_region(world, player, active_locations, LocationName.butter_bridge_2_region, None) - butter_bridge_2_exit_1 = create_region(world, player, active_locations, LocationName.butter_bridge_2_exit_1, + butter_bridge_2_tile = create_region(multiworld, player, active_locations, LocationName.butter_bridge_2_tile, None) + butter_bridge_2_region = create_region(multiworld, player, active_locations, LocationName.butter_bridge_2_region, None) + butter_bridge_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.butter_bridge_2_exit_1, [LocationName.butter_bridge_2_exit_1]) - cheese_bridge_tile = create_region(world, player, active_locations, LocationName.cheese_bridge_tile, None) - cheese_bridge_region = create_region(world, player, active_locations, LocationName.cheese_bridge_region, None) - cheese_bridge_exit_1 = create_region(world, player, active_locations, LocationName.cheese_bridge_exit_1, + cheese_bridge_tile = create_region(multiworld, player, active_locations, LocationName.cheese_bridge_tile, None) + cheese_bridge_region = create_region(multiworld, player, active_locations, LocationName.cheese_bridge_region, None) + cheese_bridge_exit_1 = create_region(multiworld, player, active_locations, LocationName.cheese_bridge_exit_1, [LocationName.cheese_bridge_exit_1]) - cheese_bridge_exit_2 = create_region(world, player, active_locations, LocationName.cheese_bridge_exit_2, + cheese_bridge_exit_2 = create_region(multiworld, player, active_locations, LocationName.cheese_bridge_exit_2, [LocationName.cheese_bridge_exit_2]) - cookie_mountain_tile = create_region(world, player, active_locations, LocationName.cookie_mountain_tile, None) - cookie_mountain_region = create_region(world, player, active_locations, LocationName.cookie_mountain_region, None) - cookie_mountain_exit_1 = create_region(world, player, active_locations, LocationName.cookie_mountain_exit_1, + cookie_mountain_tile = create_region(multiworld, player, active_locations, LocationName.cookie_mountain_tile, None) + cookie_mountain_region = create_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, None) + cookie_mountain_exit_1 = create_region(multiworld, player, active_locations, LocationName.cookie_mountain_exit_1, [LocationName.cookie_mountain_exit_1]) - soda_lake_tile = create_region(world, player, active_locations, LocationName.soda_lake_tile, None) - soda_lake_region = create_region(world, player, active_locations, LocationName.soda_lake_region, None) - soda_lake_exit_1 = create_region(world, player, active_locations, LocationName.soda_lake_exit_1, + soda_lake_tile = create_region(multiworld, player, active_locations, LocationName.soda_lake_tile, None) + soda_lake_region = create_region(multiworld, player, active_locations, LocationName.soda_lake_region, None) + soda_lake_exit_1 = create_region(multiworld, player, active_locations, LocationName.soda_lake_exit_1, [LocationName.soda_lake_exit_1]) - twin_bridges_castle_tile = create_region(world, player, active_locations, LocationName.twin_bridges_castle_tile, None) - twin_bridges_castle_region = create_region(world, player, active_locations, LocationName.twin_bridges_castle_region, None) - twin_bridges_castle = create_region(world, player, active_locations, LocationName.twin_bridges_castle, + twin_bridges_castle_tile = create_region(multiworld, player, active_locations, LocationName.twin_bridges_castle_tile, None) + twin_bridges_castle_region = create_region(multiworld, player, active_locations, LocationName.twin_bridges_castle_region, None) + twin_bridges_castle = create_region(multiworld, player, active_locations, LocationName.twin_bridges_castle, [LocationName.twin_bridges_castle, LocationName.twin_bridges_koopaling]) - forest_of_illusion_1_tile = create_region(world, player, active_locations, LocationName.forest_of_illusion_1_tile, None) - forest_of_illusion_1_region = create_region(world, player, active_locations, LocationName.forest_of_illusion_1_region, None) - forest_of_illusion_1_exit_1 = create_region(world, player, active_locations, LocationName.forest_of_illusion_1_exit_1, + forest_of_illusion_1_tile = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_tile, None) + forest_of_illusion_1_region = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_region, None) + forest_of_illusion_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_exit_1, [LocationName.forest_of_illusion_1_exit_1]) - forest_of_illusion_1_exit_2 = create_region(world, player, active_locations, LocationName.forest_of_illusion_1_exit_2, + forest_of_illusion_1_exit_2 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_exit_2, [LocationName.forest_of_illusion_1_exit_2]) - forest_of_illusion_2_tile = create_region(world, player, active_locations, LocationName.forest_of_illusion_2_tile, None) - forest_of_illusion_2_region = create_region(world, player, active_locations, LocationName.forest_of_illusion_2_region, None) - forest_of_illusion_2_exit_1 = create_region(world, player, active_locations, LocationName.forest_of_illusion_2_exit_1, + forest_of_illusion_2_tile = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_tile, None) + forest_of_illusion_2_region = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, None) + forest_of_illusion_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_exit_1, [LocationName.forest_of_illusion_2_exit_1]) - forest_of_illusion_2_exit_2 = create_region(world, player, active_locations, LocationName.forest_of_illusion_2_exit_2, + forest_of_illusion_2_exit_2 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_exit_2, [LocationName.forest_of_illusion_2_exit_2]) - forest_of_illusion_3_tile = create_region(world, player, active_locations, LocationName.forest_of_illusion_3_tile, None) - forest_of_illusion_3_region = create_region(world, player, active_locations, LocationName.forest_of_illusion_3_region, None) - forest_of_illusion_3_exit_1 = create_region(world, player, active_locations, LocationName.forest_of_illusion_3_exit_1, + forest_of_illusion_3_tile = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_tile, None) + forest_of_illusion_3_region = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, None) + forest_of_illusion_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_exit_1, [LocationName.forest_of_illusion_3_exit_1]) - forest_of_illusion_3_exit_2 = create_region(world, player, active_locations, LocationName.forest_of_illusion_3_exit_2, + forest_of_illusion_3_exit_2 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_exit_2, [LocationName.forest_of_illusion_3_exit_2]) - forest_of_illusion_4_tile = create_region(world, player, active_locations, LocationName.forest_of_illusion_4_tile, None) - forest_of_illusion_4_region = create_region(world, player, active_locations, LocationName.forest_of_illusion_4_region, None) - forest_of_illusion_4_exit_1 = create_region(world, player, active_locations, LocationName.forest_of_illusion_4_exit_1, + forest_of_illusion_4_tile = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_tile, None) + forest_of_illusion_4_region = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, None) + forest_of_illusion_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_exit_1, [LocationName.forest_of_illusion_4_exit_1]) - forest_of_illusion_4_exit_2 = create_region(world, player, active_locations, LocationName.forest_of_illusion_4_exit_2, + forest_of_illusion_4_exit_2 = create_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_exit_2, [LocationName.forest_of_illusion_4_exit_2]) - forest_ghost_house_tile = create_region(world, player, active_locations, LocationName.forest_ghost_house_tile, None) - forest_ghost_house_region = create_region(world, player, active_locations, LocationName.forest_ghost_house_region, None) - forest_ghost_house_exit_1 = create_region(world, player, active_locations, LocationName.forest_ghost_house_exit_1, + forest_ghost_house_tile = create_region(multiworld, player, active_locations, LocationName.forest_ghost_house_tile, None) + forest_ghost_house_region = create_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, None) + forest_ghost_house_exit_1 = create_region(multiworld, player, active_locations, LocationName.forest_ghost_house_exit_1, [LocationName.forest_ghost_house_exit_1]) - forest_ghost_house_exit_2 = create_region(world, player, active_locations, LocationName.forest_ghost_house_exit_2, + forest_ghost_house_exit_2 = create_region(multiworld, player, active_locations, LocationName.forest_ghost_house_exit_2, [LocationName.forest_ghost_house_exit_2]) - forest_secret_tile = create_region(world, player, active_locations, LocationName.forest_secret_tile, None) - forest_secret_region = create_region(world, player, active_locations, LocationName.forest_secret_region, None) - forest_secret_exit_1 = create_region(world, player, active_locations, LocationName.forest_secret_exit_1, + forest_secret_tile = create_region(multiworld, player, active_locations, LocationName.forest_secret_tile, None) + forest_secret_region = create_region(multiworld, player, active_locations, LocationName.forest_secret_region, None) + forest_secret_exit_1 = create_region(multiworld, player, active_locations, LocationName.forest_secret_exit_1, [LocationName.forest_secret_exit_1]) - forest_fortress_tile = create_region(world, player, active_locations, LocationName.forest_fortress_tile, None) - forest_fortress_region = create_region(world, player, active_locations, LocationName.forest_fortress_region, None) - forest_fortress = create_region(world, player, active_locations, LocationName.forest_fortress, + forest_fortress_tile = create_region(multiworld, player, active_locations, LocationName.forest_fortress_tile, None) + forest_fortress_region = create_region(multiworld, player, active_locations, LocationName.forest_fortress_region, None) + forest_fortress = create_region(multiworld, player, active_locations, LocationName.forest_fortress, [LocationName.forest_fortress, LocationName.forest_reznor]) - forest_castle_tile = create_region(world, player, active_locations, LocationName.forest_castle_tile, None) - forest_castle_region = create_region(world, player, active_locations, LocationName.forest_castle_region, None) - forest_castle = create_region(world, player, active_locations, LocationName.forest_castle, + forest_castle_tile = create_region(multiworld, player, active_locations, LocationName.forest_castle_tile, None) + forest_castle_region = create_region(multiworld, player, active_locations, LocationName.forest_castle_region, None) + forest_castle = create_region(multiworld, player, active_locations, LocationName.forest_castle, [LocationName.forest_castle, LocationName.forest_koopaling]) - blue_switch_palace_tile = create_region(world, player, active_locations, LocationName.blue_switch_palace_tile, None) - blue_switch_palace = create_region(world, player, active_locations, LocationName.blue_switch_palace, + blue_switch_palace_tile = create_region(multiworld, player, active_locations, LocationName.blue_switch_palace_tile, None) + blue_switch_palace = create_region(multiworld, player, active_locations, LocationName.blue_switch_palace, [LocationName.blue_switch_palace]) - chocolate_island_1_tile = create_region(world, player, active_locations, LocationName.chocolate_island_1_tile, None) - chocolate_island_1_region = create_region(world, player, active_locations, LocationName.chocolate_island_1_region, None) - chocolate_island_1_exit_1 = create_region(world, player, active_locations, LocationName.chocolate_island_1_exit_1, + chocolate_island_1_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_island_1_tile, None) + chocolate_island_1_region = create_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, None) + chocolate_island_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.chocolate_island_1_exit_1, [LocationName.chocolate_island_1_exit_1]) - chocolate_island_2_tile = create_region(world, player, active_locations, LocationName.chocolate_island_2_tile, None) - chocolate_island_2_region = create_region(world, player, active_locations, LocationName.chocolate_island_2_region, None) - chocolate_island_2_exit_1 = create_region(world, player, active_locations, LocationName.chocolate_island_2_exit_1, + chocolate_island_2_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_island_2_tile, None) + chocolate_island_2_region = create_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, None) + chocolate_island_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.chocolate_island_2_exit_1, [LocationName.chocolate_island_2_exit_1]) - chocolate_island_2_exit_2 = create_region(world, player, active_locations, LocationName.chocolate_island_2_exit_2, + chocolate_island_2_exit_2 = create_region(multiworld, player, active_locations, LocationName.chocolate_island_2_exit_2, [LocationName.chocolate_island_2_exit_2]) - chocolate_island_3_tile = create_region(world, player, active_locations, LocationName.chocolate_island_3_tile, None) - chocolate_island_3_region = create_region(world, player, active_locations, LocationName.chocolate_island_3_region, None) - chocolate_island_3_exit_1 = create_region(world, player, active_locations, LocationName.chocolate_island_3_exit_1, + chocolate_island_3_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_island_3_tile, None) + chocolate_island_3_region = create_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, None) + chocolate_island_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.chocolate_island_3_exit_1, [LocationName.chocolate_island_3_exit_1]) - chocolate_island_3_exit_2 = create_region(world, player, active_locations, LocationName.chocolate_island_3_exit_2, + chocolate_island_3_exit_2 = create_region(multiworld, player, active_locations, LocationName.chocolate_island_3_exit_2, [LocationName.chocolate_island_3_exit_2]) - chocolate_island_4_tile = create_region(world, player, active_locations, LocationName.chocolate_island_4_tile, None) - chocolate_island_4_region = create_region(world, player, active_locations, LocationName.chocolate_island_4_region, None) - chocolate_island_4_exit_1 = create_region(world, player, active_locations, LocationName.chocolate_island_4_exit_1, + chocolate_island_4_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_island_4_tile, None) + chocolate_island_4_region = create_region(multiworld, player, active_locations, LocationName.chocolate_island_4_region, None) + chocolate_island_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.chocolate_island_4_exit_1, [LocationName.chocolate_island_4_exit_1]) - chocolate_island_5_tile = create_region(world, player, active_locations, LocationName.chocolate_island_5_tile, None) - chocolate_island_5_region = create_region(world, player, active_locations, LocationName.chocolate_island_5_region, None) - chocolate_island_5_exit_1 = create_region(world, player, active_locations, LocationName.chocolate_island_5_exit_1, + chocolate_island_5_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_island_5_tile, None) + chocolate_island_5_region = create_region(multiworld, player, active_locations, LocationName.chocolate_island_5_region, None) + chocolate_island_5_exit_1 = create_region(multiworld, player, active_locations, LocationName.chocolate_island_5_exit_1, [LocationName.chocolate_island_5_exit_1]) - chocolate_ghost_house_tile = create_region(world, player, active_locations, LocationName.chocolate_ghost_house_tile, None) - chocolate_ghost_house_region = create_region(world, player, active_locations, LocationName.chocolate_ghost_house_region, None) - chocolate_ghost_house_exit_1 = create_region(world, player, active_locations, LocationName.chocolate_ghost_house_exit_1, + chocolate_ghost_house_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_ghost_house_tile, None) + chocolate_ghost_house_region = create_region(multiworld, player, active_locations, LocationName.chocolate_ghost_house_region, None) + chocolate_ghost_house_exit_1 = create_region(multiworld, player, active_locations, LocationName.chocolate_ghost_house_exit_1, [LocationName.chocolate_ghost_house_exit_1]) - chocolate_secret_tile = create_region(world, player, active_locations, LocationName.chocolate_secret_tile, None) - chocolate_secret_region = create_region(world, player, active_locations, LocationName.chocolate_secret_region, None) - chocolate_secret_exit_1 = create_region(world, player, active_locations, LocationName.chocolate_secret_exit_1, + chocolate_secret_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_secret_tile, None) + chocolate_secret_region = create_region(multiworld, player, active_locations, LocationName.chocolate_secret_region, None) + chocolate_secret_exit_1 = create_region(multiworld, player, active_locations, LocationName.chocolate_secret_exit_1, [LocationName.chocolate_secret_exit_1]) - chocolate_fortress_tile = create_region(world, player, active_locations, LocationName.chocolate_fortress_tile, None) - chocolate_fortress_region = create_region(world, player, active_locations, LocationName.chocolate_fortress_region, None) - chocolate_fortress = create_region(world, player, active_locations, LocationName.chocolate_fortress, + chocolate_fortress_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_fortress_tile, None) + chocolate_fortress_region = create_region(multiworld, player, active_locations, LocationName.chocolate_fortress_region, None) + chocolate_fortress = create_region(multiworld, player, active_locations, LocationName.chocolate_fortress, [LocationName.chocolate_fortress, LocationName.chocolate_reznor]) - chocolate_castle_tile = create_region(world, player, active_locations, LocationName.chocolate_castle_tile, None) - chocolate_castle_region = create_region(world, player, active_locations, LocationName.chocolate_castle_region, None) - chocolate_castle = create_region(world, player, active_locations, LocationName.chocolate_castle, + chocolate_castle_tile = create_region(multiworld, player, active_locations, LocationName.chocolate_castle_tile, None) + chocolate_castle_region = create_region(multiworld, player, active_locations, LocationName.chocolate_castle_region, None) + chocolate_castle = create_region(multiworld, player, active_locations, LocationName.chocolate_castle, [LocationName.chocolate_castle, LocationName.chocolate_koopaling]) - sunken_ghost_ship_tile = create_region(world, player, active_locations, LocationName.sunken_ghost_ship_tile, None) - sunken_ghost_ship_region = create_region(world, player, active_locations, LocationName.sunken_ghost_ship_region, None) - sunken_ghost_ship = create_region(world, player, active_locations, LocationName.sunken_ghost_ship, + sunken_ghost_ship_tile = create_region(multiworld, player, active_locations, LocationName.sunken_ghost_ship_tile, None) + sunken_ghost_ship_region = create_region(multiworld, player, active_locations, LocationName.sunken_ghost_ship_region, None) + sunken_ghost_ship = create_region(multiworld, player, active_locations, LocationName.sunken_ghost_ship, [LocationName.sunken_ghost_ship]) - valley_of_bowser_1_tile = create_region(world, player, active_locations, LocationName.valley_of_bowser_1_tile, None) - valley_of_bowser_1_region = create_region(world, player, active_locations, LocationName.valley_of_bowser_1_region, None) - valley_of_bowser_1_exit_1 = create_region(world, player, active_locations, LocationName.valley_of_bowser_1_exit_1, + valley_of_bowser_1_tile = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_tile, None) + valley_of_bowser_1_region = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, None) + valley_of_bowser_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_exit_1, [LocationName.valley_of_bowser_1_exit_1]) - valley_of_bowser_2_tile = create_region(world, player, active_locations, LocationName.valley_of_bowser_2_tile, None) - valley_of_bowser_2_region = create_region(world, player, active_locations, LocationName.valley_of_bowser_2_region, None) - valley_of_bowser_2_exit_1 = create_region(world, player, active_locations, LocationName.valley_of_bowser_2_exit_1, + valley_of_bowser_2_tile = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_tile, None) + valley_of_bowser_2_region = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_region, None) + valley_of_bowser_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_exit_1, [LocationName.valley_of_bowser_2_exit_1]) - valley_of_bowser_2_exit_2 = create_region(world, player, active_locations, LocationName.valley_of_bowser_2_exit_2, + valley_of_bowser_2_exit_2 = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_exit_2, [LocationName.valley_of_bowser_2_exit_2]) - valley_of_bowser_3_tile = create_region(world, player, active_locations, LocationName.valley_of_bowser_3_tile, None) - valley_of_bowser_3_region = create_region(world, player, active_locations, LocationName.valley_of_bowser_3_region, None) - valley_of_bowser_3_exit_1 = create_region(world, player, active_locations, LocationName.valley_of_bowser_3_exit_1, + valley_of_bowser_3_tile = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_3_tile, None) + valley_of_bowser_3_region = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_3_region, None) + valley_of_bowser_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_3_exit_1, [LocationName.valley_of_bowser_3_exit_1]) - valley_of_bowser_4_tile = create_region(world, player, active_locations, LocationName.valley_of_bowser_4_tile, None) - valley_of_bowser_4_region = create_region(world, player, active_locations, LocationName.valley_of_bowser_4_region, None) - valley_of_bowser_4_exit_1 = create_region(world, player, active_locations, LocationName.valley_of_bowser_4_exit_1, + valley_of_bowser_4_tile = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_tile, None) + valley_of_bowser_4_region = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_region, None) + valley_of_bowser_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_exit_1, [LocationName.valley_of_bowser_4_exit_1]) - valley_of_bowser_4_exit_2 = create_region(world, player, active_locations, LocationName.valley_of_bowser_4_exit_2, + valley_of_bowser_4_exit_2 = create_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_exit_2, [LocationName.valley_of_bowser_4_exit_2]) - valley_ghost_house_tile = create_region(world, player, active_locations, LocationName.valley_ghost_house_tile, None) - valley_ghost_house_region = create_region(world, player, active_locations, LocationName.valley_ghost_house_region, None) - valley_ghost_house_exit_1 = create_region(world, player, active_locations, LocationName.valley_ghost_house_exit_1, + valley_ghost_house_tile = create_region(multiworld, player, active_locations, LocationName.valley_ghost_house_tile, None) + valley_ghost_house_region = create_region(multiworld, player, active_locations, LocationName.valley_ghost_house_region, None) + valley_ghost_house_exit_1 = create_region(multiworld, player, active_locations, LocationName.valley_ghost_house_exit_1, [LocationName.valley_ghost_house_exit_1]) - valley_ghost_house_exit_2 = create_region(world, player, active_locations, LocationName.valley_ghost_house_exit_2, + valley_ghost_house_exit_2 = create_region(multiworld, player, active_locations, LocationName.valley_ghost_house_exit_2, [LocationName.valley_ghost_house_exit_2]) - valley_fortress_tile = create_region(world, player, active_locations, LocationName.valley_fortress_tile, None) - valley_fortress_region = create_region(world, player, active_locations, LocationName.valley_fortress_region, None) - valley_fortress = create_region(world, player, active_locations, LocationName.valley_fortress, + valley_fortress_tile = create_region(multiworld, player, active_locations, LocationName.valley_fortress_tile, None) + valley_fortress_region = create_region(multiworld, player, active_locations, LocationName.valley_fortress_region, None) + valley_fortress = create_region(multiworld, player, active_locations, LocationName.valley_fortress, [LocationName.valley_fortress, LocationName.valley_reznor]) - valley_castle_tile = create_region(world, player, active_locations, LocationName.valley_castle_tile, None) - valley_castle_region = create_region(world, player, active_locations, LocationName.valley_castle_region, None) - valley_castle = create_region(world, player, active_locations, LocationName.valley_castle, + valley_castle_tile = create_region(multiworld, player, active_locations, LocationName.valley_castle_tile, None) + valley_castle_region = create_region(multiworld, player, active_locations, LocationName.valley_castle_region, None) + valley_castle = create_region(multiworld, player, active_locations, LocationName.valley_castle, [LocationName.valley_castle, LocationName.valley_koopaling]) - front_door_tile = create_region(world, player, active_locations, LocationName.front_door_tile, None) - front_door_region = create_region(world, player, active_locations, LocationName.front_door, None) - back_door_tile = create_region(world, player, active_locations, LocationName.back_door_tile, None) - back_door_region = create_region(world, player, active_locations, LocationName.back_door, None) + front_door_tile = create_region(multiworld, player, active_locations, LocationName.front_door_tile, None) + front_door_region = create_region(multiworld, player, active_locations, LocationName.front_door, None) + back_door_tile = create_region(multiworld, player, active_locations, LocationName.back_door_tile, None) + back_door_region = create_region(multiworld, player, active_locations, LocationName.back_door, None) bowser_region_locations = [] - if world.goal[player] == "bowser": + if world.options.goal == "bowser": bowser_region_locations += [LocationName.bowser] - bowser_region = create_region(world, player, active_locations, LocationName.bowser_region, bowser_region_locations) + bowser_region = create_region(multiworld, player, active_locations, LocationName.bowser_region, bowser_region_locations) - donut_plains_star_road = create_region(world, player, active_locations, LocationName.donut_plains_star_road, None) - vanilla_dome_star_road = create_region(world, player, active_locations, LocationName.vanilla_dome_star_road, None) - twin_bridges_star_road = create_region(world, player, active_locations, LocationName.twin_bridges_star_road, None) - forest_star_road = create_region(world, player, active_locations, LocationName.forest_star_road, None) - valley_star_road = create_region(world, player, active_locations, LocationName.valley_star_road, None) - star_road_donut = create_region(world, player, active_locations, LocationName.star_road_donut, None) - star_road_vanilla = create_region(world, player, active_locations, LocationName.star_road_vanilla, None) - star_road_twin_bridges = create_region(world, player, active_locations, LocationName.star_road_twin_bridges, None) - star_road_forest = create_region(world, player, active_locations, LocationName.star_road_forest, None) - star_road_valley = create_region(world, player, active_locations, LocationName.star_road_valley, None) - star_road_special = create_region(world, player, active_locations, LocationName.star_road_special, None) - special_star_road = create_region(world, player, active_locations, LocationName.special_star_road, None) + donut_plains_star_road = create_region(multiworld, player, active_locations, LocationName.donut_plains_star_road, None) + vanilla_dome_star_road = create_region(multiworld, player, active_locations, LocationName.vanilla_dome_star_road, None) + twin_bridges_star_road = create_region(multiworld, player, active_locations, LocationName.twin_bridges_star_road, None) + forest_star_road = create_region(multiworld, player, active_locations, LocationName.forest_star_road, None) + valley_star_road = create_region(multiworld, player, active_locations, LocationName.valley_star_road, None) + star_road_donut = create_region(multiworld, player, active_locations, LocationName.star_road_donut, None) + star_road_vanilla = create_region(multiworld, player, active_locations, LocationName.star_road_vanilla, None) + star_road_twin_bridges = create_region(multiworld, player, active_locations, LocationName.star_road_twin_bridges, None) + star_road_forest = create_region(multiworld, player, active_locations, LocationName.star_road_forest, None) + star_road_valley = create_region(multiworld, player, active_locations, LocationName.star_road_valley, None) + star_road_special = create_region(multiworld, player, active_locations, LocationName.star_road_special, None) + special_star_road = create_region(multiworld, player, active_locations, LocationName.special_star_road, None) - star_road_1_tile = create_region(world, player, active_locations, LocationName.star_road_1_tile, None) - star_road_1_region = create_region(world, player, active_locations, LocationName.star_road_1_region, None) - star_road_1_exit_1 = create_region(world, player, active_locations, LocationName.star_road_1_exit_1, + star_road_1_tile = create_region(multiworld, player, active_locations, LocationName.star_road_1_tile, None) + star_road_1_region = create_region(multiworld, player, active_locations, LocationName.star_road_1_region, None) + star_road_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.star_road_1_exit_1, [LocationName.star_road_1_exit_1]) - star_road_1_exit_2 = create_region(world, player, active_locations, LocationName.star_road_1_exit_2, + star_road_1_exit_2 = create_region(multiworld, player, active_locations, LocationName.star_road_1_exit_2, [LocationName.star_road_1_exit_2]) - star_road_2_tile = create_region(world, player, active_locations, LocationName.star_road_2_tile, None) - star_road_2_region = create_region(world, player, active_locations, LocationName.star_road_2_region, None) - star_road_2_exit_1 = create_region(world, player, active_locations, LocationName.star_road_2_exit_1, + star_road_2_tile = create_region(multiworld, player, active_locations, LocationName.star_road_2_tile, None) + star_road_2_region = create_region(multiworld, player, active_locations, LocationName.star_road_2_region, None) + star_road_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.star_road_2_exit_1, [LocationName.star_road_2_exit_1]) - star_road_2_exit_2 = create_region(world, player, active_locations, LocationName.star_road_2_exit_2, + star_road_2_exit_2 = create_region(multiworld, player, active_locations, LocationName.star_road_2_exit_2, [LocationName.star_road_2_exit_2]) - star_road_3_tile = create_region(world, player, active_locations, LocationName.star_road_3_tile, None) - star_road_3_region = create_region(world, player, active_locations, LocationName.star_road_3_region, None) - star_road_3_exit_1 = create_region(world, player, active_locations, LocationName.star_road_3_exit_1, + star_road_3_tile = create_region(multiworld, player, active_locations, LocationName.star_road_3_tile, None) + star_road_3_region = create_region(multiworld, player, active_locations, LocationName.star_road_3_region, None) + star_road_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.star_road_3_exit_1, [LocationName.star_road_3_exit_1]) - star_road_3_exit_2 = create_region(world, player, active_locations, LocationName.star_road_3_exit_2, + star_road_3_exit_2 = create_region(multiworld, player, active_locations, LocationName.star_road_3_exit_2, [LocationName.star_road_3_exit_2]) - star_road_4_tile = create_region(world, player, active_locations, LocationName.star_road_4_tile, None) - star_road_4_region = create_region(world, player, active_locations, LocationName.star_road_4_region, None) - star_road_4_exit_1 = create_region(world, player, active_locations, LocationName.star_road_4_exit_1, + star_road_4_tile = create_region(multiworld, player, active_locations, LocationName.star_road_4_tile, None) + star_road_4_region = create_region(multiworld, player, active_locations, LocationName.star_road_4_region, None) + star_road_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.star_road_4_exit_1, [LocationName.star_road_4_exit_1]) - star_road_4_exit_2 = create_region(world, player, active_locations, LocationName.star_road_4_exit_2, + star_road_4_exit_2 = create_region(multiworld, player, active_locations, LocationName.star_road_4_exit_2, [LocationName.star_road_4_exit_2]) - star_road_5_tile = create_region(world, player, active_locations, LocationName.star_road_5_tile, None) - star_road_5_region = create_region(world, player, active_locations, LocationName.star_road_5_region, None) - star_road_5_exit_1 = create_region(world, player, active_locations, LocationName.star_road_5_exit_1, + star_road_5_tile = create_region(multiworld, player, active_locations, LocationName.star_road_5_tile, None) + star_road_5_region = create_region(multiworld, player, active_locations, LocationName.star_road_5_region, None) + star_road_5_exit_1 = create_region(multiworld, player, active_locations, LocationName.star_road_5_exit_1, [LocationName.star_road_5_exit_1]) - star_road_5_exit_2 = create_region(world, player, active_locations, LocationName.star_road_5_exit_2, + star_road_5_exit_2 = create_region(multiworld, player, active_locations, LocationName.star_road_5_exit_2, [LocationName.star_road_5_exit_2]) - special_zone_1_tile = create_region(world, player, active_locations, LocationName.special_zone_1_tile, None) - special_zone_1_region = create_region(world, player, active_locations, LocationName.special_zone_1_region, None) - special_zone_1_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_1_exit_1, + special_zone_1_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_1_tile, None) + special_zone_1_region = create_region(multiworld, player, active_locations, LocationName.special_zone_1_region, None) + special_zone_1_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_1_exit_1, [LocationName.special_zone_1_exit_1]) - special_zone_2_tile = create_region(world, player, active_locations, LocationName.special_zone_2_tile, None) - special_zone_2_region = create_region(world, player, active_locations, LocationName.special_zone_2_region, None) - special_zone_2_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_2_exit_1, + special_zone_2_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_2_tile, None) + special_zone_2_region = create_region(multiworld, player, active_locations, LocationName.special_zone_2_region, None) + special_zone_2_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_2_exit_1, [LocationName.special_zone_2_exit_1]) - special_zone_3_tile = create_region(world, player, active_locations, LocationName.special_zone_3_tile, None) - special_zone_3_region = create_region(world, player, active_locations, LocationName.special_zone_3_region, None) - special_zone_3_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_3_exit_1, + special_zone_3_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_3_tile, None) + special_zone_3_region = create_region(multiworld, player, active_locations, LocationName.special_zone_3_region, None) + special_zone_3_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_3_exit_1, [LocationName.special_zone_3_exit_1]) - special_zone_4_tile = create_region(world, player, active_locations, LocationName.special_zone_4_tile, None) - special_zone_4_region = create_region(world, player, active_locations, LocationName.special_zone_4_region, None) - special_zone_4_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_4_exit_1, + special_zone_4_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_4_tile, None) + special_zone_4_region = create_region(multiworld, player, active_locations, LocationName.special_zone_4_region, None) + special_zone_4_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_4_exit_1, [LocationName.special_zone_4_exit_1]) - special_zone_5_tile = create_region(world, player, active_locations, LocationName.special_zone_5_tile, None) - special_zone_5_region = create_region(world, player, active_locations, LocationName.special_zone_5_region, None) - special_zone_5_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_5_exit_1, + special_zone_5_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_5_tile, None) + special_zone_5_region = create_region(multiworld, player, active_locations, LocationName.special_zone_5_region, None) + special_zone_5_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_5_exit_1, [LocationName.special_zone_5_exit_1]) - special_zone_6_tile = create_region(world, player, active_locations, LocationName.special_zone_6_tile, None) - special_zone_6_region = create_region(world, player, active_locations, LocationName.special_zone_6_region, None) - special_zone_6_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_6_exit_1, + special_zone_6_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_6_tile, None) + special_zone_6_region = create_region(multiworld, player, active_locations, LocationName.special_zone_6_region, None) + special_zone_6_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_6_exit_1, [LocationName.special_zone_6_exit_1]) - special_zone_7_tile = create_region(world, player, active_locations, LocationName.special_zone_7_tile, None) - special_zone_7_region = create_region(world, player, active_locations, LocationName.special_zone_7_region, None) - special_zone_7_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_7_exit_1, + special_zone_7_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_7_tile, None) + special_zone_7_region = create_region(multiworld, player, active_locations, LocationName.special_zone_7_region, None) + special_zone_7_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_7_exit_1, [LocationName.special_zone_7_exit_1]) - special_zone_8_tile = create_region(world, player, active_locations, LocationName.special_zone_8_tile, None) - special_zone_8_region = create_region(world, player, active_locations, LocationName.special_zone_8_region, None) - special_zone_8_exit_1 = create_region(world, player, active_locations, LocationName.special_zone_8_exit_1, + special_zone_8_tile = create_region(multiworld, player, active_locations, LocationName.special_zone_8_tile, None) + special_zone_8_region = create_region(multiworld, player, active_locations, LocationName.special_zone_8_region, None) + special_zone_8_exit_1 = create_region(multiworld, player, active_locations, LocationName.special_zone_8_exit_1, [LocationName.special_zone_8_exit_1]) - special_complete = create_region(world, player, active_locations, LocationName.special_complete, None) + special_complete = create_region(multiworld, player, active_locations, LocationName.special_complete, None) # Set up the regions correctly. - world.regions += [ + multiworld.regions += [ menu_region, yoshis_island_region, yoshis_house_tile, @@ -725,323 +728,1327 @@ def create_regions(world, player: int, active_locations): ] - if world.dragon_coin_checks[player]: - add_location_to_region(world, player, active_locations, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_dragon, + if world.options.dragon_coin_checks: + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_dragon, lambda state: (state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.progressive_powerup, player, 1))) - add_location_to_region(world, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_dragon, lambda state: (state.has(ItemName.yoshi_activate, player) or state.has(ItemName.mario_climb, player))) - add_location_to_region(world, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_dragon, lambda state: state.has(ItemName.p_switch, player)) - add_location_to_region(world, player, active_locations, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_dragon, lambda state: (state.has(ItemName.yoshi_activate, player) or state.has(ItemName.mario_swim, player) or (state.has(ItemName.mario_carry, player) and state.has(ItemName.p_switch, player)))) - add_location_to_region(world, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_dragon, lambda state: (state.has(ItemName.mario_climb, player) or state.has(ItemName.yoshi_activate, player) or (state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.mario_run, player)))) - add_location_to_region(world, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_dragon) - add_location_to_region(world, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_dragon, lambda state: ((state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_climb, player) or state.has(ItemName.yoshi_activate, player) or (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) - add_location_to_region(world, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_dragon) - add_location_to_region(world, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_dragon, lambda state: state.has(ItemName.mario_swim, player)) - add_location_to_region(world, player, active_locations, LocationName.donut_secret_2_region, LocationName.donut_secret_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_2_region, LocationName.donut_secret_2_dragon, lambda state: (state.has(ItemName.mario_climb, player) or state.has(ItemName.yoshi_activate, player))) - add_location_to_region(world, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_dragon, lambda state: (state.has(ItemName.mario_carry, player) and state.has(ItemName.mario_run, player) and (state.has(ItemName.super_star_active, player) or state.has(ItemName.progressive_powerup, player, 1)))) - add_location_to_region(world, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_dragon, lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.p_switch, player) and (state.has(ItemName.mario_climb, player) or state.has(ItemName.yoshi_activate, player)))) - add_location_to_region(world, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_dragon) - add_location_to_region(world, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_dragon) - add_location_to_region(world, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_dragon, lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.mario_carry, player))) - add_location_to_region(world, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_dragon, lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) - add_location_to_region(world, player, active_locations, LocationName.vanilla_secret_3_region, LocationName.vanilla_secret_3_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_3_region, LocationName.vanilla_secret_3_dragon, lambda state: state.has(ItemName.mario_swim, player)) - add_location_to_region(world, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_dragon, lambda state: state.has(ItemName.mario_climb, player)) - add_location_to_region(world, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_dragon) - add_location_to_region(world, player, active_locations, LocationName.butter_bridge_2_region, LocationName.butter_bridge_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_2_region, LocationName.butter_bridge_2_dragon, lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) - add_location_to_region(world, player, active_locations, LocationName.cheese_bridge_region, LocationName.cheese_bridge_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.cheese_bridge_region, LocationName.cheese_bridge_dragon, lambda state: (state.has(ItemName.yoshi_activate, player) or state.has(ItemName.mario_climb, player))) - add_location_to_region(world, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_dragon, lambda state: (state.has(ItemName.yoshi_activate, player) or state.has(ItemName.mario_climb, player))) - add_location_to_region(world, player, active_locations, LocationName.soda_lake_region, LocationName.soda_lake_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.soda_lake_region, LocationName.soda_lake_dragon, lambda state: state.has(ItemName.mario_swim, player)) - add_location_to_region(world, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_dragon, lambda state: state.has(ItemName.mario_swim, player)) - add_location_to_region(world, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_dragon, lambda state: (state.has(ItemName.yoshi_activate, player) or state.has(ItemName.mario_carry, player))) - add_location_to_region(world, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_dragon, lambda state: (state.has(ItemName.yoshi_activate, player) or state.has(ItemName.mario_carry, player) or state.has(ItemName.p_switch, player) or state.has(ItemName.progressive_powerup, player, 2))) - add_location_to_region(world, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_dragon, lambda state: state.has(ItemName.p_switch, player)) - add_location_to_region(world, player, active_locations, LocationName.forest_secret_region, LocationName.forest_secret_dragon) - add_location_to_region(world, player, active_locations, LocationName.forest_castle_region, LocationName.forest_castle_dragon) - add_location_to_region(world, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_dragon, - lambda state: state.has(ItemName.mario_swim, player)) - add_location_to_region(world, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.forest_secret_region, LocationName.forest_secret_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_castle_region, LocationName.forest_castle_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_dragon, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_dragon, lambda state: (state.has(ItemName.blue_switch_palace, player) and (state.has(ItemName.p_switch, player) or state.has(ItemName.green_switch_palace, player) or (state.has(ItemName.yellow_switch_palace, player) or state.has(ItemName.red_switch_palace, player))))) - add_location_to_region(world, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_dragon) - add_location_to_region(world, player, active_locations, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_dragon, lambda state: (state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) - add_location_to_region(world, player, active_locations, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_dragon, - lambda state: (state.has(ItemName.mario_swim, player) or - (state.has(ItemName.mario_carry, player) and state.has(ItemName.p_switch, player)))) - add_location_to_region(world, player, active_locations, LocationName.sunken_ghost_ship_region, LocationName.sunken_ghost_ship_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_dragon, + lambda state: (state.has(ItemName.mario_carry, player) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.sunken_ghost_ship_region, LocationName.sunken_ghost_ship_dragon, lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.super_star_active, player) and state.has(ItemName.progressive_powerup, player, 3))) - add_location_to_region(world, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_dragon) - add_location_to_region(world, player, active_locations, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_dragon, lambda state: state.has(ItemName.yoshi_activate, player)) - add_location_to_region(world, player, active_locations, LocationName.valley_of_bowser_3_region, LocationName.valley_of_bowser_3_dragon) - add_location_to_region(world, player, active_locations, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_3_region, LocationName.valley_of_bowser_3_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_dragon, lambda state: state.has(ItemName.p_switch, player)) - add_location_to_region(world, player, active_locations, LocationName.valley_castle_region, LocationName.valley_castle_dragon) - add_location_to_region(world, player, active_locations, LocationName.star_road_1_region, LocationName.star_road_1_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.valley_castle_region, LocationName.valley_castle_dragon) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_1_region, LocationName.star_road_1_dragon, lambda state: (state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.progressive_powerup, player, 1))) - add_location_to_region(world, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_dragon, lambda state: state.has(ItemName.mario_climb, player)) - add_location_to_region(world, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_dragon, lambda state: state.has(ItemName.p_balloon, player)) - add_location_to_region(world, player, active_locations, LocationName.special_zone_3_region, LocationName.special_zone_3_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_3_region, LocationName.special_zone_3_dragon, lambda state: state.has(ItemName.yoshi_activate, player)) - add_location_to_region(world, player, active_locations, LocationName.special_zone_4_region, LocationName.special_zone_4_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_4_region, LocationName.special_zone_4_dragon, lambda state: state.has(ItemName.progressive_powerup, player, 1)) - add_location_to_region(world, player, active_locations, LocationName.special_zone_5_region, LocationName.special_zone_5_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_5_region, LocationName.special_zone_5_dragon, lambda state: state.has(ItemName.progressive_powerup, player, 1)) - add_location_to_region(world, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_dragon, lambda state: state.has(ItemName.mario_swim, player)) - add_location_to_region(world, player, active_locations, LocationName.special_zone_7_region, LocationName.special_zone_7_dragon, - lambda state: state.has(ItemName.progressive_powerup, player, 1)) - add_location_to_region(world, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_dragon, + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_7_region, LocationName.special_zone_7_dragon, lambda state: state.has(ItemName.progressive_powerup, player, 1)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_dragon, + lambda state: ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player)) or + state.has(ItemName.progressive_powerup, player, 3) or + state.has(ItemName.yoshi_activate, player) or + state.has(ItemName.mario_carry, player))) + if world.options.moon_checks: + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_moon, + lambda state: ((state.has(ItemName.mario_run, player) and + state.has(ItemName.progressive_powerup, player, 3)) or + state.has(ItemName.yoshi_activate, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_moon, + lambda state: (state.has(ItemName.mario_run, player) and + state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_moon, + lambda state: (state.has(ItemName.mario_run, player) and + state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.cheese_bridge_region, LocationName.cheese_bridge_moon, + lambda state: (state.has(ItemName.mario_run, player) and + (state.has(ItemName.progressive_powerup, player, 3) or + state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_moon, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_moon, + lambda state: ((state.has(ItemName.mario_run, player) and + state.has(ItemName.progressive_powerup, player, 3)) or + state.has(ItemName.yoshi_activate, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_moon) + if world.options.hidden_1up_checks: + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_hidden_1up, + lambda state: (state.has(ItemName.yoshi_activate, player) or + (state.has(ItemName.mario_run, player, player) and + state.has(ItemName.progressive_powerup, player, 3)))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_hidden_1up) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_hidden_1up, + lambda state: (state.has(ItemName.mario_run, player) and + state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_hidden_1up) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_hidden_1up) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_hidden_1up) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_fortress_region, LocationName.vanilla_fortress_hidden_1up, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_hidden_1up, + lambda state: (state.has(ItemName.mario_swim, player) or + state.has(ItemName.yoshi_activate, player) or + (state.has(ItemName.mario_run, player, player) and + state.has(ItemName.progressive_powerup, player, 3)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_hidden_1up, + lambda state: (state.has(ItemName.mario_carry, player) or + state.has(ItemName.yoshi_activate, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_hidden_1up) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_castle_region, LocationName.chocolate_castle_hidden_1up, + lambda state: (state.has(ItemName.progressive_powerup, player, 1))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_hidden_1up) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_castle_region, LocationName.valley_castle_hidden_1up) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_hidden_1up, + lambda state: state.has(ItemName.mario_climb, player)) + + if world.options.bonus_block_checks: + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_bonus_block) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_bonus_block) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_bonus_block) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_bonus_block) + + if world.options.blocksanity: + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_green_block_1, + lambda state:( ((state.has(ItemName.green_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_gray_pow_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_coin_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_coin_block_5) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_coin_block_6) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_3_region, LocationName.vanilla_secret_3_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_3_region, LocationName.vanilla_secret_3_powerup_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_directional_coin_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_life_block_1, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_life_block_2, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_life_block_3, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_life_block_4, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_vine_block_1, + lambda state: (state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_3_region, LocationName.donut_plains_3_bonus_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_4_region, LocationName.donut_plains_4_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_invis_life_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_coin_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_coin_block_5) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_flying_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_yellow_block_2, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_2_region, LocationName.donut_plains_2_vine_block_1, + lambda state:( ((state.has(ItemName.mario_climb, player) and state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_coin_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_coin_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_coin_block_3, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_powerup_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_powerup_block_3, + lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.p_balloon, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_life_block_1, + lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.p_balloon, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_powerup_block_4, + lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.p_balloon, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_powerup_block_5, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_1_region, LocationName.donut_secret_1_key_block_1, + lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_fortress_region, LocationName.vanilla_fortress_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_fortress_region, LocationName.vanilla_fortress_powerup_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_fortress_region, LocationName.vanilla_fortress_yellow_block_1, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_swim, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_multi_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_multi_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_life_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_bonus_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_2_region, LocationName.butter_bridge_2_powerup_block_1, + lambda state: state.has(ItemName.mario_carry, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_2_region, LocationName.butter_bridge_2_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.butter_bridge_2_region, LocationName.butter_bridge_2_yoshi_block_1, + lambda state: state.has(ItemName.mario_carry, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.twin_bridges_castle_region, LocationName.twin_bridges_castle_powerup_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.cheese_bridge_region, LocationName.cheese_bridge_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.cheese_bridge_region, LocationName.cheese_bridge_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.cheese_bridge_region, LocationName.cheese_bridge_wings_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.cheese_bridge_region, LocationName.cheese_bridge_powerup_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_5) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_6) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_7) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_8) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_9) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_life_block_1, + lambda state:( (state.has(ItemName.mario_climb, player)) or (state.has(ItemName.mario_swim, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_yoshi_block_1, + lambda state: state.has(ItemName.red_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_10) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_11) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_12) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_13) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_14) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_15) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_16) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_17) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_18) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_19) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_20) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_21) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_22) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_23) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_24) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_25) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_26) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_27) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_28) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_29) + add_location_to_region(multiworld, player, active_locations, LocationName.cookie_mountain_region, LocationName.cookie_mountain_coin_block_30) + add_location_to_region(multiworld, player, active_locations, LocationName.soda_lake_region, LocationName.soda_lake_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_house_region, LocationName.donut_secret_house_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_house_region, LocationName.donut_secret_house_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_house_region, LocationName.donut_secret_house_life_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_house_region, LocationName.donut_secret_house_vine_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_house_region, LocationName.donut_secret_house_directional_coin_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_1, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_2, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_3, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_4, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_5, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_6, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_7, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_8, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_9, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_10, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_11, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_12, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_13, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_14, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_15, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_green_block_16, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_yellow_block_2, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_plains_1_region, LocationName.donut_plains_1_yellow_block_3, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.sunken_ghost_ship_region, LocationName.sunken_ghost_ship_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.sunken_ghost_ship_region, LocationName.sunken_ghost_ship_star_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_castle_region, LocationName.chocolate_castle_yellow_block_1, + lambda state: (state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.yellow_switch_palace, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_castle_region, LocationName.chocolate_castle_yellow_block_2, + lambda state: (state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.yellow_switch_palace, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_castle_region, LocationName.chocolate_castle_green_block_1, + lambda state: (state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.yellow_switch_palace, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_fortress_region, LocationName.chocolate_fortress_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_fortress_region, LocationName.chocolate_fortress_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_fortress_region, LocationName.chocolate_fortress_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_fortress_region, LocationName.chocolate_fortress_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_fortress_region, LocationName.chocolate_fortress_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_life_block_1, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.progressive_powerup, player, 3)))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_yellow_block_1, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_yellow_block_1, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.blue_switch_palace, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_blue_pow_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_1, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_2, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_3, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_4, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_5, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_6, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_7, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_8, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_fortress_region, LocationName.forest_fortress_life_block_9, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_castle_region, LocationName.forest_castle_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_ghost_house_region, LocationName.chocolate_ghost_house_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_ghost_house_region, LocationName.chocolate_ghost_house_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_ghost_house_region, LocationName.chocolate_ghost_house_life_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_flying_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_flying_block_2, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_yoshi_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_green_block_1, + lambda state:( ((state.has(ItemName.green_switch_palace, player) and state.has(ItemName.blue_switch_palace, player) and state.has(ItemName.p_switch, player))) or ((state.has(ItemName.green_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.blue_switch_palace, player) and state.has(ItemName.p_switch, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_life_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_powerup_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_bonus_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_life_block_1, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_life_block_2, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_life_block_3, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_invis_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_multi_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_blue_pow_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_yellow_block_2, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_green_block_2, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_green_block_3, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_green_block_4, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_green_block_5, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_green_block_6, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle_coin_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle_coin_block_2, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle_powerup_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle_coin_block_3, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle_coin_block_4, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle_flying_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_star_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_2, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_3, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_4, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_5, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_6, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_7, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_8, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_9, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_10, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_11, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_yellow_block_12, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_bonus_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_flying_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_life_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_flying_block_1, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_flying_block_2, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_flying_block_3, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_flying_block_4, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_flying_block_5, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_flying_block_6, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_coin_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_yoshi_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_coin_block_5) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_yellow_block_2, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_blue_pow_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_vine_block_2, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_coin_block_2, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_coin_block_3, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_powerup_block_2, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_flying_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_flying_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_flying_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_invis_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_powerup_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_yoshi_block_1, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_powerup_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_pswitch_coin_block_1, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_pswitch_coin_block_2, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_pswitch_coin_block_3, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_pswitch_coin_block_4, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_pswitch_coin_block_5, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_pswitch_coin_block_6, + lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3) and state.has(ItemName.p_switch, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_2_region, LocationName.donut_secret_2_directional_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_2_region, LocationName.donut_secret_2_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_2_region, LocationName.donut_secret_2_star_block_1, + lambda state:( (state.has(ItemName.mario_climb, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_2_region, LocationName.donut_secret_2_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.donut_secret_2_region, LocationName.donut_secret_2_star_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_yoshi_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_life_block_1, + lambda state: (state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.mario_climb, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_powerup_block_2, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_climb, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_castle_region, LocationName.valley_castle_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_castle_region, LocationName.valley_castle_yellow_block_2, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_castle_region, LocationName.valley_castle_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_fortress_region, LocationName.valley_fortress_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_fortress_region, LocationName.valley_fortress_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_3_region, LocationName.valley_of_bowser_3_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_3_region, LocationName.valley_of_bowser_3_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_pswitch_coin_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_multi_coin_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_directional_coin_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_yellow_block_1, + lambda state: state.has(ItemName.yellow_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_wings_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_invis_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_invis_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_invis_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_yellow_block_1, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_yellow_block_2, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_yellow_block_3, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_yellow_block_4, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_secret_region, LocationName.chocolate_secret_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_secret_region, LocationName.chocolate_secret_powerup_block_2, + lambda state: state.has(ItemName.mario_run, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_coin_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_coin_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_coin_block_3, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_vine_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_invis_life_block_1, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_coin_block_4, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_coin_block_5, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_powerup_block_2, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_powerup_block_3, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_powerup_block_4, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_powerup_block_5, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_multi_coin_block_1, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_multi_coin_block_2, + lambda state:( ((state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_climb, player))) or ((state.has(ItemName.mario_swim, player) and state.has(ItemName.yoshi_activate, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_life_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_5) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_6) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_7) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_coin_block_8, + lambda state: state.has(ItemName.mario_carry, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_flying_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_life_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_powerup_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_vine_block_1, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.red_switch_palace, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_star_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_powerup_block_4, + lambda state:( ((state.has(ItemName.mario_run, player) and state.has(ItemName.super_star_active, player))) or ((state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 1))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_coin_block_2, + lambda state:( ((state.has(ItemName.mario_run, player) and state.has(ItemName.super_star_active, player))) or ((state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 1))))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle_region, LocationName.vanilla_dome_castle_life_block_1, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.progressive_powerup, player, 1)))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle_region, LocationName.vanilla_dome_castle_life_block_2, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.progressive_powerup, player, 1)))) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle_region, LocationName.vanilla_dome_castle_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle_region, LocationName.vanilla_dome_castle_life_block_3, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.vanilla_dome_castle_region, LocationName.vanilla_dome_castle_green_block_1, + lambda state: state.has(ItemName.green_switch_palace, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_flying_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_life_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_key_block_1, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_life_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_5) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_6) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_7) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_8) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_9) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_coin_block_10) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_green_block_1, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_invis_coin_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_invis_coin_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_invis_life_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_invis_coin_block_3, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_yellow_block_1, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.mario_swim, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_secret_region, LocationName.forest_secret_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_secret_region, LocationName.forest_secret_powerup_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_secret_region, LocationName.forest_secret_life_block_1, + lambda state:( (state.has(ItemName.blue_switch_palace, player)) or (state.has(ItemName.mario_carry, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_multi_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_2, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_multi_coin_block_2, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_3, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_4, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_5, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_6, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_7, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_8, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_9, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_10, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_11, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_12, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_13, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_14, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_15, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_16, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_17, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_18, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_19, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_20, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_21, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_22, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_23, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_coin_block_24, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_yoshi_block_1, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_5) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_blue_pow_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_star_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_6, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_7, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_8, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_9, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_10, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_11, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_12, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_13, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_14, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_15, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_16, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_17, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_18, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_multi_coin_block_1, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_19, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_20, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_21, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_22, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_coin_block_23, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_powerup_block_2, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_8_region, LocationName.special_zone_8_flying_block_1, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player))) or (state.has(ItemName.progressive_powerup, player, 3)) or (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.yoshi_activate, player)))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_7_region, LocationName.special_zone_7_powerup_block_1, + lambda state: state.has(ItemName.progressive_powerup, player, 1)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_7_region, LocationName.special_zone_7_yoshi_block_1, + lambda state: state.has(ItemName.progressive_powerup, player, 1)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_7_region, LocationName.special_zone_7_coin_block_1, + lambda state: state.has(ItemName.progressive_powerup, player, 1)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_7_region, LocationName.special_zone_7_powerup_block_2, + lambda state: state.has(ItemName.progressive_powerup, player, 1)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_7_region, LocationName.special_zone_7_coin_block_2, + lambda state: state.has(ItemName.progressive_powerup, player, 1)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_powerup_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_yoshi_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_life_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_multi_coin_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_3, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_4, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_5, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_6, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_7, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_8, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_9, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_10, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_11, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_12, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_13, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_14, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_15, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_16, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_17, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_18, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_19, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_20, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_21, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_22, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_23, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_24, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_25, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_26, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_27, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_28, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_powerup_block_2, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_29, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_30, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_31, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_32, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_6_region, LocationName.special_zone_6_coin_block_33, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_5_region, LocationName.special_zone_5_yoshi_block_1, + lambda state: state.has(ItemName.progressive_powerup, player, 1)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_vine_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_vine_block_2) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_vine_block_3) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_vine_block_4) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_life_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_vine_block_5, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_blue_pow_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_vine_block_6, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_powerup_block_1, + lambda state: state.has(ItemName.mario_climb, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_1, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_2, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_3, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_4, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_5, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_6, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_7, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_8, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_9, + lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_10, + lambda state:( ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) or ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_11, + lambda state:( ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) or ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_12, + lambda state:( ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) or ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_1_region, LocationName.special_zone_1_pswitch_coin_block_13, + lambda state:( ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.progressive_powerup, player, 3))) or ((state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_coin_block_1, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_coin_block_2, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_powerup_block_2, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_coin_block_3, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_coin_block_4, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_powerup_block_3, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_multi_coin_block_1, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_coin_block_5, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_2_region, LocationName.special_zone_2_coin_block_6, + lambda state: state.has(ItemName.p_balloon, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_3_region, LocationName.special_zone_3_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_3_region, LocationName.special_zone_3_yoshi_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_3_region, LocationName.special_zone_3_wings_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_4_region, LocationName.special_zone_4_powerup_block_1, + lambda state: state.has(ItemName.progressive_powerup, player, 2)) + add_location_to_region(multiworld, player, active_locations, LocationName.special_zone_4_region, LocationName.special_zone_4_star_block_1, + lambda state:( ((state.has(ItemName.progressive_powerup, player, 2) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.progressive_powerup, player, 2) and state.has(ItemName.p_switch, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_2_region, LocationName.star_road_2_star_block_1, + lambda state: state.has(ItemName.mario_swim, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_3_region, LocationName.star_road_3_key_block_1, + lambda state:( (state.has(ItemName.mario_carry, player)) or (state.has(ItemName.progressive_powerup, player, 2)))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_powerup_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_green_block_1, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_green_block_2, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_green_block_3, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_green_block_4, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_green_block_5, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_green_block_6, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_green_block_7, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_4_region, LocationName.star_road_4_key_block_1, + lambda state:( ((state.has(ItemName.mario_climb, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.green_switch_palace, player) and state.has(ItemName.red_switch_palace, player) and state.has(ItemName.mario_climb, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_directional_coin_block_1) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_life_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_vine_block_1, + lambda state: state.has(ItemName.p_switch, player)) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_1, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_climb, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_2, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_3, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_4, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_5, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_6, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_7, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_8, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_9, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_10, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_11, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_12, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_13, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_14, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_15, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_16, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_17, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_18, + lambda state: (state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_19, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.green_switch_palace, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_climb, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_yellow_block_20, + lambda state:( ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player))) or ((state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.green_switch_palace, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_climb, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.progressive_powerup, player, 3))))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_1, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_2, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_3, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_4, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_5, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_6, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_7, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_8, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_9, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_10, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_11, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_12, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_13, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_14, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_15, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_16, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_17, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_18, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_19, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + add_location_to_region(multiworld, player, active_locations, LocationName.star_road_5_region, LocationName.star_road_5_green_block_20, + lambda state: (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.special_world_clear, player))) + +def connect_regions(world: World, level_to_tile_dict): + multiworld: MultiWorld = world.multiworld + player: int = world.player -def connect_regions(world, player, level_to_tile_dict): names: typing.Dict[str, int] = {} - connect(world, player, names, "Menu", LocationName.yoshis_island_region) - connect(world, player, names, LocationName.yoshis_island_region, LocationName.yoshis_house_tile) - connect(world, player, names, LocationName.yoshis_house_tile, LocationName.donut_plains_top_secret) - connect(world, player, names, LocationName.yoshis_island_region, LocationName.yoshis_island_1_tile) - connect(world, player, names, LocationName.yoshis_island_region, LocationName.yoshis_island_2_tile) + connect(world, "Menu", LocationName.yoshis_island_region) + connect(world, LocationName.yoshis_island_region, LocationName.yoshis_house_tile) + connect(world, LocationName.yoshis_island_region, LocationName.yoshis_island_1_tile) + connect(world, LocationName.yoshis_island_region, LocationName.yoshis_island_2_tile) # Connect regions within levels using rules - connect(world, player, names, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_exit_1) - connect(world, player, names, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_exit_1) - connect(world, player, names, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_exit_1) - connect(world, player, names, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_exit_1) - connect(world, player, names, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle, + connect(world, LocationName.yoshis_island_1_region, LocationName.yoshis_island_1_exit_1) + connect(world, LocationName.yoshis_island_2_region, LocationName.yoshis_island_2_exit_1) + connect(world, LocationName.yoshis_island_3_region, LocationName.yoshis_island_3_exit_1) + connect(world, LocationName.yoshis_island_4_region, LocationName.yoshis_island_4_exit_1) + connect(world, LocationName.yoshis_island_castle_region, LocationName.yoshis_island_castle, lambda state: (state.has(ItemName.mario_climb, player))) - connect(world, player, names, LocationName.donut_plains_1_region, LocationName.donut_plains_1_exit_1) - connect(world, player, names, LocationName.donut_plains_1_region, LocationName.donut_plains_1_exit_2, + connect(world, LocationName.donut_plains_1_region, LocationName.donut_plains_1_exit_1) + connect(world, LocationName.donut_plains_1_region, LocationName.donut_plains_1_exit_2, lambda state: (state.has(ItemName.mario_carry, player) and (state.has(ItemName.yoshi_activate, player) or state.has(ItemName.green_switch_palace, player) or (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) - connect(world, player, names, LocationName.donut_plains_2_region, LocationName.donut_plains_2_exit_1) - connect(world, player, names, LocationName.donut_plains_2_region, LocationName.donut_plains_2_exit_2, + connect(world, LocationName.donut_plains_2_region, LocationName.donut_plains_2_exit_1) + connect(world, LocationName.donut_plains_2_region, LocationName.donut_plains_2_exit_2, lambda state: (state.has(ItemName.mario_carry, player) and (state.has(ItemName.yoshi_activate, player) or (state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.mario_climb, player) and state.has(ItemName.progressive_powerup, player, 1))))) - connect(world, player, names, LocationName.donut_secret_1_region, LocationName.donut_secret_1_exit_1, + connect(world, LocationName.donut_secret_1_region, LocationName.donut_secret_1_exit_1, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.donut_secret_1_region, LocationName.donut_secret_1_exit_2, + connect(world, LocationName.donut_secret_1_region, LocationName.donut_secret_1_exit_2, lambda state: (state.has(ItemName.mario_carry, player) and state.has(ItemName.mario_swim, player) and state.has(ItemName.p_switch, player))) - connect(world, player, names, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_exit_1, + connect(world, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_exit_1, lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) - connect(world, player, names, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_exit_2, + connect(world, LocationName.donut_ghost_house_region, LocationName.donut_ghost_house_exit_2, lambda state: (state.has(ItemName.mario_climb, player) or (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3)))) - connect(world, player, names, LocationName.donut_secret_house_region, LocationName.donut_secret_house_exit_1, + connect(world, LocationName.donut_secret_house_region, LocationName.donut_secret_house_exit_1, lambda state: state.has(ItemName.p_switch, player)) - connect(world, player, names, LocationName.donut_secret_house_region, LocationName.donut_secret_house_exit_2, + connect(world, LocationName.donut_secret_house_region, LocationName.donut_secret_house_exit_2, lambda state: (state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player) and (state.has(ItemName.mario_climb, player) or (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) - connect(world, player, names, LocationName.donut_plains_3_region, LocationName.donut_plains_3_exit_1) - connect(world, player, names, LocationName.donut_plains_4_region, LocationName.donut_plains_4_exit_1) - connect(world, player, names, LocationName.donut_secret_2_region, LocationName.donut_secret_2_exit_1) - connect(world, player, names, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle) + connect(world, LocationName.donut_plains_3_region, LocationName.donut_plains_3_exit_1) + connect(world, LocationName.donut_plains_4_region, LocationName.donut_plains_4_exit_1) + connect(world, LocationName.donut_secret_2_region, LocationName.donut_secret_2_exit_1) + connect(world, LocationName.donut_plains_castle_region, LocationName.donut_plains_castle) - connect(world, player, names, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_exit_1, + connect(world, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_exit_1, lambda state: (state.has(ItemName.mario_run, player) and (state.has(ItemName.super_star_active, player) or state.has(ItemName.progressive_powerup, player, 1)))) - connect(world, player, names, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_exit_2, + connect(world, LocationName.vanilla_dome_1_region, LocationName.vanilla_dome_1_exit_2, lambda state: (state.has(ItemName.mario_carry, player) and ((state.has(ItemName.yoshi_activate, player) and state.has(ItemName.mario_climb, player)) or (state.has(ItemName.yoshi_activate, player) and state.has(ItemName.red_switch_palace, player)) or (state.has(ItemName.red_switch_palace, player) and state.has(ItemName.mario_climb, player))))) - connect(world, player, names, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_exit_1, + connect(world, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_exit_1, lambda state: (state.has(ItemName.mario_swim, player) and (state.has(ItemName.mario_climb, player) or state.has(ItemName.yoshi_activate, player)))) - connect(world, player, names, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_exit_2, + connect(world, LocationName.vanilla_dome_2_region, LocationName.vanilla_dome_2_exit_2, lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player) and (state.has(ItemName.mario_climb, player) or state.has(ItemName.yoshi_activate, player)))) - connect(world, player, names, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_exit_1, + connect(world, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_exit_1, lambda state: state.has(ItemName.mario_climb, player)) - connect(world, player, names, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_exit_2, + connect(world, LocationName.vanilla_secret_1_region, LocationName.vanilla_secret_1_exit_2, lambda state: (state.has(ItemName.mario_climb, player) and (state.has(ItemName.mario_carry, player) and state.has(ItemName.blue_switch_palace, player)))) - connect(world, player, names, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_exit_1, + connect(world, LocationName.vanilla_ghost_house_region, LocationName.vanilla_ghost_house_exit_1, lambda state: state.has(ItemName.p_switch, player)) - connect(world, player, names, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_exit_1) - connect(world, player, names, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_exit_1) - connect(world, player, names, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_exit_1) - connect(world, player, names, LocationName.vanilla_secret_3_region, LocationName.vanilla_secret_3_exit_1, + connect(world, LocationName.vanilla_dome_3_region, LocationName.vanilla_dome_3_exit_1) + connect(world, LocationName.vanilla_dome_4_region, LocationName.vanilla_dome_4_exit_1) + connect(world, LocationName.vanilla_secret_2_region, LocationName.vanilla_secret_2_exit_1) + connect(world, LocationName.vanilla_secret_3_region, LocationName.vanilla_secret_3_exit_1, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.vanilla_fortress_region, LocationName.vanilla_fortress, + connect(world, LocationName.vanilla_fortress_region, LocationName.vanilla_fortress, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.vanilla_dome_castle_region, LocationName.vanilla_dome_castle) + connect(world, LocationName.vanilla_dome_castle_region, LocationName.vanilla_dome_castle) - connect(world, player, names, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_exit_1) - connect(world, player, names, LocationName.butter_bridge_2_region, LocationName.butter_bridge_2_exit_1) - connect(world, player, names, LocationName.cheese_bridge_region, LocationName.cheese_bridge_exit_1, + connect(world, LocationName.butter_bridge_1_region, LocationName.butter_bridge_1_exit_1) + connect(world, LocationName.butter_bridge_2_region, LocationName.butter_bridge_2_exit_1) + connect(world, LocationName.cheese_bridge_region, LocationName.cheese_bridge_exit_1, lambda state: state.has(ItemName.mario_climb, player)) - connect(world, player, names, LocationName.cheese_bridge_region, LocationName.cheese_bridge_exit_2, - lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) - connect(world, player, names, LocationName.soda_lake_region, LocationName.soda_lake_exit_1, + connect(world, LocationName.cheese_bridge_region, LocationName.cheese_bridge_exit_2, + lambda state: (state.has(ItemName.mario_run, player) and + (state.has(ItemName.progressive_powerup, player, 3) or + state.has(ItemName.yoshi_activate, player)))) + connect(world, LocationName.soda_lake_region, LocationName.soda_lake_exit_1, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.cookie_mountain_region, LocationName.cookie_mountain_exit_1) - connect(world, player, names, LocationName.twin_bridges_castle_region, LocationName.twin_bridges_castle, + connect(world, LocationName.cookie_mountain_region, LocationName.cookie_mountain_exit_1) + connect(world, LocationName.twin_bridges_castle_region, LocationName.twin_bridges_castle, lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.mario_climb, player))) - connect(world, player, names, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_exit_1) - connect(world, player, names, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_exit_2, + connect(world, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_exit_1) + connect(world, LocationName.forest_of_illusion_1_region, LocationName.forest_of_illusion_1_exit_2, lambda state: (state.has(ItemName.mario_carry, player) and state.has(ItemName.p_balloon, player))) - connect(world, player, names, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_exit_1, + connect(world, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_exit_1, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_exit_2, + connect(world, LocationName.forest_of_illusion_2_region, LocationName.forest_of_illusion_2_exit_2, lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_carry, player))) - connect(world, player, names, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_exit_1, + connect(world, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_exit_1, lambda state: (state.has(ItemName.mario_carry, player) or state.has(ItemName.yoshi_activate, player))) - connect(world, player, names, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_exit_2, + connect(world, LocationName.forest_of_illusion_3_region, LocationName.forest_of_illusion_3_exit_2, lambda state: (state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.progressive_powerup, player, 1))) - connect(world, player, names, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_exit_1) - connect(world, player, names, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_exit_2, + connect(world, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_exit_1) + connect(world, LocationName.forest_of_illusion_4_region, LocationName.forest_of_illusion_4_exit_2, lambda state: state.has(ItemName.mario_carry, player)) - connect(world, player, names, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_exit_1, + connect(world, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_exit_1, lambda state: state.has(ItemName.p_switch, player)) - connect(world, player, names, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_exit_2, + connect(world, LocationName.forest_ghost_house_region, LocationName.forest_ghost_house_exit_2, lambda state: state.has(ItemName.p_switch, player)) - connect(world, player, names, LocationName.forest_secret_region, LocationName.forest_secret_exit_1) - connect(world, player, names, LocationName.forest_fortress_region, LocationName.forest_fortress) - connect(world, player, names, LocationName.forest_castle_region, LocationName.forest_castle) + connect(world, LocationName.forest_secret_region, LocationName.forest_secret_exit_1) + connect(world, LocationName.forest_fortress_region, LocationName.forest_fortress) + connect(world, LocationName.forest_castle_region, LocationName.forest_castle) - connect(world, player, names, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_exit_1, + connect(world, LocationName.chocolate_island_1_region, LocationName.chocolate_island_1_exit_1, lambda state: state.has(ItemName.p_switch, player)) - connect(world, player, names, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_exit_1) - connect(world, player, names, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_exit_2, + connect(world, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_exit_1) + connect(world, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_exit_2, lambda state: state.has(ItemName.mario_carry, player)) - connect(world, player, names, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_exit_1, + connect(world, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_exit_1, lambda state: (state.has(ItemName.mario_climb, player) or (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3)))) - connect(world, player, names, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_exit_2, + connect(world, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_exit_2, lambda state: (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))) - connect(world, player, names, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_exit_1) - connect(world, player, names, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_exit_1) - connect(world, player, names, LocationName.chocolate_ghost_house_region, LocationName.chocolate_ghost_house_exit_1) - connect(world, player, names, LocationName.chocolate_fortress_region, LocationName.chocolate_fortress) - connect(world, player, names, LocationName.chocolate_secret_region, LocationName.chocolate_secret_exit_1, + connect(world, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_exit_1) + connect(world, LocationName.chocolate_island_5_region, LocationName.chocolate_island_5_exit_1) + connect(world, LocationName.chocolate_ghost_house_region, LocationName.chocolate_ghost_house_exit_1) + connect(world, LocationName.chocolate_fortress_region, LocationName.chocolate_fortress) + connect(world, LocationName.chocolate_secret_region, LocationName.chocolate_secret_exit_1, lambda state: state.has(ItemName.mario_run, player)) - connect(world, player, names, LocationName.chocolate_castle_region, LocationName.chocolate_castle, + connect(world, LocationName.chocolate_castle_region, LocationName.chocolate_castle, lambda state: (state.has(ItemName.progressive_powerup, player, 1))) - connect(world, player, names, LocationName.sunken_ghost_ship_region, LocationName.sunken_ghost_ship, + connect(world, LocationName.sunken_ghost_ship_region, LocationName.sunken_ghost_ship, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_exit_1) - connect(world, player, names, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_exit_1) - connect(world, player, names, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_exit_2, + connect(world, LocationName.valley_of_bowser_1_region, LocationName.valley_of_bowser_1_exit_1) + connect(world, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_exit_1) + connect(world, LocationName.valley_of_bowser_2_region, LocationName.valley_of_bowser_2_exit_2, lambda state: state.has(ItemName.mario_carry, player)) - connect(world, player, names, LocationName.valley_of_bowser_3_region, LocationName.valley_of_bowser_3_exit_1) - connect(world, player, names, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_exit_1, + connect(world, LocationName.valley_of_bowser_3_region, LocationName.valley_of_bowser_3_exit_1) + connect(world, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_exit_1, lambda state: state.has(ItemName.mario_climb, player)) - connect(world, player, names, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_exit_2, + connect(world, LocationName.valley_of_bowser_4_region, LocationName.valley_of_bowser_4_exit_2, lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.yoshi_activate, player))) - connect(world, player, names, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_exit_1, + connect(world, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_exit_1, lambda state: state.has(ItemName.p_switch, player)) - connect(world, player, names, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_exit_2, + connect(world, LocationName.valley_ghost_house_region, LocationName.valley_ghost_house_exit_2, lambda state: (state.has(ItemName.p_switch, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.mario_run, player))) - connect(world, player, names, LocationName.valley_fortress_region, LocationName.valley_fortress, + connect(world, LocationName.valley_fortress_region, LocationName.valley_fortress, lambda state: state.has(ItemName.progressive_powerup, player, 1)) - connect(world, player, names, LocationName.valley_castle_region, LocationName.valley_castle) - connect(world, player, names, LocationName.front_door, LocationName.bowser_region, + connect(world, LocationName.valley_castle_region, LocationName.valley_castle) + connect(world, LocationName.front_door, LocationName.bowser_region, lambda state: (state.has(ItemName.mario_climb, player) and state.has(ItemName.mario_run, player) and state.has(ItemName.mario_swim, player) and state.has(ItemName.progressive_powerup, player, 1) and - state.has(ItemName.koopaling, player, world.bosses_required[player].value))) - connect(world, player, names, LocationName.back_door, LocationName.bowser_region, - lambda state: state.has(ItemName.koopaling, player, world.bosses_required[player].value)) + state.has(ItemName.koopaling, player, world.options.bosses_required.value))) + connect(world, LocationName.back_door, LocationName.bowser_region, + lambda state: state.has(ItemName.koopaling, player, world.options.bosses_required.value)) - connect(world, player, names, LocationName.star_road_1_region, LocationName.star_road_1_exit_1, + connect(world, LocationName.star_road_1_region, LocationName.star_road_1_exit_1, lambda state: (state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.progressive_powerup, player, 1))) - connect(world, player, names, LocationName.star_road_1_region, LocationName.star_road_1_exit_2, + connect(world, LocationName.star_road_1_region, LocationName.star_road_1_exit_2, lambda state: (state.has(ItemName.mario_spin_jump, player) and state.has(ItemName.mario_carry, player) and state.has(ItemName.progressive_powerup, player, 1))) - connect(world, player, names, LocationName.star_road_2_region, LocationName.star_road_2_exit_1, + connect(world, LocationName.star_road_2_region, LocationName.star_road_2_exit_1, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.star_road_2_region, LocationName.star_road_2_exit_2, + connect(world, LocationName.star_road_2_region, LocationName.star_road_2_exit_2, lambda state: (state.has(ItemName.mario_swim, player) and state.has(ItemName.mario_carry, player))) - connect(world, player, names, LocationName.star_road_3_region, LocationName.star_road_3_exit_1) - connect(world, player, names, LocationName.star_road_3_region, LocationName.star_road_3_exit_2, + connect(world, LocationName.star_road_3_region, LocationName.star_road_3_exit_1) + connect(world, LocationName.star_road_3_region, LocationName.star_road_3_exit_2, lambda state: state.has(ItemName.mario_carry, player)) - connect(world, player, names, LocationName.star_road_4_region, LocationName.star_road_4_exit_1) - connect(world, player, names, LocationName.star_road_4_region, LocationName.star_road_4_exit_2, + connect(world, LocationName.star_road_4_region, LocationName.star_road_4_exit_1) + connect(world, LocationName.star_road_4_region, LocationName.star_road_4_exit_2, lambda state: (state.has(ItemName.mario_carry, player) and (state.has(ItemName.yoshi_activate, player) or (state.has(ItemName.green_switch_palace, player) and state.has(ItemName.red_switch_palace, player))))) - connect(world, player, names, LocationName.star_road_5_region, LocationName.star_road_5_exit_1, + connect(world, LocationName.star_road_5_region, LocationName.star_road_5_exit_1, lambda state: state.has(ItemName.p_switch, player)) - connect(world, player, names, LocationName.star_road_5_region, LocationName.star_road_5_exit_2, + connect(world, LocationName.star_road_5_region, LocationName.star_road_5_exit_2, lambda state: (state.has(ItemName.mario_carry, player) and state.has(ItemName.mario_climb, player) and state.has(ItemName.p_switch, player) and @@ -1050,26 +2057,29 @@ def connect_regions(world, player, level_to_tile_dict): state.has(ItemName.red_switch_palace, player) and state.has(ItemName.blue_switch_palace, player))) - connect(world, player, names, LocationName.special_zone_1_region, LocationName.special_zone_1_exit_1, + connect(world, LocationName.special_zone_1_region, LocationName.special_zone_1_exit_1, lambda state: (state.has(ItemName.mario_climb, player) and (state.has(ItemName.p_switch, player) or (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3))))) - connect(world, player, names, LocationName.special_zone_2_region, LocationName.special_zone_2_exit_1, + connect(world, LocationName.special_zone_2_region, LocationName.special_zone_2_exit_1, lambda state: state.has(ItemName.p_balloon, player)) - connect(world, player, names, LocationName.special_zone_3_region, LocationName.special_zone_3_exit_1, + connect(world, LocationName.special_zone_3_region, LocationName.special_zone_3_exit_1, lambda state: (state.has(ItemName.mario_climb, player) or - state.has(ItemName.p_switch, player) or - (state.has(ItemName.mario_run, player) and state.has(ItemName.progressive_powerup, player, 3)))) - connect(world, player, names, LocationName.special_zone_4_region, LocationName.special_zone_4_exit_1, + state.has(ItemName.yoshi_activate, player))) + connect(world, LocationName.special_zone_4_region, LocationName.special_zone_4_exit_1, + lambda state: (state.has(ItemName.progressive_powerup, player, 2) or + state.has(ItemName.super_star_active, player))) + connect(world, LocationName.special_zone_5_region, LocationName.special_zone_5_exit_1, lambda state: state.has(ItemName.progressive_powerup, player, 1)) - connect(world, player, names, LocationName.special_zone_5_region, LocationName.special_zone_5_exit_1, - lambda state: state.has(ItemName.progressive_powerup, player, 1)) - connect(world, player, names, LocationName.special_zone_6_region, LocationName.special_zone_6_exit_1, + connect(world, LocationName.special_zone_6_region, LocationName.special_zone_6_exit_1, lambda state: state.has(ItemName.mario_swim, player)) - connect(world, player, names, LocationName.special_zone_7_region, LocationName.special_zone_7_exit_1, - lambda state: state.has(ItemName.progressive_powerup, player, 1)) - connect(world, player, names, LocationName.special_zone_8_region, LocationName.special_zone_8_exit_1, + connect(world, LocationName.special_zone_7_region, LocationName.special_zone_7_exit_1, lambda state: state.has(ItemName.progressive_powerup, player, 1)) + connect(world, LocationName.special_zone_8_region, LocationName.special_zone_8_exit_1, + lambda state: ((state.has(ItemName.progressive_powerup, player, 1) and state.has(ItemName.mario_spin_jump, player)) or + state.has(ItemName.progressive_powerup, player, 3) or + state.has(ItemName.yoshi_activate, player) or + state.has(ItemName.mario_carry, player))) @@ -1085,52 +2095,52 @@ def connect_regions(world, player, level_to_tile_dict): current_tile_name = current_tile_data.levelName if ("Star Road - " not in current_tile_name) and (" - Star Road" not in current_tile_name): current_tile_name += " - Tile" - connect(world, player, names, current_tile_name, current_level_data.levelName) + connect(world, current_tile_name, current_level_data.levelName) # Connect Exit regions to next tile regions if current_tile_data.exit1Path: next_tile_id = current_tile_data.exit1Path.otherLevelID - if world.swap_donut_gh_exits[player] and current_tile_id == 0x04: + if world.options.swap_donut_gh_exits and current_tile_id == 0x04: next_tile_id = current_tile_data.exit2Path.otherLevelID next_tile_name = level_info_dict[next_tile_id].levelName if ("Star Road - " not in next_tile_name) and (" - Star Road" not in next_tile_name): next_tile_name += " - Tile" current_exit_name = (current_level_data.levelName + " - Normal Exit") - connect(world, player, names, current_exit_name, next_tile_name) + connect(world, current_exit_name, next_tile_name) if current_tile_data.exit2Path: next_tile_id = current_tile_data.exit2Path.otherLevelID - if world.swap_donut_gh_exits[player] and current_tile_id == 0x04: + if world.options.swap_donut_gh_exits and current_tile_id == 0x04: next_tile_id = current_tile_data.exit1Path.otherLevelID next_tile_name = level_info_dict[next_tile_id].levelName if ("Star Road - " not in next_tile_name) and (" - Star Road" not in next_tile_name): next_tile_name += " - Tile" current_exit_name = (current_level_data.levelName + " - Secret Exit") - connect(world, player, names, current_exit_name, next_tile_name) + connect(world, current_exit_name, next_tile_name) - connect(world, player, names, LocationName.donut_plains_star_road, LocationName.star_road_donut) - connect(world, player, names, LocationName.star_road_donut, LocationName.donut_plains_star_road) - connect(world, player, names, LocationName.star_road_donut, LocationName.star_road_1_tile) - connect(world, player, names, LocationName.vanilla_dome_star_road, LocationName.star_road_vanilla) - connect(world, player, names, LocationName.star_road_vanilla, LocationName.vanilla_dome_star_road) - connect(world, player, names, LocationName.star_road_vanilla, LocationName.star_road_2_tile) - connect(world, player, names, LocationName.twin_bridges_star_road, LocationName.star_road_twin_bridges) - connect(world, player, names, LocationName.star_road_twin_bridges, LocationName.twin_bridges_star_road) - connect(world, player, names, LocationName.star_road_twin_bridges, LocationName.star_road_3_tile) - connect(world, player, names, LocationName.forest_star_road, LocationName.star_road_forest) - connect(world, player, names, LocationName.star_road_forest, LocationName.forest_star_road) - connect(world, player, names, LocationName.star_road_forest, LocationName.star_road_4_tile) - connect(world, player, names, LocationName.valley_star_road, LocationName.star_road_valley) - connect(world, player, names, LocationName.star_road_valley, LocationName.valley_star_road) - connect(world, player, names, LocationName.star_road_valley, LocationName.star_road_5_tile) - connect(world, player, names, LocationName.star_road_special, LocationName.special_star_road) - connect(world, player, names, LocationName.special_star_road, LocationName.star_road_special) - connect(world, player, names, LocationName.special_star_road, LocationName.special_zone_1_tile) + connect(world, LocationName.donut_plains_star_road, LocationName.star_road_donut) + connect(world, LocationName.star_road_donut, LocationName.donut_plains_star_road) + connect(world, LocationName.star_road_donut, LocationName.star_road_1_tile) + connect(world, LocationName.vanilla_dome_star_road, LocationName.star_road_vanilla) + connect(world, LocationName.star_road_vanilla, LocationName.vanilla_dome_star_road) + connect(world, LocationName.star_road_vanilla, LocationName.star_road_2_tile) + connect(world, LocationName.twin_bridges_star_road, LocationName.star_road_twin_bridges) + connect(world, LocationName.star_road_twin_bridges, LocationName.twin_bridges_star_road) + connect(world, LocationName.star_road_twin_bridges, LocationName.star_road_3_tile) + connect(world, LocationName.forest_star_road, LocationName.star_road_forest) + connect(world, LocationName.star_road_forest, LocationName.forest_star_road) + connect(world, LocationName.star_road_forest, LocationName.star_road_4_tile) + connect(world, LocationName.valley_star_road, LocationName.star_road_valley) + connect(world, LocationName.star_road_valley, LocationName.valley_star_road) + connect(world, LocationName.star_road_valley, LocationName.star_road_5_tile) + connect(world, LocationName.star_road_special, LocationName.special_star_road) + connect(world, LocationName.special_star_road, LocationName.star_road_special) + connect(world, LocationName.special_star_road, LocationName.special_zone_1_tile) - connect(world, player, names, LocationName.star_road_valley, LocationName.front_door_tile) + connect(world, LocationName.star_road_valley, LocationName.front_door_tile) -def create_region(world: MultiWorld, player: int, active_locations, name: str, locations=None): - ret = Region(name, player, world) +def create_region(multiworld: MultiWorld, player: int, active_locations, name: str, locations=None): + ret = Region(name, player, multiworld) if locations: for locationName in locations: loc_id = active_locations.get(locationName, 0) @@ -1140,9 +2150,9 @@ def create_region(world: MultiWorld, player: int, active_locations, name: str, l return ret -def add_location_to_region(world: MultiWorld, player: int, active_locations, region_name: str, location_name: str, +def add_location_to_region(multiworld: MultiWorld, player: int, active_locations, region_name: str, location_name: str, rule: typing.Optional[typing.Callable] = None): - region = world.get_region(region_name, player) + region = multiworld.get_region(region_name, player) loc_id = active_locations.get(location_name, 0) if loc_id: location = SMWLocation(player, location_name, loc_id, region) @@ -1151,23 +2161,8 @@ def add_location_to_region(world: MultiWorld, player: int, active_locations, reg add_rule(location, rule) - -def connect(world: MultiWorld, player: int, used_names: typing.Dict[str, int], source: str, target: str, +def connect(world: World, source: str, target: str, rule: typing.Optional[typing.Callable] = None): - source_region = world.get_region(source, player) - target_region = world.get_region(target, player) - - if target not in used_names: - used_names[target] = 1 - name = target - else: - used_names[target] += 1 - name = target + (' ' * used_names[target]) - - connection = Entrance(player, name, source_region) - - if rule: - connection.access_rule = rule - - source_region.exits.append(connection) - connection.connect(target_region) + source_region: Region = world.get_region(source) + target_region: Region = world.get_region(target) + source_region.connect(target_region, rule=rule) diff --git a/worlds/smw/Rom.py b/worlds/smw/Rom.py index 0f5ec7e4..66226d50 100644 --- a/worlds/smw/Rom.py +++ b/worlds/smw/Rom.py @@ -1,6 +1,7 @@ import Utils +from worlds.AutoWorld import World from worlds.Files import APDeltaPatch -from .Aesthetics import generate_shuffled_header_data, generate_shuffled_ow_palettes +from .Aesthetics import generate_shuffled_header_data, generate_shuffled_ow_palettes, generate_curated_level_palette_data, generate_curated_map_palette_data, generate_shuffled_sfx from .Levels import level_info_dict, full_bowser_rooms, standard_bowser_rooms, submap_boss_rooms, ow_boss_rooms from .Names.TextBox import generate_goal_text, title_text_mapping, generate_text_box @@ -10,38 +11,48 @@ ROM_PLAYER_LIMIT = 65535 import hashlib import os import math +import pkgutil ability_rom_data = { - 0xBC0003: [[0x1F2C, 0x7]], # Run 0x80 - 0xBC0004: [[0x1F2C, 0x6]], # Carry 0x40 - 0xBC0005: [[0x1F2C, 0x2]], # Swim 0x04 - 0xBC0006: [[0x1F2C, 0x3]], # Spin Jump 0x08 - 0xBC0007: [[0x1F2C, 0x5]], # Climb 0x20 - 0xBC0008: [[0x1F2C, 0x1]], # Yoshi 0x02 - 0xBC0009: [[0x1F2C, 0x4]], # P-Switch 0x10 + 0xBC0003: [[0x1F1C, 0x7]], # Run 0x80 + 0xBC0004: [[0x1F1C, 0x6]], # Carry 0x40 + 0xBC0005: [[0x1F1C, 0x2]], # Swim 0x04 + 0xBC0006: [[0x1F1C, 0x3]], # Spin Jump 0x08 + 0xBC0007: [[0x1F1C, 0x5]], # Climb 0x20 + 0xBC0008: [[0x1F1C, 0x1]], # Yoshi 0x02 + 0xBC0009: [[0x1F1C, 0x4]], # P-Switch 0x10 #0xBC000A: [[]] 0xBC000B: [[0x1F2D, 0x3]], # P-Balloon 0x08 - 0xBC000D: [[0x1F2D, 0x4]], # Super Star 0x10 + 0xBC000D: [[0x1F2D, 0x4]] # Super Star 0x10 } +icon_rom_data = { + 0xBC0002: [0x1B00C], # Yoshi Egg + 0xBC0012: [0x1B00E], # Boss Token + 0xBC0017: [0x1B004], # 1 coin + 0xBC0018: [0x1B006], # 5 coins + 0xBC0019: [0x1B008], # 10 coins + 0xBC001A: [0x1B00A], # 50 coins + + 0xBC0001: [0x1B010] # 1-Up Mushroom +} + item_rom_data = { - 0xBC0001: [0x18E4, 0x1], # 1-Up Mushroom - - 0xBC0002: [0x1F24, 0x1, 0x1F], # Yoshi Egg - 0xBC0012: [0x1F26, 0x1, 0x09], # Boss Token - - 0xBC000E: [0x1F28, 0x1, 0x1C], # Yellow Switch Palace - 0xBC000F: [0x1F27, 0x1, 0x1C], # Green Switch Palace - 0xBC0010: [0x1F2A, 0x1, 0x1C], # Red Switch Palace - 0xBC0011: [0x1F29, 0x1, 0x1C], # Blue Switch Palace + 0xBC000E: [0x1F28, 0x1, 0x1C], # Yellow Switch Palace + 0xBC000F: [0x1F27, 0x1, 0x1C], # Green Switch Palace + 0xBC0010: [0x1F2A, 0x1, 0x1C], # Red Switch Palace + 0xBC0011: [0x1F29, 0x1, 0x1C], # Blue Switch Palace + 0xBC001B: [0x1F1E, 0x80, 0x39] # Special Zone Clear } trap_rom_data = { - 0xBC0013: [0x0086, 0x1, 0x0E], # Ice Trap + 0xBC0013: [0x0086, 0x1, 0x0E], # Ice Trap 0xBC0014: [0x18BD, 0x7F, 0x18], # Stun Trap - 0xBC0016: [0x0F31, 0x1], # Timer Trap + 0xBC0016: [0x0F31, 0x1], # Timer Trap + 0xBC001C: [0x18B4, 0x1, 0x44], # Reverse controls trap + 0xBC001D: [0x18B7, 0x1], # Thwimp Trap } @@ -109,7 +120,7 @@ def handle_ability_code(rom): rom.write_bytes(RUN_SUB_ADDR + 0x04, bytearray([0xC8])) # INY rom.write_bytes(RUN_SUB_ADDR + 0x05, bytearray([0xA9, 0x70])) # LDA #70 rom.write_bytes(RUN_SUB_ADDR + 0x07, bytearray([0xAA])) # TAX - rom.write_bytes(RUN_SUB_ADDR + 0x08, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(RUN_SUB_ADDR + 0x08, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(RUN_SUB_ADDR + 0x0B, bytearray([0x89, 0x80])) # BIT #80 rom.write_bytes(RUN_SUB_ADDR + 0x0D, bytearray([0xF0, 0x04])) # BEQ +0x04 rom.write_bytes(RUN_SUB_ADDR + 0x0F, bytearray([0x8A])) # TXA @@ -126,7 +137,7 @@ def handle_ability_code(rom): PURPLE_BLOCK_CARRY_SUB_ADDR = 0x01BA28 rom.write_bytes(PURPLE_BLOCK_CARRY_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(PURPLE_BLOCK_CARRY_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(PURPLE_BLOCK_CARRY_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(PURPLE_BLOCK_CARRY_SUB_ADDR + 0x04, bytearray([0x89, 0x40])) # BIT #40 rom.write_bytes(PURPLE_BLOCK_CARRY_SUB_ADDR + 0x06, bytearray([0xF0, 0x09])) # BEQ +0x09 rom.write_bytes(PURPLE_BLOCK_CARRY_SUB_ADDR + 0x08, bytearray([0x28])) # PLP @@ -145,7 +156,7 @@ def handle_ability_code(rom): SPRINGBOARD_CARRY_SUB_ADDR = 0x01BA40 rom.write_bytes(SPRINGBOARD_CARRY_SUB_ADDR + 0x00, bytearray([0x48])) # PHA rom.write_bytes(SPRINGBOARD_CARRY_SUB_ADDR + 0x01, bytearray([0x08])) # PHP - rom.write_bytes(SPRINGBOARD_CARRY_SUB_ADDR + 0x02, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(SPRINGBOARD_CARRY_SUB_ADDR + 0x02, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(SPRINGBOARD_CARRY_SUB_ADDR + 0x05, bytearray([0x89, 0x40])) # BIT #40 rom.write_bytes(SPRINGBOARD_CARRY_SUB_ADDR + 0x07, bytearray([0xF0, 0x08])) # BEQ +0x08 rom.write_bytes(SPRINGBOARD_CARRY_SUB_ADDR + 0x09, bytearray([0xA9, 0x0B])) # LDA #0B @@ -157,7 +168,7 @@ def handle_ability_code(rom): # End Springboard Carry # Shell Carry - rom.write_bytes(0xAA66, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(0xAA66, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(0xAA69, bytearray([0x89, 0x40])) # BIT #40 rom.write_bytes(0xAA6B, bytearray([0xF0, 0x07])) # BEQ +0x07 rom.write_bytes(0xAA6D, bytearray([0x22, 0x60, 0xBA, 0x03])) # JSL $03BA60 @@ -180,7 +191,7 @@ def handle_ability_code(rom): YOSHI_CARRY_SUB_ADDR = 0x01BA70 rom.write_bytes(YOSHI_CARRY_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(YOSHI_CARRY_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(YOSHI_CARRY_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(YOSHI_CARRY_SUB_ADDR + 0x04, bytearray([0x89, 0x40])) # BIT #40 rom.write_bytes(YOSHI_CARRY_SUB_ADDR + 0x06, bytearray([0xF0, 0x0A])) # BEQ +0x0A rom.write_bytes(YOSHI_CARRY_SUB_ADDR + 0x08, bytearray([0xA9, 0x12])) # LDA #12 @@ -197,7 +208,7 @@ def handle_ability_code(rom): CLIMB_SUB_ADDR = 0x01BA88 rom.write_bytes(CLIMB_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(CLIMB_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(CLIMB_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(CLIMB_SUB_ADDR + 0x04, bytearray([0x89, 0x20])) # BIT #20 rom.write_bytes(CLIMB_SUB_ADDR + 0x06, bytearray([0xF0, 0x09])) # BEQ +0x09 rom.write_bytes(CLIMB_SUB_ADDR + 0x08, bytearray([0xA5, 0x8B])) # LDA $8B @@ -213,7 +224,7 @@ def handle_ability_code(rom): CLIMB_ROPE_SUB_ADDR = 0x01BC70 rom.write_bytes(CLIMB_ROPE_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(CLIMB_ROPE_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(CLIMB_ROPE_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(CLIMB_ROPE_SUB_ADDR + 0x04, bytearray([0x89, 0x20])) # BIT #20 rom.write_bytes(CLIMB_ROPE_SUB_ADDR + 0x06, bytearray([0xF0, 0x07])) # BEQ +0x07 rom.write_bytes(CLIMB_ROPE_SUB_ADDR + 0x08, bytearray([0x28])) # PLP @@ -230,7 +241,7 @@ def handle_ability_code(rom): P_SWITCH_SUB_ADDR = 0x01BAA0 rom.write_bytes(P_SWITCH_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(P_SWITCH_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(P_SWITCH_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(P_SWITCH_SUB_ADDR + 0x04, bytearray([0x89, 0x10])) # BIT #10 rom.write_bytes(P_SWITCH_SUB_ADDR + 0x06, bytearray([0xF0, 0x04])) # BEQ +0x04 rom.write_bytes(P_SWITCH_SUB_ADDR + 0x08, bytearray([0xA9, 0xB0])) # LDA #B0 @@ -242,7 +253,7 @@ def handle_ability_code(rom): # End P-Switch # Spin Jump - rom.write_bytes(0x5645, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(0x5645, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(0x5648, bytearray([0x89, 0x08])) # BIT #08 rom.write_bytes(0x564A, bytearray([0xF0, 0x12])) # BEQ +0x12 rom.write_bytes(0x564C, bytearray([0x22, 0xB8, 0xBA, 0x03])) # JSL $03BAB8 @@ -264,7 +275,7 @@ def handle_ability_code(rom): SPIN_JUMP_WATER_SUB_ADDR = 0x01BBF8 rom.write_bytes(SPIN_JUMP_WATER_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(SPIN_JUMP_WATER_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(SPIN_JUMP_WATER_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(SPIN_JUMP_WATER_SUB_ADDR + 0x04, bytearray([0x89, 0x08])) # BIT #08 rom.write_bytes(SPIN_JUMP_WATER_SUB_ADDR + 0x06, bytearray([0xF0, 0x09])) # BEQ +0x09 rom.write_bytes(SPIN_JUMP_WATER_SUB_ADDR + 0x08, bytearray([0x1A])) # INC @@ -281,7 +292,7 @@ def handle_ability_code(rom): SPIN_JUMP_SPRING_SUB_ADDR = 0x01BC0C rom.write_bytes(SPIN_JUMP_SPRING_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(SPIN_JUMP_SPRING_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(SPIN_JUMP_SPRING_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(SPIN_JUMP_SPRING_SUB_ADDR + 0x04, bytearray([0x89, 0x08])) # BIT #08 rom.write_bytes(SPIN_JUMP_SPRING_SUB_ADDR + 0x06, bytearray([0xF0, 0x05])) # BEQ +0x05 rom.write_bytes(SPIN_JUMP_SPRING_SUB_ADDR + 0x08, bytearray([0xA9, 0x01])) # LDA #01 @@ -297,7 +308,7 @@ def handle_ability_code(rom): SWIM_SUB_ADDR = 0x01BAC8 rom.write_bytes(SWIM_SUB_ADDR + 0x00, bytearray([0x48])) # PHA rom.write_bytes(SWIM_SUB_ADDR + 0x01, bytearray([0x08])) # PHP - rom.write_bytes(SWIM_SUB_ADDR + 0x02, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(SWIM_SUB_ADDR + 0x02, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(SWIM_SUB_ADDR + 0x05, bytearray([0x89, 0x04])) # BIT #04 rom.write_bytes(SWIM_SUB_ADDR + 0x07, bytearray([0xF0, 0x0C])) # BEQ +0x0C rom.write_bytes(SWIM_SUB_ADDR + 0x09, bytearray([0x28])) # PLP @@ -321,7 +332,7 @@ def handle_ability_code(rom): SWIM_SUB_ADDR = 0x01BAE8 rom.write_bytes(SWIM_SUB_ADDR + 0x00, bytearray([0x48])) # PHA rom.write_bytes(SWIM_SUB_ADDR + 0x01, bytearray([0x08])) # PHP - rom.write_bytes(SWIM_SUB_ADDR + 0x02, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(SWIM_SUB_ADDR + 0x02, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(SWIM_SUB_ADDR + 0x05, bytearray([0x89, 0x04])) # BIT #04 rom.write_bytes(SWIM_SUB_ADDR + 0x07, bytearray([0xF0, 0x0A])) # BEQ +0x0A rom.write_bytes(SWIM_SUB_ADDR + 0x09, bytearray([0x28])) # PLP @@ -344,7 +355,7 @@ def handle_ability_code(rom): YOSHI_SUB_ADDR = 0x01BB08 rom.write_bytes(YOSHI_SUB_ADDR + 0x00, bytearray([0x08])) # PHP - rom.write_bytes(YOSHI_SUB_ADDR + 0x01, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(YOSHI_SUB_ADDR + 0x01, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(YOSHI_SUB_ADDR + 0x04, bytearray([0x89, 0x02])) # BIT #02 rom.write_bytes(YOSHI_SUB_ADDR + 0x06, bytearray([0xF0, 0x06])) # BEQ +0x06 rom.write_bytes(YOSHI_SUB_ADDR + 0x08, bytearray([0x28])) # PLP @@ -366,7 +377,7 @@ def handle_ability_code(rom): YOSHI_SUB_ADDR = 0x01BB20 rom.write_bytes(YOSHI_SUB_ADDR + 0x00, bytearray([0x08])) # PHP rom.write_bytes(YOSHI_SUB_ADDR + 0x01, bytearray([0x9C, 0x1E, 0x14])) # STZ $141E - rom.write_bytes(YOSHI_SUB_ADDR + 0x04, bytearray([0xAD, 0x2C, 0x1F])) # LDA $1F2C + rom.write_bytes(YOSHI_SUB_ADDR + 0x04, bytearray([0xAD, 0x1C, 0x1F])) # LDA $1F1C rom.write_bytes(YOSHI_SUB_ADDR + 0x07, bytearray([0x89, 0x02])) # BIT #02 rom.write_bytes(YOSHI_SUB_ADDR + 0x09, bytearray([0xF0, 0x05])) # BEQ +0x05 rom.write_bytes(YOSHI_SUB_ADDR + 0x0B, bytearray([0x28])) # PLP @@ -654,6 +665,7 @@ def handle_level_shuffle(rom, active_level_dict): for level_id, tile_id in active_level_dict.items(): rom.write_byte(0x37F70 + level_id, tile_id) + rom.write_byte(0x37F00 + tile_id, level_id) def handle_collected_paths(rom): @@ -673,38 +685,2139 @@ def handle_collected_paths(rom): def handle_vertical_scroll(rom): - rom.write_bytes(0x285BA, bytearray([0x22, 0x90, 0xBC, 0x03])) # JSL $03BC90 + rom.write_bytes(0x285BA, bytearray([0x22, 0x80, 0xF4, 0x0F])) # JSL $0FF480 - VERTICAL_SCROLL_SUB_ADDR = 0x01BC90 - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x00, bytearray([0x4A])) # LSR - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x01, bytearray([0x4A])) # LSR - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x02, bytearray([0x4A])) # LSR - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x03, bytearray([0x4A])) # LSR - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x04, bytearray([0x08])) # PHP - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x05, bytearray([0xC9, 0x02])) # CMP #02 - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x07, bytearray([0xD0, 0x02])) # BNE +0x02 - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x09, bytearray([0xA9, 0x01])) # LDA #01 - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0B, bytearray([0x28])) # PLP - rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0C, bytearray([0x6B])) # RTL + VERTICAL_SCROLL_SUB_ADDR = 0x7F480 + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0000, bytearray([0x4A])) # vertical_scroll: lsr + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0001, bytearray([0x4A])) # lsr + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0002, bytearray([0x4A])) # lsr + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0003, bytearray([0x4A])) # lsr + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0004, bytearray([0x08])) # php + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0005, bytearray([0xC9, 0x02])) # cmp #$02 + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0007, bytearray([0xD0, 0x0B])) # bne + + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0009, bytearray([0xC2, 0x10])) # rep #$10 + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x000B, bytearray([0xDA])) # phx + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x000C, bytearray([0xAE, 0x0B, 0x01])) # ldx $010B + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x000F, bytearray([0xBF, 0x00, 0xF5, 0x0F])) # lda.l vertical_scroll_levels,x + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0013, bytearray([0xFA])) # plx + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0014, bytearray([0x28])) # + plp + rom.write_bytes(VERTICAL_SCROLL_SUB_ADDR + 0x0015, bytearray([0x6B])) # rtl + + vertical_scroll_table = [ + 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, # Levels 000-00F + 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, # Levels 010-01F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 020-02F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 030-03F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 040-04F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 050-05F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 060-06F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 070-07F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 080-08F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 090-09F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 0A0-0AF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 0B0-0BF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 0C0-0CF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, # Levels 0D0-0DF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, # Levels 0E0-0EF + 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, # Levels 0F0-0FF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, # Levels 100-10F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 110-11F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 120-12F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 130-13F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 140-14F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 150-15F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 160-16F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 170-17F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 180-18F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 190-19F + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 1A0-1AF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 1B0-1BF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 1C0-1CF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 1D0-1DF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, # Levels 1E0-1EF + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02] # Levels 1F0-1FF + + rom.write_bytes(0x7F500, bytes(vertical_scroll_table)) -def handle_music_shuffle(rom, world, player): +def handle_bonus_block(rom): + rom.write_bytes(0x71A5, bytearray([0x5C, 0x19, 0x8E, 0x05])) # JML $058E19 + + BONUS_BLOCK_ADDR = 0x28E19 + rom.write_bytes(BONUS_BLOCK_ADDR + 0x00, bytearray([0xA9, 0x06])) # LDA #$06 + rom.write_bytes(BONUS_BLOCK_ADDR + 0x02, bytearray([0xAC, 0xC0, 0x0D])) # LDY $0DC0 + rom.write_bytes(BONUS_BLOCK_ADDR + 0x05, bytearray([0xD0, 0x1E])) # BNE IGNORE + rom.write_bytes(BONUS_BLOCK_ADDR + 0x07, bytearray([0xDA])) # PHX + rom.write_bytes(BONUS_BLOCK_ADDR + 0x08, bytearray([0xAD, 0xBF, 0x13])) # LDA $13BF + rom.write_bytes(BONUS_BLOCK_ADDR + 0x0B, bytearray([0x4A])) # LSR + rom.write_bytes(BONUS_BLOCK_ADDR + 0x0C, bytearray([0x4A])) # LSR + rom.write_bytes(BONUS_BLOCK_ADDR + 0x0D, bytearray([0x4A])) # LSR + rom.write_bytes(BONUS_BLOCK_ADDR + 0x0E, bytearray([0x48])) # PHA + rom.write_bytes(BONUS_BLOCK_ADDR + 0x0F, bytearray([0xAD, 0xBF, 0x13])) # LDA $13BF + rom.write_bytes(BONUS_BLOCK_ADDR + 0x12, bytearray([0x29, 0x07])) # AND #$07 + rom.write_bytes(BONUS_BLOCK_ADDR + 0x14, bytearray([0xAA])) # TAX + rom.write_bytes(BONUS_BLOCK_ADDR + 0x15, bytearray([0xBF, 0x5B, 0xB3, 0x05])) # LDA $05B35B,x + rom.write_bytes(BONUS_BLOCK_ADDR + 0x19, bytearray([0xFA])) # PLX + rom.write_bytes(BONUS_BLOCK_ADDR + 0x1A, bytearray([0x1F, 0x00, 0xA0, 0x7F])) # ORA $7FA000,x + rom.write_bytes(BONUS_BLOCK_ADDR + 0x1E, bytearray([0x9F, 0x00, 0xA0, 0x7F])) # STA $7FA000,x + rom.write_bytes(BONUS_BLOCK_ADDR + 0x22, bytearray([0xFA])) # PLX + rom.write_bytes(BONUS_BLOCK_ADDR + 0x23, bytearray([0xA9, 0x05])) # LDA #$05 + rom.write_bytes(BONUS_BLOCK_ADDR + 0x25, bytearray([0x5C, 0xD0, 0xF1, 0x00])) # IGNORE: JML $00F1D0 + + +def handle_blocksanity(rom): + import json + blocksanity_data = pkgutil.get_data(__name__, f"data/blocksanity.json").decode("utf-8") + blocksanity_data = json.loads(blocksanity_data) + blocksanity_coords = bytearray([]) + blocksanity_bytes = bytearray([]) + + block_count = 0 + entries = 0 + for level_name, level_data in blocksanity_data.items(): + # Calculate blocksanity pointer + if level_data == []: + # Skip if the level doesn't have any data + blocksanity_bytes += bytearray([0xFF, 0xFF]) + continue + level_ptr = 0x80C0 + entries + blocksanity_bytes += bytearray([level_ptr & 0xFF, (level_ptr >> 8) & 0xFF]) + + # Get block data + block_coords = bytearray([]) + for x in range(len(level_data)): + block_coords += bytearray([ + int(level_data[x][1], 16) & 0xFF, (int(level_data[x][1], 16) >> 8) & 0xFF, + int(level_data[x][2], 16) & 0xFF, (int(level_data[x][2], 16) >> 8) & 0xFF, + block_count & 0xFF, (block_count >> 8) & 0xFF]) + entries += 6 + block_count += 1 + block_coords += bytearray([0xFF, 0xFF]) + entries += 2 + + blocksanity_coords += block_coords + + blocksanity_bytes += blocksanity_coords + + rom.write_bytes(0x80000, blocksanity_bytes) + rom.write_bytes(0x071D0, bytearray([0x5C, 0x00, 0xF7, 0x0F])) # org $00F1D0 : jml blocksanity_main + rom.write_bytes(0x0AD59, bytearray([0x5C, 0x15, 0xF7, 0x0F])) # org $01AD5C : jml blocksanity_flying_init + rom.write_bytes(0x0AE16, bytearray([0x22, 0x39, 0xF7, 0x0F])) # org $01AE16 : jsl blocksanity_flying_main + + BLOCKSANITY_ADDR = 0x7F700 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0000, bytearray([0x85, 0x05])) # blocksanity_main: sta $05 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0002, bytearray([0x8B])) # phb + rom.write_bytes(BLOCKSANITY_ADDR + 0x0003, bytearray([0xA9, 0x10])) # lda.b #blocksanity_pointers>>16 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0005, bytearray([0x48])) # pha + rom.write_bytes(BLOCKSANITY_ADDR + 0x0006, bytearray([0xAB])) # plb + rom.write_bytes(BLOCKSANITY_ADDR + 0x0007, bytearray([0x5A])) # phy + rom.write_bytes(BLOCKSANITY_ADDR + 0x0008, bytearray([0x20, 0x63, 0xF7])) # jsr process_block + rom.write_bytes(BLOCKSANITY_ADDR + 0x000B, bytearray([0x7A])) # ply + rom.write_bytes(BLOCKSANITY_ADDR + 0x000C, bytearray([0xAB])) # plb + rom.write_bytes(BLOCKSANITY_ADDR + 0x000D, bytearray([0xA5, 0x05])) # lda $05 + rom.write_bytes(BLOCKSANITY_ADDR + 0x000F, bytearray([0xC9, 0x05])) # cmp #$05 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0011, bytearray([0x5C, 0xD4, 0xF1, 0x00])) # jml $00F1D4 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0015, bytearray([0xB5, 0xD8])) # blocksanity_flying_init: lda $D8,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0017, bytearray([0x29, 0xF0])) # and #$F0 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0019, bytearray([0x9F, 0x20, 0xB8, 0x7F])) # sta !sprite_blocksanity_y_lo,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x001D, bytearray([0xBD, 0xD4, 0x14])) # lda $14D4,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0020, bytearray([0x9F, 0x30, 0xB8, 0x7F])) # sta !sprite_blocksanity_y_hi,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0024, bytearray([0xBD, 0xE0, 0x14])) # lda $14E0,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0027, bytearray([0x9F, 0x10, 0xB8, 0x7F])) # sta !sprite_blocksanity_x_hi,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x002B, bytearray([0xB5, 0xE4])) # lda $E4,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x002D, bytearray([0x29, 0xF0])) # and #$F0 + rom.write_bytes(BLOCKSANITY_ADDR + 0x002F, bytearray([0x9F, 0x00, 0xB8, 0x7F])) # sta !sprite_blocksanity_x_lo,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0033, bytearray([0x4A])) # lsr + rom.write_bytes(BLOCKSANITY_ADDR + 0x0034, bytearray([0x4A])) # lsr + rom.write_bytes(BLOCKSANITY_ADDR + 0x0035, bytearray([0x5C, 0x5D, 0xAD, 0x01])) # jml $01AD5D + rom.write_bytes(BLOCKSANITY_ADDR + 0x0039, bytearray([0xBF, 0x20, 0xB8, 0x7F])) # blocksanity_flying_main: lda !sprite_blocksanity_y_lo,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x003D, bytearray([0x85, 0x98])) # sta $98 + rom.write_bytes(BLOCKSANITY_ADDR + 0x003F, bytearray([0xBF, 0x30, 0xB8, 0x7F])) # lda !sprite_blocksanity_y_hi,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0043, bytearray([0x85, 0x99])) # sta $99 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0045, bytearray([0xBF, 0x00, 0xB8, 0x7F])) # lda !sprite_blocksanity_x_lo,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0049, bytearray([0x85, 0x9A])) # sta $9A + rom.write_bytes(BLOCKSANITY_ADDR + 0x004B, bytearray([0xBF, 0x10, 0xB8, 0x7F])) # lda !sprite_blocksanity_x_hi,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x004F, bytearray([0x85, 0x9B])) # sta $9B + rom.write_bytes(BLOCKSANITY_ADDR + 0x0051, bytearray([0x8B])) # phb + rom.write_bytes(BLOCKSANITY_ADDR + 0x0052, bytearray([0xA9, 0x10])) # lda.b #blocksanity_pointers>>16 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0054, bytearray([0x48])) # pha + rom.write_bytes(BLOCKSANITY_ADDR + 0x0055, bytearray([0xAB])) # plb + rom.write_bytes(BLOCKSANITY_ADDR + 0x0056, bytearray([0x5A])) # phy + rom.write_bytes(BLOCKSANITY_ADDR + 0x0057, bytearray([0xDA])) # phx + rom.write_bytes(BLOCKSANITY_ADDR + 0x0058, bytearray([0x20, 0x63, 0xF7])) # jsr process_block + rom.write_bytes(BLOCKSANITY_ADDR + 0x005B, bytearray([0xFA])) # plx + rom.write_bytes(BLOCKSANITY_ADDR + 0x005C, bytearray([0x7A])) # ply + rom.write_bytes(BLOCKSANITY_ADDR + 0x005D, bytearray([0xAB])) # plb + rom.write_bytes(BLOCKSANITY_ADDR + 0x005E, bytearray([0xB5, 0xE4])) # lda $E4,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0060, bytearray([0x85, 0x9A])) # sta $9A + rom.write_bytes(BLOCKSANITY_ADDR + 0x0062, bytearray([0x6B])) # rtl + rom.write_bytes(BLOCKSANITY_ADDR + 0x0063, bytearray([0xA9, 0x0F])) # process_block: lda #$0F + rom.write_bytes(BLOCKSANITY_ADDR + 0x0065, bytearray([0x14, 0x98])) # trb $98 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0067, bytearray([0x14, 0x9A])) # trb $9A + rom.write_bytes(BLOCKSANITY_ADDR + 0x0069, bytearray([0xC2, 0x30])) # rep #$30 + rom.write_bytes(BLOCKSANITY_ADDR + 0x006B, bytearray([0xA5, 0x60])) # lda $60 + rom.write_bytes(BLOCKSANITY_ADDR + 0x006D, bytearray([0x29, 0xFF, 0x00])) # and #$00FF + rom.write_bytes(BLOCKSANITY_ADDR + 0x0070, bytearray([0x0A])) # asl + rom.write_bytes(BLOCKSANITY_ADDR + 0x0071, bytearray([0x18])) # clc + rom.write_bytes(BLOCKSANITY_ADDR + 0x0072, bytearray([0x69, 0x00, 0x80])) # adc.w #blocksanity_pointers + rom.write_bytes(BLOCKSANITY_ADDR + 0x0075, bytearray([0x48])) # pha + rom.write_bytes(BLOCKSANITY_ADDR + 0x0076, bytearray([0xA0, 0x00, 0x00])) # ldy #$0000 + rom.write_bytes(BLOCKSANITY_ADDR + 0x0079, bytearray([0xB3, 0x01])) # lda ($01,s),y + rom.write_bytes(BLOCKSANITY_ADDR + 0x007B, bytearray([0x48])) # pha + rom.write_bytes(BLOCKSANITY_ADDR + 0x007C, bytearray([0xB3, 0x01])) # .loop lda ($01,s),y + rom.write_bytes(BLOCKSANITY_ADDR + 0x007E, bytearray([0xC9, 0xFF, 0xFF])) # cmp #$FFFF + rom.write_bytes(BLOCKSANITY_ADDR + 0x0081, bytearray([0xF0, 0x16])) # beq .return + rom.write_bytes(BLOCKSANITY_ADDR + 0x0083, bytearray([0xC5, 0x9A])) # cmp $9A + rom.write_bytes(BLOCKSANITY_ADDR + 0x0085, bytearray([0xD0, 0x0A])) # bne .next_block_x + rom.write_bytes(BLOCKSANITY_ADDR + 0x0087, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0088, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0089, bytearray([0xB3, 0x01])) # lda ($01,s),y + rom.write_bytes(BLOCKSANITY_ADDR + 0x008B, bytearray([0xC5, 0x98])) # cmp $98 + rom.write_bytes(BLOCKSANITY_ADDR + 0x008D, bytearray([0xF0, 0x0F])) # beq .valid_block + rom.write_bytes(BLOCKSANITY_ADDR + 0x008F, bytearray([0x80, 0x02])) # bra .next_block_y + rom.write_bytes(BLOCKSANITY_ADDR + 0x0091, bytearray([0xC8])) # .next_block_x iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0092, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0093, bytearray([0xC8])) # .next_block_y iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0094, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0095, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0096, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x0097, bytearray([0x80, 0xE3])) # bra .loop + rom.write_bytes(BLOCKSANITY_ADDR + 0x0099, bytearray([0x68])) # .return pla + rom.write_bytes(BLOCKSANITY_ADDR + 0x009A, bytearray([0x68])) # pla + rom.write_bytes(BLOCKSANITY_ADDR + 0x009B, bytearray([0xE2, 0x30])) # sep #$30 + rom.write_bytes(BLOCKSANITY_ADDR + 0x009D, bytearray([0x60])) # rts + rom.write_bytes(BLOCKSANITY_ADDR + 0x009E, bytearray([0xC8])) # .valid_block iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x009F, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x00A0, bytearray([0xB3, 0x01])) # lda ($01,s),y + rom.write_bytes(BLOCKSANITY_ADDR + 0x00A2, bytearray([0xAA])) # tax + rom.write_bytes(BLOCKSANITY_ADDR + 0x00A3, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00A5, bytearray([0xDA])) # phx + rom.write_bytes(BLOCKSANITY_ADDR + 0x00A6, bytearray([0xBF, 0x00, 0xA4, 0x7F])) # lda !blocksanity_data_flags,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x00AA, bytearray([0xD0, 0x08])) # bne .processed + rom.write_bytes(BLOCKSANITY_ADDR + 0x00AC, bytearray([0x1A])) # inc + rom.write_bytes(BLOCKSANITY_ADDR + 0x00AD, bytearray([0x9F, 0x00, 0xA4, 0x7F])) # sta !blocksanity_data_flags,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x00B1, bytearray([0x20, 0xBA, 0xF7])) # jsr blocksanity_check_flags + rom.write_bytes(BLOCKSANITY_ADDR + 0x00B4, bytearray([0xFA])) # .processed plx + rom.write_bytes(BLOCKSANITY_ADDR + 0x00B5, bytearray([0xFA])) # plx + rom.write_bytes(BLOCKSANITY_ADDR + 0x00B6, bytearray([0xFA])) # plx + rom.write_bytes(BLOCKSANITY_ADDR + 0x00B7, bytearray([0xE2, 0x10])) # sep #$10 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00B9, bytearray([0x60])) # rts + rom.write_bytes(BLOCKSANITY_ADDR + 0x00BA, bytearray([0xC2, 0x20])) # blocksanity_check_flags: rep #$20 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00BC, bytearray([0xA0, 0x00, 0x00])) # ldy #$0000 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00BF, bytearray([0xB3, 0x05])) # .loop lda ($05,s),y + rom.write_bytes(BLOCKSANITY_ADDR + 0x00C1, bytearray([0xC9, 0xFF, 0xFF])) # cmp #$FFFF + rom.write_bytes(BLOCKSANITY_ADDR + 0x00C4, bytearray([0xF0, 0x14])) # beq .check + rom.write_bytes(BLOCKSANITY_ADDR + 0x00C6, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x00C7, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x00C8, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x00C9, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x00CA, bytearray([0xB3, 0x05])) # lda ($05,s),y + rom.write_bytes(BLOCKSANITY_ADDR + 0x00CC, bytearray([0xAA])) # tax + rom.write_bytes(BLOCKSANITY_ADDR + 0x00CD, bytearray([0xBF, 0x00, 0xA4, 0x7F])) # lda !blocksanity_data_flags,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x00D1, bytearray([0x29, 0xFF, 0x00])) # and #$00FF + rom.write_bytes(BLOCKSANITY_ADDR + 0x00D4, bytearray([0xF0, 0x22])) # beq .invalid + rom.write_bytes(BLOCKSANITY_ADDR + 0x00D6, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x00D7, bytearray([0xC8])) # iny + rom.write_bytes(BLOCKSANITY_ADDR + 0x00D8, bytearray([0x80, 0xE5])) # bra .loop + rom.write_bytes(BLOCKSANITY_ADDR + 0x00DA, bytearray([0xE2, 0x20])) # .check sep #$20 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00DC, bytearray([0xA9, 0x00])) # lda #$00 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00DE, bytearray([0xEB])) # xba + rom.write_bytes(BLOCKSANITY_ADDR + 0x00DF, bytearray([0xA5, 0x60])) # lda $60 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00E1, bytearray([0x4A])) # lsr + rom.write_bytes(BLOCKSANITY_ADDR + 0x00E2, bytearray([0x4A])) # lsr + rom.write_bytes(BLOCKSANITY_ADDR + 0x00E3, bytearray([0x4A])) # lsr + rom.write_bytes(BLOCKSANITY_ADDR + 0x00E4, bytearray([0xA8])) # tay + rom.write_bytes(BLOCKSANITY_ADDR + 0x00E5, bytearray([0xA5, 0x60])) # lda $60 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00E7, bytearray([0x29, 0x07])) # and #$07 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00E9, bytearray([0xAA])) # tax + rom.write_bytes(BLOCKSANITY_ADDR + 0x00EA, bytearray([0xBF, 0x5B, 0xB3, 0x05])) # lda.l $05B35B,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x00EE, bytearray([0xBB])) # tyx + rom.write_bytes(BLOCKSANITY_ADDR + 0x00EF, bytearray([0x1F, 0x10, 0xA0, 0x7F])) # ora !blocksanity_flags,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x00F3, bytearray([0x9F, 0x10, 0xA0, 0x7F])) # sta !blocksanity_flags,x + rom.write_bytes(BLOCKSANITY_ADDR + 0x00F7, bytearray([0x60])) # rts + rom.write_bytes(BLOCKSANITY_ADDR + 0x00F8, bytearray([0xE2, 0x20])) # .invalid sep #$20 + rom.write_bytes(BLOCKSANITY_ADDR + 0x00FA, bytearray([0x60])) # rts + +def handle_ram(rom): + rom.write_byte(0x07FD8, 0x02) # Expand SRAM + rom.write_bytes(0x01CF5, bytearray([0x5C, 0x00, 0xF2, 0x0F])) # org $009CF5 : jml init_sram + rom.write_bytes(0x01C0F, bytearray([0x5C, 0x00, 0xF3, 0x0F])) # org $009C0F : jml save_sram + rom.write_bytes(0x013BB, bytearray([0x5C, 0xA0, 0xF0, 0x0F])) # org $0093BB : jml init_ram + + INIT_SRAM_ADDR = 0x7F200 + rom.write_bytes(INIT_SRAM_ADDR + 0x0000, bytearray([0xD0, 0x74])) # init_sram: bne .clear + rom.write_bytes(INIT_SRAM_ADDR + 0x0002, bytearray([0x9C, 0x09, 0x01])) # stz $0109 + rom.write_bytes(INIT_SRAM_ADDR + 0x0005, bytearray([0xDA])) # phx + rom.write_bytes(INIT_SRAM_ADDR + 0x0006, bytearray([0x08])) # php + rom.write_bytes(INIT_SRAM_ADDR + 0x0007, bytearray([0xE2, 0x10])) # sep #$10 + rom.write_bytes(INIT_SRAM_ADDR + 0x0009, bytearray([0xA2, 0x5F])) # ldx.b #$5F + rom.write_bytes(INIT_SRAM_ADDR + 0x000B, bytearray([0xBF, 0x00, 0x08, 0x70])) # - lda !level_clears_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x000F, bytearray([0x9F, 0x00, 0xA2, 0x7F])) # sta !level_clears,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0013, bytearray([0xCA])) # dex + rom.write_bytes(INIT_SRAM_ADDR + 0x0014, bytearray([0x10, 0xF5])) # bpl - + rom.write_bytes(INIT_SRAM_ADDR + 0x0016, bytearray([0xA2, 0x0B])) # ldx #$0B + rom.write_bytes(INIT_SRAM_ADDR + 0x0018, bytearray([0xBF, 0x40, 0x09, 0x70])) # - lda !blocksanity_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x001C, bytearray([0x9F, 0x10, 0xA0, 0x7F])) # sta !blocksanity_flags,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0020, bytearray([0xBF, 0x10, 0x09, 0x70])) # lda !moons_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0024, bytearray([0x9D, 0xEE, 0x1F])) # sta !moons_flags,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0027, bytearray([0xBF, 0x00, 0x09, 0x70])) # lda !yoshi_coins_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x002B, bytearray([0x9D, 0x2F, 0x1F])) # sta !yoshi_coins_flags,x + rom.write_bytes(INIT_SRAM_ADDR + 0x002E, bytearray([0xBF, 0x30, 0x09, 0x70])) # lda !bonus_block_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0032, bytearray([0x9F, 0x00, 0xA0, 0x7F])) # sta !bonus_block_flags,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0036, bytearray([0xBF, 0x20, 0x09, 0x70])) # lda !checkpoints_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x003A, bytearray([0x9D, 0x3C, 0x1F])) # sta !checkpoints_flags,x + rom.write_bytes(INIT_SRAM_ADDR + 0x003D, bytearray([0xCA])) # dex + rom.write_bytes(INIT_SRAM_ADDR + 0x003E, bytearray([0x10, 0xD8])) # bpl - + rom.write_bytes(INIT_SRAM_ADDR + 0x0040, bytearray([0xC2, 0x10])) # rep #$10 + rom.write_bytes(INIT_SRAM_ADDR + 0x0042, bytearray([0xA2, 0x45, 0x02])) # ldx.w #!blocksanity_locs-1 + rom.write_bytes(INIT_SRAM_ADDR + 0x0045, bytearray([0xBF, 0x00, 0x0A, 0x70])) # - lda !blocksanity_data_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0049, bytearray([0x9F, 0x00, 0xA4, 0x7F])) # sta !blocksanity_data_flags,x + rom.write_bytes(INIT_SRAM_ADDR + 0x004D, bytearray([0xCA])) # dex + rom.write_bytes(INIT_SRAM_ADDR + 0x004E, bytearray([0x10, 0xF5])) # bpl - + rom.write_bytes(INIT_SRAM_ADDR + 0x0050, bytearray([0xE2, 0x10])) # sep #$10 + #rom.write_bytes(INIT_SRAM_ADDR + 0x0052, bytearray([0xAF, 0x50, 0x09, 0x70])) # lda !received_items_count_sram+$00 + #rom.write_bytes(INIT_SRAM_ADDR + 0x0056, bytearray([0x8F, 0x0E, 0xA0, 0x7F])) # sta !received_items_count+$00 + #rom.write_bytes(INIT_SRAM_ADDR + 0x005A, bytearray([0xAF, 0x51, 0x09, 0x70])) # lda !received_items_count_sram+$01 + #rom.write_bytes(INIT_SRAM_ADDR + 0x005E, bytearray([0x8F, 0x0F, 0xA0, 0x7F])) # sta !received_items_count+$01 + rom.write_bytes(INIT_SRAM_ADDR + 0x0052, bytearray([0xEA] * 0x17)) # Ugly, will apply be better when we port everything to a Base Patch + #rom.write_bytes(INIT_SRAM_ADDR + 0x0062, bytearray([0xAF, 0x52, 0x09, 0x70])) # lda !special_world_clear_sram + #rom.write_bytes(INIT_SRAM_ADDR + 0x0066, bytearray([0x8D, 0xFF, 0x1F])) # sta !special_world_clear_flag + rom.write_bytes(INIT_SRAM_ADDR + 0x0069, bytearray([0xAF, 0x54, 0x09, 0x70])) # lda !goal_item_count_sram + rom.write_bytes(INIT_SRAM_ADDR + 0x006D, bytearray([0x8F, 0x1E, 0xA0, 0x7F])) # sta !goal_item_count + rom.write_bytes(INIT_SRAM_ADDR + 0x0071, bytearray([0x28])) # plp + rom.write_bytes(INIT_SRAM_ADDR + 0x0072, bytearray([0x5C, 0xFB, 0x9C, 0x00])) # jml $009CFB + rom.write_bytes(INIT_SRAM_ADDR + 0x0076, bytearray([0xDA])) # .clear phx + rom.write_bytes(INIT_SRAM_ADDR + 0x0077, bytearray([0xA2, 0x5F, 0x00])) # ldx.w #$005F + rom.write_bytes(INIT_SRAM_ADDR + 0x007A, bytearray([0xA9, 0x00])) # lda #$00 + rom.write_bytes(INIT_SRAM_ADDR + 0x007C, bytearray([0x9F, 0x00, 0x08, 0x70])) # - sta !level_clears_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0080, bytearray([0xCA])) # dex + rom.write_bytes(INIT_SRAM_ADDR + 0x0081, bytearray([0x10, 0xF9])) # bpl - + rom.write_bytes(INIT_SRAM_ADDR + 0x0083, bytearray([0xA2, 0x0B, 0x00])) # ldx.w #$000B + rom.write_bytes(INIT_SRAM_ADDR + 0x0086, bytearray([0x9F, 0x40, 0x09, 0x70])) # - sta !blocksanity_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x008A, bytearray([0x9F, 0x00, 0x09, 0x70])) # sta !yoshi_coins_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x008E, bytearray([0x9F, 0x30, 0x09, 0x70])) # sta !bonus_block_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0092, bytearray([0x9F, 0x10, 0x09, 0x70])) # sta !moons_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x0096, bytearray([0x9F, 0x20, 0x09, 0x70])) # sta !checkpoints_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x009A, bytearray([0xCA])) # dex + rom.write_bytes(INIT_SRAM_ADDR + 0x009B, bytearray([0x10, 0xE9])) # bpl - + rom.write_bytes(INIT_SRAM_ADDR + 0x009D, bytearray([0xA2, 0x45, 0x02])) # ldx.w #!blocksanity_locs-1 + rom.write_bytes(INIT_SRAM_ADDR + 0x00A0, bytearray([0x9F, 0x00, 0x0A, 0x70])) # - sta !blocksanity_data_sram,x + rom.write_bytes(INIT_SRAM_ADDR + 0x00A4, bytearray([0xCA])) # dex + rom.write_bytes(INIT_SRAM_ADDR + 0x00A5, bytearray([0x10, 0xF9])) # bpl - + rom.write_bytes(INIT_SRAM_ADDR + 0x00A7, bytearray([0x8F, 0x52, 0x09, 0x70])) # sta !special_world_clear_sram + rom.write_bytes(INIT_SRAM_ADDR + 0x00AB, bytearray([0x8F, 0x50, 0x09, 0x70])) # sta !received_items_count_sram+$00 + rom.write_bytes(INIT_SRAM_ADDR + 0x00AF, bytearray([0x8F, 0x51, 0x09, 0x70])) # sta !received_items_count_sram+$01 + rom.write_bytes(INIT_SRAM_ADDR + 0x00B3, bytearray([0x8F, 0x54, 0x09, 0x70])) # sta !goal_item_count_sram + rom.write_bytes(INIT_SRAM_ADDR + 0x00B7, bytearray([0xFA])) # plx + rom.write_bytes(INIT_SRAM_ADDR + 0x00B8, bytearray([0x5C, 0x22, 0x9D, 0x00])) # jml $009D22 + + SAVE_SRAM_ADDR = 0x7F300 + rom.write_bytes(SAVE_SRAM_ADDR + 0x0000, bytearray([0xE2, 0x30])) # save_sram: sep #$30 + rom.write_bytes(SAVE_SRAM_ADDR + 0x0002, bytearray([0xAB])) # plb + rom.write_bytes(SAVE_SRAM_ADDR + 0x0003, bytearray([0xA2, 0x5F])) # ldx.b #$5F + rom.write_bytes(SAVE_SRAM_ADDR + 0x0005, bytearray([0xBF, 0x00, 0xA2, 0x7F])) # - lda !level_clears,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0009, bytearray([0x9F, 0x00, 0x08, 0x70])) # sta !level_clears_sram,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x000D, bytearray([0xCA])) # dex + rom.write_bytes(SAVE_SRAM_ADDR + 0x000E, bytearray([0x10, 0xF5])) # bpl - + rom.write_bytes(SAVE_SRAM_ADDR + 0x0010, bytearray([0xA2, 0x0B])) # ldx #$0B + rom.write_bytes(SAVE_SRAM_ADDR + 0x0012, bytearray([0xBF, 0x10, 0xA0, 0x7F])) # - lda !blocksanity_flags,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0016, bytearray([0x9F, 0x40, 0x09, 0x70])) # sta !blocksanity_sram,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x001A, bytearray([0xBD, 0x2F, 0x1F])) # lda !yoshi_coins_flags,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x001D, bytearray([0x9F, 0x00, 0x09, 0x70])) # sta !yoshi_coins_sram,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0021, bytearray([0xBD, 0xEE, 0x1F])) # lda !moons_flags,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0024, bytearray([0x9F, 0x10, 0x09, 0x70])) # sta !moons_sram,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0028, bytearray([0xBF, 0x00, 0xA0, 0x7F])) # lda !bonus_block_flags,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x002C, bytearray([0x9F, 0x30, 0x09, 0x70])) # sta !bonus_block_sram,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0030, bytearray([0xBD, 0x3C, 0x1F])) # lda !checkpoints_flags,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0033, bytearray([0x9F, 0x20, 0x09, 0x70])) # sta !checkpoints_sram,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0037, bytearray([0xCA])) # dex + rom.write_bytes(SAVE_SRAM_ADDR + 0x0038, bytearray([0x10, 0xD8])) # bpl - + rom.write_bytes(SAVE_SRAM_ADDR + 0x003A, bytearray([0xC2, 0x10])) # rep #$10 + rom.write_bytes(SAVE_SRAM_ADDR + 0x003C, bytearray([0xA2, 0x45, 0x02])) # ldx.w #!blocksanity_locs-1 + rom.write_bytes(SAVE_SRAM_ADDR + 0x003F, bytearray([0xBF, 0x00, 0xA4, 0x7F])) # - lda !blocksanity_data_flags,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0043, bytearray([0x9F, 0x00, 0x0A, 0x70])) # sta !blocksanity_data_sram,x + rom.write_bytes(SAVE_SRAM_ADDR + 0x0047, bytearray([0xCA])) # dex + rom.write_bytes(SAVE_SRAM_ADDR + 0x0048, bytearray([0x10, 0xF5])) # bpl - + rom.write_bytes(SAVE_SRAM_ADDR + 0x004A, bytearray([0xE2, 0x10])) # sep #$10 + #rom.write_bytes(SAVE_SRAM_ADDR + 0x004C, bytearray([0xAD, 0xFF, 0x1F])) # lda !special_world_clear_flag + #rom.write_bytes(SAVE_SRAM_ADDR + 0x004F, bytearray([0x8F, 0x52, 0x09, 0x70])) # sta !special_world_clear_sram + #rom.write_bytes(SAVE_SRAM_ADDR + 0x0053, bytearray([0xAF, 0x0E, 0xA0, 0x7F])) # lda !received_items_count+$00 + #rom.write_bytes(SAVE_SRAM_ADDR + 0x0057, bytearray([0x8F, 0x50, 0x09, 0x70])) # sta !received_items_count_sram+$00 + #rom.write_bytes(SAVE_SRAM_ADDR + 0x005B, bytearray([0xAF, 0x0F, 0xA0, 0x7F])) # lda !received_items_count+$01 + #rom.write_bytes(SAVE_SRAM_ADDR + 0x005F, bytearray([0x8F, 0x51, 0x09, 0x70])) # sta !received_items_count_sram+$01 + rom.write_bytes(SAVE_SRAM_ADDR + 0x004C, bytearray([0xEA] * 0x17)) # Ugly, will apply be better when we port everything to a Base Patch + rom.write_bytes(SAVE_SRAM_ADDR + 0x0063, bytearray([0xAF, 0x0F, 0xA0, 0x7F])) # lda !goal_item_count + rom.write_bytes(SAVE_SRAM_ADDR + 0x0067, bytearray([0x8F, 0x51, 0x09, 0x70])) # sta !goal_item_count_sram + rom.write_bytes(SAVE_SRAM_ADDR + 0x006B, bytearray([0x6B])) # rtl + + INIT_RAM_ADDR = 0x7F0A0 + rom.write_bytes(INIT_RAM_ADDR + 0x0000, bytearray([0xA9, 0xAA])) # init_ram: lda #$AA + rom.write_bytes(INIT_RAM_ADDR + 0x0002, bytearray([0x8D, 0x00, 0x04])) # sta $0400 + rom.write_bytes(INIT_RAM_ADDR + 0x0005, bytearray([0xA9, 0x00])) # clear_level_data: lda #$00 + rom.write_bytes(INIT_RAM_ADDR + 0x0007, bytearray([0xA2, 0x5F])) # ldx #$5F + rom.write_bytes(INIT_RAM_ADDR + 0x0009, bytearray([0x9F, 0x00, 0xA2, 0x7F])) # .loop sta !level_clears,x + rom.write_bytes(INIT_RAM_ADDR + 0x000D, bytearray([0xCA])) # dex + rom.write_bytes(INIT_RAM_ADDR + 0x000E, bytearray([0x10, 0xF9])) # bpl .loop + rom.write_bytes(INIT_RAM_ADDR + 0x0010, bytearray([0xC2, 0x10])) # rep #$10 + rom.write_bytes(INIT_RAM_ADDR + 0x0012, bytearray([0xA2, 0x0B, 0x00])) # ldx.w #$000B + rom.write_bytes(INIT_RAM_ADDR + 0x0015, bytearray([0x9F, 0x10, 0xA0, 0x7F])) # - sta !blocksanity_flags,x + rom.write_bytes(INIT_RAM_ADDR + 0x0019, bytearray([0x9D, 0x2F, 0x1F])) # sta !yoshi_coins_flags,x + rom.write_bytes(INIT_RAM_ADDR + 0x001C, bytearray([0x9D, 0xEE, 0x1F])) # sta !moons_flags,x + rom.write_bytes(INIT_RAM_ADDR + 0x001F, bytearray([0x9F, 0x00, 0xA0, 0x7F])) # sta !bonus_block_flags,x + rom.write_bytes(INIT_RAM_ADDR + 0x0023, bytearray([0x9D, 0x3C, 0x1F])) # sta !checkpoints_flags,x + rom.write_bytes(INIT_RAM_ADDR + 0x0026, bytearray([0xCA])) # dex + rom.write_bytes(INIT_RAM_ADDR + 0x0027, bytearray([0x10, 0xEC])) # bpl - + rom.write_bytes(INIT_RAM_ADDR + 0x0029, bytearray([0xA2, 0x45, 0x02])) # ldx.w #!blocksanity_locs-1 + rom.write_bytes(INIT_RAM_ADDR + 0x002C, bytearray([0x9F, 0x00, 0xA4, 0x7F])) # - sta !blocksanity_data_flags,x + rom.write_bytes(INIT_RAM_ADDR + 0x0030, bytearray([0xCA])) # dex + rom.write_bytes(INIT_RAM_ADDR + 0x0031, bytearray([0x10, 0xF9])) # bpl - + rom.write_bytes(INIT_RAM_ADDR + 0x0033, bytearray([0xA2, 0x22, 0x04])) # ldx #$0422 + rom.write_bytes(INIT_RAM_ADDR + 0x0036, bytearray([0x9F, 0x00, 0xB0, 0x7F])) # - sta !score_sprite_count,x + rom.write_bytes(INIT_RAM_ADDR + 0x003A, bytearray([0xCA])) # dex + rom.write_bytes(INIT_RAM_ADDR + 0x003B, bytearray([0x10, 0xF9])) # bpl - + #rom.write_bytes(INIT_RAM_ADDR + 0x003D, bytearray([0x8D, 0xFF, 0x1F])) # sta !special_world_clear_flag + rom.write_bytes(INIT_RAM_ADDR + 0x003D, bytearray([0xEA, 0xEA, 0xEA])) # sta !special_world_clear_flag + rom.write_bytes(INIT_RAM_ADDR + 0x0040, bytearray([0x8F, 0x0E, 0xA0, 0x7F])) # sta !received_items_count+$00 + rom.write_bytes(INIT_RAM_ADDR + 0x0044, bytearray([0x8F, 0x0F, 0xA0, 0x7F])) # sta !received_items_count+$01 + rom.write_bytes(INIT_RAM_ADDR + 0x0048, bytearray([0x8F, 0x1E, 0xA0, 0x7F])) # sta !goal_item_count + rom.write_bytes(INIT_RAM_ADDR + 0x004C, bytearray([0xA9, 0xFF])) # lda #$FF + rom.write_bytes(INIT_RAM_ADDR + 0x004E, bytearray([0x8D, 0x3C, 0x0F])) # sta !thwimp_index + rom.write_bytes(INIT_RAM_ADDR + 0x0051, bytearray([0xE2, 0x10])) # sep #$10 + rom.write_bytes(INIT_RAM_ADDR + 0x0053, bytearray([0x22, 0x20, 0xF1, 0x0F])) # jsl clear_tilemap + rom.write_bytes(INIT_RAM_ADDR + 0x0057, bytearray([0x5C, 0xC0, 0x93, 0x00])) # jml $0093C0 + +def handle_map_indicators(rom): + rom.write_bytes(0x265EE, bytearray([0x4C, 0x00, 0xA3])) # org $04E5EE : jmp check_events + + GET_MAP_LEVEL_NUM_ADDR = 0x22340 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0000, bytearray([0xC2, 0x30])) # get_translevel_num: rep #$30 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0002, bytearray([0xAE, 0xD6, 0x0D])) # ldx $0DD6 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0005, bytearray([0xBD, 0x1F, 0x1F])) # lda $1F1F,x + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0008, bytearray([0x85, 0x00])) # sta $00 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x000A, bytearray([0xBD, 0x21, 0x1F])) # lda $1F21,x + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x000D, bytearray([0x85, 0x02])) # sta $02 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x000F, bytearray([0x8A])) # txa + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0010, bytearray([0x4A])) # lsr + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0011, bytearray([0x4A])) # lsr + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0012, bytearray([0xAA])) # tax + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0013, bytearray([0x20, 0x85, 0x98])) # jsr $9885 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0016, bytearray([0xA6, 0x04])) # ldx $04 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0018, bytearray([0xBF, 0x00, 0xD0, 0x7E])) # lda $7ED000,x + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x001C, bytearray([0xE2, 0x30])) # sep #$30 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x001E, bytearray([0x85, 0x60])) # sta $60 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0020, bytearray([0xAA])) # tax + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0021, bytearray([0xBF, 0x00, 0xFF, 0x06])) # lda $06FF00,x + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0025, bytearray([0xC9, 0xFF])) # cmp #$FF + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0027, bytearray([0xF0, 0x02])) # beq + + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x0029, bytearray([0x85, 0x60])) # sta $60 + rom.write_bytes(GET_MAP_LEVEL_NUM_ADDR + 0x002B, bytearray([0x60])) # + rts + + GET_MAP_LEVEL_BIT_ADDR = 0x22380 + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x0000, bytearray([0xA5, 0x60])) # get_translevel_bit: lda $60 + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x0002, bytearray([0x4A])) # lsr + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x0003, bytearray([0x4A])) # lsr + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x0004, bytearray([0x4A])) # lsr + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x0005, bytearray([0xA8])) # tay + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x0006, bytearray([0xA5, 0x60])) # lda $60 + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x0008, bytearray([0x29, 0x07])) # and #$07 + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x000A, bytearray([0xAA])) # tax + rom.write_bytes(GET_MAP_LEVEL_BIT_ADDR + 0x000B, bytearray([0x60])) # rts + + UPDATE_MAP_PTRS_ADDR = 0x223C0 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x0000, bytearray([0xE6, 0x00])) # update_flag_pointers: inc $00 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x0002, bytearray([0xE6, 0x00])) # inc $00 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x0004, bytearray([0xE6, 0x03])) # inc $03 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x0006, bytearray([0xE6, 0x03])) # inc $03 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x0008, bytearray([0xE6, 0x06])) # inc $06 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x000A, bytearray([0xE6, 0x06])) # inc $06 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x000C, bytearray([0xE6, 0x62])) # inc $62 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x000E, bytearray([0xE6, 0x62])) # inc $62 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x0010, bytearray([0xE6, 0x63])) # inc $63 + rom.write_bytes(UPDATE_MAP_PTRS_ADDR + 0x0012, bytearray([0x60])) # rts + + CLEAR_TILEMAP_ADDR = 0x7F120 + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0000, bytearray([0xC2, 0x20])) # clear_tilemap: rep #$20 + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0002, bytearray([0xA9, 0x1F, 0x39])) # lda.w #$3900+!icon_disabled + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0005, bytearray([0xA2, 0x1E])) # ldx #$1E + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0007, bytearray([0x9F, 0x20, 0xA1, 0x7F])) # .loop sta !ow_tilemap_switches,x + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x000B, bytearray([0x9F, 0x00, 0xA1, 0x7F])) # sta !ow_tilemap_abilities,x + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x000F, bytearray([0x9F, 0x40, 0xA1, 0x7F])) # sta !ow_tilemap_flags_top,x + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0013, bytearray([0x9F, 0x60, 0xA1, 0x7F])) # sta !ow_tilemap_flags_mid,x + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0017, bytearray([0x9F, 0x80, 0xA1, 0x7F])) # sta !ow_tilemap_flags_bot,x + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x001B, bytearray([0xCA])) # dex + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x001C, bytearray([0xCA])) # dex + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x001D, bytearray([0x10, 0xE8])) # bpl .loop + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x001F, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0021, bytearray([0xA9, 0x07])) # lda #$07 + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0023, bytearray([0x85, 0x63])) # sta $63 + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0025, bytearray([0x0A])) # asl + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0026, bytearray([0x85, 0x62])) # sta $62 + rom.write_bytes(CLEAR_TILEMAP_ADDR + 0x0028, bytearray([0x6B])) # rtl + + CLEAR_TILEMAP_FLAGS_ADDR = 0x7F180 + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0000, bytearray([0xC2, 0x20])) # clear_tilemap_flags: rep #$20 + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0002, bytearray([0xA9, 0x1F, 0x39])) # lda.w #$3900+!icon_disabled + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0005, bytearray([0xA2, 0x0C])) # ldx.b #($07*2)-2 + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0007, bytearray([0x9F, 0x40, 0xA1, 0x7F])) # .loop sta !ow_tilemap_flags_top,x + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x000B, bytearray([0x9F, 0x60, 0xA1, 0x7F])) # sta !ow_tilemap_flags_mid,x + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x000F, bytearray([0x9F, 0x80, 0xA1, 0x7F])) # sta !ow_tilemap_flags_bot,x + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0013, bytearray([0xCA])) # dex + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0014, bytearray([0xCA])) # dex + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0015, bytearray([0x10, 0xF0])) # bpl .loop + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0017, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0019, bytearray([0xA9, 0x06])) # lda #$06 + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x001B, bytearray([0x85, 0x63])) # sta $63 + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x001D, bytearray([0x0A])) # asl + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x001E, bytearray([0x85, 0x62])) # sta $62 + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0020, bytearray([0xA9, 0xFF])) # lda #$FF + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0022, bytearray([0x8D, 0x3C, 0x0F])) # sta !thwimp_index + rom.write_bytes(CLEAR_TILEMAP_FLAGS_ADDR + 0x0025, bytearray([0x6B])) # rtl + + CHECK_EVENTS_ADDR = 0x22300 + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0000, bytearray([0xDA])) # check_events: phx + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0001, bytearray([0x20, 0x40, 0xA3])) # jsr get_translevel_num + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0004, bytearray([0xAD, 0xD5, 0x0D])) # lda $0DD5 + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0007, bytearray([0xF0, 0x17])) # beq .dont_sync + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0009, bytearray([0x30, 0x15])) # bmi .dont_sync + rom.write_bytes(CHECK_EVENTS_ADDR + 0x000B, bytearray([0xC9, 0x05])) # cmp #$05 + rom.write_bytes(CHECK_EVENTS_ADDR + 0x000D, bytearray([0xB0, 0x11])) # bcs .dont_sync + rom.write_bytes(CHECK_EVENTS_ADDR + 0x000F, bytearray([0x29, 0x07])) # and #$07 + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0011, bytearray([0xAA])) # tax + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0012, bytearray([0xBF, 0x7D, 0x9E, 0x00])) # lda.l $009E7D,x + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0016, bytearray([0xA6, 0x60])) # ldx $60 + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0018, bytearray([0x1F, 0x00, 0xA2, 0x7F])) # ora !level_clears,x + rom.write_bytes(CHECK_EVENTS_ADDR + 0x001C, bytearray([0x9F, 0x00, 0xA2, 0x7F])) # sta !level_clears,x + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0020, bytearray([0xFA])) # .dont_sync plx + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0021, bytearray([0xAD, 0xD5, 0x0D])) # lda $0DD5 + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0024, bytearray([0xC9, 0x02])) # cmp #$02 + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0026, bytearray([0xD0, 0x03])) # bne .no_secret + rom.write_bytes(CHECK_EVENTS_ADDR + 0x0028, bytearray([0xEE, 0xEA, 0x1D])) # inc $1DEA + rom.write_bytes(CHECK_EVENTS_ADDR + 0x002B, bytearray([0x4C, 0xF8, 0xE5])) # .no_secret jmp $E5F8 + + DRAW_MAP_TILEMAP_ADDR = 0x221B6 + rom.write_bytes(0x00222, bytearray([0x5C, 0xB6, 0xA1, 0x04])) # org $008222 : jml draw_ow_tilemap + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0000, bytearray([0xAD, 0xD9, 0x13])) # draw_ow_tilemap: lda $13D9 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0003, bytearray([0xC9, 0x0A])) # cmp #$0A + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0005, bytearray([0xD0, 0x04])) # bne write_tilemap + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0007, bytearray([0x5C, 0x29, 0x82, 0x00])) # jml $008229 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x000B, bytearray([0xC2, 0x20])) # write_tilemap: rep #$20 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x000D, bytearray([0xA0, 0x80])) # ldy #$80 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x000F, bytearray([0x8C, 0x15, 0x21])) # sty $2115 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0012, bytearray([0xA9, 0x27, 0x50])) # write_abilities: lda #!vram_abilities_top + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0015, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0018, bytearray([0xA2, 0x00])) # ldx.b #$00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x001A, bytearray([0xBF, 0xA2, 0xA2, 0x04])) # ..loop lda.l abilities_top,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x001E, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0021, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0022, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0023, bytearray([0xE0, 0x14])) # cpx.b #$0A*2 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0025, bytearray([0x90, 0xF3])) # bcc ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0027, bytearray([0xA9, 0x47, 0x50])) # .mid lda #!vram_abilities_mid + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x002A, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x002D, bytearray([0xA2, 0x00])) # ldx.b #$00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x002F, bytearray([0xBF, 0xB6, 0xA2, 0x04])) # ..loop lda.l abilities_bottom,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0033, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0036, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0037, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0038, bytearray([0xE0, 0x14])) # cpx.b #$0A*2 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x003A, bytearray([0x90, 0xF3])) # bcc ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x003C, bytearray([0xA9, 0x67, 0x50])) # .bot lda #!vram_abilities_bot + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x003F, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0042, bytearray([0xA2, 0x00])) # ldx.b #$00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0044, bytearray([0xBF, 0x00, 0xA1, 0x7F])) # ..loop lda !ow_tilemap_abilities,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0048, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x004B, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x004C, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x004D, bytearray([0xE0, 0x14])) # cpx.b #$0A*2 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x004F, bytearray([0x90, 0xF3])) # bcc ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0051, bytearray([0xA9, 0x32, 0x50])) # write_switches: lda #!vram_switches_top + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0054, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0057, bytearray([0xA2, 0x00])) # ldx.b #$00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0059, bytearray([0xBF, 0xCA, 0xA2, 0x04])) # ..loop lda.l switches_top,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x005D, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0060, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0061, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0062, bytearray([0xE0, 0x0A])) # cpx.b #$05*2 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0064, bytearray([0x90, 0xF3])) # bcc ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0066, bytearray([0xA9, 0x52, 0x50])) # .mid lda #!vram_switches_mid + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0069, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x006C, bytearray([0xA2, 0x00])) # ldx.b #$00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x006E, bytearray([0xBF, 0xD4, 0xA2, 0x04])) # ..loop lda.l switches_bottom,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0072, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0075, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0076, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0077, bytearray([0xE0, 0x0A])) # cpx.b #$05*2 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0079, bytearray([0x90, 0xF3])) # bcc ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x007B, bytearray([0xA9, 0x72, 0x50])) # .bot lda #!vram_switches_bot + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x007E, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0081, bytearray([0xA2, 0x00])) # ldx.b #$00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0083, bytearray([0xBF, 0x20, 0xA1, 0x7F])) # ..loop lda !ow_tilemap_switches,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0087, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x008A, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x008B, bytearray([0xE8])) # inx + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x008C, bytearray([0xE0, 0x0A])) # cpx.b #$05*2 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x008E, bytearray([0x90, 0xF3])) # bcc ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0090, bytearray([0xD4, 0x00])) # write_level_data: pei ($00) + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0092, bytearray([0xA5, 0x63])) # lda $63 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0094, bytearray([0x29, 0xFF, 0x00])) # and #$00FF + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0097, bytearray([0x85, 0x00])) # sta $00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0099, bytearray([0xF0, 0x48])) # beq .skip_flags + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x009B, bytearray([0xA9, 0x3E, 0x50])) # .top lda.w #!vram_level_data_top+$01 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x009E, bytearray([0x38])) # sec + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x009F, bytearray([0xE5, 0x00])) # sbc $00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00A1, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00A4, bytearray([0xA6, 0x62])) # ldx.b $62 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00A6, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00A7, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00A8, bytearray([0xBF, 0x40, 0xA1, 0x7F])) # ..loop lda.l !ow_tilemap_flags_top,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00AC, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00AF, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00B0, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00B1, bytearray([0x10, 0xF5])) # bpl ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00B3, bytearray([0xA9, 0x5E, 0x50])) # .mid lda.w #!vram_level_data_mid+$01 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00B6, bytearray([0x38])) # sec + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00B7, bytearray([0xE5, 0x00])) # sbc $00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00B9, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00BC, bytearray([0xA6, 0x62])) # ldx.b $62 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00BE, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00BF, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00C0, bytearray([0xBF, 0x60, 0xA1, 0x7F])) # ..loop lda.l !ow_tilemap_flags_mid,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00C4, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00C7, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00C8, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00C9, bytearray([0x10, 0xF5])) # bpl ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00CB, bytearray([0xA9, 0x7E, 0x50])) # .bot lda.w #!vram_level_data_bot+$01 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00CE, bytearray([0x38])) # sec + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00CF, bytearray([0xE5, 0x00])) # sbc $00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00D1, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00D4, bytearray([0xA6, 0x62])) # ldx.b $62 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00D6, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00D7, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00D8, bytearray([0xBF, 0x80, 0xA1, 0x7F])) # ..loop lda.l !ow_tilemap_flags_bot,x + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00DC, bytearray([0x8D, 0x18, 0x21])) # sta $2118 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00DF, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00E0, bytearray([0xCA])) # dex + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00E1, bytearray([0x10, 0xF5])) # bpl ..loop + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00E3, bytearray([0x68])) # .skip_flags pla + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00E4, bytearray([0x85, 0x00])) # sta $00 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00E6, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00E8, bytearray([0x5C, 0x37, 0x82, 0x00])) # jml $008237 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00EC, bytearray([0x0F, 0x39, 0x12, 0x39])) # abilities_top: dw $390F,$3912 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00F0, bytearray([0x11, 0x39, 0x02, 0x39])) # dw $3911,$3902 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00F4, bytearray([0x12, 0x39, 0x02, 0x39])) # dw $3912,$3902 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00F8, bytearray([0x18, 0x39, 0x0F, 0x39])) # dw $3918,$390F + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x00FC, bytearray([0x0F, 0x39, 0x12, 0x39])) # dw $390F,$3912 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0100, bytearray([0x4E, 0x39, 0x4F, 0x39])) # abilities_bottom: dw $394E,$394F + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0104, bytearray([0x54, 0x39, 0x40, 0x39])) # dw $3954,$3940 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0108, bytearray([0x56, 0x39, 0x4B, 0x39])) # dw $3956,$394B + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x010C, bytearray([0x4E, 0x39, 0x52, 0x39])) # dw $394E,$3952 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0110, bytearray([0x41, 0x39, 0x53, 0x39])) # dw $3941,$3953 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0114, bytearray([0x18, 0x39, 0x06, 0x39])) # switches_top: dw $3918,$3906 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0118, bytearray([0x11, 0x39, 0x01, 0x39])) # dw $3911,$3901 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x011C, bytearray([0x12, 0x39])) # dw $3912 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x011E, bytearray([0x12, 0x39, 0x12, 0x39])) # switches_bottom: dw $3912,$3912 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0122, bytearray([0x12, 0x39, 0x12, 0x39])) # dw $3912,$3912 + rom.write_bytes(DRAW_MAP_TILEMAP_ADDR + 0x0126, bytearray([0x4F, 0x39])) # dw $394F + + BUILD_TILEMAP_ADDR = 0x26F3E + rom.write_bytes(0x021C7, bytearray([0x22, 0x3E, 0xEF, 0x04])) # org $00A1C7 : jsl prepare_dynamic_tilemap + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0000, bytearray([0x22, 0x41, 0x82, 0x04])) # prepare_dynamic_tilemap: jsl $048241 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0004, bytearray([0xA0, 0x22])) # .handle_powerup: ldy #$22 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0006, bytearray([0xAD, 0x2D, 0x1F])) # lda $1F2D + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0009, bytearray([0x4A])) # lsr + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x000A, bytearray([0x90, 0x01])) # bcc $01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x000C, bytearray([0xC8])) # iny + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x000D, bytearray([0x4A])) # lsr + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x000E, bytearray([0x90, 0x01])) # bcc $01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0010, bytearray([0xC8])) # iny + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0011, bytearray([0x4A])) # lsr + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0012, bytearray([0x90, 0x01])) # bcc $01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0014, bytearray([0xC8])) # iny + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0015, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0016, bytearray([0x8F, 0x00, 0xA1, 0x7F])) # sta !ow_tilemap_abilities ; Progressive powerup + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x001A, bytearray([0xA0, 0x5E])) # .handle_spinjump: ldy #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x001C, bytearray([0xAD, 0x1C, 0x1F])) # lda $1F1C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x001F, bytearray([0x29, 0x08])) # and #$08 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0021, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0023, bytearray([0xA0, 0x3F])) # ldy #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0025, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0026, bytearray([0x8F, 0x02, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$02 ; Spin jump + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x002A, bytearray([0xA0, 0x5E])) # .handle_run: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x002C, bytearray([0xAD, 0x1C, 0x1F])) # lda $1F1C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x002F, bytearray([0x29, 0x80])) # and #$80 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0031, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0033, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0035, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0036, bytearray([0x8F, 0x04, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$04 ; Run + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x003A, bytearray([0xA0, 0x5E])) # .handle_carry: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x003C, bytearray([0xAD, 0x1C, 0x1F])) # lda $1F1C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x003F, bytearray([0x29, 0x40])) # and #$40 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0041, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0043, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0045, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0046, bytearray([0x8F, 0x06, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$06 ; Carry + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x004A, bytearray([0xA0, 0x5E])) # .handle_swim: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x004C, bytearray([0xAD, 0x1C, 0x1F])) # lda $1F1C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x004F, bytearray([0x29, 0x04])) # and #$04 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0051, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0053, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0055, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0056, bytearray([0x8F, 0x08, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$08 ; Swim + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x005A, bytearray([0xA0, 0x5E])) # .handle_climb: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x005C, bytearray([0xAD, 0x1C, 0x1F])) # lda $1F1C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x005F, bytearray([0x29, 0x20])) # and #$20 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0061, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0063, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0065, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0066, bytearray([0x8F, 0x0A, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$0A ; Climb + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x006A, bytearray([0xA0, 0x5E])) # .handle_yoshi: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x006C, bytearray([0xAD, 0x1C, 0x1F])) # lda $1F1C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x006F, bytearray([0x29, 0x02])) # and #$02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0071, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0073, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0075, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0076, bytearray([0x8F, 0x0C, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$0C ; Yoshi + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x007A, bytearray([0xA0, 0x5E])) # .handle_pswitch: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x007C, bytearray([0xAD, 0x1C, 0x1F])) # lda $1F1C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x007F, bytearray([0x29, 0x10])) # and #$10 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0081, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0083, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0085, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0086, bytearray([0x8F, 0x0E, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$0E ; P-Switch + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x008A, bytearray([0xA0, 0x5E])) # .handle_pballoon: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x008C, bytearray([0xAD, 0x2D, 0x1F])) # lda $1F2D + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x008F, bytearray([0x29, 0x08])) # and #$08 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0091, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0093, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0095, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0096, bytearray([0x8F, 0x10, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$10 ; P-Balloon + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x009A, bytearray([0xA0, 0x5E])) # .handle_star: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x009C, bytearray([0xAD, 0x2D, 0x1F])) # lda $1F2D + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x009F, bytearray([0x29, 0x10])) # and #$10 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00A1, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00A3, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00A5, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00A6, bytearray([0x8F, 0x12, 0xA1, 0x7F])) # sta !ow_tilemap_abilities+$12 ; Star + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00AA, bytearray([0xA0, 0x5E])) # .handle_yellow_switch: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00AC, bytearray([0xAD, 0x28, 0x1F])) # lda $1F28 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00AF, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00B1, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00B3, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00B4, bytearray([0x8F, 0x20, 0xA1, 0x7F])) # sta !ow_tilemap_switches+$00 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00B8, bytearray([0xA0, 0x5E])) # .handle_green_switch: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00BA, bytearray([0xAD, 0x27, 0x1F])) # lda $1F27 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00BD, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00BF, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00C1, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00C2, bytearray([0x8F, 0x22, 0xA1, 0x7F])) # sta !ow_tilemap_switches+$02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00C6, bytearray([0xA0, 0x5E])) # .handle_red_switch: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00C8, bytearray([0xAD, 0x2A, 0x1F])) # lda $1F2A + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00CB, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00CD, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00CF, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00D0, bytearray([0x8F, 0x24, 0xA1, 0x7F])) # sta !ow_tilemap_switches+$04 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00D4, bytearray([0xA0, 0x5E])) # .handle_blue_switch: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00D6, bytearray([0xAD, 0x29, 0x1F])) # lda $1F29 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00D9, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00DB, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00DD, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00DE, bytearray([0x8F, 0x26, 0xA1, 0x7F])) # sta !ow_tilemap_switches+$06 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00E2, bytearray([0xA0, 0x5E])) # .handle_special_world_clear: ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00E4, bytearray([0xAD, 0x1E, 0x1F])) # lda !special_world_clear_flag + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00E7, bytearray([0xF0, 0x02])) # beq $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00E9, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00EB, bytearray([0x98])) # tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00EC, bytearray([0x8F, 0x28, 0xA1, 0x7F])) # sta !ow_tilemap_switches+$08 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00F0, bytearray([0x22, 0x80, 0xF1, 0x0F])) # jsl clear_tilemap_flags + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00F4, bytearray([0xAD, 0xD9, 0x13])) # lda $13D9 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00F7, bytearray([0xC9, 0x01])) # cmp #$01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00F9, bytearray([0xF0, 0x05])) # beq process_level + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00FB, bytearray([0xC9, 0x03])) # cmp #$03 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00FD, bytearray([0xF0, 0x01])) # beq process_level + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x00FF, bytearray([0x6B])) # rtl + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0100, bytearray([0x20, 0x40, 0xA3])) # process_level: jsr get_translevel_num + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0103, bytearray([0xA6, 0x60])) # ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0105, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0109, bytearray([0x10, 0x01])) # bpl .handle_data + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x010B, bytearray([0x6B])) # rtl + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x010C, bytearray([0x64, 0x62])) # .handle_data stz $62 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x010E, bytearray([0x64, 0x63])) # stz $63 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0110, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0112, bytearray([0xA9, 0x40, 0xA1])) # lda.w #!ow_tilemap_flags_top + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0115, bytearray([0x85, 0x00])) # sta $00 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0117, bytearray([0xA9, 0x60, 0xA1])) # lda.w #!ow_tilemap_flags_mid + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x011A, bytearray([0x85, 0x03])) # sta $03 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x011C, bytearray([0xA9, 0x80, 0xA1])) # lda.w #!ow_tilemap_flags_bot + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x011F, bytearray([0x85, 0x06])) # sta $06 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0121, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0123, bytearray([0xA9, 0x7F])) # lda.b #!ow_tilemap_flags_top>>16 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0125, bytearray([0x85, 0x02])) # sta $02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0127, bytearray([0x85, 0x05])) # sta $05 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0129, bytearray([0x85, 0x08])) # sta $08 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x012B, bytearray([0xAF, 0xAB, 0xBF, 0x03])) # handle_blocksanity: lda.l blocksanity_enabled_flag + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x012F, bytearray([0xF0, 0x30])) # beq handle_bonus_blocks + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0131, bytearray([0xA6, 0x60])) # ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0133, bytearray([0xA0, 0x1F])) # ldy.b #!icon_disabled + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0135, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0139, bytearray([0x29, 0x40])) # and #$40 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x013B, bytearray([0xF0, 0x24])) # beq handle_bonus_blocks + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x013D, bytearray([0xA0, 0x5E])) # ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x013F, bytearray([0x5A])) # phy + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0140, bytearray([0x20, 0x80, 0xA3])) # jsr get_translevel_bit + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0143, bytearray([0xDA])) # phx + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0144, bytearray([0xBB])) # tyx + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0145, bytearray([0xBF, 0x10, 0xA0, 0x7F])) # lda.l !blocksanity_flags,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0149, bytearray([0xFA])) # plx + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x014A, bytearray([0x7A])) # ply + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x014B, bytearray([0x3F, 0xA6, 0xA8, 0x0D])) # and.l $0DA8A6,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x014F, bytearray([0xF0, 0x02])) # beq .write + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0151, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0153, bytearray([0x98])) # .write tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0154, bytearray([0x87, 0x06])) # sta [$06] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0156, bytearray([0xA9, 0x01])) # lda #$01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0158, bytearray([0x87, 0x00])) # sta [$00] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x015A, bytearray([0xA9, 0x12])) # lda #$12 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x015C, bytearray([0x87, 0x03])) # sta [$03] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x015E, bytearray([0x20, 0xC0, 0xA3])) # jsr update_flag_pointers + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0161, bytearray([0xAF, 0xAA, 0xBF, 0x03])) # handle_bonus_blocks: lda.l bonus_block_enabled_flag + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0165, bytearray([0xF0, 0x30])) # beq handle_checkpoints + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0167, bytearray([0xA6, 0x60])) # ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0169, bytearray([0xA0, 0x1F])) # ldy.b #!icon_disabled + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x016B, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x016F, bytearray([0x29, 0x20])) # and #$20 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0171, bytearray([0xF0, 0x24])) # beq handle_checkpoints + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0173, bytearray([0xA0, 0x5E])) # ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0175, bytearray([0x5A])) # phy + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0176, bytearray([0x20, 0x80, 0xA3])) # jsr get_translevel_bit + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0179, bytearray([0xDA])) # phx + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x017A, bytearray([0xBB])) # tyx + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x017B, bytearray([0xBF, 0x00, 0xA0, 0x7F])) # lda !bonus_block_flags,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x017F, bytearray([0xFA])) # plx + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0180, bytearray([0x7A])) # ply + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0181, bytearray([0x3F, 0xA6, 0xA8, 0x0D])) # and.l $0DA8A6,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0185, bytearray([0xF0, 0x02])) # beq .write + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0187, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0189, bytearray([0x98])) # .write tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x018A, bytearray([0x87, 0x06])) # sta [$06] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x018C, bytearray([0xA9, 0x01])) # lda #$01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x018E, bytearray([0x87, 0x00])) # sta [$00] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0190, bytearray([0xA9, 0x4E])) # lda #$4E + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0192, bytearray([0x87, 0x03])) # sta [$03] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0194, bytearray([0x20, 0xC0, 0xA3])) # jsr update_flag_pointers + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0197, bytearray([0xAF, 0xA9, 0xBF, 0x03])) # handle_checkpoints: lda.l checkpoints_enabled_flag + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x019B, bytearray([0xF0, 0x2A])) # beq handle_moons + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x019D, bytearray([0xA6, 0x60])) # ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x019F, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01A3, bytearray([0x29, 0x10])) # and #$10 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01A5, bytearray([0xF0, 0x20])) # beq handle_moons + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01A7, bytearray([0xA0, 0x5E])) # ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01A9, bytearray([0x5A])) # phy + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01AA, bytearray([0x20, 0x80, 0xA3])) # jsr get_translevel_bit + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01AD, bytearray([0xB9, 0x3C, 0x1F])) # lda !checkpoints_flags,y + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01B0, bytearray([0x7A])) # ply + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01B1, bytearray([0x3F, 0xA6, 0xA8, 0x0D])) # and.l $0DA8A6,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01B5, bytearray([0xF0, 0x02])) # beq .write + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01B7, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01B9, bytearray([0x98])) # .write tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01BA, bytearray([0x87, 0x06])) # sta [$06] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01BC, bytearray([0xA9, 0x07])) # lda #$07 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01BE, bytearray([0x87, 0x00])) # sta [$00] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01C0, bytearray([0xA9, 0x48])) # lda #$48 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01C2, bytearray([0x87, 0x03])) # sta [$03] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01C4, bytearray([0x20, 0xC0, 0xA3])) # jsr update_flag_pointers + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01C7, bytearray([0xAF, 0xA8, 0xBF, 0x03])) # handle_moons: lda.l moon_enabled_flag + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01CB, bytearray([0xF0, 0x2A])) # beq handle_dragon_coins + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01CD, bytearray([0xA6, 0x60])) # ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01CF, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01D3, bytearray([0x29, 0x08])) # and #$08 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01D5, bytearray([0xF0, 0x20])) # beq handle_dragon_coins + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01D7, bytearray([0xA0, 0x5E])) # ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01D9, bytearray([0x5A])) # phy + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01DA, bytearray([0x20, 0x80, 0xA3])) # jsr get_translevel_bit + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01DD, bytearray([0xB9, 0xEE, 0x1F])) # lda !moons_flags,y + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01E0, bytearray([0x7A])) # ply + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01E1, bytearray([0x3F, 0xA6, 0xA8, 0x0D])) # and.l $0DA8A6,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01E5, bytearray([0xF0, 0x02])) # beq .write + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01E7, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01E9, bytearray([0x98])) # .write tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01EA, bytearray([0x87, 0x06])) # sta [$06] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01EC, bytearray([0xA9, 0x0C])) # lda #$0C + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01EE, bytearray([0x87, 0x00])) # sta [$00] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01F0, bytearray([0xA9, 0x4E])) # lda #$4E + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01F2, bytearray([0x87, 0x03])) # sta [$03] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01F4, bytearray([0x20, 0xC0, 0xA3])) # jsr update_flag_pointers + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01F7, bytearray([0xAF, 0xA6, 0xBF, 0x03])) # handle_dragon_coins: lda.l dragon_coin_enabled_flag + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01FB, bytearray([0xF0, 0x2A])) # beq handle_exit_2 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01FD, bytearray([0xA6, 0x60])) # ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x01FF, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0203, bytearray([0x29, 0x04])) # and #$04 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0205, bytearray([0xF0, 0x20])) # beq handle_exit_2 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0207, bytearray([0xA0, 0x5E])) # ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0209, bytearray([0x5A])) # phy + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x020A, bytearray([0x20, 0x80, 0xA3])) # jsr get_translevel_bit + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x020D, bytearray([0xB9, 0x2F, 0x1F])) # lda !yoshi_coins_flags,y + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0210, bytearray([0x7A])) # ply + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0211, bytearray([0x3F, 0xA6, 0xA8, 0x0D])) # and.l $0DA8A6,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0215, bytearray([0xF0, 0x02])) # beq .write + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0217, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0219, bytearray([0x98])) # .write tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x021A, bytearray([0x87, 0x06])) # sta [$06] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x021C, bytearray([0xA9, 0x03])) # lda #$03 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x021E, bytearray([0x87, 0x00])) # sta [$00] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0220, bytearray([0xA9, 0x02])) # lda #$02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0222, bytearray([0x87, 0x03])) # sta [$03] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0224, bytearray([0x20, 0xC0, 0xA3])) # jsr update_flag_pointers + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0227, bytearray([0xA6, 0x60])) # handle_exit_2: ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0229, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x022D, bytearray([0x29, 0x02])) # and #$02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x022F, bytearray([0xF0, 0x1A])) # beq handle_exit_1 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0231, bytearray([0xA0, 0x5E])) # ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0233, bytearray([0xBF, 0x00, 0xA2, 0x7F])) # lda !level_clears,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0237, bytearray([0x29, 0x02])) # and #$02 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0239, bytearray([0xF0, 0x02])) # beq .write + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x023B, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x023D, bytearray([0x98])) # .write tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x023E, bytearray([0x87, 0x06])) # sta [$06] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0240, bytearray([0xA9, 0x04])) # lda #$04 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0242, bytearray([0x87, 0x00])) # sta [$00] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0244, bytearray([0xA9, 0x24])) # lda #$24 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0246, bytearray([0x87, 0x03])) # sta [$03] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0248, bytearray([0x20, 0xC0, 0xA3])) # jsr update_flag_pointers + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x024B, bytearray([0xA6, 0x60])) # handle_exit_1: ldx $60 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x024D, bytearray([0xBF, 0x00, 0xF4, 0x0F])) # lda.l level_data,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0251, bytearray([0x29, 0x01])) # and #$01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0253, bytearray([0xF0, 0x1A])) # beq .dont_draw + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0255, bytearray([0xA0, 0x5E])) # ldy.b #!icon_not_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0257, bytearray([0xBF, 0x00, 0xA2, 0x7F])) # lda !level_clears,x + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x025B, bytearray([0x29, 0x01])) # and #$01 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x025D, bytearray([0xF0, 0x02])) # beq .write + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x025F, bytearray([0xA0, 0x3F])) # ldy.b #!icon_obtained + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0261, bytearray([0x98])) # .write tya + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0262, bytearray([0x87, 0x06])) # sta [$06] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0264, bytearray([0xA9, 0x04])) # lda #$04 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0266, bytearray([0x87, 0x00])) # sta [$00] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x0268, bytearray([0xA9, 0x23])) # lda #$23 + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x026A, bytearray([0x87, 0x03])) # sta [$03] + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x026C, bytearray([0x20, 0xC0, 0xA3])) # jsr update_flag_pointers + rom.write_bytes(BUILD_TILEMAP_ADDR + 0x026F, bytearray([0x6B])) # .dont_draw rtl + + LEVEL_INDICATOR_DATA_ADDR = 0x7F400 + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0000, bytearray([0x80,0x45,0x45,0x80,0x43,0x65,0x5D,0x51])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0008, bytearray([0x01,0x47,0x47,0x51,0x65,0x45,0x41,0x4F])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0010, bytearray([0x55,0x45,0x80,0x43,0x01,0x57,0x80,0x80])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0018, bytearray([0x45,0x80,0x51,0x41,0x45,0x45,0x80,0x41])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0020, bytearray([0x45,0x41,0x4D,0x67,0x57,0x41,0x55,0x65])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0028, bytearray([0x80,0x4D,0x45,0x55,0x80,0x47,0x4D,0x45])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0030, bytearray([0x80,0x80,0x80,0x43,0x55,0x41,0x80,0x45])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0038, bytearray([0x47,0x57,0x4D,0x41,0x47,0x55,0x47,0x01])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0040, bytearray([0x41,0x4F,0x43,0x47,0x47,0x01,0x45,0x57])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0048, bytearray([0x80,0x45,0x45,0x45,0x45,0x80,0x55,0x45])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0050, bytearray([0x45,0x45,0x80,0x80,0x43,0x80,0x43,0x80])) + rom.write_bytes(LEVEL_INDICATOR_DATA_ADDR + 0x0058, bytearray([0x07,0x43,0x43,0x80,0x80,0x80,0x80,0x80])) + + +def handle_indicators(rom): + INDICATOR_QUEUE_CODE = 0x86000 + rom.write_bytes(0x022E6, bytearray([0x22, 0x00, 0xE0, 0x10])) # org $00A2E6 : jsl gm14_hijack + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0000, bytearray([0xAD, 0x00, 0x01])) # gm14_hijack: lda $0100 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0003, bytearray([0xC9, 0x14])) # cmp #$14 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0005, bytearray([0xD0, 0x04])) # bne .invalid + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0007, bytearray([0xA5, 0x71])) # lda $71 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0009, bytearray([0xF0, 0x04])) # beq .valid + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x000B, bytearray([0x5C, 0xB1, 0x8A, 0x02])) # .invalid jml $028AB1 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x000F, bytearray([0xC2, 0x30])) # .valid rep #$30 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0011, bytearray([0xAF, 0x04, 0xB0, 0x7F])) # lda !score_sprite_add_1_coin + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0015, bytearray([0xF0, 0x03])) # beq .no_1_coin + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0017, bytearray([0x20, 0xC1, 0xE0])) # jsr add_1_coin + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x001A, bytearray([0xAF, 0x06, 0xB0, 0x7F])) # .no_1_coin lda !score_sprite_add_5_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x001E, bytearray([0xF0, 0x03])) # beq .no_5_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0020, bytearray([0x20, 0xDF, 0xE0])) # jsr add_5_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0023, bytearray([0xAF, 0x08, 0xB0, 0x7F])) # .no_5_coins lda !score_sprite_add_10_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0027, bytearray([0xF0, 0x03])) # beq .no_10_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0029, bytearray([0x20, 0xFD, 0xE0])) # jsr add_10_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x002C, bytearray([0xAF, 0x0A, 0xB0, 0x7F])) # .no_10_coins lda !score_sprite_add_15_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0030, bytearray([0xF0, 0x03])) # beq .no_15_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0032, bytearray([0x20, 0x1B, 0xE1])) # jsr add_15_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0035, bytearray([0xAF, 0x10, 0xB0, 0x7F])) # .no_15_coins lda !score_sprite_add_1up + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0039, bytearray([0xF0, 0x03])) # beq .no_1up + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x003B, bytearray([0x20, 0x39, 0xE1])) # jsr add_1up + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x003E, bytearray([0xAF, 0x0C, 0xB0, 0x7F])) # .no_1up lda !score_sprite_add_yoshi_egg + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0042, bytearray([0xF0, 0x03])) # beq .no_yoshi_egg + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0044, bytearray([0x20, 0x57, 0xE1])) # jsr add_yoshi_egg + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0047, bytearray([0xAF, 0x0E, 0xB0, 0x7F])) # .no_yoshi_egg lda !score_sprite_add_boss_token + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x004B, bytearray([0xF0, 0x03])) # beq .no_boss_token + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x004D, bytearray([0x20, 0xCF, 0xE1])) # jsr add_boss_token + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0050, bytearray([0xE2, 0x30])) # .no_boss_token sep #$30 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0052, bytearray([0x20, 0xED, 0xE1])) # jsr goal_sanity_check + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0055, bytearray([0x20, 0x5C, 0xE0])) # jsr score_sprite_queue + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0058, bytearray([0x5C, 0xB1, 0x8A, 0x02])) # jml $028AB1 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x005C, bytearray([0xAF, 0x20, 0xB0, 0x7F])) # score_sprite_queue: lda !score_sprite_queue_delay + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0060, bytearray([0xF0, 0x06])) # beq .spawn + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0062, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0063, bytearray([0x8F, 0x20, 0xB0, 0x7F])) # sta !score_sprite_queue_delay + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0067, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0068, bytearray([0xA9, 0x08])) # .spawn lda #$08 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x006A, bytearray([0x8F, 0x20, 0xB0, 0x7F])) # sta !score_sprite_queue_delay + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x006E, bytearray([0xC2, 0x30])) # rep #$30 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0070, bytearray([0xAF, 0x02, 0xB0, 0x7F])) # lda !score_sprite_index + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0074, bytearray([0xCF, 0x00, 0xB0, 0x7F])) # cmp !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0078, bytearray([0xD0, 0x03])) # bne .check_slots + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x007A, bytearray([0xE2, 0x30])) # sep #$30 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x007C, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x007D, bytearray([0xA0, 0x05, 0x00])) # .check_slots ldy #$0005 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0080, bytearray([0xB9, 0xE1, 0x16])) # ..loop lda !score_sprite_num,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0083, bytearray([0x29, 0xFF, 0x00])) # and #$00FF + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0086, bytearray([0xF0, 0x06])) # beq .found_free + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0088, bytearray([0x88])) # dey + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0089, bytearray([0x10, 0xF5])) # bpl ..loop + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x008B, bytearray([0xE2, 0x30])) # sep #$30 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x008D, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x008E, bytearray([0xAF, 0x02, 0xB0, 0x7F])) # .found_free lda !score_sprite_index + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0092, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0093, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0094, bytearray([0x8F, 0x02, 0xB0, 0x7F])) # sta !score_sprite_index + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0098, bytearray([0xBF, 0x22, 0xB0, 0x7F])) # lda !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x009C, bytearray([0xE2, 0x30])) # sep #$30 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x009E, bytearray([0x99, 0xE1, 0x16])) # sta !score_sprite_num,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00A1, bytearray([0xA5, 0x94])) # lda $94 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00A3, bytearray([0x99, 0xED, 0x16])) # sta !score_sprite_x_lo,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00A6, bytearray([0xA5, 0x95])) # lda $95 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00A8, bytearray([0x99, 0xF3, 0x16])) # sta !score_sprite_x_hi,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00AB, bytearray([0xA5, 0x96])) # lda $96 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00AD, bytearray([0x99, 0xE7, 0x16])) # sta !score_sprite_y_lo,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00B0, bytearray([0xA5, 0x97])) # lda $97 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00B2, bytearray([0x99, 0xF9, 0x16])) # sta !score_sprite_y_hi,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00B5, bytearray([0xA9, 0x30])) # lda #$30 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00B7, bytearray([0x99, 0xFF, 0x16])) # sta !score_sprite_timer,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00BA, bytearray([0xAD, 0xF9, 0x13])) # lda $13F9 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00BD, bytearray([0x99, 0x05, 0x17])) # sta !score_sprite_layer,y + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00C0, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00C1, bytearray([0xAF, 0x04, 0xB0, 0x7F])) # add_1_coin: lda !score_sprite_add_1_coin + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00C5, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00C6, bytearray([0x8F, 0x04, 0xB0, 0x7F])) # sta !score_sprite_add_1_coin + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00CA, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00CE, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00CF, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00D3, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00D4, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00D6, bytearray([0xA9, 0x11])) # lda #$11 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00D8, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00DC, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00DE, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00DF, bytearray([0xAF, 0x06, 0xB0, 0x7F])) # add_5_coins: lda !score_sprite_add_5_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00E3, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00E4, bytearray([0x8F, 0x06, 0xB0, 0x7F])) # sta !score_sprite_add_5_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00E8, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00EC, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00ED, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00F1, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00F2, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00F4, bytearray([0xA9, 0x12])) # lda #$12 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00F6, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00FA, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00FC, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x00FD, bytearray([0xAF, 0x08, 0xB0, 0x7F])) # add_10_coins: lda !score_sprite_add_10_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0101, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0102, bytearray([0x8F, 0x08, 0xB0, 0x7F])) # sta !score_sprite_add_10_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0106, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x010A, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x010B, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x010F, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0110, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0112, bytearray([0xA9, 0x13])) # lda #$13 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0114, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0118, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x011A, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x011B, bytearray([0xAF, 0x0A, 0xB0, 0x7F])) # add_15_coins: lda !score_sprite_add_15_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x011F, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0120, bytearray([0x8F, 0x0A, 0xB0, 0x7F])) # sta !score_sprite_add_15_coins + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0124, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0128, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0129, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x012D, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x012E, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0130, bytearray([0xA9, 0x14])) # lda #$14 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0132, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0136, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0138, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0139, bytearray([0xAF, 0x10, 0xB0, 0x7F])) # add_1up: lda !score_sprite_add_1up + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x013D, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x013E, bytearray([0x8F, 0x10, 0xB0, 0x7F])) # sta !score_sprite_add_1up + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0142, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0146, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0147, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x014B, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x014C, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x014E, bytearray([0xA9, 0x16])) # lda #$16 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0150, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0154, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0156, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0157, bytearray([0xAF, 0x0C, 0xB0, 0x7F])) # add_yoshi_egg: lda !score_sprite_add_yoshi_egg + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x015B, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x015C, bytearray([0x8F, 0x0C, 0xB0, 0x7F])) # sta !score_sprite_add_yoshi_egg + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0160, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0164, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0165, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0169, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x016A, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x016C, bytearray([0xA9, 0x15])) # lda #$15 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x016E, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0172, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0174, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0175, bytearray([0xAF, 0x12, 0xB0, 0x7F])) # add_mushroom: lda !score_sprite_add_mushroom + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0179, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x017A, bytearray([0x8F, 0x12, 0xB0, 0x7F])) # sta !score_sprite_add_mushroom + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x017E, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0182, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0183, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0187, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0188, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x018A, bytearray([0xA9, 0x17])) # lda #$17 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x018C, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0190, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0192, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0193, bytearray([0xAF, 0x14, 0xB0, 0x7F])) # add_flower: lda !score_sprite_add_flower + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0197, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0198, bytearray([0x8F, 0x14, 0xB0, 0x7F])) # sta !score_sprite_add_flower + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x019C, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01A0, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01A1, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01A5, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01A6, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01A8, bytearray([0xA9, 0x18])) # lda #$18 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01AA, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01AE, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01B0, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01B1, bytearray([0xAF, 0x16, 0xB0, 0x7F])) # add_feather: lda !score_sprite_add_feather + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01B5, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01B6, bytearray([0x8F, 0x16, 0xB0, 0x7F])) # sta !score_sprite_add_feather + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01BA, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01BE, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01BF, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01C3, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01C4, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01C6, bytearray([0xA9, 0x19])) # lda #$19 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01C8, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01CC, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01CE, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01CF, bytearray([0xAF, 0x0E, 0xB0, 0x7F])) # add_boss_token: lda !score_sprite_add_boss_token + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01D3, bytearray([0x3A])) # dec + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01D4, bytearray([0x8F, 0x0E, 0xB0, 0x7F])) # sta !score_sprite_add_boss_token + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01D8, bytearray([0xAF, 0x00, 0xB0, 0x7F])) # lda !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01DC, bytearray([0x1A])) # inc + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01DD, bytearray([0x8F, 0x00, 0xB0, 0x7F])) # sta !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01E1, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01E2, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01E4, bytearray([0xA9, 0x1A])) # lda #$1A + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01E6, bytearray([0x9F, 0x22, 0xB0, 0x7F])) # sta !score_sprite_queue,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01EA, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01EC, bytearray([0x60])) # rts + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01ED, bytearray([0xAF, 0xA0, 0xBF, 0x03])) # goal_sanity_check: lda $03BFA0 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01F1, bytearray([0x29, 0x01])) # and #$01 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01F3, bytearray([0x49, 0x01])) # eor #$01 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01F5, bytearray([0x0A])) # asl + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01F6, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01F8, bytearray([0xBF, 0x0C, 0xB0, 0x7F])) # lda !score_sprite_add_yoshi_egg,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01FC, bytearray([0xD0, 0x18])) # bne .return + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x01FE, bytearray([0xAF, 0x02, 0xB0, 0x7F])) # .check_queue lda !score_sprite_index + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0202, bytearray([0xCF, 0x00, 0xB0, 0x7F])) # cmp !score_sprite_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0206, bytearray([0xD0, 0x0E])) # bne .return + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0208, bytearray([0xE2, 0x20])) # .check_count sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x020A, bytearray([0xAF, 0x1E, 0xA0, 0x7F])) # lda !goal_item_count + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x020E, bytearray([0xDD, 0x24, 0x1F])) # cmp $1F24,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0211, bytearray([0xF0, 0x03])) # beq .return + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0213, bytearray([0x9D, 0x24, 0x1F])) # sta $1F24,x + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0216, bytearray([0xE2, 0x20])) # .return sep #$20 + rom.write_bytes(INDICATOR_QUEUE_CODE + 0x0218, bytearray([0x60])) # rts + + # Add code for indicators when receiving items during levels + INDICATOR_CODE = 0x84000 + rom.write_bytes(0x12DBA, bytearray([0x5C, 0x00, 0xC0, 0x10])) # org $02ADBA : jsl score_sprites + rom.write_bytes(INDICATOR_CODE + 0x0000, bytearray([0xBD, 0xE1, 0x16])) # score_sprites: lda !score_sprite_num,x + rom.write_bytes(INDICATOR_CODE + 0x0003, bytearray([0xF0, 0x2D])) # beq .return + rom.write_bytes(INDICATOR_CODE + 0x0005, bytearray([0x8E, 0xE9, 0x15])) # stx $15E9 + rom.write_bytes(INDICATOR_CODE + 0x0008, bytearray([0xC2, 0x30])) # rep #$30 + rom.write_bytes(INDICATOR_CODE + 0x000A, bytearray([0x29, 0x1F, 0x00])) # and #$001F + rom.write_bytes(INDICATOR_CODE + 0x000D, bytearray([0x85, 0x00])) # sta $00 + rom.write_bytes(INDICATOR_CODE + 0x000F, bytearray([0x0A])) # asl + rom.write_bytes(INDICATOR_CODE + 0x0010, bytearray([0x18])) # clc + rom.write_bytes(INDICATOR_CODE + 0x0011, bytearray([0x65, 0x00])) # adc $00 + rom.write_bytes(INDICATOR_CODE + 0x0013, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_CODE + 0x0014, bytearray([0xBF, 0x37, 0xC0, 0x10])) # lda.l .pointers-3,x + rom.write_bytes(INDICATOR_CODE + 0x0018, bytearray([0x85, 0x00])) # sta $00 + rom.write_bytes(INDICATOR_CODE + 0x001A, bytearray([0xE2, 0x30])) # sep #$30 + rom.write_bytes(INDICATOR_CODE + 0x001C, bytearray([0xBF, 0x39, 0xC0, 0x10])) # lda.l .pointers-3+2,x + rom.write_bytes(INDICATOR_CODE + 0x0020, bytearray([0x85, 0x02])) # sta $02 + rom.write_bytes(INDICATOR_CODE + 0x0022, bytearray([0xE2, 0x10])) # sep #$10 + rom.write_bytes(INDICATOR_CODE + 0x0024, bytearray([0xAE, 0xE9, 0x15])) # ldx $15E9 + rom.write_bytes(INDICATOR_CODE + 0x0027, bytearray([0x8B])) # phb + rom.write_bytes(INDICATOR_CODE + 0x0028, bytearray([0x48])) # pha + rom.write_bytes(INDICATOR_CODE + 0x0029, bytearray([0xAB])) # plb + rom.write_bytes(INDICATOR_CODE + 0x002A, bytearray([0x4B])) # phk + rom.write_bytes(INDICATOR_CODE + 0x002B, bytearray([0xF4, 0x30, 0xC0])) # pea.w .return_code-1 + rom.write_bytes(INDICATOR_CODE + 0x002E, bytearray([0xDC, 0x00, 0x00])) # jml [$0000] + rom.write_bytes(INDICATOR_CODE + 0x0031, bytearray([0xAB])) # .return_code plb + rom.write_bytes(INDICATOR_CODE + 0x0032, bytearray([0x5C, 0xC5, 0xAD, 0x02])) # .return jml $02ADC5 + rom.write_bytes(INDICATOR_CODE + 0x0036, bytearray([0x9E, 0xE1, 0x16])) # .kill stz !score_sprite_num,x + rom.write_bytes(INDICATOR_CODE + 0x0039, bytearray([0x6B])) # rtl + rom.write_bytes(INDICATOR_CODE + 0x003A, bytearray([0x97, 0xC0, 0x10])) # .pointers dl original_score_sprites ; 01 - 10 points + rom.write_bytes(INDICATOR_CODE + 0x003D, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 02 - 20 points + rom.write_bytes(INDICATOR_CODE + 0x0040, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 03 - 40 points + rom.write_bytes(INDICATOR_CODE + 0x0043, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 04 - 80 points + rom.write_bytes(INDICATOR_CODE + 0x0046, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 05 - 100 points + rom.write_bytes(INDICATOR_CODE + 0x0049, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 06 - 200 points + rom.write_bytes(INDICATOR_CODE + 0x004C, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 07 - 400 points + rom.write_bytes(INDICATOR_CODE + 0x004F, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 08 - 800 points + rom.write_bytes(INDICATOR_CODE + 0x0052, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 09 - 1000 points + rom.write_bytes(INDICATOR_CODE + 0x0055, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 0A - 2000 points + rom.write_bytes(INDICATOR_CODE + 0x0058, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 0B - 4000 points + rom.write_bytes(INDICATOR_CODE + 0x005B, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 0C - 8000 points + rom.write_bytes(INDICATOR_CODE + 0x005E, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 0D - 1-up + rom.write_bytes(INDICATOR_CODE + 0x0061, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 0E - 2-up + rom.write_bytes(INDICATOR_CODE + 0x0064, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 0F - 3-up + rom.write_bytes(INDICATOR_CODE + 0x0067, bytearray([0x97, 0xC0, 0x10])) # dl original_score_sprites ; 10 - 5-up + rom.write_bytes(INDICATOR_CODE + 0x006A, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 11 - 1 coin + rom.write_bytes(INDICATOR_CODE + 0x006D, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 12 - 5 coins + rom.write_bytes(INDICATOR_CODE + 0x0070, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 13 - 10 coins + rom.write_bytes(INDICATOR_CODE + 0x0073, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 14 - 15 coins + rom.write_bytes(INDICATOR_CODE + 0x0076, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 15 - Yoshi Egg + rom.write_bytes(INDICATOR_CODE + 0x0079, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 16 - 1up Mushroom + rom.write_bytes(INDICATOR_CODE + 0x007C, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 17 - Mushroom + rom.write_bytes(INDICATOR_CODE + 0x007F, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 18 - Flower + rom.write_bytes(INDICATOR_CODE + 0x0082, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 19 - Feather + rom.write_bytes(INDICATOR_CODE + 0x0085, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 1A - Boss token + rom.write_bytes(INDICATOR_CODE + 0x0088, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 1B - + rom.write_bytes(INDICATOR_CODE + 0x008B, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 1C - + rom.write_bytes(INDICATOR_CODE + 0x008E, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 1D - + rom.write_bytes(INDICATOR_CODE + 0x0091, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 1E - + rom.write_bytes(INDICATOR_CODE + 0x0094, bytearray([0xA7, 0xC0, 0x10])) # dl icon_score ; 1F - + rom.write_bytes(INDICATOR_CODE + 0x0097, bytearray([0xA9, 0x02])) # original_score_sprites: lda #$02 + rom.write_bytes(INDICATOR_CODE + 0x0099, bytearray([0x48])) # pha + rom.write_bytes(INDICATOR_CODE + 0x009A, bytearray([0xAB])) # plb + rom.write_bytes(INDICATOR_CODE + 0x009B, bytearray([0x4B])) # phk + rom.write_bytes(INDICATOR_CODE + 0x009C, bytearray([0xF4, 0xA5, 0xC0])) # pea.w .jslrtsreturn-1 + rom.write_bytes(INDICATOR_CODE + 0x009F, bytearray([0xF4, 0x88, 0xB8])) # pea.w $B889-1 + rom.write_bytes(INDICATOR_CODE + 0x00A2, bytearray([0x5C, 0xC9, 0xAD, 0x02])) # jml $02ADC9 + rom.write_bytes(INDICATOR_CODE + 0x00A6, bytearray([0x6B])) # .jslrtsreturn rtl + rom.write_bytes(INDICATOR_CODE + 0x00A7, bytearray([0xBD, 0xFF, 0x16])) # icon_score: lda !score_sprite_timer,x + rom.write_bytes(INDICATOR_CODE + 0x00AA, bytearray([0xD0, 0x04])) # bne .active + rom.write_bytes(INDICATOR_CODE + 0x00AC, bytearray([0x9E, 0xE1, 0x16])) # stz !score_sprite_num,x + rom.write_bytes(INDICATOR_CODE + 0x00AF, bytearray([0x6B])) # rtl + rom.write_bytes(INDICATOR_CODE + 0x00B0, bytearray([0xDE, 0xFF, 0x16])) # .active dec !score_sprite_timer,x + rom.write_bytes(INDICATOR_CODE + 0x00B3, bytearray([0xC9, 0x30])) # cmp #$30 + rom.write_bytes(INDICATOR_CODE + 0x00B5, bytearray([0xD0, 0x14])) # bne .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x00B7, bytearray([0xBD, 0xE1, 0x16])) # lda !score_sprite_num,x + rom.write_bytes(INDICATOR_CODE + 0x00BA, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x00BB, bytearray([0xE9, 0x11])) # sbc #$11 + rom.write_bytes(INDICATOR_CODE + 0x00BD, bytearray([0x0A])) # asl + rom.write_bytes(INDICATOR_CODE + 0x00BE, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x00BF, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_CODE + 0x00C1, bytearray([0xB9, 0x4B, 0xC2])) # lda .reward_ptrs,y + rom.write_bytes(INDICATOR_CODE + 0x00C4, bytearray([0x85, 0x00])) # sta $00 + rom.write_bytes(INDICATOR_CODE + 0x00C6, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_CODE + 0x00C8, bytearray([0x6C, 0x00, 0x00])) # jmp ($0000) + rom.write_bytes(INDICATOR_CODE + 0x00CB, bytearray([0xBD, 0xFF, 0x16])) # .handle_movement lda !score_sprite_timer,x + rom.write_bytes(INDICATOR_CODE + 0x00CE, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x00CF, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x00D0, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x00D1, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x00D2, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x00D3, bytearray([0xA5, 0x13])) # lda $13 + rom.write_bytes(INDICATOR_CODE + 0x00D5, bytearray([0x39, 0xF0, 0xC0])) # and .speed,y + rom.write_bytes(INDICATOR_CODE + 0x00D8, bytearray([0xD0, 0x14])) # bne ..skip_update + rom.write_bytes(INDICATOR_CODE + 0x00DA, bytearray([0xBD, 0xE7, 0x16])) # lda !score_sprite_y_lo,x + rom.write_bytes(INDICATOR_CODE + 0x00DD, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x00DE, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x00DF, bytearray([0xE5, 0x1C])) # sbc $1C + rom.write_bytes(INDICATOR_CODE + 0x00E1, bytearray([0xC9, 0x04])) # cmp #$04 + rom.write_bytes(INDICATOR_CODE + 0x00E3, bytearray([0x90, 0x09])) # bcc ..skip_update + rom.write_bytes(INDICATOR_CODE + 0x00E5, bytearray([0xDE, 0xE7, 0x16])) # dec !score_sprite_y_lo,x + rom.write_bytes(INDICATOR_CODE + 0x00E8, bytearray([0x98])) # tya + rom.write_bytes(INDICATOR_CODE + 0x00E9, bytearray([0xD0, 0x03])) # bne ..skip_update + rom.write_bytes(INDICATOR_CODE + 0x00EB, bytearray([0xDE, 0xF9, 0x16])) # dec !score_sprite_y_hi,x + rom.write_bytes(INDICATOR_CODE + 0x00EE, bytearray([0x80, 0x05])) # ..skip_update bra .gfx + rom.write_bytes(INDICATOR_CODE + 0x00F0, bytearray([0x03, 0x01, 0x00, 0x00])) # .speed db $03,$01,$00,$00 + rom.write_bytes(INDICATOR_CODE + 0x00F4, bytearray([0x6B])) # .return rtl + rom.write_bytes(INDICATOR_CODE + 0x00F5, bytearray([0xBD, 0x05, 0x17])) # .gfx lda !score_sprite_layer,x + rom.write_bytes(INDICATOR_CODE + 0x00F8, bytearray([0x0A])) # asl + rom.write_bytes(INDICATOR_CODE + 0x00F9, bytearray([0x0A])) # asl + rom.write_bytes(INDICATOR_CODE + 0x00FA, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x00FB, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_CODE + 0x00FD, bytearray([0xB9, 0x1C, 0x00])) # lda $001C,y + rom.write_bytes(INDICATOR_CODE + 0x0100, bytearray([0x85, 0x02])) # sta $02 + rom.write_bytes(INDICATOR_CODE + 0x0102, bytearray([0xB9, 0x1A, 0x00])) # lda $001A,y + rom.write_bytes(INDICATOR_CODE + 0x0105, bytearray([0x85, 0x04])) # sta $04 + rom.write_bytes(INDICATOR_CODE + 0x0107, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_CODE + 0x0109, bytearray([0xBD, 0xF3, 0x16])) # lda !score_sprite_x_hi,x + rom.write_bytes(INDICATOR_CODE + 0x010C, bytearray([0xEB])) # xba + rom.write_bytes(INDICATOR_CODE + 0x010D, bytearray([0xBD, 0xED, 0x16])) # lda !score_sprite_x_lo,x + rom.write_bytes(INDICATOR_CODE + 0x0110, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(INDICATOR_CODE + 0x0112, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x0113, bytearray([0xE5, 0x04])) # sbc $04 + rom.write_bytes(INDICATOR_CODE + 0x0115, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x0116, bytearray([0xE9, 0x06, 0x00])) # sbc #$0006 + rom.write_bytes(INDICATOR_CODE + 0x0119, bytearray([0xC9, 0xEA, 0x00])) # cmp #$00EA + rom.write_bytes(INDICATOR_CODE + 0x011C, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(INDICATOR_CODE + 0x011E, bytearray([0xB0, 0xD4])) # bcs .return + rom.write_bytes(INDICATOR_CODE + 0x0120, bytearray([0xBD, 0xE7, 0x16])) # lda !score_sprite_y_lo,x + rom.write_bytes(INDICATOR_CODE + 0x0123, bytearray([0xC5, 0x02])) # cmp $02 + rom.write_bytes(INDICATOR_CODE + 0x0125, bytearray([0xBD, 0xF9, 0x16])) # lda !score_sprite_y_hi,x + rom.write_bytes(INDICATOR_CODE + 0x0128, bytearray([0xE5, 0x03])) # sbc $03 + rom.write_bytes(INDICATOR_CODE + 0x012A, bytearray([0xD0, 0xC8])) # bne .return + rom.write_bytes(INDICATOR_CODE + 0x012C, bytearray([0xBF, 0x9E, 0xAD, 0x02])) # lda $02AD9E,x + rom.write_bytes(INDICATOR_CODE + 0x0130, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x0131, bytearray([0xBD, 0xE7, 0x16])) # lda !score_sprite_y_lo,x + rom.write_bytes(INDICATOR_CODE + 0x0134, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x0135, bytearray([0xE5, 0x02])) # sbc $02 + rom.write_bytes(INDICATOR_CODE + 0x0137, bytearray([0x99, 0x01, 0x02])) # sta $0201,y + rom.write_bytes(INDICATOR_CODE + 0x013A, bytearray([0x99, 0x05, 0x02])) # sta $0205,y + rom.write_bytes(INDICATOR_CODE + 0x013D, bytearray([0xBD, 0xED, 0x16])) # lda !score_sprite_x_lo,x + rom.write_bytes(INDICATOR_CODE + 0x0140, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x0141, bytearray([0xE5, 0x04])) # sbc $04 + rom.write_bytes(INDICATOR_CODE + 0x0143, bytearray([0x18])) # clc + rom.write_bytes(INDICATOR_CODE + 0x0144, bytearray([0x69, 0x09])) # adc #$09 + rom.write_bytes(INDICATOR_CODE + 0x0146, bytearray([0x99, 0x00, 0x02])) # sta $0200,y + rom.write_bytes(INDICATOR_CODE + 0x0149, bytearray([0x18])) # clc + rom.write_bytes(INDICATOR_CODE + 0x014A, bytearray([0x69, 0x05])) # adc #$05 + rom.write_bytes(INDICATOR_CODE + 0x014C, bytearray([0x99, 0x04, 0x02])) # sta $0204,y + rom.write_bytes(INDICATOR_CODE + 0x014F, bytearray([0xDA])) # phx + rom.write_bytes(INDICATOR_CODE + 0x0150, bytearray([0xBD, 0xE1, 0x16])) # lda !score_sprite_num,x + rom.write_bytes(INDICATOR_CODE + 0x0153, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x0154, bytearray([0xE9, 0x11])) # sbc #$11 + rom.write_bytes(INDICATOR_CODE + 0x0156, bytearray([0x0A])) # asl + rom.write_bytes(INDICATOR_CODE + 0x0157, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_CODE + 0x0158, bytearray([0xBD, 0x09, 0xC2])) # lda ..num_tile+$00,x + rom.write_bytes(INDICATOR_CODE + 0x015B, bytearray([0x99, 0x02, 0x02])) # sta $0202,y + rom.write_bytes(INDICATOR_CODE + 0x015E, bytearray([0xBD, 0x0A, 0xC2])) # lda ..num_tile+$01,x + rom.write_bytes(INDICATOR_CODE + 0x0161, bytearray([0x99, 0x06, 0x02])) # sta $0206,y + rom.write_bytes(INDICATOR_CODE + 0x0164, bytearray([0xBD, 0x27, 0xC2])) # lda ..num_props+$00,x + rom.write_bytes(INDICATOR_CODE + 0x0167, bytearray([0x99, 0x03, 0x02])) # sta $0203,y + rom.write_bytes(INDICATOR_CODE + 0x016A, bytearray([0xBD, 0x28, 0xC2])) # lda ..num_props+$01,x + rom.write_bytes(INDICATOR_CODE + 0x016D, bytearray([0x99, 0x07, 0x02])) # sta $0207,y + rom.write_bytes(INDICATOR_CODE + 0x0170, bytearray([0xFA])) # plx + rom.write_bytes(INDICATOR_CODE + 0x0171, bytearray([0x98])) # tya + rom.write_bytes(INDICATOR_CODE + 0x0172, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x0173, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x0174, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x0175, bytearray([0xA9, 0x00])) # lda #$00 + rom.write_bytes(INDICATOR_CODE + 0x0177, bytearray([0x99, 0x20, 0x04])) # sta $0420,y + rom.write_bytes(INDICATOR_CODE + 0x017A, bytearray([0x99, 0x21, 0x04])) # sta $0421,y + rom.write_bytes(INDICATOR_CODE + 0x017D, bytearray([0xBF, 0x45, 0xC2, 0x10])) # lda.l ..oam_2,x + rom.write_bytes(INDICATOR_CODE + 0x0181, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x0182, bytearray([0xBD, 0xE7, 0x16])) # lda !score_sprite_y_lo,x + rom.write_bytes(INDICATOR_CODE + 0x0185, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x0186, bytearray([0xE5, 0x02])) # sbc $02 + rom.write_bytes(INDICATOR_CODE + 0x0188, bytearray([0x99, 0x01, 0x02])) # sta $0201,y + rom.write_bytes(INDICATOR_CODE + 0x018B, bytearray([0x99, 0x05, 0x02])) # sta $0205,y + rom.write_bytes(INDICATOR_CODE + 0x018E, bytearray([0xBD, 0xED, 0x16])) # lda !score_sprite_x_lo,x + rom.write_bytes(INDICATOR_CODE + 0x0191, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x0192, bytearray([0xE5, 0x04])) # sbc $04 + rom.write_bytes(INDICATOR_CODE + 0x0194, bytearray([0xE9, 0x07])) # sbc #$07 + rom.write_bytes(INDICATOR_CODE + 0x0196, bytearray([0x99, 0x00, 0x02])) # sta $0200,y + rom.write_bytes(INDICATOR_CODE + 0x0199, bytearray([0x18])) # clc + rom.write_bytes(INDICATOR_CODE + 0x019A, bytearray([0x69, 0x08])) # adc #$08 + rom.write_bytes(INDICATOR_CODE + 0x019C, bytearray([0x99, 0x04, 0x02])) # sta $0204,y + rom.write_bytes(INDICATOR_CODE + 0x019F, bytearray([0xDA])) # phx + rom.write_bytes(INDICATOR_CODE + 0x01A0, bytearray([0xBD, 0xE1, 0x16])) # lda !score_sprite_num,x + rom.write_bytes(INDICATOR_CODE + 0x01A3, bytearray([0x38])) # sec + rom.write_bytes(INDICATOR_CODE + 0x01A4, bytearray([0xE9, 0x11])) # sbc #$11 + rom.write_bytes(INDICATOR_CODE + 0x01A6, bytearray([0xAA])) # tax + rom.write_bytes(INDICATOR_CODE + 0x01A7, bytearray([0xBD, 0xCD, 0xC1])) # lda ..icon_tile,x + rom.write_bytes(INDICATOR_CODE + 0x01AA, bytearray([0x99, 0x02, 0x02])) # sta $0202,y + rom.write_bytes(INDICATOR_CODE + 0x01AD, bytearray([0xBD, 0xDC, 0xC1])) # lda ..icon_props,x + rom.write_bytes(INDICATOR_CODE + 0x01B0, bytearray([0x99, 0x03, 0x02])) # sta $0203,y + rom.write_bytes(INDICATOR_CODE + 0x01B3, bytearray([0xBD, 0xFA, 0xC1])) # lda ..plus_props,x + rom.write_bytes(INDICATOR_CODE + 0x01B6, bytearray([0x99, 0x07, 0x02])) # sta $0207,y + rom.write_bytes(INDICATOR_CODE + 0x01B9, bytearray([0xBD, 0xEB, 0xC1])) # lda ..plus_tile,x + rom.write_bytes(INDICATOR_CODE + 0x01BC, bytearray([0x99, 0x06, 0x02])) # sta $0206,y + rom.write_bytes(INDICATOR_CODE + 0x01BF, bytearray([0xFA])) # plx + rom.write_bytes(INDICATOR_CODE + 0x01C0, bytearray([0x98])) # tya + rom.write_bytes(INDICATOR_CODE + 0x01C1, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x01C2, bytearray([0x4A])) # lsr + rom.write_bytes(INDICATOR_CODE + 0x01C3, bytearray([0xA8])) # tay + rom.write_bytes(INDICATOR_CODE + 0x01C4, bytearray([0xA9, 0x00])) # lda #$00 + rom.write_bytes(INDICATOR_CODE + 0x01C6, bytearray([0x99, 0x20, 0x04])) # sta $0420,y + rom.write_bytes(INDICATOR_CODE + 0x01C9, bytearray([0x99, 0x21, 0x04])) # sta $0421,y + rom.write_bytes(INDICATOR_CODE + 0x01CC, bytearray([0x6B])) # rtl + rom.write_bytes(INDICATOR_CODE + 0x01CD, bytearray([0x1B])) # ..icon_tile db $1B ; 1 coin + rom.write_bytes(INDICATOR_CODE + 0x01CE, bytearray([0x1B])) # db $1B ; 5 coins + rom.write_bytes(INDICATOR_CODE + 0x01CF, bytearray([0x1B])) # db $1B ; 10 coins + rom.write_bytes(INDICATOR_CODE + 0x01D0, bytearray([0x1B])) # db $1B ; 15 coins + rom.write_bytes(INDICATOR_CODE + 0x01D1, bytearray([0x0A])) # db $0A ; yoshi egg + rom.write_bytes(INDICATOR_CODE + 0x01D2, bytearray([0x0B])) # db $0B ; 1up mushroom + rom.write_bytes(INDICATOR_CODE + 0x01D3, bytearray([0x0B])) # db $0B ; mushroom + rom.write_bytes(INDICATOR_CODE + 0x01D4, bytearray([0x7E])) # db $7E ; flower + rom.write_bytes(INDICATOR_CODE + 0x01D5, bytearray([0x7F])) # db $7F ; feather + rom.write_bytes(INDICATOR_CODE + 0x01D6, bytearray([0x38])) # db $38 ; boss token + rom.write_bytes(INDICATOR_CODE + 0x01D7, bytearray([0x5A])) # db $5A ; + rom.write_bytes(INDICATOR_CODE + 0x01D8, bytearray([0x5A])) # db $5A ; + rom.write_bytes(INDICATOR_CODE + 0x01D9, bytearray([0x5A])) # db $5A ; + rom.write_bytes(INDICATOR_CODE + 0x01DA, bytearray([0x5A])) # db $5A ; + rom.write_bytes(INDICATOR_CODE + 0x01DB, bytearray([0x0B])) # db $0B ; + rom.write_bytes(INDICATOR_CODE + 0x01DC, bytearray([0x34])) # ..icon_props db $34 ; coin + rom.write_bytes(INDICATOR_CODE + 0x01DD, bytearray([0x34])) # db $34 ; coin + rom.write_bytes(INDICATOR_CODE + 0x01DE, bytearray([0x34])) # db $34 ; coin + rom.write_bytes(INDICATOR_CODE + 0x01DF, bytearray([0x34])) # db $34 ; coin + rom.write_bytes(INDICATOR_CODE + 0x01E0, bytearray([0x3A])) # db $3A ; yoshi egg + rom.write_bytes(INDICATOR_CODE + 0x01E1, bytearray([0x3A])) # db $3A ; 1up mushroom + rom.write_bytes(INDICATOR_CODE + 0x01E2, bytearray([0x38])) # db $38 ; mushroom + rom.write_bytes(INDICATOR_CODE + 0x01E3, bytearray([0x3A])) # db $3A ; flower + rom.write_bytes(INDICATOR_CODE + 0x01E4, bytearray([0x34])) # db $34 ; feather + rom.write_bytes(INDICATOR_CODE + 0x01E5, bytearray([0x34])) # db $34 ; boss token + rom.write_bytes(INDICATOR_CODE + 0x01E6, bytearray([0x34])) # db $34 ; + rom.write_bytes(INDICATOR_CODE + 0x01E7, bytearray([0x3A])) # db $3A ; + rom.write_bytes(INDICATOR_CODE + 0x01E8, bytearray([0x38])) # db $38 ; + rom.write_bytes(INDICATOR_CODE + 0x01E9, bytearray([0x36])) # db $36 ; + rom.write_bytes(INDICATOR_CODE + 0x01EA, bytearray([0x36])) # db $36 ; + rom.write_bytes(INDICATOR_CODE + 0x01EB, bytearray([0x1A])) # ..plus_tile db $1A ; 1 coin + rom.write_bytes(INDICATOR_CODE + 0x01EC, bytearray([0x1A])) # db $1A ; 3 coins + rom.write_bytes(INDICATOR_CODE + 0x01ED, bytearray([0x1A])) # db $1A ; 5 coins + rom.write_bytes(INDICATOR_CODE + 0x01EE, bytearray([0x1A])) # db $1A ; 10 coins + rom.write_bytes(INDICATOR_CODE + 0x01EF, bytearray([0x1A])) # db $1A ; yoshi egg + rom.write_bytes(INDICATOR_CODE + 0x01F0, bytearray([0x1A])) # db $1A ; 1up mushroom + rom.write_bytes(INDICATOR_CODE + 0x01F1, bytearray([0x1A])) # db $1A ; mushroom + rom.write_bytes(INDICATOR_CODE + 0x01F2, bytearray([0x1A])) # db $1A ; flower + rom.write_bytes(INDICATOR_CODE + 0x01F3, bytearray([0x1A])) # db $1A ; feather + rom.write_bytes(INDICATOR_CODE + 0x01F4, bytearray([0x1A])) # db $1A ; boss token + rom.write_bytes(INDICATOR_CODE + 0x01F5, bytearray([0x1A])) # db $1A ; + rom.write_bytes(INDICATOR_CODE + 0x01F6, bytearray([0x1A])) # db $1A ; + rom.write_bytes(INDICATOR_CODE + 0x01F7, bytearray([0x1A])) # db $1A ; + rom.write_bytes(INDICATOR_CODE + 0x01F8, bytearray([0x1A])) # db $1A ; + rom.write_bytes(INDICATOR_CODE + 0x01F9, bytearray([0x1A])) # db $1A ; + rom.write_bytes(INDICATOR_CODE + 0x01FA, bytearray([0x32])) # ..plus_props db $32 ; 1 coin + rom.write_bytes(INDICATOR_CODE + 0x01FB, bytearray([0x32])) # db $32 ; 5 coins + rom.write_bytes(INDICATOR_CODE + 0x01FC, bytearray([0x32])) # db $32 ; 10 coins + rom.write_bytes(INDICATOR_CODE + 0x01FD, bytearray([0x32])) # db $32 ; 50 coins + rom.write_bytes(INDICATOR_CODE + 0x01FE, bytearray([0x32])) # db $32 ; yoshi egg + rom.write_bytes(INDICATOR_CODE + 0x01FF, bytearray([0x32])) # db $32 ; 1up mushroom + rom.write_bytes(INDICATOR_CODE + 0x0200, bytearray([0x32])) # db $32 ; mushroom + rom.write_bytes(INDICATOR_CODE + 0x0201, bytearray([0x32])) # db $32 ; flower + rom.write_bytes(INDICATOR_CODE + 0x0202, bytearray([0x32])) # db $32 ; feather + rom.write_bytes(INDICATOR_CODE + 0x0203, bytearray([0x32])) # db $32 ; boss token + rom.write_bytes(INDICATOR_CODE + 0x0204, bytearray([0x32])) # db $32 ; + rom.write_bytes(INDICATOR_CODE + 0x0205, bytearray([0x32])) # db $32 ; + rom.write_bytes(INDICATOR_CODE + 0x0206, bytearray([0x32])) # db $32 ; + rom.write_bytes(INDICATOR_CODE + 0x0207, bytearray([0x32])) # db $32 ; + rom.write_bytes(INDICATOR_CODE + 0x0208, bytearray([0x32])) # db $32 ; + rom.write_bytes(INDICATOR_CODE + 0x0209, bytearray([0x4B, 0x69])) # ..num_tile db $4B,$69 ; 1 coin + rom.write_bytes(INDICATOR_CODE + 0x020B, bytearray([0x5B, 0x69])) # db $5B,$69 ; 5 coins + rom.write_bytes(INDICATOR_CODE + 0x020D, bytearray([0x4B, 0x4A])) # db $4B,$4A ; 10 coins + rom.write_bytes(INDICATOR_CODE + 0x020F, bytearray([0x5B, 0x4A])) # db $4B,$5B ; 50 coins + rom.write_bytes(INDICATOR_CODE + 0x0211, bytearray([0x4B, 0x69])) # db $4B,$69 ; yoshi egg + rom.write_bytes(INDICATOR_CODE + 0x0213, bytearray([0x4B, 0x69])) # db $4B,$69 ; 1up mushroom + rom.write_bytes(INDICATOR_CODE + 0x0215, bytearray([0x4B, 0x69])) # db $4B,$69 ; mushroom + rom.write_bytes(INDICATOR_CODE + 0x0217, bytearray([0x4B, 0x69])) # db $4B,$69 ; flower + rom.write_bytes(INDICATOR_CODE + 0x0219, bytearray([0x4B, 0x69])) # db $4B,$69 ; feather + rom.write_bytes(INDICATOR_CODE + 0x021B, bytearray([0x4B, 0x69])) # db $4B,$69 ; boss token + rom.write_bytes(INDICATOR_CODE + 0x021D, bytearray([0x69, 0x69])) # db $69,$69 ; + rom.write_bytes(INDICATOR_CODE + 0x021F, bytearray([0x69, 0x69])) # db $69,$69 ; + rom.write_bytes(INDICATOR_CODE + 0x0221, bytearray([0x69, 0x69])) # db $69,$69 ; + rom.write_bytes(INDICATOR_CODE + 0x0223, bytearray([0x69, 0x69])) # db $69,$69 ; + rom.write_bytes(INDICATOR_CODE + 0x0225, bytearray([0x69, 0x69])) # db $69,$69 ; + rom.write_bytes(INDICATOR_CODE + 0x0227, bytearray([0x34, 0x34])) # ..num_props db $34,$34 ; 1 coin + rom.write_bytes(INDICATOR_CODE + 0x0229, bytearray([0x34, 0x34])) # db $34,$34 ; 5 coins + rom.write_bytes(INDICATOR_CODE + 0x022B, bytearray([0x34, 0x34])) # db $34,$34 ; 10 coins + rom.write_bytes(INDICATOR_CODE + 0x022D, bytearray([0x34, 0x34])) # db $34,$34 ; 50 coins + rom.write_bytes(INDICATOR_CODE + 0x022F, bytearray([0x34, 0x34])) # db $34,$34 ; yoshi egg + rom.write_bytes(INDICATOR_CODE + 0x0231, bytearray([0x34, 0x34])) # db $34,$34 ; 1up mushroom + rom.write_bytes(INDICATOR_CODE + 0x0233, bytearray([0x34, 0x34])) # db $34,$34 ; mushroom + rom.write_bytes(INDICATOR_CODE + 0x0235, bytearray([0x34, 0x34])) # db $34,$34 ; flower + rom.write_bytes(INDICATOR_CODE + 0x0237, bytearray([0x34, 0x34])) # db $34,$34 ; feather + rom.write_bytes(INDICATOR_CODE + 0x0239, bytearray([0x34, 0x34])) # db $34,$34 ; boss token + rom.write_bytes(INDICATOR_CODE + 0x023B, bytearray([0x34, 0x34])) # db $34,$34 ; + rom.write_bytes(INDICATOR_CODE + 0x023D, bytearray([0x34, 0x34])) # db $34,$34 ; + rom.write_bytes(INDICATOR_CODE + 0x023F, bytearray([0x34, 0x34])) # db $34,$34 ; + rom.write_bytes(INDICATOR_CODE + 0x0241, bytearray([0x34, 0x34])) # db $34,$34 ; + rom.write_bytes(INDICATOR_CODE + 0x0243, bytearray([0x34, 0x34])) # db $34,$34 ; + rom.write_bytes(INDICATOR_CODE + 0x0245, bytearray([0x50, 0x58, 0x60, 0x68, 0x70, 0x78]))# ..oam_2 db $50,$58,$60,$68,$70,$78 + rom.write_bytes(INDICATOR_CODE + 0x024B, bytearray([0x69, 0xC2])) # .reward_ptrs dw .one_coin + rom.write_bytes(INDICATOR_CODE + 0x024D, bytearray([0x6D, 0xC2])) # dw .five_coins + rom.write_bytes(INDICATOR_CODE + 0x024F, bytearray([0x71, 0xC2])) # dw .ten_coins + rom.write_bytes(INDICATOR_CODE + 0x0251, bytearray([0x75, 0xC2])) # dw .fifty_coins + rom.write_bytes(INDICATOR_CODE + 0x0253, bytearray([0x8A, 0xC2])) # dw .yoshi_egg + rom.write_bytes(INDICATOR_CODE + 0x0255, bytearray([0xA7, 0xC2])) # dw .green_mushroom + rom.write_bytes(INDICATOR_CODE + 0x0257, bytearray([0xAD, 0xC2])) # dw .mushroom + rom.write_bytes(INDICATOR_CODE + 0x0259, bytearray([0xAF, 0xC2])) # dw .flower + rom.write_bytes(INDICATOR_CODE + 0x025B, bytearray([0xB1, 0xC2])) # dw .shared_item + rom.write_bytes(INDICATOR_CODE + 0x025D, bytearray([0x9C, 0xC2])) # dw .boss_token + rom.write_bytes(INDICATOR_CODE + 0x025F, bytearray([0xCB, 0xC0])) # dw .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x0261, bytearray([0xCB, 0xC0])) # dw .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x0263, bytearray([0xCB, 0xC0])) # dw .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x0265, bytearray([0xCB, 0xC0])) # dw .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x0267, bytearray([0xCB, 0xC0])) # dw .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x0269, bytearray([0xA9, 0x01])) # .one_coin lda #$01 + rom.write_bytes(INDICATOR_CODE + 0x026B, bytearray([0x80, 0x0A])) # bra .shared_coins + rom.write_bytes(INDICATOR_CODE + 0x026D, bytearray([0xA9, 0x05])) # .five_coins lda #$05 + rom.write_bytes(INDICATOR_CODE + 0x026F, bytearray([0x80, 0x06])) # bra .shared_coins + rom.write_bytes(INDICATOR_CODE + 0x0271, bytearray([0xA9, 0x0A])) # .ten_coins lda #$0A + rom.write_bytes(INDICATOR_CODE + 0x0273, bytearray([0x80, 0x02])) # bra .shared_coins + rom.write_bytes(INDICATOR_CODE + 0x0275, bytearray([0xA9, 0x32])) # .fifty_coins lda #$32 + rom.write_bytes(INDICATOR_CODE + 0x0277, bytearray([0x18])) # .shared_coins clc + rom.write_bytes(INDICATOR_CODE + 0x0278, bytearray([0x6D, 0xCC, 0x13])) # adc $13CC + rom.write_bytes(INDICATOR_CODE + 0x027B, bytearray([0x90, 0x02])) # bcc + + rom.write_bytes(INDICATOR_CODE + 0x027D, bytearray([0xA9, 0xFF])) # lda #$FF + rom.write_bytes(INDICATOR_CODE + 0x027F, bytearray([0x8D, 0xCC, 0x13])) # + sta $13CC + rom.write_bytes(INDICATOR_CODE + 0x0282, bytearray([0xA9, 0x01])) # lda #$01 + rom.write_bytes(INDICATOR_CODE + 0x0284, bytearray([0x8D, 0xFC, 0x1D])) # sta $1DFC + rom.write_bytes(INDICATOR_CODE + 0x0287, bytearray([0x4C, 0xCB, 0xC0])) # jmp .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x028A, bytearray([0xAD, 0x24, 0x1F])) # .yoshi_egg lda $1F24 + rom.write_bytes(INDICATOR_CODE + 0x028D, bytearray([0xC9, 0xFF])) # cmp #$FF + rom.write_bytes(INDICATOR_CODE + 0x028F, bytearray([0xF0, 0x03])) # beq ..nope + rom.write_bytes(INDICATOR_CODE + 0x0291, bytearray([0xEE, 0x24, 0x1F])) # inc $1F24 + rom.write_bytes(INDICATOR_CODE + 0x0294, bytearray([0xA9, 0x1F])) # ..nope lda #$1F + rom.write_bytes(INDICATOR_CODE + 0x0296, bytearray([0x8D, 0xFC, 0x1D])) # sta $1DFC + rom.write_bytes(INDICATOR_CODE + 0x0299, bytearray([0x4C, 0xCB, 0xC0])) # jmp .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x029C, bytearray([0xEE, 0x26, 0x1F])) # .boss_token inc $1F26 + rom.write_bytes(INDICATOR_CODE + 0x029F, bytearray([0xA9, 0x09])) # lda #$09 + rom.write_bytes(INDICATOR_CODE + 0x02A1, bytearray([0x8D, 0xFC, 0x1D])) # sta $1DFC + rom.write_bytes(INDICATOR_CODE + 0x02A4, bytearray([0x4C, 0xCB, 0xC0])) # jmp .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x02A7, bytearray([0xEE, 0xE4, 0x18])) # .green_mushroom inc $18E4 + rom.write_bytes(INDICATOR_CODE + 0x02AA, bytearray([0x4C, 0xCB, 0xC0])) # jmp .handle_movement + rom.write_bytes(INDICATOR_CODE + 0x02AD, bytearray([0x80, 0x02])) # .mushroom bra .shared_item + rom.write_bytes(INDICATOR_CODE + 0x02AF, bytearray([0x80, 0x00])) # .flower bra .shared_item + rom.write_bytes(INDICATOR_CODE + 0x02B1, bytearray([0xA9, 0x0B])) # .shared_item lda #$0B + rom.write_bytes(INDICATOR_CODE + 0x02B3, bytearray([0x8D, 0xFC, 0x1D])) # sta $1DFC + rom.write_bytes(INDICATOR_CODE + 0x02B6, bytearray([0x4C, 0xCB, 0xC0])) # jmp .handle_movement + +def handle_traps(rom): + TRAPS_CODE = 0x86C00 + rom.write_bytes(0x022D8, bytearray([0x22, 0x00, 0xEC, 0x10])) # org $00A2D8 : jsl score_sprites + rom.write_bytes(TRAPS_CODE + 0x0000, bytearray([0xAD, 0x00, 0x01])) # handle_traps: lda $0100 + rom.write_bytes(TRAPS_CODE + 0x0003, bytearray([0xC9, 0x14])) # cmp #$14 + rom.write_bytes(TRAPS_CODE + 0x0005, bytearray([0xD0, 0x04])) # bne .invalid + rom.write_bytes(TRAPS_CODE + 0x0007, bytearray([0xA5, 0x71])) # lda $71 + rom.write_bytes(TRAPS_CODE + 0x0009, bytearray([0xF0, 0x09])) # beq .valid + rom.write_bytes(TRAPS_CODE + 0x000B, bytearray([0xA9, 0xFF])) # .invalid lda #$FF + rom.write_bytes(TRAPS_CODE + 0x000D, bytearray([0x8D, 0x3C, 0x0F])) # sta !thwimp_index + rom.write_bytes(TRAPS_CODE + 0x0010, bytearray([0x5C, 0xBD, 0xE2, 0x00])) # jml $00E2BD + rom.write_bytes(TRAPS_CODE + 0x0014, bytearray([0xAD, 0xB4, 0x18])) # .valid lda !reverse_controls_trap + rom.write_bytes(TRAPS_CODE + 0x0017, bytearray([0xF0, 0x03])) # beq .no_reverse_controls + rom.write_bytes(TRAPS_CODE + 0x0019, bytearray([0x20, 0x2B, 0xEC])) # jsr reverse_controls_trap + rom.write_bytes(TRAPS_CODE + 0x001C, bytearray([0xAD, 0xB7, 0x18])) # .no_reverse_controls lda !thwimp_trap + rom.write_bytes(TRAPS_CODE + 0x001F, bytearray([0xF0, 0x03])) # beq .no_thwimp + rom.write_bytes(TRAPS_CODE + 0x0021, bytearray([0x20, 0x86, 0xEC])) # jsr spawn_thwimp + rom.write_bytes(TRAPS_CODE + 0x0024, bytearray([0x20, 0xCB, 0xEC])) # .no_thwimp jsr handle_thwimp + rom.write_bytes(TRAPS_CODE + 0x0027, bytearray([0x5C, 0xBD, 0xE2, 0x00])) # jml $00E2BD + rom.write_bytes(TRAPS_CODE + 0x002B, bytearray([0xA5, 0x15])) # reverse_controls_trap: lda $15 + rom.write_bytes(TRAPS_CODE + 0x002D, bytearray([0x89, 0x03])) # bit #$03 + rom.write_bytes(TRAPS_CODE + 0x002F, bytearray([0xF0, 0x04])) # beq ..no_swap_hold + rom.write_bytes(TRAPS_CODE + 0x0031, bytearray([0x49, 0x03])) # eor #$03 + rom.write_bytes(TRAPS_CODE + 0x0033, bytearray([0x85, 0x15])) # sta $15 + rom.write_bytes(TRAPS_CODE + 0x0035, bytearray([0xA5, 0x16])) # ..no_swap_hold lda $16 + rom.write_bytes(TRAPS_CODE + 0x0037, bytearray([0x89, 0x03])) # bit #$03 + rom.write_bytes(TRAPS_CODE + 0x0039, bytearray([0xF0, 0x04])) # beq ..no_swap_press + rom.write_bytes(TRAPS_CODE + 0x003B, bytearray([0x49, 0x03])) # eor #$03 + rom.write_bytes(TRAPS_CODE + 0x003D, bytearray([0x85, 0x16])) # sta $16 + rom.write_bytes(TRAPS_CODE + 0x003F, bytearray([0xA5, 0x15])) # .swap_up_and_down lda $15 + rom.write_bytes(TRAPS_CODE + 0x0041, bytearray([0x89, 0x0C])) # bit #$0C + rom.write_bytes(TRAPS_CODE + 0x0043, bytearray([0xF0, 0x04])) # beq .no_swap_hold + rom.write_bytes(TRAPS_CODE + 0x0045, bytearray([0x49, 0x0C])) # eor #$0C + rom.write_bytes(TRAPS_CODE + 0x0047, bytearray([0x85, 0x15])) # sta $15 + rom.write_bytes(TRAPS_CODE + 0x0049, bytearray([0xA5, 0x16])) # .no_swap_hold lda $16 + rom.write_bytes(TRAPS_CODE + 0x004B, bytearray([0x89, 0x0C])) # bit #$0C + rom.write_bytes(TRAPS_CODE + 0x004D, bytearray([0xF0, 0x04])) # beq ..no_swap_press + rom.write_bytes(TRAPS_CODE + 0x004F, bytearray([0x49, 0x0C])) # eor #$0C + rom.write_bytes(TRAPS_CODE + 0x0051, bytearray([0x85, 0x16])) # sta $16 + rom.write_bytes(TRAPS_CODE + 0x0053, bytearray([0xA5, 0x16])) # .swap_a_and_b lda $16 + rom.write_bytes(TRAPS_CODE + 0x0055, bytearray([0x10, 0x0C])) # bpl ..no_swap_b + rom.write_bytes(TRAPS_CODE + 0x0057, bytearray([0x49, 0x80])) # eor #$80 + rom.write_bytes(TRAPS_CODE + 0x0059, bytearray([0x85, 0x16])) # sta $16 + rom.write_bytes(TRAPS_CODE + 0x005B, bytearray([0xA5, 0x18])) # lda $18 + rom.write_bytes(TRAPS_CODE + 0x005D, bytearray([0x49, 0x80])) # eor #$80 + rom.write_bytes(TRAPS_CODE + 0x005F, bytearray([0x85, 0x18])) # sta $18 + rom.write_bytes(TRAPS_CODE + 0x0061, bytearray([0x80, 0x0E])) # bra .swap_l_and_r + rom.write_bytes(TRAPS_CODE + 0x0063, bytearray([0xA5, 0x18])) # ..no_swap_b lda $18 + rom.write_bytes(TRAPS_CODE + 0x0065, bytearray([0x10, 0x0A])) # bpl .swap_l_and_r + rom.write_bytes(TRAPS_CODE + 0x0067, bytearray([0x49, 0x80])) # eor #$80 + rom.write_bytes(TRAPS_CODE + 0x0069, bytearray([0x85, 0x18])) # sta $18 + rom.write_bytes(TRAPS_CODE + 0x006B, bytearray([0xA5, 0x16])) # lda $16 + rom.write_bytes(TRAPS_CODE + 0x006D, bytearray([0x49, 0x80])) # eor #$80 + rom.write_bytes(TRAPS_CODE + 0x006F, bytearray([0x85, 0x16])) # sta $16 + rom.write_bytes(TRAPS_CODE + 0x0071, bytearray([0xA5, 0x17])) # .swap_l_and_r lda $17 + rom.write_bytes(TRAPS_CODE + 0x0073, bytearray([0x89, 0x30])) # bit #$30 + rom.write_bytes(TRAPS_CODE + 0x0075, bytearray([0xF0, 0x04])) # beq ..no_swap_hold + rom.write_bytes(TRAPS_CODE + 0x0077, bytearray([0x49, 0x30])) # eor #$30 + rom.write_bytes(TRAPS_CODE + 0x0079, bytearray([0x85, 0x17])) # sta $17 + rom.write_bytes(TRAPS_CODE + 0x007B, bytearray([0xA5, 0x18])) # ..no_swap_hold lda $18 + rom.write_bytes(TRAPS_CODE + 0x007D, bytearray([0x89, 0x30])) # bit #$30 + rom.write_bytes(TRAPS_CODE + 0x007F, bytearray([0xF0, 0x04])) # beq ..no_swap_press + rom.write_bytes(TRAPS_CODE + 0x0081, bytearray([0x49, 0x30])) # eor #$30 + rom.write_bytes(TRAPS_CODE + 0x0083, bytearray([0x85, 0x18])) # sta $18 + rom.write_bytes(TRAPS_CODE + 0x0085, bytearray([0x60])) # ..no_swap_press rts + rom.write_bytes(TRAPS_CODE + 0x0086, bytearray([0xAE, 0x3C, 0x0F])) # spawn_thwimp: ldx !thwimp_index + rom.write_bytes(TRAPS_CODE + 0x0089, bytearray([0x10, 0x06])) # bpl .return + rom.write_bytes(TRAPS_CODE + 0x008B, bytearray([0x22, 0xE4, 0xA9, 0x02])) # jsl $02A9E4 + rom.write_bytes(TRAPS_CODE + 0x008F, bytearray([0x10, 0x01])) # bpl .found + rom.write_bytes(TRAPS_CODE + 0x0091, bytearray([0x60])) # .return rts + rom.write_bytes(TRAPS_CODE + 0x0092, bytearray([0xBB])) # .found tyx + rom.write_bytes(TRAPS_CODE + 0x0093, bytearray([0x9C, 0xB7, 0x18])) # stz !thwimp_trap + rom.write_bytes(TRAPS_CODE + 0x0096, bytearray([0xA9, 0x10])) # lda #$10 + rom.write_bytes(TRAPS_CODE + 0x0098, bytearray([0x8D, 0xF9, 0x1D])) # sta $1DF9 + rom.write_bytes(TRAPS_CODE + 0x009B, bytearray([0xA9, 0x27])) # lda #$27 + rom.write_bytes(TRAPS_CODE + 0x009D, bytearray([0x95, 0x9E])) # sta $9E,x + rom.write_bytes(TRAPS_CODE + 0x009F, bytearray([0xA9, 0x08])) # lda #$08 + rom.write_bytes(TRAPS_CODE + 0x00A1, bytearray([0x9D, 0xC8, 0x14])) # sta $14C8,x + rom.write_bytes(TRAPS_CODE + 0x00A4, bytearray([0x22, 0xD2, 0xF7, 0x07])) # jsl $07F7D2 + rom.write_bytes(TRAPS_CODE + 0x00A8, bytearray([0xA5, 0x94])) # lda $94 + rom.write_bytes(TRAPS_CODE + 0x00AA, bytearray([0x95, 0xE4])) # sta $E4,x + rom.write_bytes(TRAPS_CODE + 0x00AC, bytearray([0xA5, 0x95])) # lda $95 + rom.write_bytes(TRAPS_CODE + 0x00AE, bytearray([0x9D, 0xE0, 0x14])) # sta $14E0,x + rom.write_bytes(TRAPS_CODE + 0x00B1, bytearray([0xA5, 0x1C])) # lda $1C + rom.write_bytes(TRAPS_CODE + 0x00B3, bytearray([0x38])) # sec + rom.write_bytes(TRAPS_CODE + 0x00B4, bytearray([0xE9, 0x0F])) # sbc #$0F + rom.write_bytes(TRAPS_CODE + 0x00B6, bytearray([0x95, 0xD8])) # sta $D8,x + rom.write_bytes(TRAPS_CODE + 0x00B8, bytearray([0xA5, 0x1D])) # lda $1D + rom.write_bytes(TRAPS_CODE + 0x00BA, bytearray([0xE9, 0x00])) # sbc #$00 + rom.write_bytes(TRAPS_CODE + 0x00BC, bytearray([0x9D, 0xD4, 0x14])) # sta $14D4,x + rom.write_bytes(TRAPS_CODE + 0x00BF, bytearray([0xBD, 0x86, 0x16])) # lda $1686,x + rom.write_bytes(TRAPS_CODE + 0x00C2, bytearray([0x09, 0x80])) # ora #$80 + rom.write_bytes(TRAPS_CODE + 0x00C4, bytearray([0x9D, 0x86, 0x16])) # sta $1686,x + rom.write_bytes(TRAPS_CODE + 0x00C7, bytearray([0x8E, 0x3C, 0x0F])) # stx !thwimp_index + rom.write_bytes(TRAPS_CODE + 0x00CA, bytearray([0x60])) # rts + rom.write_bytes(TRAPS_CODE + 0x00CB, bytearray([0xAE, 0x3C, 0x0F])) # handle_thwimp: ldx !thwimp_index + rom.write_bytes(TRAPS_CODE + 0x00CE, bytearray([0x30, 0x1C])) # bmi .return + rom.write_bytes(TRAPS_CODE + 0x00D0, bytearray([0xBD, 0xD4, 0x14])) # lda $14D4,x + rom.write_bytes(TRAPS_CODE + 0x00D3, bytearray([0xEB])) # xba + rom.write_bytes(TRAPS_CODE + 0x00D4, bytearray([0xB5, 0xD8])) # lda $D8,x + rom.write_bytes(TRAPS_CODE + 0x00D6, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(TRAPS_CODE + 0x00D8, bytearray([0x38])) # sec + rom.write_bytes(TRAPS_CODE + 0x00D9, bytearray([0xE5, 0x96])) # sbc $96 + rom.write_bytes(TRAPS_CODE + 0x00DB, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(TRAPS_CODE + 0x00DD, bytearray([0x30, 0x0D])) # bmi .return + rom.write_bytes(TRAPS_CODE + 0x00DF, bytearray([0xA9, 0xFF])) # lda #$FF + rom.write_bytes(TRAPS_CODE + 0x00E1, bytearray([0x8D, 0x3C, 0x0F])) # sta !thwimp_index + rom.write_bytes(TRAPS_CODE + 0x00E4, bytearray([0xBD, 0x86, 0x16])) # lda $1686,x + rom.write_bytes(TRAPS_CODE + 0x00E7, bytearray([0x29, 0x7F])) # and #$7F + rom.write_bytes(TRAPS_CODE + 0x00E9, bytearray([0x9D, 0x86, 0x16])) # sta $1686,x + rom.write_bytes(TRAPS_CODE + 0x00EC, bytearray([0x60])) # .return rts + + + +def read_graphics_file(filename): + return pkgutil.get_data(__name__, f"data/graphics/{filename}") + +def handle_uncompressed_player_gfx(rom): + # Decompresses and moves into a expanded region the player, yoshi and animated graphics + # This should make swapping the graphics a lot easier. + # Maybe I should look into making a 32x32 version at some point... + # It also moves some 8x8 tiles in GFX00, thus making some free space for indicators and other stuff + # in VRAM during gameplay, will come super handy later. + # + # FOR FUTURE REFERENCE + # Player graphics are now located at 0xE0000 + # Player auxiliary tiles are now located at 0xE6000 + # Yoshi graphics are now located at 0xE8800 + SMW_COMPRESSED_PLAYER_GFX = 0x40000 + SMW_COMPRESSED_ANIMATED_GFX = 0x43FC0 + SMW_COMPRESSED_GFX_00 = 0x459F9 + SMW_COMPRESSED_GFX_10 = 0x4EF1E + SMW_COMPRESSED_GFX_28 = 0x5C06C + compressed_player_gfx = rom.read_bytes(SMW_COMPRESSED_PLAYER_GFX, 0x3FC0) + compressed_animated_gfx = rom.read_bytes(SMW_COMPRESSED_ANIMATED_GFX, 0x1A39) + compressed_gfx_00 = rom.read_bytes(SMW_COMPRESSED_GFX_00, 0x0838) + compressed_gfx_10 = rom.read_bytes(SMW_COMPRESSED_GFX_10, 0x0891) + compressed_gfx_28 = rom.read_bytes(SMW_COMPRESSED_GFX_28, 0x0637) + decompressed_player_gfx = decompress_gfx(compressed_player_gfx) + decompressed_animated_gfx = convert_3bpp(decompress_gfx(compressed_animated_gfx)) + decompressed_gfx_00 = convert_3bpp(decompress_gfx(compressed_gfx_00)) + decompressed_gfx_10 = convert_3bpp(decompress_gfx(compressed_gfx_10)) + decompressed_gfx_28 = decompress_gfx(compressed_gfx_28) + + # Copy berry tiles + order = [0x26C, 0x26D, 0x26E, 0x26F, + 0x27C, 0x27D, 0x27E, 0x27F, + 0x2E0, 0x2E1, 0x2E2, 0x2E3, + 0x2E4, 0x2E5, 0x2E6, 0x2E7] + decompressed_animated_gfx += copy_gfx_tiles(decompressed_player_gfx, order, [5, 32]) + + # Copy Mario's auxiliary tiles + order = [0x80, 0x91, 0x81, 0x90, 0x82, 0x83] + decompressed_gfx_00 += copy_gfx_tiles(decompressed_player_gfx, order, [5, 32]) + order = [0x69, 0x69, 0x0C, 0x69, 0x1A, 0x1B, 0x0D, 0x69, 0x22, 0x23, 0x32, 0x33, 0x0A, 0x0B, 0x20, 0x21, + 0x30, 0x31, 0x7E, 0x69, 0x80, 0x4A, 0x81, 0x5B, 0x82, 0x4B, 0x83, 0x5A, 0x84, 0x69, 0x85, 0x85] + player_small_tiles = copy_gfx_tiles(decompressed_gfx_00, order, [5, 32]) + + # Copy OW mario tiles + order = [0x06, 0x07, 0x16, 0x17, + 0x08, 0x09, 0x18, 0x19, + 0x0A, 0x0B, 0x1A, 0x1B, + 0x0C, 0x0D, 0x1C, 0x1D, + 0x0E, 0x0F, 0x1E, 0x1F, + 0x20, 0x21, 0x30, 0x31, + 0x24, 0x25, 0x34, 0x35, + 0x46, 0x47, 0x56, 0x57, + 0x64, 0x65, 0x74, 0x75, + 0x66, 0x67, 0x76, 0x77, + 0x2E, 0x2F, 0x3E, 0x3F, + 0x40, 0x41, 0x50, 0x51, + 0x42, 0x43, 0x52, 0x53] + player_map_tiles = copy_gfx_tiles(decompressed_gfx_10, order, [5, 32]) + + # Copy HUD mario tiles + order = [0x30, 0x31, 0x32, 0x33, 0x34] + player_name_tiles = copy_gfx_tiles(decompressed_gfx_28, order, [4, 16]) + + rom.write_bytes(0xE0000, decompressed_player_gfx) + rom.write_bytes(0xE8000, decompressed_animated_gfx) + rom.write_bytes(0xE6000, player_small_tiles) + rom.write_bytes(0xE6400, player_map_tiles) + rom.write_bytes(0xE6C00, player_name_tiles) + + # Skip Player & Animated tile decompression + rom.write_bytes(0x03888, bytearray([0x60])) # RTS + + # Edit Mario DMA routine + MARIO_GFX_DMA_ADDR = 0x02300 + rom.write_bytes(MARIO_GFX_DMA_ADDR + 0x0000, bytearray([0xA2, 0x04])) # LDX #$04 + rom.write_bytes(MARIO_GFX_DMA_ADDR + 0x0002, bytearray([0x22, 0x00, 0xF0, 0x10])) # JSL $10F000 ; upload_score_sprite_gfx + rom.write_bytes(MARIO_GFX_DMA_ADDR + 0x0006, bytearray([0x22, 0x00, 0xF8, 0x0F])) # JSL $0FF800 ; player_code + rom.write_bytes(MARIO_GFX_DMA_ADDR + 0x000A, bytearray([0x60])) # RTS + + PLAYER_UPLOAD_ADDR = 0x7F800 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0000, bytearray([0xC2, 0x20])) # player_code: rep #$20 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0002, bytearray([0xAC, 0x84, 0x0D])) # ldy $0D84 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0005, bytearray([0xD0, 0x03])) # bne .upload_player_palette + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0007, bytearray([0x4C, 0xD2, 0xF8])) # jmp .skip_everything + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x000A, bytearray([0xA0, 0x86])) # .upload_player_palette ldy #$86 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x000C, bytearray([0x8C, 0x21, 0x21])) # sty $2121 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x000F, bytearray([0xA9, 0x00, 0x22])) # lda #$2200 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0012, bytearray([0x8D, 0x20, 0x43])) # sta $4320 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0015, bytearray([0xA8])) # tay + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0016, bytearray([0xAD, 0x82, 0x0D])) # lda $0D82 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0019, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x001C, bytearray([0x8C, 0x24, 0x43])) # sty $4324 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x001F, bytearray([0xA9, 0x14, 0x00])) # lda #$0014 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0022, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0025, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0028, bytearray([0xA0, 0x80])) # ldy #$80 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x002A, bytearray([0x8C, 0x15, 0x21])) # sty $2115 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x002D, bytearray([0xA9, 0x01, 0x18])) # lda #$1801 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0030, bytearray([0x8D, 0x20, 0x43])) # sta $4320 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0033, bytearray([0xA0, 0x1C])) # ldy.b #player_gfx>>16 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0035, bytearray([0x8C, 0x24, 0x43])) # sty $4324 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0038, bytearray([0xA9, 0x00, 0x60])) # .upload_player_top lda #$6000 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x003B, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x003E, bytearray([0xA8])) # tay + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x003F, bytearray([0xB9, 0x85, 0x0D])) # - lda $0D85,y + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0042, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0045, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0048, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x004B, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x004E, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x004F, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0050, bytearray([0xC0, 0x06])) # cpy #$06 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0052, bytearray([0xD0, 0xEB])) # bne - + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0054, bytearray([0xA9, 0x00, 0x61])) # .upload_player_bottom lda #$6100 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0057, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x005A, bytearray([0xA8])) # tay + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x005B, bytearray([0xB9, 0x8F, 0x0D])) # - lda $0D8F,y + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x005E, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0061, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0064, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0067, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x006A, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x006B, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x006C, bytearray([0xC0, 0x06])) # cpy #$06 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x006E, bytearray([0xD0, 0xEB])) # bne - + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0070, bytearray([0xAC, 0x9B, 0x0D])) # .upload_player_extended ldy $0D9B + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0073, bytearray([0xC0, 0x02])) # cpy #$02 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0075, bytearray([0xF0, 0x5B])) # beq .skip_everything + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0077, bytearray([0xA9, 0xC0, 0x60])) # lda #$60C0 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x007A, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x007D, bytearray([0xAD, 0x99, 0x0D])) # lda $0D99 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0080, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0083, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0086, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0089, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x008C, bytearray([0xA0, 0x1D])) # .upload_misc_tiles ldy.b #animated_tiles>>16 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x008E, bytearray([0x8C, 0x24, 0x43])) # sty $4324 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0091, bytearray([0xA9, 0x60, 0x60])) # lda #$6060 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0094, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0097, bytearray([0xA0, 0x06])) # ldy #$06 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x0099, bytearray([0xCC, 0x84, 0x0D])) # cpy $0D84 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x009C, bytearray([0xB0, 0x34])) # bcs .skip_everything + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x009E, bytearray([0xB9, 0x85, 0x0D])) # - lda $0D85,y + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00A1, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00A4, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00A7, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00AA, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00AD, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00AE, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00AF, bytearray([0xCC, 0x84, 0x0D])) # cpy $0D84 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00B2, bytearray([0x90, 0xEA])) # bcc - + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00B4, bytearray([0xA9, 0x60, 0x61])) # lda #$6160 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00B7, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00BA, bytearray([0xA0, 0x06])) # ldy #$06 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00BC, bytearray([0xB9, 0x8F, 0x0D])) # - lda $0D8F,y + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00BF, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00C2, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00C5, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00C8, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00CB, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00CC, bytearray([0xC8])) # iny + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00CD, bytearray([0xCC, 0x84, 0x0D])) # cpy $0D84 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00D0, bytearray([0x90, 0xEA])) # bcc - + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00D2, bytearray([0xE2, 0x20])) # .skip_everything sep #$20 + rom.write_bytes(PLAYER_UPLOAD_ADDR + 0x00D4, bytearray([0x6B])) # rtl + + # Obtain data for new 8x8 tile + CHAR_TILE_CODE_ADDR = 0x05FE2 + rom.write_bytes(0x063B1, bytearray([0x20, 0xE2, 0xDF])) # jsr $DFE2 + rom.write_bytes(CHAR_TILE_CODE_ADDR + 0x0000, bytearray([0xB9, 0x1A, 0xDF])) # lda $DF1A,y + rom.write_bytes(CHAR_TILE_CODE_ADDR + 0x0003, bytearray([0x10, 0x06])) # bpl $06 + rom.write_bytes(CHAR_TILE_CODE_ADDR + 0x0005, bytearray([0x29, 0x7F])) # and #$7F + rom.write_bytes(CHAR_TILE_CODE_ADDR + 0x0007, bytearray([0x85, 0x0D])) # sta $0D + rom.write_bytes(CHAR_TILE_CODE_ADDR + 0x0009, bytearray([0xA9, 0x04])) # lda #$04 + rom.write_bytes(CHAR_TILE_CODE_ADDR + 0x000B, bytearray([0x60])) # rts + + rom.write_bytes(0x0640D, bytearray([0x20, 0xEE, 0xDF])) # jsr $DFEE + CAPE_TILE_CODE_ADDR = 0x05FEE + rom.write_bytes(CAPE_TILE_CODE_ADDR + 0x0000, bytearray([0xA5, 0x0D])) # lda $0D + rom.write_bytes(CAPE_TILE_CODE_ADDR + 0x0002, bytearray([0xE0, 0x2B])) # cpx #$2B + rom.write_bytes(CAPE_TILE_CODE_ADDR + 0x0004, bytearray([0x90, 0x07])) # bcc $07 + rom.write_bytes(CAPE_TILE_CODE_ADDR + 0x0006, bytearray([0xE0, 0x40])) # cpx #$40 + rom.write_bytes(CAPE_TILE_CODE_ADDR + 0x0008, bytearray([0xB0, 0x03])) # bcs $03 + rom.write_bytes(CAPE_TILE_CODE_ADDR + 0x000A, bytearray([0xBD, 0xD7, 0xE1])) # lda $E1D7,x + rom.write_bytes(CAPE_TILE_CODE_ADDR + 0x000D, bytearray([0x60])) # rts + + # Edit Mario's 8x8 tile data + MARIO_AUX_TILE_DATA_ADDR = 0x05F1A + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0000, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0008, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0010, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0018, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0020, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0028, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0030, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0038, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0040, bytearray([0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0048, bytearray([0x00,0x00,0x82,0x82,0x82,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0050, bytearray([0x00,0x00,0x84,0x00,0x00,0x00,0x00,0x86])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0058, bytearray([0x86,0x86,0x00,0x00,0x88,0x88,0x8A,0x8A])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0060, bytearray([0x8C,0x8C,0x00,0x00,0x90,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0068, bytearray([0x00,0x8E,0x00,0x00,0x00,0x00,0x92,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0070, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0078, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0080, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0088, bytearray([0x82,0x82,0x00,0x00,0x00,0x00,0x00,0x84])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0090, bytearray([0x00,0x00,0x00,0x00,0x86,0x86,0x86,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x0098, bytearray([0x00,0x88,0x88,0x8A,0x8A,0x8C,0x8C,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x00A0, bytearray([0x00,0x90,0x00,0x00,0x00,0x00,0x8E,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x00A8, bytearray([0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x00B0, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + rom.write_bytes(MARIO_AUX_TILE_DATA_ADDR + 0x00B8, bytearray([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00])) + + MARIO_AUX_TILE_OFFSETS_ADDR = 0x05FDA # ends at $00E00C + rom.write_bytes(MARIO_AUX_TILE_OFFSETS_ADDR + 0x0000, bytearray([0x00,0x02,0x80,0x80,0x00,0x02,0x0C,0x0D])) + rom.write_bytes(MARIO_AUX_TILE_OFFSETS_ADDR + 0x0022, bytearray([0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x02])) + rom.write_bytes(MARIO_AUX_TILE_OFFSETS_ADDR + 0x002A, bytearray([0x02,0x80,0x04,0x0C,0x0D,0xFF,0xFF,0xFF])) + + MARIO_AUX_CAPE_TILE_DATA_ADDR = 0x061FF + rom.write_bytes(MARIO_AUX_CAPE_TILE_DATA_ADDR + 0x0000, bytearray([0x00,0x8C,0x14,0x14,0x2E])) + rom.write_bytes(MARIO_AUX_CAPE_TILE_DATA_ADDR + 0x0005, bytearray([0x00,0xCA,0x16,0x16,0x2E])) + rom.write_bytes(MARIO_AUX_CAPE_TILE_DATA_ADDR + 0x000A, bytearray([0x00,0x8E,0x18,0x18,0x2E])) + rom.write_bytes(MARIO_AUX_CAPE_TILE_DATA_ADDR + 0x000F, bytearray([0x00,0xEB,0x1A,0x1A,0x2E])) + rom.write_bytes(MARIO_AUX_CAPE_TILE_DATA_ADDR + 0x0014, bytearray([0x04,0xED,0x1C,0x1C])) + + # Edit player data offsets + rom.write_bytes(0x07649, bytearray([0x69, 0x00, 0x80])) # adc #$8000 + rom.write_bytes(0x07667, bytearray([0x69, 0x00, 0x80])) # adc #$8000 + rom.write_bytes(0x0767C, bytearray([0x69, 0x00, 0x80])) # adc #$8000 + rom.write_bytes(0x07691, bytearray([0x69, 0x00, 0xE0])) # adc #$E000 + + # Fix berries + FIX_BERRIES_ADDR = 0x7FFE0 + rom.write_bytes(FIX_BERRIES_ADDR + 0x0000, bytearray([0xA0, 0x1D])) # fix_berries: ldy.b #animated_tiles>>16 + rom.write_bytes(FIX_BERRIES_ADDR + 0x0002, bytearray([0x8C, 0x24, 0x43])) # sty $4324 + rom.write_bytes(FIX_BERRIES_ADDR + 0x0005, bytearray([0xAD, 0x76, 0x0D])) # lda $0D76 + rom.write_bytes(FIX_BERRIES_ADDR + 0x0008, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(FIX_BERRIES_ADDR + 0x000B, bytearray([0x6B])) # rtl + + # Fix animated graphics + rom.write_bytes(0x018D1, bytearray([0x1D])) # db $1D + rom.write_bytes(0x0239E, bytearray([0x1D])) # db $1D + + rom.write_bytes(0x023F0, bytearray([0x22, 0xE0, 0xFF, 0x0F])) # jsl $0FFFE0 + rom.write_bytes(0x023F4, bytearray([0xEA])) # nop + rom.write_bytes(0x023F5, bytearray([0xEA])) # nop + + rom.write_bytes(0x0E1A8, bytearray([0x69, 0x00, 0x88])) # adc #$8800 + rom.write_bytes(0x0EEB4, bytearray([0x69, 0x00, 0x88])) # adc #$8800 + rom.write_bytes(0x0EEC9, bytearray([0x69, 0x00, 0x88])) # adc #$8800 + rom.write_bytes(0x16A3E, bytearray([0x69, 0x00, 0x88])) # adc #$8800 + + ANIMATED_TILE_DATA_ADDR = 0x2B999 + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0000, bytearray([0x00,0x98,0x00,0x9A,0x00,0x9C,0x00,0x9E])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0008, bytearray([0x80,0x98,0x80,0x9A,0x80,0x9C,0x80,0x9E])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0010, bytearray([0x00,0x99,0x00,0x99,0x00,0x99,0x00,0x99])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0018, bytearray([0x80,0xA0,0x80,0xA2,0x80,0xA4,0x80,0xA6])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0020, bytearray([0x00,0x99,0x00,0x9B,0x00,0x9D,0x00,0x9F])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0028, bytearray([0x00,0xB0,0x80,0xB0,0x00,0xB1,0x80,0xB1])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0030, bytearray([0x20,0xAF,0x20,0xAF,0x20,0xAF,0x20,0xAF])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0038, bytearray([0x20,0xAF,0x20,0xAF,0x20,0xAF,0x20,0xAF])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0040, bytearray([0x80,0x96,0x80,0x96,0x80,0x96,0x80,0x96])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0048, bytearray([0x00,0xA7,0x80,0xA7,0x00,0xA7,0x80,0xA7])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0050, bytearray([0x20,0xAF,0x20,0xAF,0x20,0xAF,0x20,0xAF])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0058, bytearray([0x00,0xAF,0x00,0xAF,0x00,0xAF,0x00,0xAF])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0060, bytearray([0x00,0x94,0x00,0x94,0x00,0x94,0x00,0x94])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0068, bytearray([0x80,0x99,0x80,0x9B,0x80,0x9D,0x80,0x9F])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0070, bytearray([0x00,0xA0,0x00,0xA2,0x00,0xA4,0x00,0xA6])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0078, bytearray([0x80,0x91,0x80,0x93,0x80,0x95,0x80,0x97])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0080, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0088, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0090, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0098, bytearray([0x00,0xA0,0x00,0xA2,0x00,0xA4,0x00,0xA6])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00A0, bytearray([0x80,0x91,0x80,0x93,0x80,0x95,0x80,0x97])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00A8, bytearray([0x00,0x80,0x00,0x82,0x00,0x84,0x00,0x86])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00B0, bytearray([0x00,0x86,0x00,0x84,0x00,0x82,0x00,0x80])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00B8, bytearray([0x00,0xA1,0x00,0xA3,0x00,0xA5,0x00,0xA3])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00C0, bytearray([0x00,0xA0,0x00,0xA2,0x00,0xA4,0x00,0xA6])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00C8, bytearray([0x00,0xA8,0x00,0xAA,0x00,0xAC,0x00,0xAE])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00D0, bytearray([0x80,0xA8,0x80,0xAA,0x80,0xAC,0x80,0xAE])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00D8, bytearray([0x80,0xAE,0x80,0xAC,0x80,0xAA,0x80,0xA8])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00E0, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00E8, bytearray([0x80,0xA1,0x80,0xA3,0x80,0xA5,0x80,0xA3])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00F0, bytearray([0x80,0x80,0x80,0x82,0x80,0x84,0x80,0x86])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x00F8, bytearray([0x00,0x81,0x00,0x83,0x00,0x85,0x00,0x87])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0100, bytearray([0x80,0x81,0x80,0x83,0x80,0x85,0x80,0x87])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0108, bytearray([0x80,0x86,0x80,0x84,0x80,0x82,0x80,0x80])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0110, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0118, bytearray([0x80,0xA9,0x80,0xAB,0x80,0xAD,0x80,0xAB])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0120, bytearray([0x00,0x91,0x00,0x93,0x00,0x95,0x00,0x97])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0128, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0130, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0138, bytearray([0x80,0xA1,0x80,0xA3,0x80,0xA5,0x80,0xA3])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0140, bytearray([0x00,0xA9,0x00,0xAB,0x00,0xAD,0x00,0xAB])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0148, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0150, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0158, bytearray([0x00,0x98,0x00,0x98,0x00,0x98,0x00,0x98])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0160, bytearray([0x80,0x94,0x80,0x94,0x80,0x94,0x80,0x94])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0168, bytearray([0x80,0x99,0x80,0x9B,0x80,0x9D,0x80,0x9F])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0170, bytearray([0x80,0x99,0x80,0x9B,0x80,0x9D,0x80,0x9F])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0178, bytearray([0x80,0x99,0x80,0x9B,0x80,0x9D,0x80,0x9F])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0180, bytearray([0x00,0x98,0x00,0x9A,0x00,0x9C,0x00,0x9E])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0188, bytearray([0x80,0xAF,0x80,0xAF,0x80,0xAF,0x80,0xAF])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0190, bytearray([0x00,0x96,0x00,0x96,0x00,0x96,0x00,0x96])) + rom.write_bytes(ANIMATED_TILE_DATA_ADDR + 0x0198, bytearray([0x80,0x96,0x80,0x96,0x80,0x96,0x80,0x96])) + + # Insert hand drawn graphics for in level indicators + rom.write_bytes(0xE7000, read_graphics_file("indicators.bin")) + # Upload indicator GFX + UPLOAD_INDICATOR_GFX = 0x87000 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0000, bytearray([0xAD, 0x00, 0x01])) # upload_score_sprite_gfx: lda $0100 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0003, bytearray([0xC9, 0x13])) # cmp #$13 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0005, bytearray([0xF0, 0x03])) # beq .check_level + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0007, bytearray([0x4C, 0x9D, 0xF0])) # jmp .check_map + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x000A, bytearray([0xA5, 0x7C])) # .check_level lda $7C + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x000C, bytearray([0xF0, 0x03])) # beq ..perform + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x000E, bytearray([0x4C, 0x9C, 0xF0])) # jmp .skip + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0011, bytearray([0xE6, 0x7C])) # ..perform inc $7C + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0013, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0015, bytearray([0xA0, 0x80])) # ldy #$80 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0017, bytearray([0x8C, 0x15, 0x21])) # sty $2115 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x001A, bytearray([0xA9, 0x01, 0x18])) # lda #$1801 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x001D, bytearray([0x8D, 0x20, 0x43])) # sta $4320 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0020, bytearray([0xA0, 0x1C])) # ldy.b #$1C + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0022, bytearray([0x8C, 0x24, 0x43])) # sty $4324 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0025, bytearray([0xA9, 0x00, 0xF0])) # lda.w #$F000 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0028, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x002B, bytearray([0xA9, 0xA0, 0x64])) # .nums_01 lda #$64A0 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x002E, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0031, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0034, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0037, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x003A, bytearray([0xA9, 0xA0, 0x65])) # .nums_35 lda #$65A0 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x003D, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0040, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0043, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0046, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0049, bytearray([0xA9, 0xA0, 0x61])) # .plus_coin lda #$61A0 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x004C, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x004F, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0052, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0055, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0058, bytearray([0xA9, 0xA0, 0x60])) # .egg_mushroom lda #$60A0 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x005B, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x005E, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0061, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0064, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0067, bytearray([0xA9, 0xE0, 0x67])) # .thwimp lda #$67E0 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x006A, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x006D, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0070, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0073, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0076, bytearray([0xA9, 0x80, 0x63])) # .token lda #$6380 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0079, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x007C, bytearray([0xA9, 0x20, 0x00])) # lda #$0020 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x007F, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0082, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0085, bytearray([0xA9, 0x00, 0xEC])) # .layer_3 lda #$EC00 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0088, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x008B, bytearray([0xA9, 0x80, 0x41])) # lda #$4180 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x008E, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0091, bytearray([0xA9, 0x50, 0x00])) # lda #$0050 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0094, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0097, bytearray([0x8E, 0x0B, 0x42])) # stx $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x009A, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x009C, bytearray([0x6B])) # .skip rtl + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x009D, bytearray([0xC9, 0x0E])) # .check_map cmp #$0E + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x009F, bytearray([0xF0, 0x51])) # beq .map_pal + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00A1, bytearray([0xC9, 0x0D])) # cmp #$0D + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00A3, bytearray([0xD0, 0xF7])) # bne .skip + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00A5, bytearray([0xA5, 0x7C])) # lda $7C + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00A7, bytearray([0xD0, 0xF3])) # bne .skip + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00A9, bytearray([0xE6, 0x7C])) # inc $7C + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00AB, bytearray([0xC2, 0x20])) # rep #$20 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00AD, bytearray([0xA0, 0x80])) # ldy #$80 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00AF, bytearray([0x8C, 0x15, 0x21])) # sty $2115 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00B2, bytearray([0xA9, 0x01, 0x18])) # lda #$1801 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00B5, bytearray([0x8D, 0x20, 0x43])) # sta $4320 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00B8, bytearray([0xA0, 0x1C])) # ldy.b #$1C + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00BA, bytearray([0x8C, 0x24, 0x43])) # sty $4324 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00BD, bytearray([0xA9, 0x00, 0xE4])) # lda.w #$E400 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00C0, bytearray([0x8D, 0x22, 0x43])) # sta $4322 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00C3, bytearray([0xDA])) # phx + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00C4, bytearray([0x9B])) # txy + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00C5, bytearray([0xA2, 0x18])) # ldx.b #(.map_targets_end-.map_targets-1)*2 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00C7, bytearray([0xA9, 0x40, 0x00])) # ..loop lda #$0040 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00CA, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00CD, bytearray([0xBF, 0x80, 0xFF, 0x10])) # lda.l .map_targets,x + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00D1, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00D4, bytearray([0x8C, 0x0B, 0x42])) # sty $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00D7, bytearray([0xBF, 0x80, 0xFF, 0x10])) # lda.l .map_targets,x + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00DB, bytearray([0x18])) # clc + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00DC, bytearray([0x69, 0x00, 0x01])) # adc #$0100 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00DF, bytearray([0x8D, 0x16, 0x21])) # sta $2116 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00E2, bytearray([0xA9, 0x40, 0x00])) # lda #$0040 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00E5, bytearray([0x8D, 0x25, 0x43])) # sta $4325 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00E8, bytearray([0x8C, 0x0B, 0x42])) # sty $420B + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00EB, bytearray([0xCA])) # dex + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00EC, bytearray([0xCA])) # dex + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00ED, bytearray([0x10, 0xD8])) # bpl .loop + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00EF, bytearray([0xFA])) # plx + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00F0, bytearray([0xE2, 0x20])) # sep #$20 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00F2, bytearray([0xA9, 0xA3])) # .map_pal lda #$A3 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00F4, bytearray([0x8D, 0x21, 0x21])) # sta $2121 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00F7, bytearray([0xAF, 0x9C, 0xB5, 0x00])) # lda $00B59C + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00FB, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x00FE, bytearray([0xAF, 0x9D, 0xB5, 0x00])) # lda $00B59D + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0102, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0105, bytearray([0xAF, 0x9E, 0xB5, 0x00])) # lda $00B59E + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0109, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x010C, bytearray([0xAF, 0x9F, 0xB5, 0x00])) # lda $00B59F + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0110, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0113, bytearray([0xAF, 0xA0, 0xB5, 0x00])) # lda $00B5A0 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0117, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x011A, bytearray([0xAF, 0xA1, 0xB5, 0x00])) # lda $00B5A1 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x011E, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0121, bytearray([0xAF, 0xA2, 0xB5, 0x00])) # lda $00B5A2 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0125, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0128, bytearray([0xAF, 0xA3, 0xB5, 0x00])) # lda $00B5A3 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x012C, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x012F, bytearray([0xAF, 0xA4, 0xB5, 0x00])) # lda $00B5A4 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0133, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x0136, bytearray([0xAF, 0xA5, 0xB5, 0x00])) # lda $00B5A5 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x013A, bytearray([0x8D, 0x22, 0x21])) # sta $2122 + rom.write_bytes(UPLOAD_INDICATOR_GFX + 0x013D, bytearray([0x6B])) # rtl + + vram_targets = bytearray([ + 0x20,0x64, 0x00,0x64, 0xE0,0x62, + 0x60,0x66, 0x40,0x66, + 0x60,0x64, + 0x40,0x62, 0x00,0x62, + 0xE0,0x60, 0xC0,0x60, 0xA0,0x60, 0x80,0x60, 0x60,0x60 + ]) + rom.write_bytes(0x87F80, vram_targets) + +def decompress_gfx(compressed_graphics): + # This code decompresses graphics in LC_LZ2 format in order to be able to swap player and yoshi's graphics with ease. + decompressed_gfx = bytearray([]) + i = 0 + while True: + cmd = compressed_graphics[i] + i += 1 + if cmd == 0xFF: + break + else: + if (cmd >> 5) == 0x07: + size = ((cmd & 0x03) << 8) + compressed_graphics[i] + 1 + cmd = (cmd & 0x1C) >> 2 + i += 1 + else: + size = (cmd & 0x1F) + 1 + cmd = cmd >> 5 + if cmd == 0x00: + decompressed_gfx += bytearray([compressed_graphics[i+j] for j in range(size)]) + i += size + elif cmd == 0x01: + byte_fill = compressed_graphics[i] + i += 1 + decompressed_gfx += bytearray([byte_fill for j in range(size)]) + elif cmd == 0x02: + byte_fill_1 = compressed_graphics[i] + i += 1 + byte_fill_2 = compressed_graphics[i] + i += 1 + for j in range(size): + if (j & 0x1) == 0x00: + decompressed_gfx += bytearray([byte_fill_1]) + else: + decompressed_gfx += bytearray([byte_fill_2]) + elif cmd == 0x03: + byte_read = compressed_graphics[i] + i += 1 + decompressed_gfx += bytearray([(byte_read + j) for j in range(size)]) + elif cmd == 0x04: + position = (compressed_graphics[i] << 8) + compressed_graphics[i+1] + i += 2 + for j in range(size): + copy_byte = decompressed_gfx[position+j] + decompressed_gfx += bytearray([copy_byte]) + return decompressed_gfx + + +def convert_3bpp(decompressed_gfx): + i = 0 + converted_gfx = bytearray([]) + while i < len(decompressed_gfx): + converted_gfx += bytearray([decompressed_gfx[i+j] for j in range(16)]) + i += 16 + for j in range(8): + converted_gfx += bytearray([decompressed_gfx[i]]) + converted_gfx += bytearray([0x00]) + i += 1 + return converted_gfx + + +def copy_gfx_tiles(original, order, size): + result = bytearray([]) + for x in range(len(order)): + z = order[x] << size[0] + result += bytearray([original[z+y] for y in range(size[1])]) + return result + + +def file_to_bytes(filename): + return open(os.path.dirname(__file__)+filename, "rb").read() + + +def handle_music_shuffle(rom, world: World): from .Aesthetics import generate_shuffled_level_music, generate_shuffled_ow_music, level_music_address_data, ow_music_address_data - shuffled_level_music = generate_shuffled_level_music(world, player) + shuffled_level_music = generate_shuffled_level_music(world) for i in range(len(shuffled_level_music)): rom.write_byte(level_music_address_data[i], shuffled_level_music[i]) - shuffled_ow_music = generate_shuffled_ow_music(world, player) + shuffled_ow_music = generate_shuffled_ow_music(world) for i in range(len(shuffled_ow_music)): for addr in ow_music_address_data[i]: rom.write_byte(addr, shuffled_ow_music[i]) -def handle_mario_palette(rom, world, player): +def handle_mario_palette(rom, world: World): from .Aesthetics import mario_palettes, fire_mario_palettes, ow_mario_palettes - chosen_palette = world.mario_palette[player].value + chosen_palette = world.options.mario_palette.value rom.write_bytes(0x32C8, bytes(mario_palettes[chosen_palette])) rom.write_bytes(0x32F0, bytes(fire_mario_palettes[chosen_palette])) @@ -723,9 +2836,9 @@ def handle_swap_donut_gh_exits(rom): rom.write_bytes(0x26371, bytes([0x32])) -def handle_bowser_rooms(rom, world, player: int): - if world.bowser_castle_rooms[player] == "random_two_room": - chosen_rooms = world.per_slot_randoms[player].sample(standard_bowser_rooms, 2) +def handle_bowser_rooms(rom, world: World): + if world.options.bowser_castle_rooms == "random_two_room": + chosen_rooms = world.random.sample(standard_bowser_rooms, 2) rom.write_byte(0x3A680, chosen_rooms[0].roomID) rom.write_byte(0x3A684, chosen_rooms[0].roomID) @@ -737,8 +2850,8 @@ def handle_bowser_rooms(rom, world, player: int): rom.write_byte(chosen_rooms[len(chosen_rooms)-1].exitAddress, 0xBD) - elif world.bowser_castle_rooms[player] == "random_five_room": - chosen_rooms = world.per_slot_randoms[player].sample(standard_bowser_rooms, 5) + elif world.options.bowser_castle_rooms == "random_five_room": + chosen_rooms = world.random.sample(standard_bowser_rooms, 5) rom.write_byte(0x3A680, chosen_rooms[0].roomID) rom.write_byte(0x3A684, chosen_rooms[0].roomID) @@ -750,9 +2863,9 @@ def handle_bowser_rooms(rom, world, player: int): rom.write_byte(chosen_rooms[len(chosen_rooms)-1].exitAddress, 0xBD) - elif world.bowser_castle_rooms[player] == "gauntlet": + elif world.options.bowser_castle_rooms == "gauntlet": chosen_rooms = standard_bowser_rooms.copy() - world.per_slot_randoms[player].shuffle(chosen_rooms) + world.random.shuffle(chosen_rooms) rom.write_byte(0x3A680, chosen_rooms[0].roomID) rom.write_byte(0x3A684, chosen_rooms[0].roomID) @@ -763,12 +2876,12 @@ def handle_bowser_rooms(rom, world, player: int): rom.write_byte(chosen_rooms[i-1].exitAddress, chosen_rooms[i].roomID) rom.write_byte(chosen_rooms[len(chosen_rooms)-1].exitAddress, 0xBD) - elif world.bowser_castle_rooms[player] == "labyrinth": + elif world.options.bowser_castle_rooms == "labyrinth": bowser_rooms_copy = full_bowser_rooms.copy() entrance_point = bowser_rooms_copy.pop(0) - world.per_slot_randoms[player].shuffle(bowser_rooms_copy) + world.random.shuffle(bowser_rooms_copy) rom.write_byte(entrance_point.exitAddress, bowser_rooms_copy[0].roomID) for i in range(0, len(bowser_rooms_copy) - 1): @@ -777,13 +2890,13 @@ def handle_bowser_rooms(rom, world, player: int): rom.write_byte(bowser_rooms_copy[len(bowser_rooms_copy)-1].exitAddress, 0xBD) -def handle_boss_shuffle(rom, world, player): - if world.boss_shuffle[player] == "simple": +def handle_boss_shuffle(rom, world: World): + if world.options.boss_shuffle == "simple": submap_boss_rooms_copy = submap_boss_rooms.copy() ow_boss_rooms_copy = ow_boss_rooms.copy() - world.per_slot_randoms[player].shuffle(submap_boss_rooms_copy) - world.per_slot_randoms[player].shuffle(ow_boss_rooms_copy) + world.random.shuffle(submap_boss_rooms_copy) + world.random.shuffle(ow_boss_rooms_copy) for i in range(len(submap_boss_rooms_copy)): rom.write_byte(submap_boss_rooms[i].exitAddress, submap_boss_rooms_copy[i].roomID) @@ -794,21 +2907,21 @@ def handle_boss_shuffle(rom, world, player): if ow_boss_rooms[i].exitAddressAlt is not None: rom.write_byte(ow_boss_rooms[i].exitAddressAlt, ow_boss_rooms_copy[i].roomID) - elif world.boss_shuffle[player] == "full": + elif world.options.boss_shuffle == "full": for i in range(len(submap_boss_rooms)): - chosen_boss = world.per_slot_randoms[player].choice(submap_boss_rooms) + chosen_boss = world.random.choice(submap_boss_rooms) rom.write_byte(submap_boss_rooms[i].exitAddress, chosen_boss.roomID) for i in range(len(ow_boss_rooms)): - chosen_boss = world.per_slot_randoms[player].choice(ow_boss_rooms) + chosen_boss = world.random.choice(ow_boss_rooms) rom.write_byte(ow_boss_rooms[i].exitAddress, chosen_boss.roomID) if ow_boss_rooms[i].exitAddressAlt is not None: rom.write_byte(ow_boss_rooms[i].exitAddressAlt, chosen_boss.roomID) - elif world.boss_shuffle[player] == "singularity": - chosen_submap_boss = world.per_slot_randoms[player].choice(submap_boss_rooms) - chosen_ow_boss = world.per_slot_randoms[player].choice(ow_boss_rooms) + elif world.options.boss_shuffle == "singularity": + chosen_submap_boss = world.random.choice(submap_boss_rooms) + chosen_ow_boss = world.random.choice(ow_boss_rooms) for i in range(len(submap_boss_rooms)): rom.write_byte(submap_boss_rooms[i].exitAddress, chosen_submap_boss.roomID) @@ -820,8 +2933,8 @@ def handle_boss_shuffle(rom, world, player): rom.write_byte(ow_boss_rooms[i].exitAddressAlt, chosen_ow_boss.roomID) -def patch_rom(world, rom, player, active_level_dict): - goal_text = generate_goal_text(world, player) +def patch_rom(world: World, rom, player, active_level_dict): + goal_text = generate_goal_text(world) rom.write_bytes(0x2A6E2, goal_text) rom.write_byte(0x2B1D8, 0x80) @@ -829,19 +2942,23 @@ def patch_rom(world, rom, player, active_level_dict): intro_text = generate_text_box("Bowser has stolen all of Mario's abilities. Can you help Mario travel across Dinosaur land to get them back and save the Princess from him?") rom.write_bytes(0x2A5D9, intro_text) - handle_bowser_rooms(rom, world, player) - handle_boss_shuffle(rom, world, player) + handle_bowser_rooms(rom, world) + handle_boss_shuffle(rom, world) + + # Handle ROM expansion + rom.write_bytes(0x07FD7, bytearray([0x0A])) + rom.write_bytes(0x80000, bytearray([0x00 for _ in range(0x80000)])) # Prevent Title Screen Deaths rom.write_byte(0x1C6A, 0x80) # Title Screen Text player_name_bytes = bytearray() - player_name = world.get_player_name(player) + player_name = world.multiworld.get_player_name(player) for i in range(16): char = " " if i < len(player_name): - char = world.get_player_name(player)[i] + char = player_name[i] upper_char = char.upper() if upper_char not in title_text_mapping: for byte in title_text_mapping["."]: @@ -869,33 +2986,58 @@ def patch_rom(world, rom, player, active_level_dict): rom.write_bytes(0x2B88E, bytearray([0x2C, 0x31, 0x73, 0x31, 0x75, 0x31, 0x82, 0x30, 0x30, 0x31, 0xFC, 0x38, 0x31, 0x31, 0x73, 0x31, 0x73, 0x31, 0x7C, 0x30, 0xFC, 0x38, 0xFC, 0x38, 0xFC, 0x38])) # 1 Player Game - rom.write_bytes(0x2B6D7, bytearray([0xFC, 0x38, 0xFC, 0x38, 0x16, 0x38, 0x18, 0x38, 0x0D, 0x38, 0xFC, 0x38, 0x0B, 0x38, 0x22, 0x38, + rom.write_bytes(0x2B6D7, bytearray([0x16, 0x38, 0x18, 0x38, 0x0D, 0x38, 0xFC, 0x38, 0x0B, 0x38, 0x22, 0x38, 0xFC, 0x38, 0x19, 0x38, 0x18, 0x38, 0x1B, 0x38, 0x22, 0x38, 0x10, 0x38, 0x18, 0x38, 0x17, 0x38, - 0x0E, 0x38, 0xFC, 0x38, 0xFC, 0x38])) # Mod by PoryGone + 0x0E, 0x38, 0xFC, 0x38, 0x15, 0x38, 0x21, 0x38, 0x05, 0x38])) # Mod by PoryGone + lx5 # Title Options rom.write_bytes(0x1E6A, bytearray([0x01])) rom.write_bytes(0x1E6C, bytearray([0x01])) rom.write_bytes(0x1E6E, bytearray([0x01])) + # Save current level number to RAM (not translevel) + rom.write_bytes(0x2D8B9, bytearray([0x20, 0x46, 0xDC])) # org $05D8B9 : jsr level_num + rom.write_bytes(0x2DC46 + 0x0000, bytearray([0xA5, 0x0E])) # level_num: lda $0E + rom.write_bytes(0x2DC46 + 0x0002, bytearray([0x8D, 0x0B, 0x01])) # sta $010B + rom.write_bytes(0x2DC46 + 0x0005, bytearray([0x0A])) # asl + rom.write_bytes(0x2DC46 + 0x0006, bytearray([0x60])) # rts + # Always allow Start+Select rom.write_bytes(0x2267, bytearray([0xEA, 0xEA])) # Always bring up save prompt on beating a level - if world.autosave[player]: + if world.options.autosave: rom.write_bytes(0x20F93, bytearray([0x00])) - if world.overworld_speed[player] == "fast": + if world.options.overworld_speed == "fast": rom.write_bytes(0x21414, bytearray([0x20, 0x10])) - elif world.overworld_speed[player] == "slow": + elif world.options.overworld_speed == "slow": rom.write_bytes(0x21414, bytearray([0x05, 0x05])) # Starting Life Count - rom.write_bytes(0x1E25, bytearray([world.starting_life_count[player].value - 1])) + rom.write_bytes(0x1E25, bytearray([world.options.starting_life_count.value - 1])) # Repurpose Bonus Stars counter for Boss Token or Yoshi Eggs rom.write_bytes(0x3F1AA, bytearray([0x00] * 0x20)) + # Make bonus star counter go up to 255 (999 in theory, but can't load a 16-bit addr there) + rom.write_bytes(0x00F5B, bytearray([0x4C, 0x73, 0x8F])) + rom.write_byte(0x00F95, 0x08) + rom.write_byte(0x00F97, 0x0C) + rom.write_byte(0x00FAC, 0x02) + rom.write_byte(0x00F9E, 0x1D) + rom.write_byte(0x00FA5, 0x1D) + rom.write_byte(0x00FA8, 0x02) + rom.write_byte(0x00FB0, 0x1D) + rom.write_byte(0x00FB8, 0x02) + rom.write_byte(0x00FBE, 0x1D) + rom.write_byte(0x00FC2, 0x03) + + # Move Dragon coins one spot to the left & fix tilemap + rom.write_byte(0x00FF0, 0xFE) + rom.write_byte(0x00C94, 0x3C) + rom.write_byte(0x00C9C, 0x38) + # Delete Routine that would copy Mario position data over repurposed Luigi save data rom.write_bytes(0x20F9F, bytearray([0xEA] * 0x3D)) @@ -904,6 +3046,10 @@ def patch_rom(world, rom, player, active_level_dict): rom.write_bytes(0x6EB1, bytearray([0xEA, 0xEA])) rom.write_bytes(0x6EB4, bytearray([0xEA, 0xEA, 0xEA])) + # Move Thwimps tilemap to another spot in VRAM in order to make them global + rom.write_bytes(0x09C13, bytearray([0x7E, 0x7E, 0x7F, 0x7F])) + rom.write_byte(0x3F425, 0x32) + handle_ability_code(rom) handle_yoshi_box(rom) @@ -913,44 +3059,97 @@ def patch_rom(world, rom, player, active_level_dict): handle_vertical_scroll(rom) + handle_ram(rom) + handle_bonus_block(rom) + handle_blocksanity(rom) + + handle_uncompressed_player_gfx(rom) + + # Handle Special Zone Clear flag + rom.write_bytes(0x02A74, bytearray([0x1E, 0x1F])) + rom.write_bytes(0x09826, bytearray([0x1E, 0x1F])) + rom.write_bytes(0x0B9CD, bytearray([0x1E, 0x1F])) + rom.write_bytes(0x12986, bytearray([0x1E, 0x1F])) + rom.write_bytes(0x62E0F, bytearray([0x1E, 0x1F])) + + handle_indicators(rom) + handle_map_indicators(rom) + + # Handle extra traps + handle_traps(rom) + + # Mario Start! -> Player Start! + text_data_top_tiles = bytearray([ + 0x00,0xFF,0x4D,0x4C,0x03,0x4D,0x5D,0xFF,0x4C,0x4B, + 0x4A,0x03,0x4E,0x01,0x00,0x02,0x00,0x4a,0x4E,0xFF + ]) + text_data_top_props = bytearray([ + 0x34,0x30,0x34,0x34,0x34,0x34,0x34,0x30,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x30 + ]) + text_data_bottom_tiles = bytearray([ + 0x10,0xFF,0x00,0x5C,0x13,0x00,0x5D,0xFF,0x5C,0x5B, + 0x00,0x13,0x5E,0x11,0x00,0x12,0x00,0x03,0x5E,0xFF + ]) + text_data_bottom_props = bytearray([ + 0x34,0x30,0xb4,0x34,0x34,0xb4,0xf4,0x30,0x34,0x34, + 0xB4,0x34,0x34,0x34,0xb4,0x34,0xb4,0xb4,0x34,0x30 + ]) + + rom.write_bytes(0x010D1, text_data_top_tiles) + rom.write_bytes(0x01139, text_data_top_props) + rom.write_bytes(0x01105, text_data_bottom_tiles) + rom.write_bytes(0x0116A, text_data_bottom_props) + # Handle Level Shuffle handle_level_shuffle(rom, active_level_dict) # Handle Music Shuffle - if world.music_shuffle[player] != "none": - handle_music_shuffle(rom, world, player) + if world.options.music_shuffle != "none": + handle_music_shuffle(rom, world) - generate_shuffled_ow_palettes(rom, world, player) + generate_shuffled_ow_palettes(rom, world) - generate_shuffled_header_data(rom, world, player) + generate_shuffled_header_data(rom, world) - if world.swap_donut_gh_exits[player]: + if world.options.level_palette_shuffle == "on_curated": + generate_curated_level_palette_data(rom, world) + + if world.options.overworld_palette_shuffle == "on_curated": + generate_curated_map_palette_data(rom, world) + + if world.options.sfx_shuffle != "none": + generate_shuffled_sfx(rom, world) + + if world.options.swap_donut_gh_exits: handle_swap_donut_gh_exits(rom) - handle_mario_palette(rom, world, player) + handle_mario_palette(rom, world) # Store all relevant option results in ROM - rom.write_byte(0x01BFA0, world.goal[player].value) - if world.goal[player].value == 0: - rom.write_byte(0x01BFA1, world.bosses_required[player].value) + rom.write_byte(0x01BFA0, world.options.goal.value) + if world.options.goal.value == 0: + rom.write_byte(0x01BFA1, world.options.bosses_required.value) else: rom.write_byte(0x01BFA1, 0x7F) - required_yoshi_eggs = max(math.floor( - world.number_of_yoshi_eggs[player].value * (world.percentage_of_yoshi_eggs[player].value / 100.0)), 1) + required_yoshi_eggs = world.required_egg_count rom.write_byte(0x01BFA2, required_yoshi_eggs) - #rom.write_byte(0x01BFA3, world.display_sent_item_popups[player].value) - rom.write_byte(0x01BFA4, world.display_received_item_popups[player].value) - rom.write_byte(0x01BFA5, world.death_link[player].value) - rom.write_byte(0x01BFA6, world.dragon_coin_checks[player].value) - rom.write_byte(0x01BFA7, world.swap_donut_gh_exits[player].value) + #rom.write_byte(0x01BFA3, world.options.display_sent_item_popups.value) + rom.write_byte(0x01BFA4, world.options.display_received_item_popups.value) + rom.write_byte(0x01BFA5, world.options.death_link.value) + rom.write_byte(0x01BFA6, world.options.dragon_coin_checks.value) + rom.write_byte(0x01BFA7, world.options.swap_donut_gh_exits.value) + rom.write_byte(0x01BFA8, world.options.moon_checks.value) + rom.write_byte(0x01BFA9, world.options.hidden_1up_checks.value) + rom.write_byte(0x01BFAA, world.options.bonus_block_checks.value) + rom.write_byte(0x01BFAB, world.options.blocksanity.value) from Utils import __version__ - rom.name = bytearray(f'SMW{__version__.replace(".", "")[0:3]}_{player}_{world.seed:11}\0', 'utf8')[:21] + rom.name = bytearray(f'SMW{__version__.replace(".", "")[0:3]}_{player}_{world.multiworld.seed:11}\0', 'utf8')[:21] rom.name.extend([0] * (21 - len(rom.name))) rom.write_bytes(0x7FC0, rom.name) - def get_base_rom_bytes(file_name: str = "") -> bytes: base_rom_bytes = getattr(get_base_rom_bytes, "base_rom_bytes", None) if not base_rom_bytes: diff --git a/worlds/smw/Rules.py b/worlds/smw/Rules.py index 82f22c3a..a900b4fd 100644 --- a/worlds/smw/Rules.py +++ b/worlds/smw/Rules.py @@ -2,19 +2,18 @@ import math from BaseClasses import MultiWorld from .Names import LocationName, ItemName -from worlds.AutoWorld import LogicMixin +from worlds.AutoWorld import World from worlds.generic.Rules import add_rule, set_rule -def set_rules(world: MultiWorld, player: int): +def set_rules(world: World): - if world.goal[player] == "yoshi_egg_hunt": - required_yoshi_eggs = max(math.floor( - world.number_of_yoshi_eggs[player].value * (world.percentage_of_yoshi_eggs[player].value / 100.0)), 1) + if world.options.goal == "yoshi_egg_hunt": + required_yoshi_eggs = world.required_egg_count - add_rule(world.get_location(LocationName.yoshis_house, player), - lambda state: state.has(ItemName.yoshi_egg, player, required_yoshi_eggs)) + add_rule(world.multiworld.get_location(LocationName.yoshis_house, world.player), + lambda state: state.has(ItemName.yoshi_egg, world.player, required_yoshi_eggs)) else: - add_rule(world.get_location(LocationName.bowser, player), lambda state: state.has(ItemName.mario_carry, player)) + add_rule(world.multiworld.get_location(LocationName.bowser, world.player), lambda state: state.has(ItemName.mario_carry, world.player)) - world.completion_condition[player] = lambda state: state.has(ItemName.victory, player) + world.multiworld.completion_condition[world.player] = lambda state: state.has(ItemName.victory, world.player) diff --git a/worlds/smw/__init__.py b/worlds/smw/__init__.py index 431287c3..19161081 100644 --- a/worlds/smw/__init__.py +++ b/worlds/smw/__init__.py @@ -1,3 +1,4 @@ +import dataclasses import os import typing import math @@ -5,9 +6,9 @@ import settings import threading from BaseClasses import Item, MultiWorld, Tutorial, ItemClassification -from .Items import SMWItem, ItemData, item_table -from .Locations import SMWLocation, all_locations, setup_locations, special_zone_level_names, special_zone_dragon_coin_names -from .Options import smw_options +from .Items import SMWItem, ItemData, item_table, junk_table +from .Locations import SMWLocation, all_locations, setup_locations, special_zone_level_names, special_zone_dragon_coin_names, special_zone_hidden_1up_names, special_zone_blocksanity_names +from .Options import SMWOptions from .Regions import create_regions, connect_regions from .Levels import full_level_list, generate_level_list, location_id_to_level_id from .Rules import set_rules @@ -50,11 +51,14 @@ class SMWWorld(World): lost all of his abilities. Can he get them back in time to save the Princess? """ game: str = "Super Mario World" - option_definitions = smw_options + settings: typing.ClassVar[SMWSettings] + + options_dataclass = SMWOptions + options: SMWOptions + topology_present = False - data_version = 3 - required_client_version = (0, 3, 5) + required_client_version = (0, 4, 4) item_name_to_id = {name: data.code for name, data in item_table.items()} location_name_to_id = all_locations @@ -62,9 +66,9 @@ class SMWWorld(World): active_level_dict: typing.Dict[int,int] web = SMWWeb() - def __init__(self, world: MultiWorld, player: int): + def __init__(self, multiworld: MultiWorld, player: int): self.rom_name_available_event = threading.Event() - super().__init__(world, player) + super().__init__(multiworld, player) @classmethod def stage_assert_generate(cls, multiworld: MultiWorld): @@ -72,37 +76,34 @@ class SMWWorld(World): if not os.path.exists(rom_file): raise FileNotFoundError(rom_file) - def _get_slot_data(self): - return { - #"death_link": self.multiworld.death_link[self.player].value, - "active_levels": self.active_level_dict, - } - def fill_slot_data(self) -> dict: - slot_data = self._get_slot_data() - for option_name in smw_options: - option = getattr(self.multiworld, option_name)[self.player] - slot_data[option_name] = option.value + slot_data = self.options.as_dict( + "dragon_coin_checks", + "moon_checks", + "hidden_1up_checks", + "bonus_block_checks", + "blocksanity", + ) + slot_data["active_levels"] = self.active_level_dict return slot_data def generate_early(self): - if self.multiworld.early_climb[self.player]: + if self.options.early_climb: self.multiworld.local_early_items[self.player][ItemName.mario_climb] = 1 - def create_regions(self): - location_table = setup_locations(self.multiworld, self.player) - create_regions(self.multiworld, self.player, location_table) + location_table = setup_locations(self) + create_regions(self, location_table) # Not generate basic itempool: typing.List[SMWItem] = [] - self.active_level_dict = dict(zip(generate_level_list(self.multiworld, self.player), full_level_list)) - self.topology_present = self.multiworld.level_shuffle[self.player] + self.active_level_dict = dict(zip(generate_level_list(self), full_level_list)) + self.topology_present = self.options.level_shuffle + + connect_regions(self, self.active_level_dict) - connect_regions(self.multiworld, self.player, self.active_level_dict) - # Add Boss Token amount requirements for Worlds add_rule(self.multiworld.get_region(LocationName.donut_plains_1_tile, self.player).entrances[0], lambda state: state.has(ItemName.koopaling, self.player, 1)) add_rule(self.multiworld.get_region(LocationName.vanilla_dome_1_tile, self.player).entrances[0], lambda state: state.has(ItemName.koopaling, self.player, 2)) @@ -110,18 +111,29 @@ class SMWWorld(World): add_rule(self.multiworld.get_region(LocationName.chocolate_island_1_tile, self.player).entrances[0], lambda state: state.has(ItemName.koopaling, self.player, 5)) add_rule(self.multiworld.get_region(LocationName.valley_of_bowser_1_tile, self.player).entrances[0], lambda state: state.has(ItemName.koopaling, self.player, 6)) - if self.multiworld.exclude_special_zone[self.player]: - exclusion_pool = set() - if self.multiworld.dragon_coin_checks[self.player]: - exclusion_pool.update(special_zone_level_names) + exclusion_pool = set() + if self.options.exclude_special_zone: + exclusion_pool.update(special_zone_level_names) + if self.options.dragon_coin_checks: exclusion_pool.update(special_zone_dragon_coin_names) - elif self.multiworld.number_of_yoshi_eggs[self.player].value <= 72: - exclusion_pool.update(special_zone_level_names) + if self.options.hidden_1up_checks: + exclusion_pool.update(special_zone_hidden_1up_names) + if self.options.blocksanity: + exclusion_pool.update(special_zone_blocksanity_names) + exclusion_rules(self.multiworld, self.player, exclusion_pool) total_required_locations = 96 - if self.multiworld.dragon_coin_checks[self.player]: + if self.options.dragon_coin_checks: total_required_locations += 49 + if self.options.moon_checks: + total_required_locations += 7 + if self.options.hidden_1up_checks: + total_required_locations += 14 + if self.options.bonus_block_checks: + total_required_locations += 4 + if self.options.blocksanity: + total_required_locations += 582 itempool += [self.create_item(ItemName.mario_run)] itempool += [self.create_item(ItemName.mario_carry)] @@ -137,31 +149,53 @@ class SMWWorld(World): itempool += [self.create_item(ItemName.green_switch_palace)] itempool += [self.create_item(ItemName.red_switch_palace)] itempool += [self.create_item(ItemName.blue_switch_palace)] + itempool += [self.create_item(ItemName.special_world_clear)] - if self.multiworld.goal[self.player] == "yoshi_egg_hunt": - itempool += [self.create_item(ItemName.yoshi_egg) - for _ in range(self.multiworld.number_of_yoshi_eggs[self.player])] + if self.options.goal == "yoshi_egg_hunt": + raw_egg_count = total_required_locations - len(itempool) - len(exclusion_pool) + total_egg_count = min(raw_egg_count, self.options.max_yoshi_egg_cap.value) + self.required_egg_count = max(math.floor(total_egg_count * (self.options.percentage_of_yoshi_eggs.value / 100.0)), 1) + extra_egg_count = total_egg_count - self.required_egg_count + removed_egg_count = math.floor(extra_egg_count * (self.options.junk_fill_percentage.value / 100.0)) + self.actual_egg_count = total_egg_count - removed_egg_count + + itempool += [self.create_item(ItemName.yoshi_egg) for _ in range(self.actual_egg_count)] + self.multiworld.get_location(LocationName.yoshis_house, self.player).place_locked_item(self.create_item(ItemName.victory)) else: + self.actual_egg_count = 0 + self.required_egg_count = 0 + self.multiworld.get_location(LocationName.bowser, self.player).place_locked_item(self.create_item(ItemName.victory)) junk_count = total_required_locations - len(itempool) trap_weights = [] - trap_weights += ([ItemName.ice_trap] * self.multiworld.ice_trap_weight[self.player].value) - trap_weights += ([ItemName.stun_trap] * self.multiworld.stun_trap_weight[self.player].value) - trap_weights += ([ItemName.literature_trap] * self.multiworld.literature_trap_weight[self.player].value) - trap_weights += ([ItemName.timer_trap] * self.multiworld.timer_trap_weight[self.player].value) - trap_count = 0 if (len(trap_weights) == 0) else math.ceil(junk_count * (self.multiworld.trap_fill_percentage[self.player].value / 100.0)) + trap_weights += ([ItemName.ice_trap] * self.options.ice_trap_weight.value) + trap_weights += ([ItemName.stun_trap] * self.options.stun_trap_weight.value) + trap_weights += ([ItemName.literature_trap] * self.options.literature_trap_weight.value) + trap_weights += ([ItemName.timer_trap] * self.options.timer_trap_weight.value) + trap_weights += ([ItemName.reverse_controls_trap] * self.options.reverse_trap_weight.value) + trap_weights += ([ItemName.thwimp_trap] * self.options.thwimp_trap_weight.value) + trap_count = 0 if (len(trap_weights) == 0) else math.ceil(junk_count * (self.options.trap_fill_percentage.value / 100.0)) junk_count -= trap_count trap_pool = [] for i in range(trap_count): - trap_item = self.multiworld.random.choice(trap_weights) + trap_item = self.random.choice(trap_weights) trap_pool.append(self.create_item(trap_item)) itempool += trap_pool - itempool += [self.create_item(ItemName.one_up_mushroom) for _ in range(junk_count)] + junk_weights = [] + junk_weights += ([ItemName.one_coin] * 15) + junk_weights += ([ItemName.five_coins] * 15) + junk_weights += ([ItemName.ten_coins] * 25) + junk_weights += ([ItemName.fifty_coins] * 25) + junk_weights += ([ItemName.one_up_mushroom] * 20) + + junk_pool = [self.create_item(self.random.choice(junk_weights)) for _ in range(junk_count)] + + itempool += junk_pool boss_location_names = [LocationName.yoshis_island_koopaling, LocationName.donut_plains_koopaling, LocationName.vanilla_dome_koopaling, LocationName.twin_bridges_koopaling, LocationName.forest_koopaling, LocationName.chocolate_koopaling, @@ -176,18 +210,18 @@ class SMWWorld(World): def generate_output(self, output_directory: str): rompath = "" # if variable is not declared finally clause may fail try: - world = self.multiworld + multiworld = self.multiworld player = self.player rom = LocalRom(get_base_rom_path()) - patch_rom(self.multiworld, rom, self.player, self.active_level_dict) + patch_rom(self, rom, self.player, self.active_level_dict) rompath = os.path.join(output_directory, f"{self.multiworld.get_out_file_name_base(self.player)}.sfc") rom.write_to_file(rompath) self.rom_name = rom.name patch = SMWDeltaPatch(os.path.splitext(rompath)[0]+SMWDeltaPatch.patch_file_ending, player=player, - player_name=world.player_name[player], patched_path=rompath) + player_name=multiworld.player_name[player], patched_path=rompath) patch.write() except: raise @@ -243,7 +277,15 @@ class SMWWorld(World): if level_index >= world_cutoffs[i]: continue - if self.multiworld.dragon_coin_checks[self.player].value == 0 and "Dragon Coins" in loc_name: + if not self.options.dragon_coin_checks and "Dragon Coins" in loc_name: + continue + if not self.options.moon_checks and "3-Up Moon" in loc_name: + continue + if not self.options.hidden_1up_checks and "Hidden 1-Up" in loc_name: + continue + if not self.options.bonus_block_checks and "1-Up from Bonus Block" in loc_name: + continue + if not self.options.blocksanity and "Block #" in loc_name: continue location = self.multiworld.get_location(loc_name, self.player) @@ -271,7 +313,7 @@ class SMWWorld(World): return created_item def get_filler_item_name(self) -> str: - return ItemName.one_up_mushroom + return self.random.choice(list(junk_table.keys())) def set_rules(self): - set_rules(self.multiworld, self.player) + set_rules(self) diff --git a/worlds/smw/data/blocksanity.json b/worlds/smw/data/blocksanity.json new file mode 100644 index 00000000..e3737d25 --- /dev/null +++ b/worlds/smw/data/blocksanity.json @@ -0,0 +1,747 @@ +{ + "000_bonus": [], + "001_vanilla_secret_2": [ + ["yoshi", "0170", "0130", []], + ["green", "02F0", "0170", ["greenswitch carry", "greenswitch cape"]], + ["power", "0660", "0110", []], + ["power", "0B70", "0100", []], + ["multi", "0DC0", "0120", []], + ["gray", "0E70", "0120", []], + ["single", "1180", "0130", []], + ["single", "1190", "0130", []], + ["single", "11A0", "0130", []], + ["single", "11B0", "0130", []], + ["single", "11C0", "0130", []], + ["single", "11D0", "0130", []] + ], + "002_vanilla_secret_3": [ + ["power", "0270", "00D0", ["swim"]], + ["power", "06E0", "00E0", ["swim"]] + ], + "003_top_secret_area": [], + "004_donut_ghost_house": [ + ["vine", "0120", "0120", []], + ["dir", "0070", "0140", ["pswitch"]], + ["life", "0610", "0140", ["run cape"]], + ["life", "0640", "0140", ["run cape"]], + ["life", "0670", "0140", ["run cape"]], + ["life", "06A0", "0140", ["run cape"]] + ], + "005_donut_plains_3": [ + ["green", "01B0", "00E0", ["greenswitch"]], + ["single", "0450", "00F0", []], + ["single", "0480", "00F0", []], + ["vine", "04E0", "0130", ["mushroom spin"]], + ["power", "0BD0", "0140", []], + ["bonus", "1250", "00F0", []] + ], + "006_donut_plains_4": [ + ["single", "0660", "0130", []], + ["power", "0670", "0130", []], + ["single", "0680", "0130", []], + ["yoshi", "0AF0", "0150", []] + ], + "007_donut_plains_castle": [ + ["yellow", "01E0", "00C0", ["yellowswitch"]], + ["single", "00A0", "0680", []], + ["power", "00B0", "0680", []], + ["single", "00C0", "0680", []], + ["vine", "0050", "0450", []], + ["inlife", "0030", "0320", ["climb"]], + ["single", "0050", "0250", []], + ["single", "0080", "0250", []], + ["single", "00B0", "0250", []], + ["green", "0090", "0060", ["greenswitch"]] + ], + "008_green_switch_palace": [], + "009_donut_plains_2": [ + ["single", "00D0", "0120", []], + ["single", "00E0", "0120", []], + ["single", "00F0", "0120", []], + ["yellow", "0100", "0120", ["yellowswitch"]], + ["power", "0330", "00D0", []], + ["multi", "03C0", "00C0", []], + ["fly", "0820", "00E0", []], + ["green", "0560", "00E0", ["greenswitch"]], + ["yellow", "0050", "0140", ["yellowswitch"]], + ["vine", "02B0", "00E0", ["carry spin mushroom", "yoshi"]] + ], + "00A_donut_secret_1": [ + ["single", "02C0", "0130", ["swim"]], + ["single", "02D0", "0130", ["swim"]], + ["power", "02E0", "0130", ["swim"]], + ["single", "02F0", "0130", ["swim"]], + ["power", "00E0", "0480", ["swim"]], + ["power", "0060", "0250", ["swim balloon"]], + ["life", "0110", "0070", ["swim balloon"]], + ["power", "01A0", "0250", ["swim balloon"]], + ["power", "0570", "0150", ["swim"]], + ["key", "0940", "0150", ["swim carry pswitch"]] + ], + "00B_vanilla_fortress": [ + ["power", "04E0", "0130", ["swim"]], + ["power", "0220", "0130", ["swim"]], + ["yellow", "0780", "0110", ["yellowswitch swim"]] + ], + "00C_butter_bridge_1": [ + ["power", "08A0", "0110", []], + ["multi", "08B0", "00D0", []], + ["multi", "0860", "0090", []], + ["multi", "08E0", "0050", []], + ["life", "0840", "0050", []], + ["bonus", "0BD0", "0130", []] + ], + "00D_butter_bridge_2": [ + ["power", "0310", "0100", ["carry"]], + ["green", "0AC0", "0120", ["greenswitch"]], + ["yoshi", "0C70", "0110", ["carry"]] + ], + "00E_twin_bridges_castle": [ + ["power", "01B0", "0370", ["climb"]] + ], + "00F_cheese_bridge": [ + ["power", "00C0", "0140", []], + ["power", "0560", "00E0", []], + ["wings", "0A10", "0140", []], + ["power", "0B60", "0150", []] + ], + "010_cookie_mountain": [ + ["single", "01C0", "0130", []], + ["single", "01D0", "0130", []], + ["single", "01E0", "0130", []], + ["single", "01F0", "0130", []], + ["single", "0200", "0130", []], + ["single", "0210", "0130", []], + ["single", "0220", "0130", []], + ["single", "0230", "0130", []], + ["single", "0240", "0130", []], + ["power", "0200", "00F0", []], + ["life", "0A40", "0070", ["climb", "swim"]], + ["vine", "0B20", "0140", []], + ["yoshi", "0C40", "0140", ["redswitch"]], + ["single", "11C0", "0140", []], + ["single", "11D0", "0140", []], + ["power", "11E0", "0140", []], + ["single", "11F0", "0140", []], + ["single", "1200", "0140", []], + ["single", "1210", "0140", []], + ["single", "1220", "0140", []], + ["single", "1230", "0140", []], + ["single", "1240", "0140", []], + ["single", "1250", "0140", []], + ["single", "11B0", "0100", []], + ["single", "11C0", "0100", []], + ["single", "11D0", "0100", []], + ["single", "11E0", "0100", []], + ["single", "11F0", "0100", []], + ["single", "1200", "0100", []], + ["single", "1210", "0100", []], + ["single", "1220", "0100", []], + ["single", "1230", "0100", []], + ["single", "1240", "0100", []], + ["single", "1250", "0100", []], + ["single", "1360", "0140", []] + ], + "011_soda_lake": [ + ["power", "0200", "0110", ["swim"]] + ], + "012_test": [], + "013_donut_secret_house": [ + ["power", "0480", "0140", []], + ["multi", "0310", "0140", []], + ["life", "04A0", "0140", ["pswitch"]], + ["vine", "01E0", "0110", ["pswitch"]], + ["dir", "0180", "0130", ["pswitch"]] + ], + "014_yellow_switch_palace": [], + "015_donut_plains_1": [ + ["single", "0710", "0140", []], + ["single", "0720", "0140", []], + ["yoshi", "0D20", "00F0", []], + ["vine", "0DB0", "0130", []], + ["green", "11A0", "0070", ["greenswitch cape"]], + ["green", "11A0", "0080", ["greenswitch cape"]], + ["green", "11A0", "0090", ["greenswitch cape"]], + ["green", "11A0", "00A0", ["greenswitch cape"]], + ["green", "11A0", "00B0", ["greenswitch cape"]], + ["green", "11A0", "00C0", ["greenswitch cape"]], + ["green", "11A0", "00D0", ["greenswitch cape"]], + ["green", "11A0", "00E0", ["greenswitch cape"]], + ["green", "11A0", "00F0", ["greenswitch cape"]], + ["green", "11A0", "0100", ["greenswitch cape"]], + ["green", "11A0", "0110", ["greenswitch cape"]], + ["green", "11A0", "0120", ["greenswitch cape"]], + ["green", "11A0", "0130", ["greenswitch cape"]], + ["green", "11A0", "0140", ["greenswitch cape"]], + ["green", "11A0", "0150", ["greenswitch cape"]], + ["green", "11A0", "0160", ["greenswitch cape"]], + ["yellow", "1240", "0120", ["yellowswitch"]], + ["yellow", "1280", "0140", ["yellowswitch"]], + ["yellow", "1290", "0140", ["yellowswitch"]] + ], + "016_test": [], + "017_test": [], + "018_sunken_ghost_ship": [ + ["power", "0110", "0070", ["swim"]], + ["star", "0100", "0C80", ["swim"]] + ], + "019_test": [], + "01A_chocolate_castle": [ + ["yellow", "09C0", "0110", ["yellowswitch"]], + ["yellow", "0150", "0110", ["yellowswitch"]], + ["green", "0750", "0140", ["greenswitch"]] + ], + "01B_chocolate_fortress": [ + ["power", "0380", "0140", []], + ["power", "0360", "0150", []], + ["single", "0370", "0150", []], + ["single", "0380", "0150", []], + ["green", "0AC0", "0130", ["greenswitch"]] + ], + "01C_chocolate_island_5": [ + ["yoshi", "0170", "0130", []], + ["power", "0180", "0150", []], + ["life", "0340", "0170", ["carry", "cape"]], + ["yellow", "0560", "0140", ["yellowswitch pswitch"]] + ], + "01D_chocolate_island_4": [ + ["yellow", "0700", "0140", ["yellowswitch blueswitch"]], + ["pow", "0920", "00A0", []], + ["power", "0B50", "0040", []] + ], + "01E_test": [], + "01F_forest_fortress": [ + ["yellow", "02B0", "00E0", ["yellowswitch"]], + ["power", "0750", "00D0", []], + ["life", "0ED0", "0140", ["run cape"]], + ["life", "0F10", "0140", ["run cape"]], + ["life", "0F10", "0100", ["run cape"]], + ["life", "0F40", "0130", ["run cape"]], + ["life", "0F70", "0140", ["run cape"]], + ["life", "0F70", "00F0", ["run cape"]], + ["life", "0FA0", "0130", ["run cape"]], + ["life", "0FD0", "0140", ["run cape"]], + ["life", "0FD0", "0100", ["run cape"]] + ], + "020_forest_castle": [ + ["green", "0CC0", "0120", ["greenswitch"]] + ], + "021_chocolate_ghost_house": [ + ["power", "0910", "0140", []], + ["power", "0110", "0140", []], + ["life", "05D0", "0140", []] + ], + "022_chocolate_island_1": [ + ["fly", "0490", "0120", ["pswitch"]], + ["fly", "0CD0", "0100", ["pswitch"]], + ["yoshi", "0E10", "0110", ["pswitch"]], + ["green", "0F00", "0140", ["greenswitch blueswitch", "greenswitch cape", "yellowswitch blueswitch", "yellowswitch cape"]], + ["life", "0070", "0120", ["pswitch"]] + ], + "023_chocolate_island_3": [ + ["power", "0530", "0140", []], + ["power", "0A20", "0140", []], + ["power", "0F50", "00F0", []], + ["green", "1080", "00F0", ["greenswitch"]], + ["bonus", "11D0", "0140", []], + ["vine", "1220", "0140", []], + ["life", "1640", "0140", ["run cape"]], + ["life", "1670", "0140", ["run cape"]], + ["life", "16A0", "0140", ["run cape"]] + ], + "024_chocolate_island_2": [ + ["multi", "00E0", "00A0", []], + ["invis", "00F0", "00D0", []], + ["yoshi", "0280", "0040", []], + ["single", "0080", "0140", []], + ["single", "05C0", "0140", []], + ["multi" , "05F0", "0120", []], + ["power", "0620", "0100", []], + ["pow", "0040", "0140", []], + ["yellow", "0190", "0110", ["yellowswitch"]], + ["yellow", "01A0", "0110", ["yellowswitch"]], + ["green", "0240", "0110", ["greenswitch"]], + ["green", "0250", "0110", ["greenswitch"]], + ["green", "0260", "0110", ["greenswitch"]], + ["green", "0270", "0110", ["greenswitch"]], + ["green", "0280", "0110", ["greenswitch"]], + ["green", "0290", "0110", ["greenswitch"]] + ], + "101_yoshis_island_castle": [ + ["single", "0280", "00F0", ["climb"]], + ["single", "0290", "00F0", ["climb"]], + ["power", "02A0", "00F0", ["climb"]], + ["single", "02B0", "00F0", ["climb"]], + ["single", "02C0", "00F0", ["climb"]], + ["fly", "0250", "0150", ["climb"]] + ], + "102_yoshis_island_4": [ + ["yellow", "00D0", "00F0", ["yellowswitch"]], + ["power", "0160", "0140", []], + ["multi", "0290", "0140", []], + ["star", "04E0", "0120", []] + ], + "103_yoshis_island_3": [ + ["yellow", "0250", "00C0", ["yellowswitch"]], + ["yellow", "0290", "0140", ["yellowswitch"]], + ["yellow", "02F0", "00E0", ["yellowswitch carry", "yellowswitch yoshi", "yellowswitch run cape"]], + ["yellow", "0300", "00E0", ["yellowswitch carry", "yellowswitch yoshi", "yellowswitch run cape"]], + ["yellow", "0310", "00E0", ["yellowswitch carry", "yellowswitch yoshi", "yellowswitch run cape"]], + ["yellow", "0320", "00E0", ["yellowswitch carry", "yellowswitch yoshi", "yellowswitch run cape"]], + ["yellow", "0330", "00E0", ["yellowswitch carry", "yellowswitch yoshi", "yellowswitch run cape"]], + ["yellow", "0340", "00E0", ["yellowswitch carry", "yellowswitch yoshi", "yellowswitch run cape"]], + ["yellow", "0350", "00E0", ["yellowswitch carry", "yellowswitch yoshi", "yellowswitch run cape"]], + ["single", "04B0", "00A0", []], + ["yoshi", "04C0", "00A0", []], + ["single", "0AC0", "0140", []], + ["power", "0B00", "00C0", []], + ["yellow", "0CD0", "0120", ["yellowswitch"]], + ["yellow", "0CE0", "0120", ["yellowswitch"]], + ["yellow", "0DA0", "00F0", ["yellowswitch"]], + ["bonus", "10A0", "0080", []] + ], + "104_yoshis_house": [], + "105_yoshis_island_1": [ + ["fly", "0250", "0140", []], + ["yellow", "09C0", "0140", ["yellowswitch"]], + ["life", "0D10", "00F0", []], + ["power", "0F30", "0110", []] + ], + "106_yoshis_island_2": [ + ["fly", "0080", "00F0", ["carry", "yoshi"]], + ["fly", "00C0", "00E0", ["carry", "yoshi"]], + ["fly", "0130", "00F0", ["carry", "yoshi"]], + ["fly", "0140", "00D0", ["carry", "yoshi"]], + ["fly", "0180", "0100", ["carry", "yoshi"]], + ["fly", "01C0", "00E0", ["carry", "yoshi"]], + ["single", "0260", "0140", []], + ["yellow", "0270", "0140", ["yellowswitch"]], + ["single", "0280", "0140", []], + ["single", "0350", "0150", []], + ["yoshi", "0360", "0150", []], + ["single", "0B20", "0150", []], + ["yoshi", "0B30", "0150", []], + ["single", "0B40", "0150", []], + ["vine", "0C80", "0100", []], + ["yellow", "0DF0", "0120", ["yellowswitch"]] + ], + "107_vanilla_ghost_house": [ + ["power", "0200", "0100", []], + ["vine", "0750", "0150", []], + ["power", "0860", "0140", []], + ["multi", "0A00", "0140", []], + ["pow", "05E0", "0120", []] + ], + "108_test": [], + "109_vanilla_secret_1": [ + ["single", "0030", "0590", []], + ["power", "0040", "0590", []], + ["multi", "0110", "0490", []], + ["vine", "01B0", "0520", []], + ["vine", "0180", "0470", ["climb"]], + ["single", "0190", "0350", ["climb"]], + ["single", "01A0", "0350", ["climb"]], + ["power", "01B0", "0350", ["climb"]] + ], + "10A_vanilla_dome_3": [ + ["single", "01C0", "0140", []], + ["fly", "0200", "0160", []], + ["fly", "0230", "0120", []], + ["power", "02D0", "0110", []], + ["fly", "0480", "0150", []], + ["invis", "0800", "0130", []], + ["power", "0830", "0130", []], + ["multi", "0D90", "0120", []], + ["power", "03D0", "0130", []], + ["yoshi", "10A0", "0100", ["carry", "yoshi"]], + ["power", "1A60", "0140", []], + ["pswitch", "1E40", "0090", ["run cape pswitch"]], + ["pswitch", "1E50", "00A0", ["run cape pswitch"]], + ["pswitch", "1E60", "00B0", ["run cape pswitch"]], + ["pswitch", "1E70", "00C0", ["run cape pswitch"]], + ["pswitch", "1E80", "00D0", ["run cape pswitch"]], + ["pswitch", "1E90", "00E0", ["run cape pswitch"]] + ], + "10B_donut_secret_2": [ + ["dir", "00A0", "0170", []], + ["vine", "0220", "0100", []], + ["star", "0250", "0040", ["climb", "yoshi"]], + ["power", "0060", "0140", []], + ["star", "0B00", "0140", []] + ], + "10C_test": [], + "10D_front_door": [], + "10E_back_door": [], + "10F_valley_of_bowser_4": [ + ["yellow", "0370", "0130", ["yellowswitch"]], + ["power", "0210", "0130", []], + ["vine", "05E0", "0110", []], + ["yoshi", "0610", "0040", ["climb"]], + ["life", "07A0", "00D0", ["mushroom spin climb"]], + ["power", "0B60", "0110", ["yellowswitch climb"]] + ], + "110_valley_castle": [ + ["yellow", "0290", "0030", ["yellowswitch"]], + ["yellow", "0330", "0110", ["yellowswitch"]], + ["green", "0980", "0140", ["greenswitch"]] + ], + "111_valley_fortress": [ + ["green", "0220", "0140", ["greenswitch"]], + ["yellow", "0940", "0100", ["yellowswitch"]] + ], + "112_test": [], + "113_valley_of_bowser_3": [ + ["power", "0130", "0110", []], + ["power", "08A0", "00E0", []] + ], + "114_valley_ghost_house": [ + ["pswitch", "0160", "0100", ["pswitch"]], + ["multi", "0570", "0110", ["pswitch"]], + ["power", "00E0", "0100", []], + ["dir", "0270", "0140", ["pswitch"]] + ], + "115_valley_of_bowser_2": [ + ["power", "0330", "0130", []], + ["yellow", "0720", "0140", ["yellowswitch"]], + ["power", "0010", "00A0", []], + ["wings", "00D0", "0140", []] + ], + "116_valley_of_bowser_1": [ + ["green", "0810", "0140", ["greenswitch"]], + ["invis", "0D40", "0100", []], + ["invis", "0D50", "0100", []], + ["invis", "0D60", "0100", []], + ["yellow", "0D60", "0080", ["yellowswitch cape"]], + ["yellow", "0D60", "0090", ["yellowswitch cape"]], + ["yellow", "0D60", "00A0", ["yellowswitch cape"]], + ["yellow", "0D60", "00B0", ["yellowswitch cape"]], + ["vine", "0F20", "0120", []] + ], + "117_chocolate_secret": [ + ["power", "04A0", "0120", []], + ["power", "0960", "0140", []] + ], + "118_vanilla_dome_2": [ + ["single", "0240", "0100", ["swim"]], + ["power", "0250", "0100", ["swim"]], + ["single", "0260", "0100", ["swim"]], + ["single", "0270", "0100", ["swim"]], + ["vine", "03B0", "0100", ["swim"]], + ["inlife", "0720", "00F0", ["swim climb", "swim yoshi"]], + ["single", "0760", "00F0", ["swim climb", "swim yoshi"]], + ["single", "0770", "00F0", ["swim climb", "swim yoshi"]], + ["power", "0780", "00F0", ["swim climb", "swim yoshi"]], + ["power", "0880", "0100", ["swim climb", "swim yoshi"]], + ["power", "0730", "0040", ["swim climb", "swim yoshi"]], + ["power", "0D10", "0100", ["swim climb", "swim yoshi"]], + ["multi", "0290", "0130", ["swim climb", "swim yoshi"]], + ["multi", "1150", "0140", ["swim climb", "swim yoshi"]] + ], + "119_vanilla_dome_4": [ + ["power", "0690", "0100", []], + ["power", "0CB0", "0140", []], + ["single", "0E10", "0120", []], + ["single", "0E20", "0120", []], + ["single", "0E30", "0120", []], + ["life", "0E40", "0120", []], + ["single", "0E50", "0120", []], + ["single", "0E60", "0120", []], + ["single", "0E70", "0120", []], + ["single", "0E80", "0120", []], + ["single", "0E90", "0120", ["carry"]] + ], + "11A_vanilla_dome_1": [ + ["fly", "0250", "0110", []], + ["power", "0400", "0120", []], + ["power", "0450", "00E0", []], + ["single", "0460", "0120", []], + ["life", "04D0", "0120", []], + ["power", "0640", "0180", []], + ["vine", "0680", "00E0", ["carry", "redswitch"]], + ["star", "00F0", "00E0", []], + ["power", "13A0", "0140", ["run star", "run mushroom"]], + ["single", "17D0", "0150", ["run star", "run mushroom"]] + ], + "11B_red_switch_palace": [], + "11C_vanilla_dome_castle": [ + ["life", "0110", "0100", ["carry", "mushroom"]], + ["life", "0210", "0100", ["carry", "mushroom"]], + ["power", "03A0", "0130", []], + ["life", "0170", "0140", ["pswitch"]], + ["green", "0B90", "0140", ["greenswitch"]] + ], + "11D_forest_ghost_house": [ + ["single", "0950", "0110", []], + ["power", "0990", "0110", []], + ["fly", "0190", "0150", []], + ["power", "0370", "0140", []], + ["life", "0640", "0160", []] + ], + "11E_forest_of_illusion_1": [ + ["power", "01A0", "0110", []], + ["yoshi", "0360", "0130", []], + ["power", "0FA0", "0150", []], + ["key", "0E00", "0160", ["pballoon"]], + ["life", "0610", "0130", []] + ], + "11F_forest_of_illusion_4": [ + ["multi", "0540", "0140", []], + ["single", "05E0", "0140", []], + ["single", "05F0", "0140", []], + ["single", "0600", "0140", []], + ["single", "0620", "0140", []], + ["power", "0630", "0140", []], + ["single", "0640", "0140", []], + ["single", "0E30", "0140", []], + ["single", "0E40", "0140", []], + ["power", "0E40", "0100", []], + ["single", "0EF0", "0140", []], + ["single", "0F00", "0140", []], + ["single", "0EF0", "0100", []] + ], + "120_forest_of_illusion_2": [ + ["green", "0070", "0130", ["greenswitch swim"]], + ["power", "0480", "0040", ["swim"]], + ["invis", "0600", "0120", ["swim"]], + ["invis", "0610", "0120", ["swim"]], + ["inlife", "0620", "0120", ["swim"]], + ["invis", "0630", "0120", ["swim"]], + ["yellow", "0950", "0160", ["yellowswitch swim"]] + ], + "121_blue_switch_palace": [], + "122_forest_secret": [ + ["power", "0330", "00A0", []], + ["power", "0450", "0110", []], + ["life", "06A0", "00B0", ["blueswitch", "carry"]] + ], + "123_forest_of_illusion_3": [ + ["yoshi", "0350", "0150", []], + ["single", "04C0", "0150", []], + ["multi", "04D0", "0140", []], + ["single", "04F0", "0120", ["carry", "yoshi"]], + ["multi", "0D90", "0110", ["carry", "yoshi"]], + ["single", "0D80", "0150", ["carry", "yoshi"]], + ["single", "0D90", "0150", ["carry", "yoshi"]], + ["single", "0DA0", "0150", ["carry", "yoshi"]], + ["single", "0E40", "0140", ["carry", "yoshi"]], + ["single", "0E50", "0120", ["carry", "yoshi"]], + ["single", "0E70", "0150", ["carry", "yoshi"]], + ["single", "0E90", "0110", ["carry", "yoshi"]], + ["single", "0EB0", "0130", ["carry", "yoshi"]], + ["single", "0EE0", "0140", ["carry", "yoshi"]], + ["single", "0EF0", "0100", ["carry", "yoshi"]], + ["single", "0F10", "0120", ["carry", "yoshi"]], + ["single", "0F50", "0130", ["carry", "yoshi"]], + ["single", "0F70", "0150", ["carry", "yoshi"]], + ["single", "0F80", "0110", ["carry", "yoshi"]], + ["single", "0F90", "0130", ["carry", "yoshi"]], + ["single", "0FC0", "0150", ["carry", "yoshi"]], + ["single", "0FD0", "0120", ["carry", "yoshi"]], + ["single", "11A0", "0150", ["carry", "yoshi"]], + ["single", "11B0", "0120", ["carry", "yoshi"]], + ["single", "1230", "0150", ["carry", "yoshi"]], + ["single", "1240", "0140", ["carry", "yoshi"]], + ["single", "1250", "0130", ["carry", "yoshi"]] + ], + "124_test": [], + "125_special_zone_8": [ + ["yoshi", "0390", "0100", ["carry", "yoshi"]], + ["single", "04A0", "0130", []], + ["single", "04B0", "0130", []], + ["single", "04C0", "0130", []], + ["single", "04D0", "0130", []], + ["single", "04E0", "0130", []], + ["pow", "0560", "0140", []], + ["power", "05D0", "0140", []], + ["star", "0750", "00F0", []], + ["single", "0670", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0680", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0690", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "06A0", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "06B0", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "06C0", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "06F0", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0700", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0710", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0720", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0730", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0740", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "0750", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["multi", "0CA0", "0100", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "1100", "0120", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "1110", "0120", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "1120", "0120", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "1130", "0120", ["mushroom spin", "cape", "carry", "yoshi"]], + ["single", "1140", "0120", ["mushroom spin", "cape", "carry", "yoshi"]], + ["power", "13F0", "0140", ["mushroom spin", "cape", "carry", "yoshi"]], + ["fly", "1570", "00F0", ["mushroom spin", "cape", "carry", "yoshi"]] + ], + "126_special_zone_7": [ + ["power", "0350", "0150", ["mushroom"]], + ["yoshi", "0C80", "0140", ["mushroom"]], + ["single", "0F90", "0140", ["mushroom"]], + ["power", "0FA0", "0140", ["mushroom"]], + ["single", "0FB0", "0140", ["mushroom"]] + ], + "127_special_zone_6": [ + ["power", "0370", "00F0", ["swim"]], + ["single", "0610", "0140", ["swim"]], + ["single", "0630", "0120", ["swim"]], + ["yoshi", "0650", "0100", ["swim"]], + ["life", "07D0", "0140", ["swim"]], + ["multi", "0950", "0140", ["swim"]], + ["single", "0D80", "0140", ["swim"]], + ["single", "0D90", "0140", ["swim"]], + ["single", "0DA0", "0140", ["swim"]], + ["single", "0DB0", "0140", ["swim"]], + ["single", "0DC0", "0140", ["swim"]], + ["single", "0DD0", "0140", ["swim"]], + ["single", "0DE0", "0140", ["swim"]], + ["single", "0DF0", "0140", ["swim"]], + ["single", "0E00", "0140", ["swim"]], + ["single", "0E10", "0140", ["swim"]], + ["single", "0E20", "0140", ["swim"]], + ["single", "0E30", "0140", ["swim"]], + ["single", "0E40", "0140", ["swim"]], + ["single", "0E50", "0140", ["swim"]], + ["single", "0E60", "0140", ["swim"]], + ["single", "0E70", "0140", ["swim"]], + ["single", "0D80", "0100", ["swim"]], + ["single", "0D90", "0100", ["swim"]], + ["single", "0DA0", "0100", ["swim"]], + ["single", "0DB0", "0100", ["swim"]], + ["single", "0DC0", "0100", ["swim"]], + ["single", "0DD0", "0100", ["swim"]], + ["single", "0DE0", "0100", ["swim"]], + ["single", "0DF0", "0100", ["swim"]], + ["single", "0E00", "0100", ["swim"]], + ["single", "0E10", "0100", ["swim"]], + ["power", "0E20", "0100", ["swim"]], + ["single", "0E30", "0100", ["swim"]], + ["single", "0E40", "0100", ["swim"]], + ["single", "0E50", "0100", ["swim"]], + ["single", "0E60", "0100", ["swim"]], + ["single", "0E70", "0100", ["swim"]] + ], + "128_special_zone_5": [ + ["yoshi", "01D0", "0160", ["mushroom"]] + ], + "129_test": [], + "12A_special_zone_1": [ + ["vine", "0020", "03C0", []], + ["vine", "0050", "03C0", []], + ["vine", "0080", "03C0", []], + ["vine", "00B0", "03C0", []], + ["life", "0110", "0340", ["climb"]], + ["vine", "0120", "0280", ["climb"]], + ["pow", "0080", "01F0", ["climb"]], + ["vine", "00B0", "01F0", ["climb"]], + ["power", "00F0", "00D0", ["climb"]], + ["pswitch", "0190", "00C0", ["climb pswitch cape"]], + ["pswitch", "01C0", "0130", ["climb pswitch cape"]], + ["pswitch", "0180", "01A0", ["climb pswitch cape"]], + ["pswitch", "01D0", "01A0", ["climb pswitch cape"]], + ["pswitch", "01C0", "0270", ["climb pswitch cape"]], + ["pswitch", "01A0", "02C0", ["climb pswitch cape"]], + ["pswitch", "0190", "0310", ["climb pswitch cape"]], + ["pswitch", "01B0", "0370", ["climb pswitch cape"]], + ["pswitch", "0180", "03D0", ["climb pswitch cape"]], + ["pswitch", "0200", "0120", ["climb pswitch cape", "climb pswitch carry"]], + ["pswitch", "0210", "0130", ["climb pswitch cape", "climb pswitch carry"]], + ["pswitch", "0220", "0140", ["climb pswitch cape", "climb pswitch carry"]], + ["pswitch", "0230", "0150", ["climb pswitch cape", "climb pswitch carry"]] + ], + "12B_special_zone_2": [ + ["power", "02E0", "0120", []], + ["single", "0380", "0110", ["pballoon"]], + ["single", "0450", "0140", ["pballoon"]], + ["power", "04A0", "00F0", ["pballoon"]], + ["single", "05C0", "0150", ["pballoon"]], + ["single", "05C0", "00F0", ["pballoon"]], + ["power", "0760", "0140", ["pballoon"]], + ["multi", "07E0", "00E0", ["pballoon"]], + ["single", "0850", "0100", ["pballoon"]], + ["single", "0920", "0140", ["pballoon"]] + ], + "12C_special_zone_3": [ + ["power", "03F0", "0110", []], + ["yoshi", "0080", "0140", []], + ["wings", "0A50", "0140", []] + ], + "12D_special_zone_4": [ + ["power", "0490", "0140", ["flower"]], + ["star", "0AF0", "00F0", ["flower carry", "flower pswitch"]] + ], + "12E_test": [], + "12F_test": [], + "130_star_road_2": [ + ["star", "0460", "0130", ["swim"]] + ], + "131_test": [], + "132_star_road_3": [ + ["key", "0080", "0030", ["carry"]] + ], + "133_test": [], + "134_star_road_1": [], + "135_star_road_4": [ + ["power", "0540", "0090", []], + ["green", "0C00", "0140", ["greenswitch yoshi carry"]], + ["green", "0C10", "0140", ["greenswitch yoshi carry"]], + ["green", "0C20", "0140", ["greenswitch yoshi carry"]], + ["green", "0C30", "0140", ["greenswitch yoshi carry"]], + ["green", "0C40", "0140", ["greenswitch yoshi carry"]], + ["green", "0C50", "0140", ["greenswitch yoshi carry"]], + ["green", "0C60", "0140", ["greenswitch yoshi carry"]], + ["key", "0D40", "0160", ["carry yoshi", "greenswitch redswitch carry"]] + ], + "136_star_road_5": [ + ["dir", "0510", "0140", []], + ["life", "07D0", "0150", ["pswitch"]], + ["vine", "08E0", "0100", ["pswitch"]], + ["yellow", "08F0", "0050", ["yellowswitch pswitch climb carry", "yellowswitch specialworld yoshi carry"]], + ["yellow", "0900", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0910", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0920", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0930", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0940", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0950", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0960", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0970", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0980", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0990", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "09A0", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "09B0", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "09C0", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "09D0", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "09E0", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "09F0", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0A00", "0050", ["yellowswitch specialworld yoshi carry"]], + ["yellow", "0A10", "0050", ["yellowswitch greenswitch yoshi carry", "yellowswitch greenswitch pswitch climb carry cape"]], + ["yellow", "0A10", "0060", ["yellowswitch greenswitch yoshi carry", "yellowswitch greenswitch pswitch climb carry cape"]], + ["green", "0A20", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0A30", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0A40", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0A50", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0A60", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0A70", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0A80", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0A90", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0AA0", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0AB0", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0AC0", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0AD0", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0AE0", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0AF0", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0B00", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0B10", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0B20", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0B30", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0B40", "0080", ["greenswitch specialworld yoshi carry"]], + ["green", "0B50", "0080", ["greenswitch specialworld yoshi carry"]] + ], + "137_test": [], + "138_test": [], + "139_test": [], + "13A_test": [], + "13B_test": [] +} \ No newline at end of file diff --git a/worlds/smw/data/graphics/indicators.bin b/worlds/smw/data/graphics/indicators.bin new file mode 100644 index 00000000..70e70365 Binary files /dev/null and b/worlds/smw/data/graphics/indicators.bin differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/agnus_castle.mw3 b/worlds/smw/data/palettes/level/castle_pillars/agnus_castle.mw3 new file mode 100644 index 00000000..99924e1f Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/agnus_castle.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/cheese.mw3 b/worlds/smw/data/palettes/level/castle_pillars/cheese.mw3 new file mode 100644 index 00000000..e9b83f1b Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/cheese.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/chocolate_blue.mw3 b/worlds/smw/data/palettes/level/castle_pillars/chocolate_blue.mw3 new file mode 100644 index 00000000..51073a16 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/chocolate_blue.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/dark_aqua_marine.mw3 b/worlds/smw/data/palettes/level/castle_pillars/dark_aqua_marine.mw3 new file mode 100644 index 00000000..a482231a Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/dark_aqua_marine.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/dollhouse.mw3 b/worlds/smw/data/palettes/level/castle_pillars/dollhouse.mw3 new file mode 100644 index 00000000..06849cea Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/dollhouse.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/gold_caslte.mw3 b/worlds/smw/data/palettes/level/castle_pillars/gold_caslte.mw3 new file mode 100644 index 00000000..f4c03d2c Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/gold_caslte.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/keves_castle.mw3 b/worlds/smw/data/palettes/level/castle_pillars/keves_castle.mw3 new file mode 100644 index 00000000..a1ab883c Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/keves_castle.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/original_gray.mw3 b/worlds/smw/data/palettes/level/castle_pillars/original_gray.mw3 new file mode 100644 index 00000000..37143fb2 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/original_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/original_green.mw3 b/worlds/smw/data/palettes/level/castle_pillars/original_green.mw3 new file mode 100644 index 00000000..4124e190 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/original_mustard.mw3 b/worlds/smw/data/palettes/level/castle_pillars/original_mustard.mw3 new file mode 100644 index 00000000..1ce7a0f3 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/original_mustard.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/original_white.mw3 b/worlds/smw/data/palettes/level/castle_pillars/original_white.mw3 new file mode 100644 index 00000000..f235216f Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/original_white.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/pink_purple.mw3 b/worlds/smw/data/palettes/level/castle_pillars/pink_purple.mw3 new file mode 100644 index 00000000..591ce013 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/pink_purple.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/purple_pink.mw3 b/worlds/smw/data/palettes/level/castle_pillars/purple_pink.mw3 new file mode 100644 index 00000000..5bea7248 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/purple_pink.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/sand_gray.mw3 b/worlds/smw/data/palettes/level/castle_pillars/sand_gray.mw3 new file mode 100644 index 00000000..eff02a49 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/sand_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/sand_green.mw3 b/worlds/smw/data/palettes/level/castle_pillars/sand_green.mw3 new file mode 100644 index 00000000..5757d8fb Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/sand_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/shenhe.mw3 b/worlds/smw/data/palettes/level/castle_pillars/shenhe.mw3 new file mode 100644 index 00000000..93dc170a Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/shenhe.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_pillars/whatsapp.mw3 b/worlds/smw/data/palettes/level/castle_pillars/whatsapp.mw3 new file mode 100644 index 00000000..198f46ec Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_pillars/whatsapp.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/dark_lava.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/dark_lava.mw3 new file mode 100644 index 00000000..477701e8 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/dark_lava.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/dark_purple.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/dark_purple.mw3 new file mode 100644 index 00000000..29eff5ae Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/dark_purple.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/dollhouse.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/dollhouse.mw3 new file mode 100644 index 00000000..73f69240 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/dollhouse.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/forgotten_temple.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/forgotten_temple.mw3 new file mode 100644 index 00000000..35d97033 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/forgotten_temple.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/original_gray.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/original_gray.mw3 new file mode 100644 index 00000000..37143fb2 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/original_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/original_volcanic.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/original_volcanic.mw3 new file mode 100644 index 00000000..21d82d7c Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/original_volcanic.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/original_water.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/original_water.mw3 new file mode 100644 index 00000000..20ee47e8 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/original_water.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/sand_gray.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/sand_gray.mw3 new file mode 100644 index 00000000..5b11808a Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/sand_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/sand_green.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/sand_green.mw3 new file mode 100644 index 00000000..2a5ff0ed Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/sand_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/shenhe.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/shenhe.mw3 new file mode 100644 index 00000000..93dc170a Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/shenhe.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/water.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/water.mw3 new file mode 100644 index 00000000..9822a3c2 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/water.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_small_windows/whatsapp.mw3 b/worlds/smw/data/palettes/level/castle_small_windows/whatsapp.mw3 new file mode 100644 index 00000000..198f46ec Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_small_windows/whatsapp.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/cheese.mw3 b/worlds/smw/data/palettes/level/castle_wall/cheese.mw3 new file mode 100644 index 00000000..913ad397 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/cheese.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/dollhouse.mw3 b/worlds/smw/data/palettes/level/castle_wall/dollhouse.mw3 new file mode 100644 index 00000000..73f69240 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/dollhouse.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/grand_marshall.mw3 b/worlds/smw/data/palettes/level/castle_wall/grand_marshall.mw3 new file mode 100644 index 00000000..574d557f Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/grand_marshall.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/hot_wall.mw3 b/worlds/smw/data/palettes/level/castle_wall/hot_wall.mw3 new file mode 100644 index 00000000..44703fe4 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/hot_wall.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/original.mw3 b/worlds/smw/data/palettes/level/castle_wall/original.mw3 new file mode 100644 index 00000000..395fb66a Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/sand_green.mw3 b/worlds/smw/data/palettes/level/castle_wall/sand_green.mw3 new file mode 100644 index 00000000..5757d8fb Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/sand_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/shenhe.mw3 b/worlds/smw/data/palettes/level/castle_wall/shenhe.mw3 new file mode 100644 index 00000000..93dc170a Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/shenhe.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_wall/water.mw3 b/worlds/smw/data/palettes/level/castle_wall/water.mw3 new file mode 100644 index 00000000..a0955e82 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_wall/water.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/brawler_pink.mw3 b/worlds/smw/data/palettes/level/castle_windows/brawler_pink.mw3 new file mode 100644 index 00000000..69c496fc Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/brawler_pink.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/cheese.mw3 b/worlds/smw/data/palettes/level/castle_windows/cheese.mw3 new file mode 100644 index 00000000..d91826e8 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/cheese.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/dark_aqua_marine.mw3 b/worlds/smw/data/palettes/level/castle_windows/dark_aqua_marine.mw3 new file mode 100644 index 00000000..501f11d1 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/dark_aqua_marine.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/dollhouse.mw3 b/worlds/smw/data/palettes/level/castle_windows/dollhouse.mw3 new file mode 100644 index 00000000..d3e5fe4b Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/dollhouse.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/original_brown.mw3 b/worlds/smw/data/palettes/level/castle_windows/original_brown.mw3 new file mode 100644 index 00000000..0bcc7305 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/original_brown.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/original_gray.mw3 b/worlds/smw/data/palettes/level/castle_windows/original_gray.mw3 new file mode 100644 index 00000000..37143fb2 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/original_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/original_water.mw3 b/worlds/smw/data/palettes/level/castle_windows/original_water.mw3 new file mode 100644 index 00000000..d61f6dba Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/original_water.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/red_castle.mw3 b/worlds/smw/data/palettes/level/castle_windows/red_castle.mw3 new file mode 100644 index 00000000..666c17f6 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/red_castle.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/shenhe.mw3 b/worlds/smw/data/palettes/level/castle_windows/shenhe.mw3 new file mode 100644 index 00000000..93dc170a Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/shenhe.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/underwater.mw3 b/worlds/smw/data/palettes/level/castle_windows/underwater.mw3 new file mode 100644 index 00000000..db5c1a99 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/underwater.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/water.mw3 b/worlds/smw/data/palettes/level/castle_windows/water.mw3 new file mode 100644 index 00000000..a0955e82 Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/water.mw3 differ diff --git a/worlds/smw/data/palettes/level/castle_windows/whatsapp.mw3 b/worlds/smw/data/palettes/level/castle_windows/whatsapp.mw3 new file mode 100644 index 00000000..198f46ec Binary files /dev/null and b/worlds/smw/data/palettes/level/castle_windows/whatsapp.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/brawler_dark.mw3 b/worlds/smw/data/palettes/level/cave/brawler_dark.mw3 new file mode 100644 index 00000000..9197e99e Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/brawler_dark.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/brawler_purple.mw3 b/worlds/smw/data/palettes/level/cave/brawler_purple.mw3 new file mode 100644 index 00000000..0bd5a1bf Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/brawler_purple.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/brawler_red.mw3 b/worlds/smw/data/palettes/level/cave/brawler_red.mw3 new file mode 100644 index 00000000..e3f5cdfa Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/brawler_red.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/brawler_teal.mw3 b/worlds/smw/data/palettes/level/cave/brawler_teal.mw3 new file mode 100644 index 00000000..1927ac99 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/brawler_teal.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/bright_magma.mw3 b/worlds/smw/data/palettes/level/cave/bright_magma.mw3 new file mode 100644 index 00000000..92e059d8 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/bright_magma.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/dark_red.mw3 b/worlds/smw/data/palettes/level/cave/dark_red.mw3 new file mode 100644 index 00000000..b2cc6068 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/dark_red.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/glowing_mushroom.mw3 b/worlds/smw/data/palettes/level/cave/glowing_mushroom.mw3 new file mode 100644 index 00000000..5b5531c7 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/glowing_mushroom.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/green_depths.mw3 b/worlds/smw/data/palettes/level/cave/green_depths.mw3 new file mode 100644 index 00000000..7f7593d2 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/green_depths.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/ice.mw3 b/worlds/smw/data/palettes/level/cave/ice.mw3 new file mode 100644 index 00000000..23b0b2ef Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/ice.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/magma_cave.mw3 b/worlds/smw/data/palettes/level/cave/magma_cave.mw3 new file mode 100644 index 00000000..ca297deb Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/magma_cave.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/original_chocolate.mw3 b/worlds/smw/data/palettes/level/cave/original_chocolate.mw3 new file mode 100644 index 00000000..db2693d6 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/original_chocolate.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/original_gray.mw3 b/worlds/smw/data/palettes/level/cave/original_gray.mw3 new file mode 100644 index 00000000..2e01f098 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/original_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/original_ice.mw3 b/worlds/smw/data/palettes/level/cave/original_ice.mw3 new file mode 100644 index 00000000..6d17d16e Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/original_ice.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/original_mustard.mw3 b/worlds/smw/data/palettes/level/cave/original_mustard.mw3 new file mode 100644 index 00000000..001ed133 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/original_mustard.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/original_volcanic.mw3 b/worlds/smw/data/palettes/level/cave/original_volcanic.mw3 new file mode 100644 index 00000000..96befdfa Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/original_volcanic.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/snow.mw3 b/worlds/smw/data/palettes/level/cave/snow.mw3 new file mode 100644 index 00000000..2328e1a2 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/snow.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/toxic.mw3 b/worlds/smw/data/palettes/level/cave/toxic.mw3 new file mode 100644 index 00000000..a78538dd Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/toxic.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave/toxic_moss.mw3 b/worlds/smw/data/palettes/level/cave/toxic_moss.mw3 new file mode 100644 index 00000000..9afe6110 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave/toxic_moss.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/bocchi_rock_hair_cube_things.mw3 b/worlds/smw/data/palettes/level/cave_rocks/bocchi_rock_hair_cube_things.mw3 new file mode 100644 index 00000000..0fb33b2d Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/bocchi_rock_hair_cube_things.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/brawler_volcanic.mw3 b/worlds/smw/data/palettes/level/cave_rocks/brawler_volcanic.mw3 new file mode 100644 index 00000000..5a3cf230 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/brawler_volcanic.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/ice.mw3 b/worlds/smw/data/palettes/level/cave_rocks/ice.mw3 new file mode 100644 index 00000000..baa52fbf Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/ice.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/layer_2.mw3 b/worlds/smw/data/palettes/level/cave_rocks/layer_2.mw3 new file mode 100644 index 00000000..ff354e34 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/layer_2.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/original_gray.mw3 b/worlds/smw/data/palettes/level/cave_rocks/original_gray.mw3 new file mode 100644 index 00000000..bf50bed4 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/original_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/original_mustard.mw3 b/worlds/smw/data/palettes/level/cave_rocks/original_mustard.mw3 new file mode 100644 index 00000000..8150d468 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/original_mustard.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/pyra_mythra_ft_pneuma.mw3 b/worlds/smw/data/palettes/level/cave_rocks/pyra_mythra_ft_pneuma.mw3 new file mode 100644 index 00000000..8f2b2817 Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/pyra_mythra_ft_pneuma.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/snow.mw3 b/worlds/smw/data/palettes/level/cave_rocks/snow.mw3 new file mode 100644 index 00000000..b36bff4f Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/snow.mw3 differ diff --git a/worlds/smw/data/palettes/level/cave_rocks/toxic.mw3 b/worlds/smw/data/palettes/level/cave_rocks/toxic.mw3 new file mode 100644 index 00000000..4f98b11b Binary files /dev/null and b/worlds/smw/data/palettes/level/cave_rocks/toxic.mw3 differ diff --git a/worlds/smw/data/palettes/level/clouds/atardecer.mw3 b/worlds/smw/data/palettes/level/clouds/atardecer.mw3 new file mode 100644 index 00000000..bb175496 Binary files /dev/null and b/worlds/smw/data/palettes/level/clouds/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/clouds/charcoal.mw3 b/worlds/smw/data/palettes/level/clouds/charcoal.mw3 new file mode 100644 index 00000000..755f9af8 Binary files /dev/null and b/worlds/smw/data/palettes/level/clouds/charcoal.mw3 differ diff --git a/worlds/smw/data/palettes/level/clouds/cloudy.mw3 b/worlds/smw/data/palettes/level/clouds/cloudy.mw3 new file mode 100644 index 00000000..b7d07d34 Binary files /dev/null and b/worlds/smw/data/palettes/level/clouds/cloudy.mw3 differ diff --git a/worlds/smw/data/palettes/level/clouds/cotton_candy.mw3 b/worlds/smw/data/palettes/level/clouds/cotton_candy.mw3 new file mode 100644 index 00000000..f9ddeb89 Binary files /dev/null and b/worlds/smw/data/palettes/level/clouds/cotton_candy.mw3 differ diff --git a/worlds/smw/data/palettes/level/clouds/original_green.mw3 b/worlds/smw/data/palettes/level/clouds/original_green.mw3 new file mode 100644 index 00000000..79af5087 Binary files /dev/null and b/worlds/smw/data/palettes/level/clouds/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/clouds/original_orange.mw3 b/worlds/smw/data/palettes/level/clouds/original_orange.mw3 new file mode 100644 index 00000000..453b717b Binary files /dev/null and b/worlds/smw/data/palettes/level/clouds/original_orange.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/agnian_queen.mw3 b/worlds/smw/data/palettes/level/forest/agnian_queen.mw3 new file mode 100644 index 00000000..f187d8a1 Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/agnian_queen.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/atardecer.mw3 b/worlds/smw/data/palettes/level/forest/atardecer.mw3 new file mode 100644 index 00000000..95e07701 Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/frozen.mw3 b/worlds/smw/data/palettes/level/forest/frozen.mw3 new file mode 100644 index 00000000..f6dc97c1 Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/frozen.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/halloween.mw3 b/worlds/smw/data/palettes/level/forest/halloween.mw3 new file mode 100644 index 00000000..2e23b6dd Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/halloween.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/kevesi_queen.mw3 b/worlds/smw/data/palettes/level/forest/kevesi_queen.mw3 new file mode 100644 index 00000000..1a4cd413 Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/kevesi_queen.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/original_dark.mw3 b/worlds/smw/data/palettes/level/forest/original_dark.mw3 new file mode 100644 index 00000000..7c28daa0 Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/original_dark.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/original_fall.mw3 b/worlds/smw/data/palettes/level/forest/original_fall.mw3 new file mode 100644 index 00000000..4b67c03d Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/original_fall.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/original_green.mw3 b/worlds/smw/data/palettes/level/forest/original_green.mw3 new file mode 100644 index 00000000..9139338c Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/sakura.mw3 b/worlds/smw/data/palettes/level/forest/sakura.mw3 new file mode 100644 index 00000000..df694e2b Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/sakura.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/snow_dark_leaves.mw3 b/worlds/smw/data/palettes/level/forest/snow_dark_leaves.mw3 new file mode 100644 index 00000000..32025698 Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/snow_dark_leaves.mw3 differ diff --git a/worlds/smw/data/palettes/level/forest/snow_green_leaves.mw3 b/worlds/smw/data/palettes/level/forest/snow_green_leaves.mw3 new file mode 100644 index 00000000..a2346ca3 Binary files /dev/null and b/worlds/smw/data/palettes/level/forest/snow_green_leaves.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/brawler_cyan.mw3 b/worlds/smw/data/palettes/level/ghost_house/brawler_cyan.mw3 new file mode 100644 index 00000000..cb659085 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/brawler_cyan.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/brawler_orange.mw3 b/worlds/smw/data/palettes/level/ghost_house/brawler_orange.mw3 new file mode 100644 index 00000000..750def41 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/brawler_orange.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/brawler_purple.mw3 b/worlds/smw/data/palettes/level/ghost_house/brawler_purple.mw3 new file mode 100644 index 00000000..60ac884b Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/brawler_purple.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/creepypasta.mw3 b/worlds/smw/data/palettes/level/ghost_house/creepypasta.mw3 new file mode 100644 index 00000000..92876c3c Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/creepypasta.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/crimson_house.mw3 b/worlds/smw/data/palettes/level/ghost_house/crimson_house.mw3 new file mode 100644 index 00000000..fc7369f7 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/crimson_house.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/golden_house.mw3 b/worlds/smw/data/palettes/level/ghost_house/golden_house.mw3 new file mode 100644 index 00000000..5d4e153b Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/golden_house.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/halloween_pallet.mw3 b/worlds/smw/data/palettes/level/ghost_house/halloween_pallet.mw3 new file mode 100644 index 00000000..f73c16e4 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/halloween_pallet.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/orange_lights.mw3 b/worlds/smw/data/palettes/level/ghost_house/orange_lights.mw3 new file mode 100644 index 00000000..8eddf82f Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/orange_lights.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/original_aqua.mw3 b/worlds/smw/data/palettes/level/ghost_house/original_aqua.mw3 new file mode 100644 index 00000000..fec63947 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/original_aqua.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/original_blue.mw3 b/worlds/smw/data/palettes/level/ghost_house/original_blue.mw3 new file mode 100644 index 00000000..b46979ed Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/original_blue.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/original_dark.mw3 b/worlds/smw/data/palettes/level/ghost_house/original_dark.mw3 new file mode 100644 index 00000000..eb615209 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/original_dark.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house/original_white.mw3 b/worlds/smw/data/palettes/level/ghost_house/original_white.mw3 new file mode 100644 index 00000000..0d5c43f3 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house/original_white.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house_exit/evening_exit.mw3 b/worlds/smw/data/palettes/level/ghost_house_exit/evening_exit.mw3 new file mode 100644 index 00000000..98a5f92a Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house_exit/evening_exit.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house_exit/golden_house.mw3 b/worlds/smw/data/palettes/level/ghost_house_exit/golden_house.mw3 new file mode 100644 index 00000000..45f5c670 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house_exit/golden_house.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house_exit/original.mw3 b/worlds/smw/data/palettes/level/ghost_house_exit/original.mw3 new file mode 100644 index 00000000..3856df59 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house_exit/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house_exit/original_blue_door.mw3 b/worlds/smw/data/palettes/level/ghost_house_exit/original_blue_door.mw3 new file mode 100644 index 00000000..b43818c5 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house_exit/original_blue_door.mw3 differ diff --git a/worlds/smw/data/palettes/level/ghost_house_exit/underwater.mw3 b/worlds/smw/data/palettes/level/ghost_house_exit/underwater.mw3 new file mode 100644 index 00000000..a92bc7a1 Binary files /dev/null and b/worlds/smw/data/palettes/level/ghost_house_exit/underwater.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/atardecer.mw3 b/worlds/smw/data/palettes/level/grass_clouds/atardecer.mw3 new file mode 100644 index 00000000..2b055f2f Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/crimson.mw3 b/worlds/smw/data/palettes/level/grass_clouds/crimson.mw3 new file mode 100644 index 00000000..aefeb5d3 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/crimson.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/electro.mw3 b/worlds/smw/data/palettes/level/grass_clouds/electro.mw3 new file mode 100644 index 00000000..8a397198 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/electro.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/geo.mw3 b/worlds/smw/data/palettes/level/grass_clouds/geo.mw3 new file mode 100644 index 00000000..f085c6f3 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/geo.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/miku.mw3 b/worlds/smw/data/palettes/level/grass_clouds/miku.mw3 new file mode 100644 index 00000000..3b009fbc Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/miku.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/original_blue.mw3 b/worlds/smw/data/palettes/level/grass_clouds/original_blue.mw3 new file mode 100644 index 00000000..bcf57d82 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/original_blue.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/original_green.mw3 b/worlds/smw/data/palettes/level/grass_clouds/original_green.mw3 new file mode 100644 index 00000000..e896e0dc Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/pizza.mw3 b/worlds/smw/data/palettes/level/grass_clouds/pizza.mw3 new file mode 100644 index 00000000..2be2f2db Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/pizza.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/sakura.mw3 b/worlds/smw/data/palettes/level/grass_clouds/sakura.mw3 new file mode 100644 index 00000000..9a0d8d86 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/sakura.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/shukfr.mw3 b/worlds/smw/data/palettes/level/grass_clouds/shukfr.mw3 new file mode 100644 index 00000000..635d22c9 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/shukfr.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/snow_day.mw3 b/worlds/smw/data/palettes/level/grass_clouds/snow_day.mw3 new file mode 100644 index 00000000..8a7c6321 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/snow_day.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_clouds/volcanic_rock.mw3 b/worlds/smw/data/palettes/level/grass_clouds/volcanic_rock.mw3 new file mode 100644 index 00000000..224bfed2 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_clouds/volcanic_rock.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/atardecer.mw3 b/worlds/smw/data/palettes/level/grass_forest/atardecer.mw3 new file mode 100644 index 00000000..cf97cf05 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/autumn.mw3 b/worlds/smw/data/palettes/level/grass_forest/autumn.mw3 new file mode 100644 index 00000000..89d75ed2 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/autumn.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/brawler.mw3 b/worlds/smw/data/palettes/level/grass_forest/brawler.mw3 new file mode 100644 index 00000000..85db596e Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/brawler.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/brawler_atardecer.mw3 b/worlds/smw/data/palettes/level/grass_forest/brawler_atardecer.mw3 new file mode 100644 index 00000000..39b73646 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/brawler_atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/brawler_green.mw3 b/worlds/smw/data/palettes/level/grass_forest/brawler_green.mw3 new file mode 100644 index 00000000..8ada9a25 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/brawler_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/crimson.mw3 b/worlds/smw/data/palettes/level/grass_forest/crimson.mw3 new file mode 100644 index 00000000..48465a54 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/crimson.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/deep_forest.mw3 b/worlds/smw/data/palettes/level/grass_forest/deep_forest.mw3 new file mode 100644 index 00000000..91517aa1 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/deep_forest.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/electro.mw3 b/worlds/smw/data/palettes/level/grass_forest/electro.mw3 new file mode 100644 index 00000000..d462646a Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/electro.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/geo.mw3 b/worlds/smw/data/palettes/level/grass_forest/geo.mw3 new file mode 100644 index 00000000..f085c6f3 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/geo.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/miku.mw3 b/worlds/smw/data/palettes/level/grass_forest/miku.mw3 new file mode 100644 index 00000000..5eeaf6c5 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/miku.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/myon.mw3 b/worlds/smw/data/palettes/level/grass_forest/myon.mw3 new file mode 100644 index 00000000..8420ad56 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/myon.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/original_aqua.mw3 b/worlds/smw/data/palettes/level/grass_forest/original_aqua.mw3 new file mode 100644 index 00000000..ba8ffc90 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/original_aqua.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/original_green.mw3 b/worlds/smw/data/palettes/level/grass_forest/original_green.mw3 new file mode 100644 index 00000000..607d80cc Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/pizza.mw3 b/worlds/smw/data/palettes/level/grass_forest/pizza.mw3 new file mode 100644 index 00000000..2be2f2db Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/pizza.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/sakura.mw3 b/worlds/smw/data/palettes/level/grass_forest/sakura.mw3 new file mode 100644 index 00000000..5b7627fe Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/sakura.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/snow_dark_leaves.mw3 b/worlds/smw/data/palettes/level/grass_forest/snow_dark_leaves.mw3 new file mode 100644 index 00000000..47bbd42b Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/snow_dark_leaves.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/snow_green.mw3 b/worlds/smw/data/palettes/level/grass_forest/snow_green.mw3 new file mode 100644 index 00000000..50364a4a Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/snow_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_forest/winter.mw3 b/worlds/smw/data/palettes/level/grass_forest/winter.mw3 new file mode 100644 index 00000000..63109c24 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_forest/winter.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/atardecer.mw3 b/worlds/smw/data/palettes/level/grass_hills/atardecer.mw3 new file mode 100644 index 00000000..0c32989c Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/brawler_green.mw3 b/worlds/smw/data/palettes/level/grass_hills/brawler_green.mw3 new file mode 100644 index 00000000..612dcce9 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/brawler_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/crimson.mw3 b/worlds/smw/data/palettes/level/grass_hills/crimson.mw3 new file mode 100644 index 00000000..9f567578 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/crimson.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/electro.mw3 b/worlds/smw/data/palettes/level/grass_hills/electro.mw3 new file mode 100644 index 00000000..c0796b53 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/electro.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/geo.mw3 b/worlds/smw/data/palettes/level/grass_hills/geo.mw3 new file mode 100644 index 00000000..ac56278a Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/geo.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/miku.mw3 b/worlds/smw/data/palettes/level/grass_hills/miku.mw3 new file mode 100644 index 00000000..49c78fad Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/miku.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/mogumogu.mw3 b/worlds/smw/data/palettes/level/grass_hills/mogumogu.mw3 new file mode 100644 index 00000000..88af74ce Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/mogumogu.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/nocturno.mw3 b/worlds/smw/data/palettes/level/grass_hills/nocturno.mw3 new file mode 100644 index 00000000..f0eeaee1 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/nocturno.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/original.mw3 b/worlds/smw/data/palettes/level/grass_hills/original.mw3 new file mode 100644 index 00000000..705c6602 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/sakura.mw3 b/worlds/smw/data/palettes/level/grass_hills/sakura.mw3 new file mode 100644 index 00000000..6c65dc4f Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/sakura.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/snow.mw3 b/worlds/smw/data/palettes/level/grass_hills/snow.mw3 new file mode 100644 index 00000000..38d11468 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/snow.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/sunsetish_grass_hills.mw3 b/worlds/smw/data/palettes/level/grass_hills/sunsetish_grass_hills.mw3 new file mode 100644 index 00000000..c51bdfc6 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/sunsetish_grass_hills.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_hills/toothpaste.mw3 b/worlds/smw/data/palettes/level/grass_hills/toothpaste.mw3 new file mode 100644 index 00000000..7c108ae3 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_hills/toothpaste.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/brawler_lifeless.mw3 b/worlds/smw/data/palettes/level/grass_mountains/brawler_lifeless.mw3 new file mode 100644 index 00000000..b9979692 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/brawler_lifeless.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/classic_sm.mw3 b/worlds/smw/data/palettes/level/grass_mountains/classic_sm.mw3 new file mode 100644 index 00000000..0e77cc01 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/classic_sm.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/crimson.mw3 b/worlds/smw/data/palettes/level/grass_mountains/crimson.mw3 new file mode 100644 index 00000000..9527a0a2 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/crimson.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/dry_hills.mw3 b/worlds/smw/data/palettes/level/grass_mountains/dry_hills.mw3 new file mode 100644 index 00000000..61bdc7b8 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/dry_hills.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/electro.mw3 b/worlds/smw/data/palettes/level/grass_mountains/electro.mw3 new file mode 100644 index 00000000..684b84a6 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/electro.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/geo.mw3 b/worlds/smw/data/palettes/level/grass_mountains/geo.mw3 new file mode 100644 index 00000000..f085c6f3 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/geo.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/late_sandish.mw3 b/worlds/smw/data/palettes/level/grass_mountains/late_sandish.mw3 new file mode 100644 index 00000000..d94156ad Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/late_sandish.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/miku.mw3 b/worlds/smw/data/palettes/level/grass_mountains/miku.mw3 new file mode 100644 index 00000000..5eeaf6c5 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/miku.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/original_aqua.mw3 b/worlds/smw/data/palettes/level/grass_mountains/original_aqua.mw3 new file mode 100644 index 00000000..fda1d358 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/original_aqua.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/original_blue.mw3 b/worlds/smw/data/palettes/level/grass_mountains/original_blue.mw3 new file mode 100644 index 00000000..29404f64 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/original_blue.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/original_green.mw3 b/worlds/smw/data/palettes/level/grass_mountains/original_green.mw3 new file mode 100644 index 00000000..607d80cc Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/original_white.mw3 b/worlds/smw/data/palettes/level/grass_mountains/original_white.mw3 new file mode 100644 index 00000000..7ecd4e3c Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/original_white.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/recksfr.mw3 b/worlds/smw/data/palettes/level/grass_mountains/recksfr.mw3 new file mode 100644 index 00000000..b5da161c Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/recksfr.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/sakura_hills.mw3 b/worlds/smw/data/palettes/level/grass_mountains/sakura_hills.mw3 new file mode 100644 index 00000000..0f8144cd Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/sakura_hills.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_mountains/snow_day.mw3 b/worlds/smw/data/palettes/level/grass_mountains/snow_day.mw3 new file mode 100644 index 00000000..3b182c3b Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_mountains/snow_day.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/atardecer.mw3 b/worlds/smw/data/palettes/level/grass_rocks/atardecer.mw3 new file mode 100644 index 00000000..2212fc60 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/crimson.mw3 b/worlds/smw/data/palettes/level/grass_rocks/crimson.mw3 new file mode 100644 index 00000000..9527a0a2 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/crimson.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/dark.mw3 b/worlds/smw/data/palettes/level/grass_rocks/dark.mw3 new file mode 100644 index 00000000..1f6aa06a Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/dark.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/electro.mw3 b/worlds/smw/data/palettes/level/grass_rocks/electro.mw3 new file mode 100644 index 00000000..684b84a6 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/electro.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/geo.mw3 b/worlds/smw/data/palettes/level/grass_rocks/geo.mw3 new file mode 100644 index 00000000..f085c6f3 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/geo.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/ice.mw3 b/worlds/smw/data/palettes/level/grass_rocks/ice.mw3 new file mode 100644 index 00000000..349ce8e0 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/ice.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/miku.mw3 b/worlds/smw/data/palettes/level/grass_rocks/miku.mw3 new file mode 100644 index 00000000..5eeaf6c5 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/miku.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/napolitano.mw3 b/worlds/smw/data/palettes/level/grass_rocks/napolitano.mw3 new file mode 100644 index 00000000..bc6ebc66 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/napolitano.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/original_aqua.mw3 b/worlds/smw/data/palettes/level/grass_rocks/original_aqua.mw3 new file mode 100644 index 00000000..fda1d358 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/original_aqua.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/original_choco_volcanic.mw3 b/worlds/smw/data/palettes/level/grass_rocks/original_choco_volcanic.mw3 new file mode 100644 index 00000000..4b4631e8 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/original_choco_volcanic.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/original_ice.mw3 b/worlds/smw/data/palettes/level/grass_rocks/original_ice.mw3 new file mode 100644 index 00000000..041aa9ed Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/original_ice.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/original_volcanic.mw3 b/worlds/smw/data/palettes/level/grass_rocks/original_volcanic.mw3 new file mode 100644 index 00000000..d7a19dc3 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/original_volcanic.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/original_volcanic_green.mw3 b/worlds/smw/data/palettes/level/grass_rocks/original_volcanic_green.mw3 new file mode 100644 index 00000000..86b038d6 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/original_volcanic_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/original_white.mw3 b/worlds/smw/data/palettes/level/grass_rocks/original_white.mw3 new file mode 100644 index 00000000..53d76fe5 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/original_white.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/original_white_2.mw3 b/worlds/smw/data/palettes/level/grass_rocks/original_white_2.mw3 new file mode 100644 index 00000000..596e5b93 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/original_white_2.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/recks.mw3 b/worlds/smw/data/palettes/level/grass_rocks/recks.mw3 new file mode 100644 index 00000000..57ed9fcb Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/recks.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/sakura.mw3 b/worlds/smw/data/palettes/level/grass_rocks/sakura.mw3 new file mode 100644 index 00000000..a339b4a6 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/sakura.mw3 differ diff --git a/worlds/smw/data/palettes/level/grass_rocks/thanks_doc.mw3 b/worlds/smw/data/palettes/level/grass_rocks/thanks_doc.mw3 new file mode 100644 index 00000000..2359c277 Binary files /dev/null and b/worlds/smw/data/palettes/level/grass_rocks/thanks_doc.mw3 differ diff --git a/worlds/smw/data/palettes/level/logs/brawler.mw3 b/worlds/smw/data/palettes/level/logs/brawler.mw3 new file mode 100644 index 00000000..ed25ef97 Binary files /dev/null and b/worlds/smw/data/palettes/level/logs/brawler.mw3 differ diff --git a/worlds/smw/data/palettes/level/logs/evening.mw3 b/worlds/smw/data/palettes/level/logs/evening.mw3 new file mode 100644 index 00000000..a5cb1bf5 Binary files /dev/null and b/worlds/smw/data/palettes/level/logs/evening.mw3 differ diff --git a/worlds/smw/data/palettes/level/logs/mahogany.mw3 b/worlds/smw/data/palettes/level/logs/mahogany.mw3 new file mode 100644 index 00000000..80d5c2c1 Binary files /dev/null and b/worlds/smw/data/palettes/level/logs/mahogany.mw3 differ diff --git a/worlds/smw/data/palettes/level/logs/not_quite_dawnbreak.mw3 b/worlds/smw/data/palettes/level/logs/not_quite_dawnbreak.mw3 new file mode 100644 index 00000000..ecce214b Binary files /dev/null and b/worlds/smw/data/palettes/level/logs/not_quite_dawnbreak.mw3 differ diff --git a/worlds/smw/data/palettes/level/logs/original.mw3 b/worlds/smw/data/palettes/level/logs/original.mw3 new file mode 100644 index 00000000..a1048938 Binary files /dev/null and b/worlds/smw/data/palettes/level/logs/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/logs/riesgo_de_chubascos.mw3 b/worlds/smw/data/palettes/level/logs/riesgo_de_chubascos.mw3 new file mode 100644 index 00000000..0a7e8779 Binary files /dev/null and b/worlds/smw/data/palettes/level/logs/riesgo_de_chubascos.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_cave/argent_cave.mw3 b/worlds/smw/data/palettes/level/mushroom_cave/argent_cave.mw3 new file mode 100644 index 00000000..872685eb Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_cave/argent_cave.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_cave/glowing_mushroom.mw3 b/worlds/smw/data/palettes/level/mushroom_cave/glowing_mushroom.mw3 new file mode 100644 index 00000000..b3ed246d Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_cave/glowing_mushroom.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_cave/green_aqua.mw3 b/worlds/smw/data/palettes/level/mushroom_cave/green_aqua.mw3 new file mode 100644 index 00000000..dcd6d0f0 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_cave/green_aqua.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_cave/ice.mw3 b/worlds/smw/data/palettes/level/mushroom_cave/ice.mw3 new file mode 100644 index 00000000..ec308ed9 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_cave/ice.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_cave/original.mw3 b/worlds/smw/data/palettes/level/mushroom_cave/original.mw3 new file mode 100644 index 00000000..7d97ca36 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_cave/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_cave/really_dark.mw3 b/worlds/smw/data/palettes/level/mushroom_cave/really_dark.mw3 new file mode 100644 index 00000000..696f6df3 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_cave/really_dark.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_cave/toxic.mw3 b/worlds/smw/data/palettes/level/mushroom_cave/toxic.mw3 new file mode 100644 index 00000000..75f87d3c Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_cave/toxic.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_clouds/atardecer.mw3 b/worlds/smw/data/palettes/level/mushroom_clouds/atardecer.mw3 new file mode 100644 index 00000000..8e3b464f Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_clouds/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_clouds/greenshroom.mw3 b/worlds/smw/data/palettes/level/mushroom_clouds/greenshroom.mw3 new file mode 100644 index 00000000..4ad23210 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_clouds/greenshroom.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_clouds/oilshroom.mw3 b/worlds/smw/data/palettes/level/mushroom_clouds/oilshroom.mw3 new file mode 100644 index 00000000..5013182a Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_clouds/oilshroom.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_clouds/original_aqua.mw3 b/worlds/smw/data/palettes/level/mushroom_clouds/original_aqua.mw3 new file mode 100644 index 00000000..2448aa85 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_clouds/original_aqua.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_clouds/original_blue.mw3 b/worlds/smw/data/palettes/level/mushroom_clouds/original_blue.mw3 new file mode 100644 index 00000000..268518d3 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_clouds/original_blue.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_clouds/original_yellow.mw3 b/worlds/smw/data/palettes/level/mushroom_clouds/original_yellow.mw3 new file mode 100644 index 00000000..7241f8e9 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_clouds/original_yellow.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_clouds/riesgo_de_chubascos.mw3 b/worlds/smw/data/palettes/level/mushroom_clouds/riesgo_de_chubascos.mw3 new file mode 100644 index 00000000..d515e876 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_clouds/riesgo_de_chubascos.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/atardecer.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/atardecer.mw3 new file mode 100644 index 00000000..a78e54d2 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/autumn.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/autumn.mw3 new file mode 100644 index 00000000..499e038e Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/autumn.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/count_shroomcula.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/count_shroomcula.mw3 new file mode 100644 index 00000000..74e336cf Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/count_shroomcula.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/cursed_gold.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/cursed_gold.mw3 new file mode 100644 index 00000000..f0c7d612 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/cursed_gold.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/dark_green.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/dark_green.mw3 new file mode 100644 index 00000000..2b1f15cb Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/dark_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/lifeless_gray.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/lifeless_gray.mw3 new file mode 100644 index 00000000..4690266b Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/lifeless_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/original.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/original.mw3 new file mode 100644 index 00000000..cab6dd13 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/snow_dark.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/snow_dark.mw3 new file mode 100644 index 00000000..cf3390d5 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/snow_dark.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_forest/snow_green.mw3 b/worlds/smw/data/palettes/level/mushroom_forest/snow_green.mw3 new file mode 100644 index 00000000..850630f9 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_forest/snow_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/atardecer.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/atardecer.mw3 new file mode 100644 index 00000000..19d9d324 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/atardecer_naranjo.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/atardecer_naranjo.mw3 new file mode 100644 index 00000000..dfb9d3b4 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/atardecer_naranjo.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/atardecer_verde.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/atardecer_verde.mw3 new file mode 100644 index 00000000..2c59282a Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/atardecer_verde.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/future.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/future.mw3 new file mode 100644 index 00000000..4b0e3cc5 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/future.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/original.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/original.mw3 new file mode 100644 index 00000000..3e485458 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_azul.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_azul.mw3 new file mode 100644 index 00000000..02bfc3fb Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_azul.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_cafe.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_cafe.mw3 new file mode 100644 index 00000000..e3f6885c Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_cafe.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_negro.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_negro.mw3 new file mode 100644 index 00000000..ce79e6ac Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/riesgo_de_chubascos_negro.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_hills/watermelon_skies.mw3 b/worlds/smw/data/palettes/level/mushroom_hills/watermelon_skies.mw3 new file mode 100644 index 00000000..c4b24625 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_hills/watermelon_skies.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/atardecer.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/atardecer.mw3 new file mode 100644 index 00000000..4540f32b Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/brightshroom.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/brightshroom.mw3 new file mode 100644 index 00000000..2b0b66ac Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/brightshroom.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/original_green.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/original_green.mw3 new file mode 100644 index 00000000..3c4ba930 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/original_ice.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/original_ice.mw3 new file mode 100644 index 00000000..82b72af5 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/original_ice.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/original_volcanic.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/original_volcanic.mw3 new file mode 100644 index 00000000..b366b224 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/original_volcanic.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/original_white.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/original_white.mw3 new file mode 100644 index 00000000..9ab8fe7e Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/original_white.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/riesgo_de_chubascos_cafe.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/riesgo_de_chubascos_cafe.mw3 new file mode 100644 index 00000000..c8da0fa1 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/riesgo_de_chubascos_cafe.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/riesgo_de_chubascos_negro.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/riesgo_de_chubascos_negro.mw3 new file mode 100644 index 00000000..868945e9 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/riesgo_de_chubascos_negro.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_rocks/shuk_ft_reyn.mw3 b/worlds/smw/data/palettes/level/mushroom_rocks/shuk_ft_reyn.mw3 new file mode 100644 index 00000000..4fa3e760 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_rocks/shuk_ft_reyn.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/atardecer.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/atardecer.mw3 new file mode 100644 index 00000000..d64a4bb2 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/cool.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/cool.mw3 new file mode 100644 index 00000000..326b693e Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/cool.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/dark_night.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/dark_night.mw3 new file mode 100644 index 00000000..a4c0442e Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/dark_night.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/halloween.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/halloween.mw3 new file mode 100644 index 00000000..1fcbd561 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/halloween.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/light_pollution.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/light_pollution.mw3 new file mode 100644 index 00000000..17c47d68 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/light_pollution.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/midas.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/midas.mw3 new file mode 100644 index 00000000..9adffb69 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/midas.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/original_green.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/original_green.mw3 new file mode 100644 index 00000000..9abb7915 Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/original_night.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/original_night.mw3 new file mode 100644 index 00000000..c60a87ab Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/original_night.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/purpleish_night.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/purpleish_night.mw3 new file mode 100644 index 00000000..5757d04f Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/purpleish_night.mw3 differ diff --git a/worlds/smw/data/palettes/level/mushroom_stars/riesgo_de_chubascos.mw3 b/worlds/smw/data/palettes/level/mushroom_stars/riesgo_de_chubascos.mw3 new file mode 100644 index 00000000..b17323af Binary files /dev/null and b/worlds/smw/data/palettes/level/mushroom_stars/riesgo_de_chubascos.mw3 differ diff --git a/worlds/smw/data/palettes/level/palettes.json b/worlds/smw/data/palettes/level/palettes.json new file mode 100644 index 00000000..9690c206 --- /dev/null +++ b/worlds/smw/data/palettes/level/palettes.json @@ -0,0 +1,358 @@ +{ + "grass_hills": [ + "atardecer.mw3", + "brawler_green.mw3", + "crimson.mw3", + "electro.mw3", + "geo.mw3", + "miku.mw3", + "mogumogu.mw3", + "nocturno.mw3", + "original.mw3", + "sakura.mw3", + "snow.mw3", + "sunsetish_grass_hills.mw3", + "toothpaste.mw3" + ], + "grass_forest": [ + "atardecer.mw3", + "autumn.mw3", + "brawler.mw3", + "brawler_atardecer.mw3", + "brawler_green.mw3", + "crimson.mw3", + "deep_forest.mw3", + "electro.mw3", + "geo.mw3", + "miku.mw3", + "myon.mw3", + "original_aqua.mw3", + "original_green.mw3", + "pizza.mw3", + "sakura.mw3", + "snow_dark_leaves.mw3", + "snow_green.mw3", + "winter.mw3" + ], + "grass_rocks": [ + "atardecer.mw3", + "crimson.mw3", + "dark.mw3", + "electro.mw3", + "geo.mw3", + "ice.mw3", + "miku.mw3", + "napolitano.mw3", + "original_aqua.mw3", + "original_choco_volcanic.mw3", + "original_ice.mw3", + "original_volcanic.mw3", + "original_volcanic_green.mw3", + "original_white.mw3", + "original_white_2.mw3", + "recks.mw3", + "sakura.mw3", + "thanks_doc.mw3" + ], + "grass_clouds": [ + "atardecer.mw3", + "crimson.mw3", + "electro.mw3", + "geo.mw3", + "miku.mw3", + "original_blue.mw3", + "original_green.mw3", + "pizza.mw3", + "sakura.mw3", + "shukfr.mw3", + "snow_day.mw3", + "volcanic_rock.mw3" + ], + "grass_mountains": [ + "brawler_lifeless.mw3", + "classic_sm.mw3", + "crimson.mw3", + "dry_hills.mw3", + "electro.mw3", + "geo.mw3", + "late_sandish.mw3", + "miku.mw3", + "original_aqua.mw3", + "original_blue.mw3", + "original_green.mw3", + "original_white.mw3", + "recksfr.mw3", + "sakura_hills.mw3", + "snow_day.mw3" + ], + "cave": [ + "brawler_dark.mw3", + "brawler_purple.mw3", + "brawler_red.mw3", + "brawler_teal.mw3", + "bright_magma.mw3", + "dark_red.mw3", + "glowing_mushroom.mw3", + "green_depths.mw3", + "ice.mw3", + "magma_cave.mw3", + "original_chocolate.mw3", + "original_gray.mw3", + "original_ice.mw3", + "original_mustard.mw3", + "original_volcanic.mw3", + "snow.mw3", + "toxic.mw3", + "toxic_moss.mw3" + ], + "cave_rocks": [ + "bocchi_rock_hair_cube_things.mw3", + "brawler_volcanic.mw3", + "ice.mw3", + "layer_2.mw3", + "original_gray.mw3", + "original_mustard.mw3", + "pyra_mythra_ft_pneuma.mw3", + "snow.mw3", + "toxic.mw3" + ], + "water": [ + "dark_water.mw3", + "deep_aqua.mw3", + "deep_chocolate.mw3", + "harmless_magma.mw3", + "murky.mw3", + "oil_spill.mw3", + "original_brown.mw3", + "original_gray.mw3", + "original_green.mw3", + "original_mustard.mw3", + "original_volcanic.mw3", + "pickle_juice.mw3" + ], + "mushroom_rocks": [ + "atardecer.mw3", + "brightshroom.mw3", + "original_green.mw3", + "original_ice.mw3", + "original_volcanic.mw3", + "original_white.mw3", + "riesgo_de_chubascos_cafe.mw3", + "riesgo_de_chubascos_negro.mw3", + "shuk_ft_reyn.mw3" + ], + "mushroom_clouds": [ + "atardecer.mw3", + "greenshroom.mw3", + "oilshroom.mw3", + "original_aqua.mw3", + "original_blue.mw3", + "original_yellow.mw3", + "riesgo_de_chubascos.mw3" + ], + "mushroom_forest": [ + "atardecer.mw3", + "autumn.mw3", + "count_shroomcula.mw3", + "cursed_gold.mw3", + "dark_green.mw3", + "lifeless_gray.mw3", + "original.mw3", + "snow_dark.mw3", + "snow_green.mw3" + ], + "mushroom_hills": [ + "atardecer.mw3", + "atardecer_naranjo.mw3", + "atardecer_verde.mw3", + "future.mw3", + "original.mw3", + "riesgo_de_chubascos_azul.mw3", + "riesgo_de_chubascos_cafe.mw3", + "riesgo_de_chubascos_negro.mw3", + "watermelon_skies.mw3" + ], + "mushroom_stars": [ + "atardecer.mw3", + "cool.mw3", + "dark_night.mw3", + "halloween.mw3", + "light_pollution.mw3", + "midas.mw3", + "original_green.mw3", + "original_night.mw3", + "purpleish_night.mw3", + "riesgo_de_chubascos.mw3" + ], + "mushroom_cave": [ + "argent_cave.mw3", + "glowing_mushroom.mw3", + "green_aqua.mw3", + "ice.mw3", + "original.mw3", + "really_dark.mw3", + "toxic.mw3" + ], + "forest": [ + "agnian_queen.mw3", + "atardecer.mw3", + "frozen.mw3", + "halloween.mw3", + "kevesi_queen.mw3", + "original_dark.mw3", + "original_fall.mw3", + "original_green.mw3", + "sakura.mw3", + "snow_dark_leaves.mw3", + "snow_green_leaves.mw3" + ], + "logs": [ + "brawler.mw3", + "evening.mw3", + "mahogany.mw3", + "not_quite_dawnbreak.mw3", + "original.mw3", + "riesgo_de_chubascos.mw3" + ], + "clouds": [ + "atardecer.mw3", + "charcoal.mw3", + "cloudy.mw3", + "cotton_candy.mw3", + "original_green.mw3", + "original_orange.mw3" + ], + "castle_pillars": [ + "agnus_castle.mw3", + "cheese.mw3", + "chocolate_blue.mw3", + "dark_aqua_marine.mw3", + "dollhouse.mw3", + "gold_caslte.mw3", + "keves_castle.mw3", + "original_gray.mw3", + "original_green.mw3", + "original_mustard.mw3", + "original_white.mw3", + "pink_purple.mw3", + "purple_pink.mw3", + "sand_gray.mw3", + "sand_green.mw3", + "shenhe.mw3", + "whatsapp.mw3" + ], + "castle_windows": [ + "brawler_pink.mw3", + "cheese.mw3", + "dark_aqua_marine.mw3", + "dollhouse.mw3", + "original_brown.mw3", + "original_gray.mw3", + "original_water.mw3", + "red_castle.mw3", + "shenhe.mw3", + "underwater.mw3", + "water.mw3", + "whatsapp.mw3" + ], + "castle_wall": [ + "cheese.mw3", + "dollhouse.mw3", + "grand_marshall.mw3", + "hot_wall.mw3", + "original.mw3", + "sand_green.mw3", + "shenhe.mw3", + "water.mw3" + ], + "castle_small_windows": [ + "dark_lava.mw3", + "dark_purple.mw3", + "dollhouse.mw3", + "forgotten_temple.mw3", + "original_gray.mw3", + "original_volcanic.mw3", + "original_water.mw3", + "sand_gray.mw3", + "sand_green.mw3", + "shenhe.mw3", + "water.mw3", + "whatsapp.mw3" + ], + "ghost_house": [ + "brawler_cyan.mw3", + "brawler_orange.mw3", + "brawler_purple.mw3", + "creepypasta.mw3", + "crimson_house.mw3", + "golden_house.mw3", + "halloween_pallet.mw3", + "orange_lights.mw3", + "original_aqua.mw3", + "original_blue.mw3", + "original_dark.mw3", + "original_white.mw3" + ], + "ghost_house_exit": [ + "evening_exit.mw3", + "golden_house.mw3", + "original.mw3", + "original_blue_door.mw3", + "underwater.mw3" + ], + "ship_exterior": [ + "blue_purple.mw3", + "doc_ship.mw3", + "grey_ship.mw3", + "original.mw3", + "reddish.mw3" + ], + "ship_interior": [ + "blue_purple.mw3", + "bocchi_hitori.mw3", + "bocchi_rock.mw3", + "brawler.mw3", + "grey_ship.mw3", + "original.mw3" + ], + "switch_palace": [ + "blue_grid.mw3", + "brawler_brown.mw3", + "cafe_claro.mw3", + "color_del_gato_2.mw3", + "color_de_gato.mw3", + "green_grid.mw3", + "gris.mw3", + "mario_pants.mw3", + "monado.mw3", + "morado.mw3", + "negro.mw3", + "onigiria.mw3", + "original.mw3", + "original_bonus.mw3", + "pink.mw3", + "red_grid.mw3", + "verde.mw3", + "verde_agua.mw3", + "yellow_grid.mw3", + "youbonus.mw3" + ], + "yoshi_house": [ + "atardecer.mw3", + "brawler_green.mw3", + "choco.mw3", + "crimson.mw3", + "miku.mw3", + "mogumogu.mw3", + "monocromo.mw3", + "neon.mw3", + "nieve.mw3", + "night.mw3", + "nocturno.mw3", + "original.mw3", + "sakura.mw3", + "snow.mw3", + "strong_sun.mw3", + "sunsetish_grass_hills.mw3" + ] +} \ No newline at end of file diff --git a/worlds/smw/data/palettes/level/ship_exterior/blue_purple.mw3 b/worlds/smw/data/palettes/level/ship_exterior/blue_purple.mw3 new file mode 100644 index 00000000..2e098de7 Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_exterior/blue_purple.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_exterior/doc_ship.mw3 b/worlds/smw/data/palettes/level/ship_exterior/doc_ship.mw3 new file mode 100644 index 00000000..8946830b Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_exterior/doc_ship.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_exterior/grey_ship.mw3 b/worlds/smw/data/palettes/level/ship_exterior/grey_ship.mw3 new file mode 100644 index 00000000..406656ff Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_exterior/grey_ship.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_exterior/original.mw3 b/worlds/smw/data/palettes/level/ship_exterior/original.mw3 new file mode 100644 index 00000000..20eec6ee Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_exterior/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_exterior/reddish.mw3 b/worlds/smw/data/palettes/level/ship_exterior/reddish.mw3 new file mode 100644 index 00000000..674aafd0 Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_exterior/reddish.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_interior/blue_purple.mw3 b/worlds/smw/data/palettes/level/ship_interior/blue_purple.mw3 new file mode 100644 index 00000000..9ac0f022 Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_interior/blue_purple.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_interior/bocchi_hitori.mw3 b/worlds/smw/data/palettes/level/ship_interior/bocchi_hitori.mw3 new file mode 100644 index 00000000..646c240f Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_interior/bocchi_hitori.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_interior/bocchi_rock.mw3 b/worlds/smw/data/palettes/level/ship_interior/bocchi_rock.mw3 new file mode 100644 index 00000000..4d457085 Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_interior/bocchi_rock.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_interior/brawler.mw3 b/worlds/smw/data/palettes/level/ship_interior/brawler.mw3 new file mode 100644 index 00000000..d1f3f03d Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_interior/brawler.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_interior/grey_ship.mw3 b/worlds/smw/data/palettes/level/ship_interior/grey_ship.mw3 new file mode 100644 index 00000000..78680230 Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_interior/grey_ship.mw3 differ diff --git a/worlds/smw/data/palettes/level/ship_interior/original.mw3 b/worlds/smw/data/palettes/level/ship_interior/original.mw3 new file mode 100644 index 00000000..a208db21 Binary files /dev/null and b/worlds/smw/data/palettes/level/ship_interior/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/blue_grid.mw3 b/worlds/smw/data/palettes/level/switch_palace/blue_grid.mw3 new file mode 100644 index 00000000..d613b806 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/blue_grid.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/brawler_brown.mw3 b/worlds/smw/data/palettes/level/switch_palace/brawler_brown.mw3 new file mode 100644 index 00000000..a3073c31 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/brawler_brown.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/cafe_claro.mw3 b/worlds/smw/data/palettes/level/switch_palace/cafe_claro.mw3 new file mode 100644 index 00000000..90ffc5cf Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/cafe_claro.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/color_de_gato.mw3 b/worlds/smw/data/palettes/level/switch_palace/color_de_gato.mw3 new file mode 100644 index 00000000..b5ba743b Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/color_de_gato.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/color_del_gato_2.mw3 b/worlds/smw/data/palettes/level/switch_palace/color_del_gato_2.mw3 new file mode 100644 index 00000000..9c52a56a Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/color_del_gato_2.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/green_grid.mw3 b/worlds/smw/data/palettes/level/switch_palace/green_grid.mw3 new file mode 100644 index 00000000..3a8ded95 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/green_grid.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/gris.mw3 b/worlds/smw/data/palettes/level/switch_palace/gris.mw3 new file mode 100644 index 00000000..8e8df800 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/gris.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/mario_pants.mw3 b/worlds/smw/data/palettes/level/switch_palace/mario_pants.mw3 new file mode 100644 index 00000000..b18aee2e Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/mario_pants.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/monado.mw3 b/worlds/smw/data/palettes/level/switch_palace/monado.mw3 new file mode 100644 index 00000000..c37acf98 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/monado.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/morado.mw3 b/worlds/smw/data/palettes/level/switch_palace/morado.mw3 new file mode 100644 index 00000000..ab495c8b Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/morado.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/negro.mw3 b/worlds/smw/data/palettes/level/switch_palace/negro.mw3 new file mode 100644 index 00000000..dd9db46f Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/negro.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/onigiria.mw3 b/worlds/smw/data/palettes/level/switch_palace/onigiria.mw3 new file mode 100644 index 00000000..7632dc08 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/onigiria.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/original.mw3 b/worlds/smw/data/palettes/level/switch_palace/original.mw3 new file mode 100644 index 00000000..9cc5a26c Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/original_bonus.mw3 b/worlds/smw/data/palettes/level/switch_palace/original_bonus.mw3 new file mode 100644 index 00000000..b793117f Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/original_bonus.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/pink.mw3 b/worlds/smw/data/palettes/level/switch_palace/pink.mw3 new file mode 100644 index 00000000..aaa49aa3 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/pink.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/red_grid.mw3 b/worlds/smw/data/palettes/level/switch_palace/red_grid.mw3 new file mode 100644 index 00000000..1336dc83 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/red_grid.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/verde.mw3 b/worlds/smw/data/palettes/level/switch_palace/verde.mw3 new file mode 100644 index 00000000..92515d0c Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/verde.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/verde_agua.mw3 b/worlds/smw/data/palettes/level/switch_palace/verde_agua.mw3 new file mode 100644 index 00000000..f845850f Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/verde_agua.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/yellow_grid.mw3 b/worlds/smw/data/palettes/level/switch_palace/yellow_grid.mw3 new file mode 100644 index 00000000..c4127649 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/yellow_grid.mw3 differ diff --git a/worlds/smw/data/palettes/level/switch_palace/youbonus.mw3 b/worlds/smw/data/palettes/level/switch_palace/youbonus.mw3 new file mode 100644 index 00000000..b213f566 Binary files /dev/null and b/worlds/smw/data/palettes/level/switch_palace/youbonus.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/dark_water.mw3 b/worlds/smw/data/palettes/level/water/dark_water.mw3 new file mode 100644 index 00000000..e0af55f5 Binary files /dev/null and b/worlds/smw/data/palettes/level/water/dark_water.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/deep_aqua.mw3 b/worlds/smw/data/palettes/level/water/deep_aqua.mw3 new file mode 100644 index 00000000..7407102b Binary files /dev/null and b/worlds/smw/data/palettes/level/water/deep_aqua.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/deep_chocolate.mw3 b/worlds/smw/data/palettes/level/water/deep_chocolate.mw3 new file mode 100644 index 00000000..19d645e3 Binary files /dev/null and b/worlds/smw/data/palettes/level/water/deep_chocolate.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/harmless_magma.mw3 b/worlds/smw/data/palettes/level/water/harmless_magma.mw3 new file mode 100644 index 00000000..043870cf Binary files /dev/null and b/worlds/smw/data/palettes/level/water/harmless_magma.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/murky.mw3 b/worlds/smw/data/palettes/level/water/murky.mw3 new file mode 100644 index 00000000..57ea1ce4 Binary files /dev/null and b/worlds/smw/data/palettes/level/water/murky.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/oil_spill.mw3 b/worlds/smw/data/palettes/level/water/oil_spill.mw3 new file mode 100644 index 00000000..ac1ffed2 Binary files /dev/null and b/worlds/smw/data/palettes/level/water/oil_spill.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/original_brown.mw3 b/worlds/smw/data/palettes/level/water/original_brown.mw3 new file mode 100644 index 00000000..5f5366ce Binary files /dev/null and b/worlds/smw/data/palettes/level/water/original_brown.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/original_gray.mw3 b/worlds/smw/data/palettes/level/water/original_gray.mw3 new file mode 100644 index 00000000..b5087ecc Binary files /dev/null and b/worlds/smw/data/palettes/level/water/original_gray.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/original_green.mw3 b/worlds/smw/data/palettes/level/water/original_green.mw3 new file mode 100644 index 00000000..6697f283 Binary files /dev/null and b/worlds/smw/data/palettes/level/water/original_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/original_mustard.mw3 b/worlds/smw/data/palettes/level/water/original_mustard.mw3 new file mode 100644 index 00000000..bf14a8cb Binary files /dev/null and b/worlds/smw/data/palettes/level/water/original_mustard.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/original_volcanic.mw3 b/worlds/smw/data/palettes/level/water/original_volcanic.mw3 new file mode 100644 index 00000000..ef22bf7b Binary files /dev/null and b/worlds/smw/data/palettes/level/water/original_volcanic.mw3 differ diff --git a/worlds/smw/data/palettes/level/water/pickle_juice.mw3 b/worlds/smw/data/palettes/level/water/pickle_juice.mw3 new file mode 100644 index 00000000..a27ebcfd Binary files /dev/null and b/worlds/smw/data/palettes/level/water/pickle_juice.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/atardecer.mw3 b/worlds/smw/data/palettes/level/yoshi_house/atardecer.mw3 new file mode 100644 index 00000000..561b3f49 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/brawler_green.mw3 b/worlds/smw/data/palettes/level/yoshi_house/brawler_green.mw3 new file mode 100644 index 00000000..96c93099 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/brawler_green.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/choco.mw3 b/worlds/smw/data/palettes/level/yoshi_house/choco.mw3 new file mode 100644 index 00000000..cd4ebe58 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/choco.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/crimson.mw3 b/worlds/smw/data/palettes/level/yoshi_house/crimson.mw3 new file mode 100644 index 00000000..e334904a Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/crimson.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/miku.mw3 b/worlds/smw/data/palettes/level/yoshi_house/miku.mw3 new file mode 100644 index 00000000..5d3b9e81 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/miku.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/mogumogu.mw3 b/worlds/smw/data/palettes/level/yoshi_house/mogumogu.mw3 new file mode 100644 index 00000000..cf76396c Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/mogumogu.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/monocromo.mw3 b/worlds/smw/data/palettes/level/yoshi_house/monocromo.mw3 new file mode 100644 index 00000000..8e1529f5 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/monocromo.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/neon.mw3 b/worlds/smw/data/palettes/level/yoshi_house/neon.mw3 new file mode 100644 index 00000000..d3e183a7 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/neon.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/nieve.mw3 b/worlds/smw/data/palettes/level/yoshi_house/nieve.mw3 new file mode 100644 index 00000000..07db0b13 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/nieve.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/night.mw3 b/worlds/smw/data/palettes/level/yoshi_house/night.mw3 new file mode 100644 index 00000000..7cc01223 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/night.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/nocturno.mw3 b/worlds/smw/data/palettes/level/yoshi_house/nocturno.mw3 new file mode 100644 index 00000000..de764ef9 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/nocturno.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/original.mw3 b/worlds/smw/data/palettes/level/yoshi_house/original.mw3 new file mode 100644 index 00000000..051d266f Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/original.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/sakura.mw3 b/worlds/smw/data/palettes/level/yoshi_house/sakura.mw3 new file mode 100644 index 00000000..d099ba93 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/sakura.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/snow.mw3 b/worlds/smw/data/palettes/level/yoshi_house/snow.mw3 new file mode 100644 index 00000000..4fea26a6 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/snow.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/strong_sun.mw3 b/worlds/smw/data/palettes/level/yoshi_house/strong_sun.mw3 new file mode 100644 index 00000000..7c671aa3 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/strong_sun.mw3 differ diff --git a/worlds/smw/data/palettes/level/yoshi_house/sunsetish_grass_hills.mw3 b/worlds/smw/data/palettes/level/yoshi_house/sunsetish_grass_hills.mw3 new file mode 100644 index 00000000..c51bdfc6 Binary files /dev/null and b/worlds/smw/data/palettes/level/yoshi_house/sunsetish_grass_hills.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/atardecer.mw3 b/worlds/smw/data/palettes/map/forest/atardecer.mw3 new file mode 100644 index 00000000..5ce85539 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/burnt_forest.mw3 b/worlds/smw/data/palettes/map/forest/burnt_forest.mw3 new file mode 100644 index 00000000..58b0648f Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/burnt_forest.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/dark_forest.mw3 b/worlds/smw/data/palettes/map/forest/dark_forest.mw3 new file mode 100644 index 00000000..90b9b188 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/dark_forest.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/halloween.mw3 b/worlds/smw/data/palettes/map/forest/halloween.mw3 new file mode 100644 index 00000000..c3899751 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/halloween.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/ice_forest.mw3 b/worlds/smw/data/palettes/map/forest/ice_forest.mw3 new file mode 100644 index 00000000..32d62829 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/ice_forest.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/lost_woods.mw3 b/worlds/smw/data/palettes/map/forest/lost_woods.mw3 new file mode 100644 index 00000000..ba9486b6 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/lost_woods.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/mono.mw3 b/worlds/smw/data/palettes/map/forest/mono.mw3 new file mode 100644 index 00000000..32bce2c4 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/mono.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/original.mw3 b/worlds/smw/data/palettes/map/forest/original.mw3 new file mode 100644 index 00000000..766522e0 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/original.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/original_special.mw3 b/worlds/smw/data/palettes/map/forest/original_special.mw3 new file mode 100644 index 00000000..57fcf7de Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/original_special.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/sepia.mw3 b/worlds/smw/data/palettes/map/forest/sepia.mw3 new file mode 100644 index 00000000..b265f978 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/sepia.mw3 differ diff --git a/worlds/smw/data/palettes/map/forest/snow_day.mw3 b/worlds/smw/data/palettes/map/forest/snow_day.mw3 new file mode 100644 index 00000000..c7654032 Binary files /dev/null and b/worlds/smw/data/palettes/map/forest/snow_day.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/atardecer.mw3 b/worlds/smw/data/palettes/map/main/atardecer.mw3 new file mode 100644 index 00000000..5252db00 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/brawler.mw3 b/worlds/smw/data/palettes/map/main/brawler.mw3 new file mode 100644 index 00000000..731696fc Binary files /dev/null and b/worlds/smw/data/palettes/map/main/brawler.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/cake_frosting.mw3 b/worlds/smw/data/palettes/map/main/cake_frosting.mw3 new file mode 100644 index 00000000..aec0fd7e Binary files /dev/null and b/worlds/smw/data/palettes/map/main/cake_frosting.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/invertido.mw3 b/worlds/smw/data/palettes/map/main/invertido.mw3 new file mode 100644 index 00000000..79a7147a Binary files /dev/null and b/worlds/smw/data/palettes/map/main/invertido.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/mono.mw3 b/worlds/smw/data/palettes/map/main/mono.mw3 new file mode 100644 index 00000000..d4d0f72d Binary files /dev/null and b/worlds/smw/data/palettes/map/main/mono.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/morning.mw3 b/worlds/smw/data/palettes/map/main/morning.mw3 new file mode 100644 index 00000000..b2fe88e2 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/morning.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/night.mw3 b/worlds/smw/data/palettes/map/main/night.mw3 new file mode 100644 index 00000000..a5e84ec8 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/night.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/night_time.mw3 b/worlds/smw/data/palettes/map/main/night_time.mw3 new file mode 100644 index 00000000..13a5af30 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/night_time.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/original.mw3 b/worlds/smw/data/palettes/map/main/original.mw3 new file mode 100644 index 00000000..cb655d88 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/original.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/original_special.mw3 b/worlds/smw/data/palettes/map/main/original_special.mw3 new file mode 100644 index 00000000..5c1e63e8 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/original_special.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/sepia.mw3 b/worlds/smw/data/palettes/map/main/sepia.mw3 new file mode 100644 index 00000000..3a6ece77 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/sepia.mw3 differ diff --git a/worlds/smw/data/palettes/map/main/snow_day.mw3 b/worlds/smw/data/palettes/map/main/snow_day.mw3 new file mode 100644 index 00000000..1ad307f0 Binary files /dev/null and b/worlds/smw/data/palettes/map/main/snow_day.mw3 differ diff --git a/worlds/smw/data/palettes/map/palettes.json b/worlds/smw/data/palettes/map/palettes.json new file mode 100644 index 00000000..a926418c --- /dev/null +++ b/worlds/smw/data/palettes/map/palettes.json @@ -0,0 +1,92 @@ +{ + "main": [ + "atardecer.mw3", + "brawler.mw3", + "cake_frosting.mw3", + "invertido.mw3", + "mono.mw3", + "morning.mw3", + "night.mw3", + "night_time.mw3", + "original.mw3", + "original_special.mw3", + "sepia.mw3", + "snow_day.mw3" + ], + "yoshi": [ + "atardecer.mw3", + "gum.mw3", + "lava_island.mw3", + "mono.mw3", + "original.mw3", + "original_special.mw3", + "sepia.mw3", + "snow_day.mw3", + "sunset.mw3", + "tritanopia.mw3", + "yochis_ailand.mw3" + ], + "vanilla": [ + "aqua_marine.mw3", + "dark cave.mw3", + "DOMO.mw3", + "fire cave.mw3", + "gold_mine.mw3", + "invertido.mw3", + "mono.mw3", + "original.mw3", + "original_special.mw3", + "purple.mw3", + "sepia.mw3", + "witches_cauldron.mw3" + ], + "forest": [ + "atardecer.mw3", + "burnt_forest.mw3", + "dark_forest.mw3", + "halloween.mw3", + "ice_forest.mw3", + "lost_woods.mw3", + "mono.mw3", + "original.mw3", + "original_special.mw3", + "sepia.mw3", + "snow_day.mw3" + ], + "valley": [ + "bowser.mw3", + "castle_colors.mw3", + "dark cave.mw3", + "dream_world.mw3", + "fire cave.mw3", + "invertido.mw3", + "mono.mw3", + "orange.mw3", + "original.mw3", + "original_special.mw3", + "purple_blue.mw3", + "sepia.mw3", + "snow.mw3", + "Tamaulipas.mw3" + ], + "special": [ + "black_out.mw3", + "blood_star.mw3", + "brawler.mw3", + "green.mw3", + "light_pollution_map.mw3", + "original.mw3", + "purple.mw3", + "white_special.mw3" + ], + "star": [ + "blood_moon.mw3", + "mono.mw3", + "mountain_top.mw3", + "original.mw3", + "original_special.mw3", + "pink_star.mw3", + "sepia.mw3", + "yellow_star.mw3" + ] +} \ No newline at end of file diff --git a/worlds/smw/data/palettes/map/special/black_out.mw3 b/worlds/smw/data/palettes/map/special/black_out.mw3 new file mode 100644 index 00000000..52d4e6d4 Binary files /dev/null and b/worlds/smw/data/palettes/map/special/black_out.mw3 differ diff --git a/worlds/smw/data/palettes/map/special/blood_star.mw3 b/worlds/smw/data/palettes/map/special/blood_star.mw3 new file mode 100644 index 00000000..bc778b20 Binary files /dev/null and b/worlds/smw/data/palettes/map/special/blood_star.mw3 differ diff --git a/worlds/smw/data/palettes/map/special/brawler.mw3 b/worlds/smw/data/palettes/map/special/brawler.mw3 new file mode 100644 index 00000000..595edb04 Binary files /dev/null and b/worlds/smw/data/palettes/map/special/brawler.mw3 differ diff --git a/worlds/smw/data/palettes/map/special/green.mw3 b/worlds/smw/data/palettes/map/special/green.mw3 new file mode 100644 index 00000000..2bdb5fd4 Binary files /dev/null and b/worlds/smw/data/palettes/map/special/green.mw3 differ diff --git a/worlds/smw/data/palettes/map/special/light_pollution_map.mw3 b/worlds/smw/data/palettes/map/special/light_pollution_map.mw3 new file mode 100644 index 00000000..a1bc6bbc Binary files /dev/null and b/worlds/smw/data/palettes/map/special/light_pollution_map.mw3 differ diff --git a/worlds/smw/data/palettes/map/special/original.mw3 b/worlds/smw/data/palettes/map/special/original.mw3 new file mode 100644 index 00000000..0a75a99a Binary files /dev/null and b/worlds/smw/data/palettes/map/special/original.mw3 differ diff --git a/worlds/smw/data/palettes/map/special/purple.mw3 b/worlds/smw/data/palettes/map/special/purple.mw3 new file mode 100644 index 00000000..122b5c78 Binary files /dev/null and b/worlds/smw/data/palettes/map/special/purple.mw3 differ diff --git a/worlds/smw/data/palettes/map/special/white_special.mw3 b/worlds/smw/data/palettes/map/special/white_special.mw3 new file mode 100644 index 00000000..e4d2613a Binary files /dev/null and b/worlds/smw/data/palettes/map/special/white_special.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/blood_moon.mw3 b/worlds/smw/data/palettes/map/star/blood_moon.mw3 new file mode 100644 index 00000000..42f155ef Binary files /dev/null and b/worlds/smw/data/palettes/map/star/blood_moon.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/mono.mw3 b/worlds/smw/data/palettes/map/star/mono.mw3 new file mode 100644 index 00000000..15d33bdf Binary files /dev/null and b/worlds/smw/data/palettes/map/star/mono.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/mountain_top.mw3 b/worlds/smw/data/palettes/map/star/mountain_top.mw3 new file mode 100644 index 00000000..d2b96b0e Binary files /dev/null and b/worlds/smw/data/palettes/map/star/mountain_top.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/original.mw3 b/worlds/smw/data/palettes/map/star/original.mw3 new file mode 100644 index 00000000..2107a555 Binary files /dev/null and b/worlds/smw/data/palettes/map/star/original.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/original_special.mw3 b/worlds/smw/data/palettes/map/star/original_special.mw3 new file mode 100644 index 00000000..d2bd439c Binary files /dev/null and b/worlds/smw/data/palettes/map/star/original_special.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/pink_star.mw3 b/worlds/smw/data/palettes/map/star/pink_star.mw3 new file mode 100644 index 00000000..55f68ecf Binary files /dev/null and b/worlds/smw/data/palettes/map/star/pink_star.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/sepia.mw3 b/worlds/smw/data/palettes/map/star/sepia.mw3 new file mode 100644 index 00000000..4c6a5f3c Binary files /dev/null and b/worlds/smw/data/palettes/map/star/sepia.mw3 differ diff --git a/worlds/smw/data/palettes/map/star/yellow_star.mw3 b/worlds/smw/data/palettes/map/star/yellow_star.mw3 new file mode 100644 index 00000000..96028903 Binary files /dev/null and b/worlds/smw/data/palettes/map/star/yellow_star.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/Tamaulipas.mw3 b/worlds/smw/data/palettes/map/valley/Tamaulipas.mw3 new file mode 100644 index 00000000..0cb18cc2 Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/Tamaulipas.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/bowser.mw3 b/worlds/smw/data/palettes/map/valley/bowser.mw3 new file mode 100644 index 00000000..f3d6c23a Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/bowser.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/castle_colors.mw3 b/worlds/smw/data/palettes/map/valley/castle_colors.mw3 new file mode 100644 index 00000000..7e245cc6 Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/castle_colors.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/dark cave.mw3 b/worlds/smw/data/palettes/map/valley/dark cave.mw3 new file mode 100644 index 00000000..2b6c0f57 Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/dark cave.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/dream_world.mw3 b/worlds/smw/data/palettes/map/valley/dream_world.mw3 new file mode 100644 index 00000000..bcf8d951 Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/dream_world.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/fire cave.mw3 b/worlds/smw/data/palettes/map/valley/fire cave.mw3 new file mode 100644 index 00000000..2980210d Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/fire cave.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/invertido.mw3 b/worlds/smw/data/palettes/map/valley/invertido.mw3 new file mode 100644 index 00000000..37cf2e9f Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/invertido.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/mono.mw3 b/worlds/smw/data/palettes/map/valley/mono.mw3 new file mode 100644 index 00000000..f96409be Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/mono.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/orange.mw3 b/worlds/smw/data/palettes/map/valley/orange.mw3 new file mode 100644 index 00000000..c9f6ac2f Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/orange.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/original.mw3 b/worlds/smw/data/palettes/map/valley/original.mw3 new file mode 100644 index 00000000..c165e81b Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/original.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/original_special.mw3 b/worlds/smw/data/palettes/map/valley/original_special.mw3 new file mode 100644 index 00000000..a4a0acda Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/original_special.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/purple_blue.mw3 b/worlds/smw/data/palettes/map/valley/purple_blue.mw3 new file mode 100644 index 00000000..2342f0ac Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/purple_blue.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/sepia.mw3 b/worlds/smw/data/palettes/map/valley/sepia.mw3 new file mode 100644 index 00000000..aa5aeb51 Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/sepia.mw3 differ diff --git a/worlds/smw/data/palettes/map/valley/snow.mw3 b/worlds/smw/data/palettes/map/valley/snow.mw3 new file mode 100644 index 00000000..185d0d42 Binary files /dev/null and b/worlds/smw/data/palettes/map/valley/snow.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/DOMO.mw3 b/worlds/smw/data/palettes/map/vanilla/DOMO.mw3 new file mode 100644 index 00000000..59563807 Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/DOMO.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/aqua_marine.mw3 b/worlds/smw/data/palettes/map/vanilla/aqua_marine.mw3 new file mode 100644 index 00000000..b382964d Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/aqua_marine.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/dark cave.mw3 b/worlds/smw/data/palettes/map/vanilla/dark cave.mw3 new file mode 100644 index 00000000..2b6c0f57 Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/dark cave.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/fire cave.mw3 b/worlds/smw/data/palettes/map/vanilla/fire cave.mw3 new file mode 100644 index 00000000..2980210d Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/fire cave.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/gold_mine.mw3 b/worlds/smw/data/palettes/map/vanilla/gold_mine.mw3 new file mode 100644 index 00000000..ad5460a7 Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/gold_mine.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/invertido.mw3 b/worlds/smw/data/palettes/map/vanilla/invertido.mw3 new file mode 100644 index 00000000..37cf2e9f Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/invertido.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/mono.mw3 b/worlds/smw/data/palettes/map/vanilla/mono.mw3 new file mode 100644 index 00000000..f96409be Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/mono.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/original.mw3 b/worlds/smw/data/palettes/map/vanilla/original.mw3 new file mode 100644 index 00000000..c165e81b Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/original.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/original_special.mw3 b/worlds/smw/data/palettes/map/vanilla/original_special.mw3 new file mode 100644 index 00000000..a4a0acda Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/original_special.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/purple.mw3 b/worlds/smw/data/palettes/map/vanilla/purple.mw3 new file mode 100644 index 00000000..db0008bc Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/purple.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/sepia.mw3 b/worlds/smw/data/palettes/map/vanilla/sepia.mw3 new file mode 100644 index 00000000..aa5aeb51 Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/sepia.mw3 differ diff --git a/worlds/smw/data/palettes/map/vanilla/witches_cauldron.mw3 b/worlds/smw/data/palettes/map/vanilla/witches_cauldron.mw3 new file mode 100644 index 00000000..ef6a81e5 Binary files /dev/null and b/worlds/smw/data/palettes/map/vanilla/witches_cauldron.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/atardecer.mw3 b/worlds/smw/data/palettes/map/yoshi/atardecer.mw3 new file mode 100644 index 00000000..a75c898c Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/atardecer.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/gum.mw3 b/worlds/smw/data/palettes/map/yoshi/gum.mw3 new file mode 100644 index 00000000..cfde2f53 Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/gum.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/lava_island.mw3 b/worlds/smw/data/palettes/map/yoshi/lava_island.mw3 new file mode 100644 index 00000000..570bdee3 Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/lava_island.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/mono.mw3 b/worlds/smw/data/palettes/map/yoshi/mono.mw3 new file mode 100644 index 00000000..62c9761b Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/mono.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/original.mw3 b/worlds/smw/data/palettes/map/yoshi/original.mw3 new file mode 100644 index 00000000..eb9451b1 Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/original.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/original_special.mw3 b/worlds/smw/data/palettes/map/yoshi/original_special.mw3 new file mode 100644 index 00000000..269b45db Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/original_special.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/sepia.mw3 b/worlds/smw/data/palettes/map/yoshi/sepia.mw3 new file mode 100644 index 00000000..3cbf6b03 Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/sepia.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/snow_day.mw3 b/worlds/smw/data/palettes/map/yoshi/snow_day.mw3 new file mode 100644 index 00000000..464b32ba Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/snow_day.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/sunset.mw3 b/worlds/smw/data/palettes/map/yoshi/sunset.mw3 new file mode 100644 index 00000000..9477a08c Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/sunset.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/tritanopia.mw3 b/worlds/smw/data/palettes/map/yoshi/tritanopia.mw3 new file mode 100644 index 00000000..c90b7f9a Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/tritanopia.mw3 differ diff --git a/worlds/smw/data/palettes/map/yoshi/yochis_ailand.mw3 b/worlds/smw/data/palettes/map/yoshi/yochis_ailand.mw3 new file mode 100644 index 00000000..3e1de668 Binary files /dev/null and b/worlds/smw/data/palettes/map/yoshi/yochis_ailand.mw3 differ