Merge remote-tracking branch 'origin/OverworldShuffle' into OverworldShuffle

This commit is contained in:
2021-07-23 15:47:54 -07:00
11 changed files with 50 additions and 32 deletions

View File

@@ -1,5 +1,8 @@
# Changelog
### 0.1.6.9
- ~~Merged DR v0.4.0.12 - Secure random update / Credits fix~~
### 0.1.6.8
- Implemented a smarter Balanced Flute Shuffle algorithm
- Fixed Collection Rate in credits

View File

@@ -1843,7 +1843,7 @@ def find_accessible_entrances(world, player, builder):
elif world.mode[player] != 'inverted':
start_regions = ['Links House', 'Sanctuary']
else:
start_regions = ['Links House', 'Dark Sanctuary Hint']
start_regions = ['Links House', 'Dark Sanctuary Hint', 'Hyrule Castle Ledge']
regs = convert_regions(start_regions, world, player)
visited_regions = set()
visited_entrances = []

View File

@@ -687,7 +687,8 @@ def link_entrances(world, player):
if invFlag:
# shuffle aga door. if it's on hc ledge, then one other hc ledge door has to be must_exit
aga_door = random.choice(entrances)
aga_choices = [x for x in entrances]
aga_door = random.choice(aga_choices)
if aga_door in hc_ledge_entrances:
hc_ledge_entrances.remove(aga_door)

View File

@@ -29,7 +29,7 @@ from Fill import sell_potions, sell_keys, balance_multiworld_progression, balanc
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops
from Utils import output_path, parse_player_names
__version__ = '0.4.0.11u'
__version__ = '0.4.0.12u'
class EnemizerError(RuntimeError):

View File

@@ -1,9 +1,8 @@
import RaceRandom as random
import logging, copy
import RaceRandom as random, logging, copy
from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSlot
from OWEdges import OWTileRegions, OWTileGroups, OWEdgeGroups, OpenStd, parallel_links, IsParallel
__version__ = '0.1.6.8-u'
__version__ = '0.1.6.9-u'
def link_overworld(world, player):
# setup mandatory connections
@@ -230,7 +229,7 @@ def link_overworld(world, player):
new_spots = list()
ignored_regions = set()
def addSpot(owid, removeFromPool = False):
def addSpot(owid):
if world.owFluteShuffle[player] == 'balanced':
def getIgnored(regionname, base_owid, owid):
region = world.get_region(regionname, player)
@@ -253,18 +252,17 @@ def link_overworld(world, player):
if random.randint(0, 31) != 0 and new_ignored.intersection(ignored_regions):
return False
ignored_regions.update(new_ignored)
if removeFromPool:
flute_pool.remove(owid)
flute_pool.remove(owid)
new_spots.append(owid)
return True
# guarantee desert/mire access
addSpot(0x38, True)
addSpot(0x38)
# guarantee mountain access
if world.owShuffle[player] == 'vanilla':
mountainIds = [0x0b, 0x0e, 0x07]
addSpot(mountainIds[random.randint(0, 2)], True)
addSpot(mountainIds[random.randint(0, 2)])
random.shuffle(flute_pool)
f = 0

View File

@@ -22,6 +22,11 @@ For accessibility, you now get a C or P indicator to the left of the magic bar o
# Bug Fixes and Notes.
* 0.4.0.12
* ER Inverted fix for HC Ledge, and Aga Tower choosing Links House incorrectly
* Credits again - hopefully for good
* Incorporated music fixes for now (may revisit later)
* Secure random re-incorporated
* 0.4.0.11
* Some minor base rom fixes
* Improved distribution of bombable/dashable doors

38
Rom.py
View File

@@ -31,7 +31,7 @@ from OverworldShuffle import default_flute_connections, flute_data
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = 'b39ce425e3d390aa9e956aa46b6f4087'
RANDOMIZERBASEHASH = 'd97c9a8977e73da261852d69a287abcc'
class JsonRom(object):
@@ -912,17 +912,17 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
write_int16(rom, 0x187010, credits_total) # dynamic credits
if credits_total != 216:
# collection rate address:
cr_address = 0x239200
# collection rate address (hi):
cr_address = 0x238057
cr_pc = cr_address - 0x120000 # convert to pc
mid_top, mid_bot = credits_digit((credits_total // 10) % 10)
last_top, last_bot = credits_digit(credits_total % 10)
# top half
rom.write_byte(cr_pc+0x1c, mid_top)
rom.write_byte(cr_pc+0x1d, last_top)
rom.write_byte(cr_pc+0x1, mid_top)
rom.write_byte(cr_pc+0x2, last_top)
# bottom half
rom.write_byte(cr_pc+0x3a, mid_bot)
rom.write_byte(cr_pc+0x3b, last_bot)
rom.write_byte(cr_pc+0x1f, mid_bot)
rom.write_byte(cr_pc+0x20, last_bot)
# patch medallion requirements
if world.required_medallions[player][0] == 'Bombos':
@@ -1221,18 +1221,18 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
rom.write_byte(0x30A28, 0x2C)
# update sword references in credits to bombs
rom.write_bytes(0x11803E, credits_string_top("FIRST BOMBS"))
rom.write_bytes(0x11805C, credits_string_bot("FIRST BOMBS"))
rom.write_bytes(0x11807A, credits_string_top("BOMBLESS "))
rom.write_bytes(0x118098, credits_string_bot("BOMBLESS "))
rom.write_bytes(0x1180B6, credits_string_top("FIGHTER'S BOMBS"))
rom.write_bytes(0x1180D4, credits_string_bot("FIGHTER'S BOMBS"))
rom.write_bytes(0x1180F2, credits_string_top("MASTER BOMBS"))
rom.write_bytes(0x118110, credits_string_bot("MASTER BOMBS"))
rom.write_bytes(0x11812E, credits_string_top("TEMPERED BOMBS"))
rom.write_bytes(0x11814C, credits_string_bot("TEMPERED BOMBS"))
rom.write_bytes(0x11816A, credits_string_top("GOLD BOMBS"))
rom.write_bytes(0x118188, credits_string_bot("GOLD BOMBS"))
rom.write_bytes(0x11807A, credits_string_top("FIRST BOMBS"))
rom.write_bytes(0x118098, credits_string_bot("FIRST BOMBS"))
rom.write_bytes(0x1180B6, credits_string_top("BOMBLESS "))
rom.write_bytes(0x1180D4, credits_string_bot("BOMBLESS "))
rom.write_bytes(0x1180F2, credits_string_top("FIGHTER'S BOMBS"))
rom.write_bytes(0x118110, credits_string_bot("FIGHTER'S BOMBS"))
rom.write_bytes(0x11812E, credits_string_top("MASTER BOMBS"))
rom.write_bytes(0x11814C, credits_string_bot("MASTER BOMBS"))
rom.write_bytes(0x11816A, credits_string_top("TEMPERED BOMBS"))
rom.write_bytes(0x118188, credits_string_bot("TEMPERED BOMBS"))
rom.write_bytes(0x1181A6, credits_string_top("GOLD BOMBS"))
rom.write_bytes(0x1181C4, credits_string_bot("GOLD BOMBS"))
# set up clocks for timed modes
if world.shuffle[player] == 'vanilla':

View File

@@ -179,6 +179,17 @@ JSL BlindsAtticHint : NOP #2
org $1cfd69
Main_ShowTextMessage:
; Conditionally disable UW music changes in Door Rando
org $028ADB ; <- Bank02.asm:2088-2095 (LDX.b #$14 : LDA $A0 ...)
JSL.l Underworld_DoorDown_Entry : CPX #$10
db $B0, $21 ; BCS $028B04
BRA + : NOP #6 : +
org $02C3F2 ; <- Bank02.asm:10521 Unused call
Underworld_DoorDown_Call:
org $02C3F3
dw $8AD9 ; address of Bank02.asm:2085
; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire
; IPBJ is common enough to consider not doing this. Mire is not a concern for vanilla - maybe glitched modes
; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds

View File

@@ -398,7 +398,7 @@ StraightStairsTrapDoor:
.animateTraps
lda #$05 : sta $11
inc $0468 : stz $068e : stz $0690
++ rtl
++ JSL Underworld_DoorDown_Call : rtl
+ JML Dungeon_ApproachFixedColor ; what we wrote over
}

View File

@@ -353,7 +353,7 @@ OWNewDestination:
; turn into bunny
lda $5d : cmp #$17 : beq .return
lda #$17 : sta $5d
lda #$01 : sta $02e0
lda #$01 : sta $2e0
bra .return
.nobunny
lda $5d : cmp #$17 : bne .return

Binary file not shown.