Dungeon reminder added to hud for Crossed dungeons

Blinking red square added to hud and it indicates a boss room is close by. Only appears if you have the compass. (Basic & Crossed)
Key counters added to hud if you have found the map. (Crossed only)
This commit is contained in:
aerinon
2020-04-03 15:45:55 -06:00
parent e30f66742b
commit bb402ff7f2
9 changed files with 130 additions and 5 deletions

20
Rom.py
View File

@@ -10,7 +10,7 @@ import sys
import subprocess
from BaseClasses import CollectionState, ShopType, Region, Location, DoorType
from DoorShuffle import compass_data, DROptions
from DoorShuffle import compass_data, DROptions, boss_indicator
from Dungeons import dungeon_music_addresses
from Regions import location_table
from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits, TextTable
@@ -22,7 +22,7 @@ from EntranceShuffle import door_addresses, exit_ids
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = 'b7b962ea562962200c4c88c0b615f8fe'
RANDOMIZERBASEHASH = 'a06d24c7d1473717e2610c3cf45809ff'
class JsonRom(object):
@@ -596,6 +596,15 @@ def patch_rom(world, rom, player, team, enemized):
dr_flags = DROptions.Eternal_Mini_Bosses if world.doorShuffle[player] == 'vanilla' or not world.experimental[player] else DROptions.Town_Portal
if world.doorShuffle[player] == 'crossed':
rom.write_byte(0x139004, 2)
for name, layout in world.key_layout[player].items():
offset = compass_data[name][4]//2
rom.write_byte(0x13f01c+offset, layout.max_chests + layout.max_drops)
rom.write_byte(0x13f02a+offset, layout.max_chests)
rom.write_byte(0x13f038+offset, layout.max_drops)
builder = world.dungeon_layouts[player][name]
bk_status = 1 if builder.bk_required else 0
bk_status = 2 if builder.bk_provided else bk_status
rom.write_byte(0x13f046+offset, bk_status)
rom.write_byte(0x151f1, 2)
rom.write_byte(0x15270, 2)
rom.write_byte(0x1597b, 2)
@@ -619,6 +628,13 @@ def patch_rom(world, rom, player, team, enemized):
if builder.pre_open_stonewall:
if builder.pre_open_stonewall.name == 'Desert Wall Slide NW':
dr_flags |= DROptions.Open_Desert_Wall
for name, pair in boss_indicator.items():
dungeon_id, boss_door = pair
opposite_door = world.get_door(boss_door, player).dest
if opposite_door.roomIndex > -1:
dungeon_name = opposite_door.entrance.parent_region.dungeon.name
dungeon_id = boss_indicator[dungeon_name][0]
rom.write_byte(0x13f000+dungeon_id, opposite_door.roomIndex)
rom.write_byte(0x139006, dr_flags.value)
if dr_flags & DROptions.Town_Portal and world.mode[player] == 'inverted':
rom.write_byte(0x139008, 1)