SMW: Bug+logic fixes (#1279)
* Allow levels to scroll vertically without climb or run * Account for needing Yoshi for VB2 Dragon Coins * Don't allow messages on intro level
This commit is contained in:
parent
ef66f64030
commit
64e2d55e92
|
@ -50,7 +50,7 @@ SMW_RECV_PROGRESS_ADDR = WRAM_START + 0x1F2B
|
|||
|
||||
SMW_GOAL_LEVELS = [0x28, 0x31, 0x32]
|
||||
SMW_INVALID_MARIO_STATES = [0x05, 0x06, 0x0A, 0x0C, 0x0D]
|
||||
SMW_BAD_TEXT_BOX_LEVELS = [0x26, 0x02, 0x4B]
|
||||
SMW_BAD_TEXT_BOX_LEVELS = [0x00, 0x26, 0x02, 0x4B]
|
||||
SMW_BOSS_STATES = [0x80, 0xC0, 0xC1]
|
||||
SMW_UNCOLLECTABLE_LEVELS = [0x25, 0x07, 0x0B, 0x40, 0x0E, 0x1F, 0x20, 0x1B, 0x1A, 0x35, 0x34, 0x31, 0x32]
|
||||
|
||||
|
|
|
@ -834,7 +834,8 @@ def create_regions(world, player: int, active_locations):
|
|||
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(world, 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,
|
||||
lambda state: state.has(ItemName.p_switch, player))
|
||||
|
|
|
@ -677,6 +677,22 @@ def handle_collected_paths(rom):
|
|||
rom.write_bytes(COLLECTED_PATHS_SUB_ADDR + 0x13, bytearray([0x6B])) # RTL
|
||||
|
||||
|
||||
def handle_vertical_scroll(rom):
|
||||
rom.write_bytes(0x285BA, bytearray([0x22, 0x90, 0xBC, 0x03])) # JSL $03BC90
|
||||
|
||||
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
|
||||
|
||||
|
||||
def handle_music_shuffle(rom, world, player):
|
||||
from .Aesthetics import generate_shuffled_level_music, generate_shuffled_ow_music, level_music_address_data, ow_music_address_data
|
||||
|
||||
|
@ -808,6 +824,8 @@ def patch_rom(world, rom, player, active_level_dict):
|
|||
|
||||
handle_collected_paths(rom)
|
||||
|
||||
handle_vertical_scroll(rom)
|
||||
|
||||
# Handle Level Shuffle
|
||||
handle_level_shuffle(rom, active_level_dict)
|
||||
|
||||
|
|
Loading…
Reference in New Issue