From 7442d662118ff7c5610c423e6623fa219b6d6bd6 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 3 Jun 2021 13:56:57 -0600 Subject: [PATCH] Old Man House bunny spawn Cutoff bounding box implemented Added a couple more lobby possibilities --- DoorShuffle.py | 13 ++++++++++++- Doors.py | 4 ++-- RELEASENOTES.md | 9 ++++++--- Rom.py | 5 ++++- asm/doortables.asm | 29 +++++++++++++++++++++++++++++ asm/dr_lobby.asm | 3 ++- asm/overrides.asm | 41 +++++++++++++++++------------------------ data/base2current.bps | Bin 133067 -> 133179 bytes 8 files changed, 72 insertions(+), 32 deletions(-) diff --git a/DoorShuffle.py b/DoorShuffle.py index 75bad2b8..be46bd74 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -443,10 +443,16 @@ def choose_portals(world, player): if not hc_south.entranceFlag: world.get_room(0x61, player).delete(6) world.get_room(0x61, player).change(4, DoorKind.NormalLow) + else: + world.get_room(0x61, player).change(4, DoorKind.DungeonEntrance) + world.get_room(0x61, player).change(6, DoorKind.CaveEntranceLow) sanctuary_door = world.get_door('Sanctuary S', player) if not sanctuary_door.entranceFlag: world.get_room(0x12, player).delete(3) world.get_room(0x12, player).change(2, DoorKind.NormalLow) + else: + world.get_room(0x12, player).change(2, DoorKind.DungeonEntrance) + world.get_room(0x12, player).change(3, DoorKind.CaveEntranceLow) hera_door = world.get_door('Hera Lobby S', player) if not hera_door.entranceFlag: world.get_room(0x77, player).change(0, DoorKind.NormalLow2) @@ -580,7 +586,12 @@ def assign_portal(candidates, possible_portals, world, player): world.get_room(old_door.roomIndex, player).change(old_door.doorListPos, old_door_kind) portal.change_door(candidate) if candidate.name not in ['Hyrule Castle Lobby S', 'Sanctuary S']: - new_door_kind = DoorKind.DungeonEntranceLow if candidate.layer or candidate.pseudo_bg else DoorKind.DungeonEntrance + if candidate.name == 'Swamp Hub S': + new_door_kind = DoorKind.CaveEntranceLow + elif candidate.layer or candidate.pseudo_bg: + new_door_kind = DoorKind.DungeonEntranceLow + else: + new_door_kind = DoorKind.DungeonEntrance world.get_room(candidate.roomIndex, player).change(candidate.doorListPos, new_door_kind) candidate.entranceFlag = True return candidate, portal diff --git a/Doors.py b/Doors.py index eb824fb1..cc13826e 100644 --- a/Doors.py +++ b/Doors.py @@ -496,7 +496,7 @@ def create_doors(world, player): create_door(player, 'Swamp Hammer Switch SW', Intr).dir(So, 0x37, Left, High).small_key().pos(2), create_door(player, 'Swamp Hammer Switch WN', Nrml).dir(We, 0x37, Top, High).pos(0), create_door(player, 'Swamp Hub ES', Nrml).dir(Ea, 0x36, Bot, High).pos(4), - create_door(player, 'Swamp Hub S', Nrml).dir(So, 0x36, Mid, High).pos(5), # .portal(Z, 0x22, 1), couldn't figure this out + create_door(player, 'Swamp Hub S', Nrml).dir(So, 0x36, Mid, High).pos(5).portal(Z, 0x22, 1), create_door(player, 'Swamp Hub WS', Nrml).dir(We, 0x36, Bot, High).pos(3), create_door(player, 'Swamp Hub WN', Nrml).dir(We, 0x36, Top, High).small_key().pos(2), create_door(player, 'Swamp Hub Hook Path', Lgcl), @@ -981,7 +981,7 @@ def create_doors(world, player): create_door(player, 'TR Lava Dual Pipes SW', Nrml).dir(So, 0x14, Left, High).pos(4).portal(Z, 0x22), create_door(player, 'TR Lava Island WS', Nrml).dir(We, 0x14, Bot, High).small_key().pos(1), create_door(player, 'TR Lava Island ES', Nrml).dir(Ea, 0x14, Bot, High).pos(6), - create_door(player, 'TR Lava Escape SE', Nrml).dir(So, 0x14, Right, High).small_key().pos(0), + create_door(player, 'TR Lava Escape SE', Nrml).dir(So, 0x14, Right, High).small_key().pos(0).portal(X, 0x22), create_door(player, 'TR Lava Escape NW', Nrml).dir(No, 0x14, Left, High).pos(2), create_door(player, 'TR Pokey 2 EN', Nrml).dir(Ea, 0x13, Top, High).pos(1), create_door(player, 'TR Pokey 2 Top to Bottom Barrier - Blue', Lgcl), diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 06bda972..8097eff2 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -17,7 +17,11 @@ Thanks to qadan, cheuer, & compiling * 0.4.0.6 * Hints now default to off * The maiden gives you a hint to the attic if you bring her to the unlit boss room - * Beemizer support and fix for shopsanity + * Beemizer support and fix for shopsanity + * Capacity upgrades removed in hard/expert item difficulties + * Swamp Hub added to lobby shuffle with ugly cave entrance. + * TR Lava Escape added to lobby shuffle. + * Hyrule Main Lobby and Sanctuary can now have a more visible outside exit, and rugs modified to be fully clipped. * 0.4.0.5 * Insanity - less restrictions on exiting (all modes) * Fix for simple bosses shuffle @@ -59,8 +63,7 @@ Thanks to qadan, cheuer, & compiling # Known Issues * Shopsanity Issues - * Hints for items in shops can be misleading - * Capacity upgrades present in hard/expert item pools + * Hints for items in shops can be misleading (ER) * Forfeit in Multiworld not granting all shop items * Potential keylocks in multi-entrance dungeons * Incorrect vanilla key logic for Mire diff --git a/Rom.py b/Rom.py index 2efd0008..64745298 100644 --- a/Rom.py +++ b/Rom.py @@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '56cf37536facb8e6b19d2ce516436f66' +RANDOMIZERBASEHASH = 'fef56e6629ee9fe1de52b7842beb333d' class JsonRom(object): @@ -683,6 +683,9 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): if should_be_bunny(links_house, world.mode[player]): rom.write_bytes(0x13fff0, [0x04, 0x01]) + old_man_house = world.get_region('Old Man House', player) + if should_be_bunny(old_man_house, world.mode[player]): + rom.write_bytes(0x13fff4, [0xe4, 0x00]) # patch doors if world.doorShuffle[player] == 'crossed': diff --git a/asm/doortables.asm b/asm/doortables.asm index dbbdb3c4..e427fd48 100644 --- a/asm/doortables.asm +++ b/asm/doortables.asm @@ -572,6 +572,33 @@ InroomStairsY: dw $0058, $0148, $0198, $0190 +org $27E000 +CutoffRooms: +; Room, quad, y max, x max, x min +dw $00bc, $0007, $0009, $0003 ; TT Alcove +dw $00a2, $0007, $000b, $0000 ; Mire Bridge Left & Right +dw $00a3, $0009, $0008, $0004 ; Mire Bent Bridge +dw $00c2, $0007, $0008, $0000 ; Mire Hub +;dw $00c2, $0004, $0008, $0004 ; Mire Hub +dw $001a, $0007, $0008, $0004 ; Pod Falling & Harmless +dw $0049, $0004, $0008, $0004 ; SW Star Pits +dw $0014, $0009, $0008, $0004 ; TR Lava Escape & TR Dual Pipes +dw $008c, $0009, $0008, $0004 ; Bob's Room & GT Big Chest + +dw $009f, $0009, $000a, $0002 ; Ice Many Pots +dw $0066, $0009, $0008, $0000 ; Swamp Waterfall +dw $005d, $0007, $000b, $0000 ; GT Gauntlet 3 +dw $00a8, $0007, $0008, $0004 ; Eastern Push Block +dw $00a9, $0009, $0009, $0003 ; Eastern Courtyard +dw $00aa, $0009, $0009, $0003 ; Eastern Map Valley +dw $00b9, $0008, $000b, $0000 ; Eastern Cannonball +dw $0052, $0008, $000a, $0003 ; HC East Hall - affects both doors + +dw $0050, $0009, $000a, $0002 ; HC West Hall +dw $00c5, $0008, $0008, $0000 ; TR Dash Bridge +dw $00c6, $0007, $0008, $0004 ; TR Hub +dw $ffff + ; dungeon tables ; HC HC EP DP AT SP PD MM SW IP TH TT TR GT org $27f000 @@ -675,4 +702,6 @@ org $27fff0 LinksHouseDarkWorld: dw $ffff SanctuaryDarkWorld: +dw $ffff +OldManDarkWorld: dw $ffff \ No newline at end of file diff --git a/asm/dr_lobby.asm b/asm/dr_lobby.asm index 1cac9d10..15ee435c 100644 --- a/asm/dr_lobby.asm +++ b/asm/dr_lobby.asm @@ -3,7 +3,8 @@ CheckDarkWorldSpawn: LDA.l DRFlags : AND #$0200 : BEQ + ; skip if the flag isn't set LDA.l $7EF357 : AND #$00FF : BNE + ; moon pearl? LDA.l LinksHouseDarkWorld : CMP $A0 : BEQ ++ - LDA.l SanctuaryDarkWorld : CMP $A0 : BNE + + LDA.l SanctuaryDarkWorld : CMP $A0 : BEQ ++ + LDA.l OldManDarkWorld : CMP $A0 : BNE + ++ SEP #$30 : LDA #$17 : STA $5D INC $02E0 : LDA.b #$40 : STA !DARK_WORLD : REP #$30 + RTL diff --git a/asm/overrides.asm b/asm/overrides.asm index 4ab5d3ca..40d48e5c 100644 --- a/asm/overrides.asm +++ b/asm/overrides.asm @@ -84,32 +84,24 @@ SuctionOverworldFix: stz $49 + rtl -; TT Alcove, Mire bridges, pod falling, SW torch room, TR Pipe room, Bob's Room, Ice Many Pots, Mire Hub -; swamp waterfall, Gauntlet 3, Eastern Push block -CutoffRooms: -db $bc, $a2, $1a, $49, $14, $8c, $9f, $c2 -db $66, $5d, $a8 -; Don't forget CutoffRoomCount!!! +!CutoffTable = "$27E000" CutoffEntranceRug: - pha : phx - lda.l DRMode : beq .norm - lda $04 : cmp #$000A : beq + - cmp #$000C : bne .norm - + lda $a0 : sep #$20 : ldx #$0000 - - cmp.l CutoffRooms, x : beq .check - inx : cpx #$000B : !blt - ; CutoffRoomCount is here! - rep #$20 - .norm plx : pla : lda $9B52, y : sta $7E2000, x ; what we wrote over -rtl + PHA : PHX + LDA.l DRMode : BEQ .norm + LDA $04 : cmp #$000A : BEQ + ; only affect A & C objects + cmp #$000C : BNE .norm + + LDX #$0000 : LDA !CutoffTable, x + - CMP.W $A0 : BEQ .check + TXA : !ADD #$0008 : TAX : LDA !CutoffTable, x : CMP.w #$FFFF : BNE - + .norm PLX : PLA : LDA $9B52, y : STA $7E2000, x ; what we wrote over +RTL .check - rep #$20 - lda $0c : cmp #$0006 : !bge .skip - lda $0e : cmp #$0008 : !bge .skip - cmp #$0004 : !blt .skip - bra .norm -.skip plx : pla : rtl - + LDA $0c : CMP.l !CutoffTable+2, x : !BGE .skip + LDA $0e : CMP.l !CutoffTable+4, x : !BGE .skip + CMP.l !CutoffTable+6, x : !BLT .skip + BRA .norm +.skip PLX : PLA : RTL StoreTempBunnyState: LDA $5D : CMP #$1C : BNE + @@ -131,7 +123,7 @@ RainPrevention: LDA.l BlockSanctuaryDoorInRain : BEQ .done ;flagged LDA $A0 : CMP #$0012 : BNE + ;we're in the sanctuary LDA.l $7EF3CC : AND #$00FF : CMP #$0001 : BEQ .done ; zelda is following - LDA $00 : CMP #$02A1 : BNE .done + LDA $00 : AND #$00FF : CMP #$00A1 : BNE .done ; position is a1 PLA : LDA #$0008 : RTL + LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged LDX #$FFFE @@ -150,6 +142,7 @@ StandardAgaDmg: ; note: this skips both maiden dialog triggers if the hole is open BlindsAtticHint: + REP #$20 CMP.w #$0122 : BNE + LDA $7EF0CA : AND.w #$0100 : BEQ + SEP #$20 : RTL ; skip the dialog box if the hole is already open diff --git a/data/base2current.bps b/data/base2current.bps index 974762d1e3c6e359c0ae44064cf873a071890b28..7d08f3676288ec72e609ef9a010805d031647f73 100644 GIT binary patch delta 1220 zcmW-beM}Q~9L9gYyK8&2MNkoo8S>-J1Dp!`p4>TxTA$&8HFfZYgzN_Ys*MfP!AMM(CC`7 ze8k%g2ACW5K#6lrz2|=wg5hxg$cx?LtU1r}Sc_x~5d%zXv@{_^sY-{m0}M~F_i)!x zJV~ao`0h|aiJ$OCTdtyD66`nD?TN1Wi@c94_tCaJ<8SnY6&Is%aw;jQ-VsalJ zf1*+inq8x^k7`hx{T;K({2EEGP~5e-+E2Zgc-4;aXc#-35^1e3*Iql+-bJOe{Sgvn zg=lUW8!1s9;e(YmzkSQJ}FyT-5P7f!1Oxkc`51ym2ITVNxeY z+e@1@5`_l&Kf7vstp@C~8qJQa_wb(1S~csfWI6` zhWYr%5eB;C7b6qkoMV`c>CxC{u$3n<>!5#YUZ;M--Zl3CprqLaE?FqGiI|NODr#FX z8--5c?1$^qZ(t#Qc9ow7ilrs_@k!JnJYA8)is$gE+{#)2`cYhwr^EXm*n-*2z50n-99;cYi`uoZEHsG_$eE1mOR;I%%_?fa1rsCD346%17-ak5H z!s;V#>($Jn&$f`ILd2W$+0g}>k{mYW*g)_y(18d*0-ve|06+tX5Hb!{IQH(Y_fue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