diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f37542f..343a7c36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/DoorShuffle.py b/DoorShuffle.py index 57973905..8ad99965 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -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 = [] diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 8ef8179f..ca281ea7 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -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) diff --git a/Main.py b/Main.py index 85f1b88c..0b81b934 100644 --- a/Main.py +++ b/Main.py @@ -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): diff --git a/OverworldShuffle.py b/OverworldShuffle.py index a9193519..2f75659e 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -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 diff --git a/RELEASENOTES.md b/RELEASENOTES.md index cafdb92f..0ccceb80 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -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 diff --git a/Rom.py b/Rom.py index 59d549b7..6fbb0173 100644 --- a/Rom.py +++ b/Rom.py @@ -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': diff --git a/asm/drhooks.asm b/asm/drhooks.asm index 2824771e..86ae1ff1 100644 --- a/asm/drhooks.asm +++ b/asm/drhooks.asm @@ -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 diff --git a/asm/normal.asm b/asm/normal.asm index a8ab9597..aabb24de 100644 --- a/asm/normal.asm +++ b/asm/normal.asm @@ -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 } diff --git a/asm/owrando.asm b/asm/owrando.asm index e0d986f5..8cd7bcf1 100644 --- a/asm/owrando.asm +++ b/asm/owrando.asm @@ -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 diff --git a/data/base2current.bps b/data/base2current.bps index cd6c4f57..9e742fa0 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ