Fixed a few spiral bugs

Fixed a problem with door pairing system
This commit is contained in:
aerinon
2019-10-05 23:15:06 -06:00
parent 92ad60bedf
commit 19a78f2a0c
8 changed files with 29 additions and 19 deletions

6
.gitignore vendored
View File

@@ -3,6 +3,8 @@
*_Spoiler.txt
*.pyc
*.sfc
*.srm
*.bst
*.wixobj
build
bundle/components.wxs
@@ -12,4 +14,6 @@ README.html
*multidata
*multisave
EnemizerCLI/
.mypy_cache/
.mypy_cache/
venv
test

View File

@@ -1009,7 +1009,7 @@ def reassign_key_doors(current_doors, proposal, world, player):
while len(queue) > 0:
d = queue.pop()
if d.type is DoorType.SpiralStairs and d not in proposal:
world.get_room(d.roomIndex, player).change(d.doorListPos, DoorKind.Normal)
world.get_room(d.roomIndex, player).change(d.doorListPos, DoorKind.IncognitoEntrance)
d.smallKey = False
elif d.type is DoorType.Interior and d not in flat_proposal and d.dest not in flat_proposal:
world.get_room(d.roomIndex, player).change(d.doorListPos, DoorKind.Normal)

View File

@@ -220,28 +220,28 @@ def create_doors(world, player):
create_dir_door(player, 'Tower Gold Knights SW', DoorType.Interior, Direction.South, 0xe0, Left, High).pos(1),
create_dir_door(player, 'Tower Gold Knights EN', DoorType.Interior, Direction.East, 0xe0, Top, High).pos(0),
create_dir_door(player, 'Tower Room 03 WN', DoorType.Interior, Direction.West, 0xe0, Bot, High).pos(0),
create_spiral_stairs(player, 'Tower Room 03 Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xe0, 0, HTH, S, 0x1a, 0x6c).small_key().pos(2),
create_spiral_stairs(player, 'Tower Lone Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xd0, 0, HTH, S, 0x11, 0x80),
create_spiral_stairs(player, 'Tower Room 03 Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xe0, 0, HTH, S, 0x1a, 0x6c, True, True).small_key().pos(2),
create_spiral_stairs(player, 'Tower Lone Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xd0, 0, HTH, S, 0x11, 0x80, True, True),
create_dir_door(player, 'Tower Lone Statue WN', DoorType.Interior, Direction.West, 0xd0, Top, High).pos(1),
create_dir_door(player, 'Tower Dark Maze EN', DoorType.Interior, Direction.East, 0xd0, Top, High).pos(1),
create_dir_door(player, 'Tower Dark Maze ES', DoorType.Interior, Direction.East, 0xd0, Bot, High).small_key().pos(0),
create_dir_door(player, 'Tower Dark Chargers WS', DoorType.Interior, Direction.West, 0xd0, Bot, High).small_key().pos(0),
create_spiral_stairs(player, 'Tower Dark Chargers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xd0, 2, HTH, X, 0x1b, 0x8c),
create_spiral_stairs(player, 'Tower Dual Statues Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xc0, 2, HTH, X, 0x12, 0xa0),
create_spiral_stairs(player, 'Tower Dark Chargers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xd0, 2, HTH, X, 0x1b, 0x8c, True, True),
create_spiral_stairs(player, 'Tower Dual Statues Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xc0, 2, HTH, X, 0x12, 0xa0, True, True),
create_dir_door(player, 'Tower Dual Statues WS', DoorType.Interior, Direction.West, 0xc0, Bot, High).pos(1),
create_dir_door(player, 'Tower Dark Pits ES', DoorType.Interior, Direction.East, 0xc0, Bot, High).pos(1),
create_dir_door(player, 'Tower Dark Pits EN', DoorType.Interior, Direction.East, 0xc0, Top, High).pos(0),
create_dir_door(player, 'Tower Dark Archers WN', DoorType.Interior, Direction.West, 0xc0, Top, High).pos(0),
create_spiral_stairs(player, 'Tower Dark Archers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xc0, 0, HTH, S, 0x1b, 0x6c).small_key().pos(2),
create_spiral_stairs(player, 'Tower Red Spears Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xb0, 0, HTH, S, 0x12, 0x80),
create_spiral_stairs(player, 'Tower Dark Archers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xc0, 0, HTH, S, 0x1b, 0x6c, True, True).small_key().pos(2),
create_spiral_stairs(player, 'Tower Red Spears Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xb0, 0, HTH, S, 0x12, 0x80, True, True),
create_dir_door(player, 'Tower Red Spears WN', DoorType.Interior, Direction.West, 0xb0, Top, High).pos(1),
create_dir_door(player, 'Tower Red Guards EN', DoorType.Interior, Direction.East, 0xb0, Top, High).pos(1),
create_dir_door(player, 'Tower Red Guards SW', DoorType.Interior, Direction.South, 0xb0, Left, High).pos(0),
create_dir_door(player, 'Tower Circle of Pots NW', DoorType.Interior, Direction.North, 0xb0, Left, High).pos(0),
create_dir_door(player, 'Tower Circle of Pots WS', DoorType.Interior, Direction.West, 0xb0, Bot, High).small_key().pos(2),
create_dir_door(player, 'Tower Pacifist Run ES', DoorType.Interior, Direction.East, 0xb0, Bot, High).small_key().pos(2),
create_spiral_stairs(player, 'Tower Pacifist Run Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xb0, 2, LTH, X, 0x33, 0x8c),
create_spiral_stairs(player, 'Tower Push Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0x40, 0, HTL, X, 0x12, 0xa0),
create_spiral_stairs(player, 'Tower Pacifist Run Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xb0, 2, LTH, X, 0x33, 0x8c, True, True),
create_spiral_stairs(player, 'Tower Push Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0x40, 0, HTL, X, 0x12, 0xa0, True, True),
create_dir_door(player, 'Tower Push Statue WS', DoorType.Interior, Direction.West, 0x40, Bot, Low).pos(0),
create_dir_door(player, 'Tower Catwalk ES', DoorType.Interior, Direction.East, 0x40, Bot, Low).pos(0),
create_dir_door(player, 'Tower Catwalk North Stairs', DoorType.StraightStairs, Direction.North, 0x40, Left, High),

2
Rom.py
View File

@@ -18,7 +18,7 @@ from EntranceShuffle import door_addresses
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '6f23a17f80179af941518585f2b27d52'
RANDOMIZERBASEHASH = 'fdf74815ca2ad15186daa9de3e68cecb'
class JsonRom(object):

View File

@@ -276,11 +276,11 @@ class PairedDoor(object):
def address_a(self, world, player):
d = world.check_for_door(self.door_a, player)
return 0x13C000 + door_pair_offset_table[d.roomIndex]*2
return 0x13C000 + (door_pair_offset_table[d.roomIndex]+d.doorListPos)*2
def address_b(self, world, player):
d = world.check_for_door(self.door_b, player)
return 0x13C000 + door_pair_offset_table[d.roomIndex]*2
return 0x13C000 + (door_pair_offset_table[d.roomIndex]+d.doorListPos)*2
def rom_data_a(self, world, player):
if not self.pair:

View File

@@ -54,6 +54,7 @@ SpiralWarp: {
lda $01 : and #$80 : beq .set53
; if target is also up adjust by (-6, 14)
lda #$fa : !add $20 : sta $20 : lda #$14 : !add $22 : sta $22
bne .set53 : inc $23
.set53
txa : !add $22 : sta $53
@@ -96,8 +97,8 @@ LookupSpiralOffset: {
.q1diff lda $22 : cmp #$98 : bcc .done ;swamp/pod dual stairs
inc $01 : bra .done
.quad2 ;ice room
lda $040c : cmp $12 : bne .done
lda #$03 : sta $01
lda $040c : cmp $12 : bne .done
lda $22 : cmp #$78 : bcc .done
inc $01 : bra .done
.quad3 lda #$02 : sta $01 ; always 2

File diff suppressed because one or more lines are too long

View File

@@ -1,11 +1,16 @@
Notes:
(Fixed?) HD Staircase up to HC Main Map Room was wrong location
(Fixed?) Key door between Hyrule Castle East Hall S <=> Sewers Key Rat Key Door N not paired
(Testing) Camera spots in Aga Tower: Push Statue, Lone Statue maybe?
(Fixed?) Spiral stairs without keys look funny - change to Incognito instead of Normal
Key door on Layer 1 not working (Aga Tower)
Key door in HC Lobby E door not passable - look into it?
Zero camera out skips quad logic
The armory guard room and the room above have fake layers. Shutter doors
The armory guard room and the room above have fake layers. Trap doors
Notes 2:
(Fixed) this is 0060 but looks like should be 0460 layer again