move storage of BOMB_LEVEL to make it play nicely with starting equipment

This commit is contained in:
2021-07-13 11:02:59 -07:00
parent 6d52427696
commit 2693e73a21
9 changed files with 14 additions and 15 deletions

View File

@@ -36,8 +36,9 @@ db #$20, #$19, #$08, #$31 ; year/month/day
; Rando Specific SRAM assignments
!SHOP_PURCHASE_COUNTS = "$7EF302" ;$7EF302 - $7EF33F (temporary home)
!INVENTORY_SWAP = "$7EF38C" ; [w]
!INVENTORY_SWAP_2 = "$7EF38E" ; [w]
!INVENTORY_SWAP = "$7EF38C"
!INVENTORY_SWAP_2 = "$7EF38E"
!BOMB_LEVEL = "$7EF38F"
!ITEM_LIMIT_COUNTS = "$7EF390" ; $7EF390 - ????
!NPC_FLAGS = "$7EF410"
!NPC_FLAGS_2 = "$7EF411"
@@ -58,7 +59,6 @@ db #$20, #$19, #$08, #$31 ; year/month/day
;$7EF420 - $7EF46D - Stat Tracking Bank 1 (overlaps with RNG Item Flags)
;$7EF450 - $7EF45F - RNG Item (Single) Flags
;$7EF4A0 - $7EF4A7 - Service Request Block
!PROGRESSIVE_BOMBS = "$7EF4A8"
!FRESH_FILE_MARKER = "$7EF4F0" ; zero if fresh file
;$700500 - $70050F - Extended File Name
;$701000 - $70100F - Password (incorporate into log header)

View File

@@ -147,7 +147,7 @@ SetEscapeAssist:
++
LDA.l SpecialBombs : BEQ +
LDA.l $7EF4A8 : BEQ +
LDA.l !BOMB_LEVEL : BEQ +
LDA #$01 : STA !INFINITE_BOMBS
+
RTL

View File

@@ -727,7 +727,7 @@ RTL
.incrementBossSword
LDA SpecialBombs : BEQ +
LDA $7EF4A8 : BRA ++
LDA !BOMB_LEVEL : BRA ++
+ : LDA $7EF359
++
BNE + : -

View File

@@ -76,9 +76,9 @@ JMP .done
PHA
TYA ; load bomb upgrade item
!SUB #$B0 ; convert to bomb level
CMP.l $7EF4A8 : !BGE + ; skip if highest is lower (this is an upgrade)
LDA.l $7EF4A8 : !ADD #$B0 ; convert to item id
TAY : PLA : LDA.l $7EF4A8 ; put bomb level into the thing to write
CMP.l !BOMB_LEVEL : !BGE + ; skip if highest is lower (this is an upgrade)
LDA.l !BOMB_LEVEL : !ADD #$B0 ; convert to item id
TAY : PLA : LDA.l !BOMB_LEVEL ; put bomb level into the thing to write
JMP .done
+
PLA

View File

@@ -533,7 +533,7 @@ AddReceivedItemExpanded:
LDA #$FF : STA !LOCK_IN ; clear lock-in
BRA .done
++ : CMP.b #$B6 : BNE ++ ; Progressive Bombs
LDA $7EF4A8
LDA !BOMB_LEVEL
CMP.b #$00 : BNE + ; have no Bombs
LDA.b #$B1 : STA $02D8 : JMP .done
+ : CMP.b #$01 : BNE + ; have L-1 Bombs
@@ -807,7 +807,7 @@ org $A08800
dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Big Key
dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Small Key
dw $F36A ; reserved for bee traps
dw $F4A8, $F4A8, $F4A8, $F4A8, $F4A8, $F4A8 ; Bomb Upgrades
dw $F38F, $F38F, $F38F, $F38F, $F38F, $F38F ; Bomb Upgrades
dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Unused
dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Unused
dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Unused

View File

@@ -1,6 +1,5 @@
;--------------------------------------------------------------------------------
!ANCILLA_DAMAGE = "$06EC84"
!BOMB_LEVEL = "$7EF4A8"
; start with X = sprite index, A = ancilla type index
;--------------------------------------------------------------------------------
DamageClassCalc:
@@ -262,7 +261,7 @@ DrawSwordInMenu:
LDA.w #$F859 : STA $04
RTL
.bombSword
LDA $7EF4A8 : AND.w #$00FF : STA $02
LDA !BOMB_LEVEL : AND.w #$00FF : STA $02
LDA.w #$FC51 : STA $04
RTL
;--------------------------------------------------------------------------------

View File

@@ -135,7 +135,7 @@ CheckTabletSword:
LDA.b #$02 : RTL
+
LDA.l SpecialBombs : BEQ +
LDA $7EF4A8 : CMP #$02 : !BLT + ; check for master bombs
LDA !BOMB_LEVEL : CMP #$02 : !BLT + ; check for master bombs
LDA.b #$02 : RTL
+
LDA $7EF359 ; get actual sword value

View File

@@ -1632,7 +1632,7 @@ dw $0000, $0000, $0000, $0000, $F800, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000
;--------------------------------------------------------------------------------
; 0x182355 - 183FFF (unused)
; 0x183055 - 183FFF (unused)
;================================================================================
org $30C000 ; PC 0x184000 - 0x184007
ItemSubstitutionRules:

View File

@@ -21,7 +21,7 @@ EndRainState:
CMP #$10 : BNE + : STA !INFINITE_ARROWS : +
LDA.l SpecialBombs : BEQ +
LDA.l $7EF4A8 : BEQ +
LDA.l !BOMB_LEVEL : BEQ +
LDA #$01 : STA !INFINITE_BOMBS
+
LDA.b #$02 : STA $7EF3C5 ; end rain state