Remove non-progressive bomb/cane upgrades
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
CheckReceivedItemPropertiesBeforeLoad:
|
||||
LDA $A0 : BEQ .normalCode
|
||||
LDA $7EC005 : BNE .lightOff
|
||||
.normalCode
|
||||
LDA.l AddReceivedItemExpanded_properties, X ;Restore Rando Code
|
||||
.normalCode
|
||||
JSL LoadReceivedItemExpandedProperties ; get palette
|
||||
RTL
|
||||
|
||||
.lightOff
|
||||
PHX : PHY : PHB
|
||||
LDA.l AddReceivedItemExpanded_properties, X ; get palette
|
||||
JSL LoadReceivedItemExpandedProperties ; get palette
|
||||
|
||||
REP #$30
|
||||
AND #$0007 ; mask out palette
|
||||
|
||||
@@ -557,14 +557,18 @@ AddInventory:
|
||||
CPY.b #$B0 : !BGE +
|
||||
JSR .incrementKey
|
||||
JMP .done
|
||||
+ CPY.b #$B1 : !BLT + ; Items $B1 - $B6 - Bomb Upgrades
|
||||
CPY.b #$B7 : !BGE +
|
||||
JSR .incrementBombLevel
|
||||
JMP .done
|
||||
+ CPY.b #$B7 : !BLT + ; Items $B7 - $BC - Cane Upgrades
|
||||
CPY.b #$BD : !BGE +
|
||||
JSR .incrementCaneLevel
|
||||
JMP .done
|
||||
+ CPY.b #$B6 : BNE + ; Item $B6 - Bomb Upgrade
|
||||
JSR .stampSword ; update "first bomb" timestamp
|
||||
LDA.l SpecialWeaponLevel ; get current bomb level
|
||||
CMP #$05 : !BGE ++ ; check if already maxed
|
||||
INC : STA.l SpecialWeaponLevel
|
||||
++ JMP .done
|
||||
+ CPY.b #$B7 : BNE + ; Item $B7 - Cane Upgrade
|
||||
JSR .stampSword ; update "first cane" timestamp
|
||||
LDA.l SpecialWeaponLevel ; get current cane level
|
||||
CMP #$05 : !BGE ++ ; check if already maxed
|
||||
INC : STA.l SpecialWeaponLevel
|
||||
++ JMP .done
|
||||
+
|
||||
.done
|
||||
PLP : PLX : PLA
|
||||
@@ -620,14 +624,6 @@ RTS
|
||||
+
|
||||
RTS
|
||||
|
||||
.incrementBombLevel
|
||||
JSR .stampSword ; update "first bomb" timestamp
|
||||
RTS
|
||||
|
||||
.incrementCaneLevel
|
||||
JSR .stampSword ; update "first cane" timestamp
|
||||
RTS
|
||||
|
||||
.incrementShield
|
||||
LDA HighestShield
|
||||
INC : STA $04 : CPX $04 : !BLT + ; don't increment unless we're getting a better shield
|
||||
@@ -669,7 +665,6 @@ RTS
|
||||
RTS
|
||||
|
||||
.incrementMail
|
||||
|
||||
LDA HighestMail
|
||||
INC : STA $04 : CPX $04 : !BLT + ; don't increment unless we're getting a better mail
|
||||
TXA : STA HighestMail
|
||||
|
||||
@@ -29,9 +29,6 @@ ItemDowngradeFixMain:
|
||||
CPY.b #$13 : BEQ .isShovel ; Shovel
|
||||
CPY.b #$29 : BEQ .isMushroom ; Mushroom
|
||||
|
||||
CPY.b #$B1 : !BLT + : CPY.b #$B6 : !BLT .isBombUpgrade : +
|
||||
CPY.b #$B7 : !BLT + : CPY.b #$BC : !BLT .isCaneUpgrade : +
|
||||
|
||||
CPY.b #$00 : BEQ .isUncleSwordShield ; Fighter's Sword & Shield
|
||||
|
||||
.done
|
||||
@@ -73,28 +70,6 @@ RTS
|
||||
JMP .done
|
||||
+
|
||||
PLA
|
||||
JMP .done
|
||||
.isBombUpgrade
|
||||
PHA
|
||||
TYA ; load bomb upgrade item
|
||||
!SUB #$B0 ; convert to bomb level
|
||||
CMP.l SpecialWeaponLevel : !BGE + ; skip if highest is lower (this is an upgrade)
|
||||
LDA.l SpecialWeaponLevel : !ADD #$B0 ; convert to item id
|
||||
TAY : PLA : LDA.l SpecialWeaponLevel ; put bomb level into the thing to write
|
||||
JMP .done
|
||||
+
|
||||
PLA
|
||||
JMP .done
|
||||
.isCaneUpgrade
|
||||
PHA
|
||||
TYA ; load cane upgrade item
|
||||
!SUB #$B6 ; convert to cane level
|
||||
CMP.l SpecialWeaponLevel : !BGE + ; skip if highest is lower (this is an upgrade)
|
||||
LDA.l SpecialWeaponLevel : !ADD #$B6 ; convert to item id
|
||||
TAY : PLA : LDA.l SpecialWeaponLevel ; put cane level into the thing to write
|
||||
JMP .done
|
||||
+
|
||||
PLA
|
||||
JMP .done
|
||||
.isUncleSwordShield
|
||||
PHA
|
||||
|
||||
43
newitems.asm
43
newitems.asm
@@ -441,9 +441,8 @@ AddReceivedItemExpandedGetItem:
|
||||
LDA.b #$05 : STA ArrowsFiller ; add 5 arrows
|
||||
BRA .done
|
||||
+ CMP.b #$B6 : BNE + ; Bomb Upgrade
|
||||
LDA.l SpecialWeapons : CMP #$01 : BNE .done
|
||||
LDA #$01 : STA InfiniteBombsModifier ; infinite bombs
|
||||
JMP .done
|
||||
LDA #$01 : STA InfiniteBombsModifier ; infinite bombs
|
||||
JMP .done
|
||||
+ : CMP.b #$B7 : BNE + ; Cane Upgrade
|
||||
LDA.l SpecialWeapons : CMP #$03 : BEQ .blue_cane
|
||||
CMP #$04 : BEQ .red_cane
|
||||
@@ -599,30 +598,6 @@ AddReceivedItemExpanded:
|
||||
LDA !MULTIWORLD_ITEM_PLAYER_ID : BEQ +++
|
||||
LDA.b #$0E : STA $02D8 : JMP .done ; Bee in a bottle
|
||||
+++
|
||||
++ : CMP.b #$B6 : BNE ++ ; Progressive Bombs
|
||||
LDA SpecialWeaponLevel
|
||||
CMP.b #$00 : BNE + ; have no Bombs
|
||||
LDA.b #$B1 : STA $02D8 : JMP .done
|
||||
+ : CMP.b #$01 : BNE + ; have L-1 Bombs
|
||||
LDA.b #$B2 : STA $02D8 : JMP .done
|
||||
+ : CMP.b #$02 : BNE + ; have L-2 Bombs
|
||||
LDA.b #$B3 : STA $02D8 : JMP .done
|
||||
+ : CMP.b #$03 : BNE + ; have L-3 Bombs
|
||||
LDA.b #$B4 : STA $02D8 : JMP .done
|
||||
+ ; Everything Else
|
||||
LDA.b #$B5 : STA $02D8 : JMP .done
|
||||
++ : CMP.b #$BC : BNE ++ ; Progressive Cane
|
||||
LDA SpecialWeaponLevel
|
||||
CMP.b #$00 : BNE + ; have no Cane
|
||||
LDA.b #$B7 : STA $02D8 : JMP .done
|
||||
+ : CMP.b #$01 : BNE + ; have L-1 Cane
|
||||
LDA.b #$B8 : STA $02D8 : JMP .done
|
||||
+ : CMP.b #$02 : BNE + ; have L-2 Cane
|
||||
LDA.b #$B9 : STA $02D8 : JMP .done
|
||||
+ : CMP.b #$03 : BNE + ; have L-3 Cane
|
||||
LDA.b #$BA : STA $02D8 : JMP .done
|
||||
+ ; Everything Else
|
||||
LDA.b #$BB : STA $02D8 : JMP .done
|
||||
++
|
||||
.done
|
||||
PLX : PLA
|
||||
@@ -1363,3 +1338,17 @@ MaybeFlagCompassTotalEntrance:
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadReceivedItemExpandedProperties:
|
||||
CPX.b #$B6 : BEQ .bomb_upgrade
|
||||
LDA.l AddReceivedItemExpanded_properties, X ; load from table
|
||||
RTL
|
||||
.bomb_upgrade
|
||||
LDA SpecialWeaponLevel
|
||||
CMP.b #$01 : BNE + ; L1 Bombs
|
||||
LDA.b #4 : RTL
|
||||
+ : CMP.b #$02 : BNE + ; L2 Bombs
|
||||
LDA.b #2 : RTL
|
||||
+ : CMP.b #$03 : BNE + ; L3 Bombs
|
||||
LDA.b #1 : RTL
|
||||
+ ; Everything Else
|
||||
LDA.b #5 : RTL
|
||||
|
||||
Reference in New Issue
Block a user