diff --git a/dungeondrops.asm b/dungeondrops.asm index 2a7a2ef..68ff32e 100644 --- a/dungeondrops.asm +++ b/dungeondrops.asm @@ -3,6 +3,16 @@ ;-------------------------------------------------------------------------------- SpawnDungeonPrize: PHX : PHB + + PHA + ; Don't spawn prize in Cave state, Hyrule Castle, Escape, Castle Tower, or Ganon's Tower + LDA.w DungeonID : BMI .skip_prize_drop ; Cave state + CMP.b #$00 : BEQ .skip_prize_drop ; Escape + CMP.b #$02 : BEQ .skip_prize_drop ; Hyrule Castle + CMP.b #$1A : BEQ .skip_prize_drop ; Ganon's Tower + CMP.b #$08 : BEQ .skip_prize_drop ; Agahnim's Tower (Castle Tower) + PLA + TAX LDA.b $06,S : STA.b ScrapBuffer72 ; Store current RoomTag index TXA @@ -24,6 +34,10 @@ SpawnDungeonPrize: PLB : PLX RTL +.skip_prize_drop: + PLA : PLB : PLX +RTL + AddDungeonPrizeAncilla: LDY.w ItemReceiptID STZ.w AncillaVelocityY,X diff --git a/heartpieces.asm b/heartpieces.asm index 5509e67..c5f8c08 100644 --- a/heartpieces.asm +++ b/heartpieces.asm @@ -246,6 +246,12 @@ LoadOutdoorValue: PHP REP #$20 ; set 16-bit accumulator LDA.b OverworldIndex + ; Rain state fix: In rain state DW, use LW screen ID for item lookup + BIT.w #$0040 : BEQ + + LDA.l ProgressIndicator : AND.w #$00FF : CMP.w #$0002 + LDA.b OverworldIndex : BCS ++ : AND.w #$00BF + ++ + + CMP.w #$03 : BNE + LDA.b LinkPosX : CMP.w #1890 : !BLT ++ %GetPossiblyEncryptedItem(HeartPiece_Spectacle, HeartPieceOutdoorValues) diff --git a/tablets.asm b/tablets.asm index 50801a0..09bbe13 100644 --- a/tablets.asm +++ b/tablets.asm @@ -19,7 +19,14 @@ RTL ;-------------------------------------------------------------------------------- SetTabletItemFlag: PHA - LDA.b OverworldIndex : CMP.b #$03 : BEQ .ether ; if we're on the map where ether is, we're the ether tablet + ; Rain state fix: convert DW screen ID to LW if in rain state + LDA.b OverworldIndex + BIT.b #$40 : BEQ + + LDA.l ProgressIndicator : CMP.b #$02 + LDA.b OverworldIndex : BCS ++ : AND.b #$BF + ++ + + + CMP.b #$03 : BEQ .ether ; if we're on the map where ether is, we're the ether tablet .bombos JSR ItemSet_BombosTablet : BRA .done .ether @@ -71,6 +78,12 @@ RTL IsMedallion: REP #$20 ; set 16-bit accumulator LDA.b OverworldIndex + ; Rain state fix: In rain state DW, use LW screen ID for tablet lookup + BIT.w #$0040 : BEQ + + LDA.l ProgressIndicator : AND.w #$00FF : CMP.w #$0002 + LDA.b OverworldIndex : BCS ++ : AND.w #$00BF + ++ + + CMP.w #$03 : BNE + ; Death Mountain LDA.b LinkPosX : CMP.w #1890 : !BGE ++ SEC