Prevent prizes dropping in dungeons where they shouldn't (including cave state) and fix rain state items/tablets.

This commit is contained in:
KrisDavie
2025-11-29 15:34:23 +01:00
committed by aerinon
parent 68c511d6be
commit 761365927f
3 changed files with 34 additions and 1 deletions

View File

@@ -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