Old Man House bunny spawn

Cutoff bounding box implemented
Added a couple more lobby possibilities
This commit is contained in:
aerinon
2021-06-03 13:56:57 -06:00
parent c81865b33f
commit 7442d66211
8 changed files with 72 additions and 32 deletions

View File

@@ -443,10 +443,16 @@ def choose_portals(world, player):
if not hc_south.entranceFlag: if not hc_south.entranceFlag:
world.get_room(0x61, player).delete(6) world.get_room(0x61, player).delete(6)
world.get_room(0x61, player).change(4, DoorKind.NormalLow) 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) sanctuary_door = world.get_door('Sanctuary S', player)
if not sanctuary_door.entranceFlag: if not sanctuary_door.entranceFlag:
world.get_room(0x12, player).delete(3) world.get_room(0x12, player).delete(3)
world.get_room(0x12, player).change(2, DoorKind.NormalLow) 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) hera_door = world.get_door('Hera Lobby S', player)
if not hera_door.entranceFlag: if not hera_door.entranceFlag:
world.get_room(0x77, player).change(0, DoorKind.NormalLow2) 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) world.get_room(old_door.roomIndex, player).change(old_door.doorListPos, old_door_kind)
portal.change_door(candidate) portal.change_door(candidate)
if candidate.name not in ['Hyrule Castle Lobby S', 'Sanctuary S']: 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) world.get_room(candidate.roomIndex, player).change(candidate.doorListPos, new_door_kind)
candidate.entranceFlag = True candidate.entranceFlag = True
return candidate, portal return candidate, portal

View File

@@ -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 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 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 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 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 WN', Nrml).dir(We, 0x36, Top, High).small_key().pos(2),
create_door(player, 'Swamp Hub Hook Path', Lgcl), 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 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 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 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 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 EN', Nrml).dir(Ea, 0x13, Top, High).pos(1),
create_door(player, 'TR Pokey 2 Top to Bottom Barrier - Blue', Lgcl), create_door(player, 'TR Pokey 2 Top to Bottom Barrier - Blue', Lgcl),

View File

@@ -17,7 +17,11 @@ Thanks to qadan, cheuer, & compiling
* 0.4.0.6 * 0.4.0.6
* Hints now default to off * Hints now default to off
* The maiden gives you a hint to the attic if you bring her to the unlit boss room * 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 * 0.4.0.5
* Insanity - less restrictions on exiting (all modes) * Insanity - less restrictions on exiting (all modes)
* Fix for simple bosses shuffle * Fix for simple bosses shuffle
@@ -59,8 +63,7 @@ Thanks to qadan, cheuer, & compiling
# Known Issues # Known Issues
* Shopsanity Issues * Shopsanity Issues
* Hints for items in shops can be misleading * Hints for items in shops can be misleading (ER)
* Capacity upgrades present in hard/expert item pools
* Forfeit in Multiworld not granting all shop items * Forfeit in Multiworld not granting all shop items
* Potential keylocks in multi-entrance dungeons * Potential keylocks in multi-entrance dungeons
* Incorrect vanilla key logic for Mire * Incorrect vanilla key logic for Mire

5
Rom.py
View File

@@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids
JAP10HASH = '03a63945398191337e896e5771f77173' JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '56cf37536facb8e6b19d2ce516436f66' RANDOMIZERBASEHASH = 'fef56e6629ee9fe1de52b7842beb333d'
class JsonRom(object): 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]): if should_be_bunny(links_house, world.mode[player]):
rom.write_bytes(0x13fff0, [0x04, 0x01]) 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 # patch doors
if world.doorShuffle[player] == 'crossed': if world.doorShuffle[player] == 'crossed':

View File

@@ -572,6 +572,33 @@ InroomStairsY:
dw $0058, $0148, $0198, $0190 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 ; dungeon tables
; HC HC EP DP AT SP PD MM SW IP TH TT TR GT ; HC HC EP DP AT SP PD MM SW IP TH TT TR GT
org $27f000 org $27f000
@@ -675,4 +702,6 @@ org $27fff0
LinksHouseDarkWorld: LinksHouseDarkWorld:
dw $ffff dw $ffff
SanctuaryDarkWorld: SanctuaryDarkWorld:
dw $ffff
OldManDarkWorld:
dw $ffff dw $ffff

View File

@@ -3,7 +3,8 @@ CheckDarkWorldSpawn:
LDA.l DRFlags : AND #$0200 : BEQ + ; skip if the flag isn't set LDA.l DRFlags : AND #$0200 : BEQ + ; skip if the flag isn't set
LDA.l $7EF357 : AND #$00FF : BNE + ; moon pearl? LDA.l $7EF357 : AND #$00FF : BNE + ; moon pearl?
LDA.l LinksHouseDarkWorld : CMP $A0 : BEQ ++ 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 ++ SEP #$30 : LDA #$17 : STA $5D
INC $02E0 : LDA.b #$40 : STA !DARK_WORLD : REP #$30 INC $02E0 : LDA.b #$40 : STA !DARK_WORLD : REP #$30
+ RTL + RTL

View File

@@ -84,32 +84,24 @@ SuctionOverworldFix:
stz $49 stz $49
+ rtl + rtl
; TT Alcove, Mire bridges, pod falling, SW torch room, TR Pipe room, Bob's Room, Ice Many Pots, Mire Hub !CutoffTable = "$27E000"
; 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!!!
CutoffEntranceRug: CutoffEntranceRug:
pha : phx PHA : PHX
lda.l DRMode : beq .norm LDA.l DRMode : BEQ .norm
lda $04 : cmp #$000A : beq + LDA $04 : cmp #$000A : BEQ + ; only affect A & C objects
cmp #$000C : bne .norm cmp #$000C : BNE .norm
+ lda $a0 : sep #$20 : ldx #$0000 + LDX #$0000 : LDA !CutoffTable, x
- cmp.l CutoffRooms, x : beq .check - CMP.W $A0 : BEQ .check
inx : cpx #$000B : !blt - ; CutoffRoomCount is here! TXA : !ADD #$0008 : TAX : LDA !CutoffTable, x : CMP.w #$FFFF : BNE -
rep #$20 .norm PLX : PLA : LDA $9B52, y : STA $7E2000, x ; what we wrote over
.norm plx : pla : lda $9B52, y : sta $7E2000, x ; what we wrote over RTL
rtl
.check .check
rep #$20 LDA $0c : CMP.l !CutoffTable+2, x : !BGE .skip
lda $0c : cmp #$0006 : !bge .skip LDA $0e : CMP.l !CutoffTable+4, x : !BGE .skip
lda $0e : cmp #$0008 : !bge .skip CMP.l !CutoffTable+6, x : !BLT .skip
cmp #$0004 : !blt .skip BRA .norm
bra .norm .skip PLX : PLA : RTL
.skip plx : pla : rtl
StoreTempBunnyState: StoreTempBunnyState:
LDA $5D : CMP #$1C : BNE + LDA $5D : CMP #$1C : BNE +
@@ -131,7 +123,7 @@ RainPrevention:
LDA.l BlockSanctuaryDoorInRain : BEQ .done ;flagged LDA.l BlockSanctuaryDoorInRain : BEQ .done ;flagged
LDA $A0 : CMP #$0012 : BNE + ;we're in the sanctuary LDA $A0 : CMP #$0012 : BNE + ;we're in the sanctuary
LDA.l $7EF3CC : AND #$00FF : CMP #$0001 : BEQ .done ; zelda is following 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 PLA : LDA #$0008 : RTL
+ LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged + LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged
LDX #$FFFE LDX #$FFFE
@@ -150,6 +142,7 @@ StandardAgaDmg:
; note: this skips both maiden dialog triggers if the hole is open ; note: this skips both maiden dialog triggers if the hole is open
BlindsAtticHint: BlindsAtticHint:
REP #$20
CMP.w #$0122 : BNE + CMP.w #$0122 : BNE +
LDA $7EF0CA : AND.w #$0100 : BEQ + LDA $7EF0CA : AND.w #$0100 : BEQ +
SEP #$20 : RTL ; skip the dialog box if the hole is already open SEP #$20 : RTL ; skip the dialog box if the hole is already open

Binary file not shown.