Add shop shield handling, credits counter, softlock protection
This commit is contained in:
@@ -89,6 +89,9 @@ GetMultiworldItem:
|
||||
PHP
|
||||
LDA.l !MULTIWORLD_ITEM : BNE +
|
||||
LDA.l !MULTIWORLD_HUD_TIMER : BNE +
|
||||
LDA.l ShieldEquipment : BNE ++
|
||||
LDA.l PikitItem : CMP.b #$04 : BNE +
|
||||
++
|
||||
BRL .return
|
||||
+
|
||||
|
||||
@@ -123,6 +126,34 @@ GetMultiworldItem:
|
||||
BRL .return
|
||||
+
|
||||
|
||||
LDA.l ShieldEquipment : BNE +
|
||||
LDA.l PikitItem : CMP.b #$04 : BEQ +
|
||||
|
||||
LDY.b #$10
|
||||
-
|
||||
DEY
|
||||
BMI .restore_shield
|
||||
LDA.w $0E20, Y
|
||||
CMP.b #$AA
|
||||
BNE - ; go to next sprite if this sprite isn't a pikit
|
||||
LDA.w $0DD0, Y
|
||||
BEQ - ; go to next sprite if this sprite is dead/inactive
|
||||
LDA.w $0ED0, Y
|
||||
CMP.b #$04
|
||||
BNE - ; go to next sprite if this pikit isn't grabbing a shield
|
||||
LDA.w $0E90, Y
|
||||
CMP.b #$04
|
||||
BNE - ; go to next sprite if this pikit isn't grabbing a shield
|
||||
|
||||
BRA + ; active pikit has a shield
|
||||
|
||||
.restore_shield
|
||||
; we have a pikit item, but no shield, and there's no pikit actively
|
||||
; eating a shield, so return the shield to prevent a softlock
|
||||
LDA.b #$01
|
||||
STA.l ShieldEquipment
|
||||
+
|
||||
|
||||
LDA.l !MULTIWORLD_ITEM : BNE +
|
||||
BRL .return
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user