Prevent prizes dropping in dungeons where they shouldn't (including cave state) and fix rain state items/tablets.
This commit is contained in:
@@ -3,6 +3,16 @@
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SpawnDungeonPrize:
|
SpawnDungeonPrize:
|
||||||
PHX : PHB
|
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
|
TAX
|
||||||
LDA.b $06,S : STA.b ScrapBuffer72 ; Store current RoomTag index
|
LDA.b $06,S : STA.b ScrapBuffer72 ; Store current RoomTag index
|
||||||
TXA
|
TXA
|
||||||
@@ -24,6 +34,10 @@ SpawnDungeonPrize:
|
|||||||
PLB : PLX
|
PLB : PLX
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
.skip_prize_drop:
|
||||||
|
PLA : PLB : PLX
|
||||||
|
RTL
|
||||||
|
|
||||||
AddDungeonPrizeAncilla:
|
AddDungeonPrizeAncilla:
|
||||||
LDY.w ItemReceiptID
|
LDY.w ItemReceiptID
|
||||||
STZ.w AncillaVelocityY,X
|
STZ.w AncillaVelocityY,X
|
||||||
|
|||||||
@@ -246,6 +246,12 @@ LoadOutdoorValue:
|
|||||||
PHP
|
PHP
|
||||||
REP #$20 ; set 16-bit accumulator
|
REP #$20 ; set 16-bit accumulator
|
||||||
LDA.b OverworldIndex
|
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 +
|
CMP.w #$03 : BNE +
|
||||||
LDA.b LinkPosX : CMP.w #1890 : !BLT ++
|
LDA.b LinkPosX : CMP.w #1890 : !BLT ++
|
||||||
%GetPossiblyEncryptedItem(HeartPiece_Spectacle, HeartPieceOutdoorValues)
|
%GetPossiblyEncryptedItem(HeartPiece_Spectacle, HeartPieceOutdoorValues)
|
||||||
|
|||||||
15
tablets.asm
15
tablets.asm
@@ -19,7 +19,14 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SetTabletItemFlag:
|
SetTabletItemFlag:
|
||||||
PHA
|
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
|
.bombos
|
||||||
JSR ItemSet_BombosTablet : BRA .done
|
JSR ItemSet_BombosTablet : BRA .done
|
||||||
.ether
|
.ether
|
||||||
@@ -71,6 +78,12 @@ RTL
|
|||||||
IsMedallion:
|
IsMedallion:
|
||||||
REP #$20 ; set 16-bit accumulator
|
REP #$20 ; set 16-bit accumulator
|
||||||
LDA.b OverworldIndex
|
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
|
CMP.w #$03 : BNE + ; Death Mountain
|
||||||
LDA.b LinkPosX : CMP.w #1890 : !BGE ++
|
LDA.b LinkPosX : CMP.w #1890 : !BGE ++
|
||||||
SEC
|
SEC
|
||||||
|
|||||||
Reference in New Issue
Block a user