Sewer fix

Multiworld absorbable fix
Thoughts on design for cross dungeon issues
This commit is contained in:
aerinon
2023-08-09 15:16:13 -06:00
parent 2c9161927e
commit 459dacd582

View File

@@ -147,6 +147,22 @@ org $A8ACB0
UWEnemyItemFlags: UWEnemyItemFlags:
; Reserved $250 296 * 2 ; Reserved $250 296 * 2
; Thoughs on multitile dungeon design
; Initial table indexed by room id
; Special values: $FF indicates the room can use the UWEnemyItemFlags table
; Any other value tell you where to start in the special table
; Simple mask table, 3 bytes per entry: 1st byte what dungeon it applies, if $FF, then the list is done
; 2nd and 3rd bytes are the mask
; For indicator idea:
; EOR between a mask and the equivalent SRAM should result in zero if all items are obtained
; For whether to spawn:
; $FF indicates a spawn without further checking, otherwise need to check the mask in the simple table
; this should be checked in addition to SRAM
org $A8AF00 org $A8AF00
RevealPotItem: RevealPotItem:
@@ -348,7 +364,9 @@ RevealSpriteDrop:
LDA.l StandingItemsOn : BNE + LDA.l StandingItemsOn : BNE +
INY ; big key routine INY ; big key routine
+ +
PHX : LDX.b #$00 PHX
LDA.l SpawnedItemMWPlayer : BNE .done ; abort check for absorbables it belong to someone else
LDX.b #$00 ; see if the item should be replaced by an absorbable
- CPX.b #$1A : BCS .done - CPX.b #$1A : BCS .done
LDA.l MinorForcedDrops, X LDA.l MinorForcedDrops, X
CMP.b $00 : BNE + CMP.b $00 : BNE +
@@ -403,7 +421,7 @@ IncrementCountForMinor:
ORA $0A : STA SpritePotData, X ORA $0A : STA SpritePotData, X
SEP #$30 SEP #$30
LDA $040C : CMP #$FF : BEQ + LDA $040C : CMP #$FF : BEQ +
BNE ++ CMP #$00 : BNE ++
INC #2 ; treat sewers as HC INC #2 ; treat sewers as HC
++ LSR : TAX : LDA DungeonLocationsChecked, X : INC : STA DungeonLocationsChecked, X ++ LSR : TAX : LDA DungeonLocationsChecked, X : INC : STA DungeonLocationsChecked, X
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now ; Could increment GT Tower Pre Big Key but we aren't showing that stat right now