diff --git a/npcitems.asm b/npcitems.asm index 89db845..b294904 100644 --- a/npcitems.asm +++ b/npcitems.asm @@ -169,4 +169,26 @@ ItemSet_Powder: ;LDY.b #$0D STZ $02E9 ; thing we wrote over RTL -;================================================================================ \ No newline at end of file +;================================================================================ + +;================================================================================ +; Randomize 300 Rupee NPC +;-------------------------------------------------------------------------------- +Set300RupeeNPCItem: + INC $0D80, X ; thing we wrote over + + PHA : PHP + REP #$20 ; set 16-bit accumulator + LDA $A0 ; these are all decimal because i got them that way + CMP.w #291 : BNE + + LDA RupeeNPC_MoldormCave : TAY ; load moldorm cave value into Y + BRA .done + + CMP.w #286 : BNE + + LDA RupeeNPC_NortheastDarkSwampCave : TAY ; load northeast dark swamp cave value into Y + BRA .done + + + LDY.b #$46 ; default to a normal 300 rupees + .done + PLP : PLA +RTL +;================================================================================ diff --git a/shopkeeper.asm b/shopkeeper.asm index ff783c8..5edddb3 100644 --- a/shopkeeper.asm +++ b/shopkeeper.asm @@ -1,23 +1,3 @@ -;================================================================================ -; Randomize 300 Rupee NPC -;-------------------------------------------------------------------------------- -Set300RupeeNPCItem: - INC $0D80, X ; thing we wrote over - - PHA : PHP - REP #$20 ; set 16-bit accumulator - LDA $A0 ; these are all decimal because i got them that way - CMP.w #291 : BNE + - LDA RupeeNPC_MoldormCave : TAY ; load moldorm cave value into Y - BRA .done - + CMP.w #286 : BNE + - LDA RupeeNPC_NortheastDarkSwampCave : TAY ; load northeast dark swamp cave value into Y - BRA .done - + - LDY.b #$46 ; default to a normal 300 rupees - .done - PLP : PLA -RTL ;-------------------------------------------------------------------------------- ; 291 - Moldorm Cave ; 286 - Northeast Dark Swamp Cave