Rain state prevention fix

Also, disallowed door behind Throne Room to be dashable/bombable in standard/hc
This commit is contained in:
aerinon
2022-03-29 14:30:20 -06:00
parent 8bc446fbc5
commit 68c2d06d85
6 changed files with 17 additions and 8 deletions

View File

@@ -1743,7 +1743,7 @@ def smooth_door_pairs(world, player):
if type_b == DoorKind.SmallKey:
remove_pair(door, world, player)
else:
if valid_pair:
if valid_pair and not std_forbidden(door, world, player):
bd_candidates[door.entrance.parent_region.dungeon].append(door)
elif type_a in [DoorKind.Bombable, DoorKind.Dashable] or type_b in [DoorKind.Bombable, DoorKind.Dashable]:
if type_a in [DoorKind.Bombable, DoorKind.Dashable]:
@@ -1752,7 +1752,8 @@ def smooth_door_pairs(world, player):
else:
room_b.change(partner.doorListPos, DoorKind.Normal)
remove_pair(partner, world, player)
elif valid_pair and type_a != DoorKind.SmallKey and type_b != DoorKind.SmallKey:
elif (valid_pair and type_a != DoorKind.SmallKey and type_b != DoorKind.SmallKey
and not std_forbidden(door, world, player)):
bd_candidates[door.entrance.parent_region.dungeon].append(door)
shuffle_bombable_dashable(bd_candidates, world, player)
world.paired_doors[player] = [x for x in world.paired_doors[player] if x.pair or x.original]
@@ -1791,6 +1792,11 @@ def stateful_door(door, kind):
return False
def std_forbidden(door, world, player):
return (world.mode[player] == 'standard' and door.entrance.parent_region.dungeon.name == 'Hyrule Castle' and
'Hyrule Castle Throne Room N' in [door.name, door.dest.name])
dashable_forbidden = {
'Swamp Trench 1 Key Ledge NW', 'Swamp Left Elbow WN', 'Swamp Right Elbow SE', 'Mire Hub WN', 'Mire Hub WS',
'Mire Hub Top NW', 'Mire Hub NE', 'Ice Dead End WS'

View File

@@ -159,6 +159,7 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o
* Logic refinements
* Skull X Room requires Boots or access to Skull Back Drop
* GT Falling Torches requires Boots to get over the falling tile gap (this is a stop-gap measure until more sophisticated crystal switch traversal is possible)
* Fixed a couple rain state issues
* 1.0.1.11
* Separated Collection Rate counter from experimental
* Added MSU Resume option

2
Rom.py
View File

@@ -35,7 +35,7 @@ from source.item.FillUtil import valid_pot_items
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '1e45d174c71b2e079df1c8d5e8d1451b'
RANDOMIZERBASEHASH = '8d196e8024faebbbbe1304032158ccea'
class JsonRom(object):

View File

@@ -176,7 +176,7 @@ org $02d9ce ; <- Bank02.asm : Dungeon_LoadEntrance 10829 (STA $A0 : STA $048E)
JSL CheckDarkWorldSpawn : NOP
org $01891e ; <- Bank 01.asm : 991 Dungeon_LoadType2Object (LDA $00 : XBA : AND.w #$00FF)
JSL RainPrevention : NOP #2
JSL RainPrevention : BCC + : RTS : NOP : +
org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00)
JSL StandardAgaDmg

View File

@@ -118,7 +118,7 @@ RetrieveBunnyState:
+ RTL
RainPrevention:
LDA $00 : XBA : AND #$00FF ; what we wrote over
LDA $00 : XBA : AND #$00FF : STA.b $0A ; what we wrote over
PHA
LDA $7EF3C5 : AND #$00FF : CMP #$0002 : !BGE .done ; only in rain states (0 or 1)
LDA.l $7EF3C6 : AND #$0004 : BNE .done ; zelda's been rescued
@@ -131,9 +131,11 @@ RainPrevention:
LDX #$FFFE
- INX #2 : LDA.l RemoveRainDoorsRoom, X : CMP #$FFFF : BEQ .done
CMP $A0 : BNE -
LDA.l RainDoorMatch, X : CMP $00 : BNE -
PLA : LDA #$0008 : RTL
.done PLA : RTL
SEP #$20 : LDA.l RainDoorMatch, X : CMP $00 : BNE .continue
REP #$20 : PLA : SEC : RTL
.continue
REP #$20 : BRA -
.done PLA : CLC : RTL
; A should be how much dmg to do to Aga when leaving this function
StandardAgaDmg:

Binary file not shown.