Unify standard escape ammo fills
This commit is contained in:
@@ -146,32 +146,57 @@ macro SetMinimum(base,filler,compare)
|
|||||||
endmacro
|
endmacro
|
||||||
RefreshRainAmmo:
|
RefreshRainAmmo:
|
||||||
LDA.l ProgressIndicator : CMP.b #$01 : BEQ .rain ; check if we're in rain state
|
LDA.l ProgressIndicator : CMP.b #$01 : BEQ .rain ; check if we're in rain state
|
||||||
RTL
|
|
||||||
.rain
|
|
||||||
LDA.l StartingEntrance
|
|
||||||
+ CMP.b #$03 : BNE + ; Uncle
|
|
||||||
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Uncle)
|
|
||||||
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Uncle)
|
|
||||||
LDA.l ArrowMode : BEQ ++
|
|
||||||
LDA.l BowEquipment : BEQ +++
|
|
||||||
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Uncle)
|
|
||||||
+++ BRA .done
|
|
||||||
+ CMP.b #$02 : BNE + ; Cell
|
|
||||||
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Cell)
|
|
||||||
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Cell)
|
|
||||||
LDA.l ArrowMode : BEQ ++
|
|
||||||
LDA.l BowEquipment : BEQ .done
|
|
||||||
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Cell)
|
|
||||||
BRA .done
|
|
||||||
+ CMP.b #$04 : BNE + ; Mantle
|
|
||||||
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Mantle)
|
|
||||||
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Mantle)
|
|
||||||
LDA.l ArrowMode : BEQ ++
|
|
||||||
LDA.l BowEquipment : BEQ .done
|
|
||||||
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Mantle)
|
|
||||||
+
|
|
||||||
.done
|
|
||||||
RTL
|
RTL
|
||||||
|
.rain
|
||||||
|
LDA.l StartingEntrance : BEQ .uncle
|
||||||
|
CMP.b #$03 : BNE + ; Uncle
|
||||||
|
.uncle
|
||||||
|
LDA.l RainDeathRefillMagic_Uncle : JSR .refillMagic
|
||||||
|
LDA.l RainDeathRefillBombs_Uncle : JSR .refillBombs
|
||||||
|
LDA.l ArrowMode : BNE .rupeeBow
|
||||||
|
LDA.l RainDeathRefillArrows_Uncle : JSR .refillArrows
|
||||||
|
BRA .done
|
||||||
|
+ CMP.b #$02 : BNE + ; Cell
|
||||||
|
LDA.l RainDeathRefillMagic_Cell : JSR .refillMagic
|
||||||
|
LDA.l RainDeathRefillBombs_Cell : JSR .refillBombs
|
||||||
|
LDA.l ArrowMode : BNE .rupeeBow
|
||||||
|
LDA.l RainDeathRefillArrows_Cell : JSR .refillArrows
|
||||||
|
BRA .done
|
||||||
|
+ CMP.b #$04 : BNE + ; Mantle
|
||||||
|
LDA.l RainDeathRefillMagic_Mantle : JSR .refillMagic
|
||||||
|
LDA.l RainDeathRefillBombs_Mantle : JSR .refillBombs
|
||||||
|
LDA.l ArrowMode : BNE .rupeeBow
|
||||||
|
LDA.l RainDeathRefillArrows_Mantle : JSR .refillArrows
|
||||||
|
BRA .done
|
||||||
|
+ BRA .done
|
||||||
|
|
||||||
|
.rupeeBow
|
||||||
|
REP #$20
|
||||||
|
LDA.l RainDeathRefillRupeeBow : JSR .refillRupees
|
||||||
|
SEP #$20
|
||||||
|
|
||||||
|
.done
|
||||||
|
RTL
|
||||||
|
|
||||||
|
.refillMagic
|
||||||
|
SEC : SBC.l CurrentMagic : BCC +
|
||||||
|
STA.l MagicFiller
|
||||||
|
+ RTS
|
||||||
|
|
||||||
|
.refillBombs
|
||||||
|
SEC : SBC.l BombsEquipment : BCC +
|
||||||
|
STA.l BombsFiller
|
||||||
|
+ RTS
|
||||||
|
|
||||||
|
.refillArrows
|
||||||
|
SEC : SBC.l CurrentArrows : BCC +
|
||||||
|
STA.l ArrowsFiller
|
||||||
|
+ RTS
|
||||||
|
|
||||||
|
.refillRupees
|
||||||
|
CMP.l CurrentRupees : BCC +
|
||||||
|
STA.l CurrentRupees
|
||||||
|
+ RTS
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SetEscapeAssist:
|
SetEscapeAssist:
|
||||||
LDA.l ProgressIndicator : CMP.b #$01 : BNE .no_train ; check if we're in rain state
|
LDA.l ProgressIndicator : CMP.b #$01 : BNE .no_train ; check if we're in rain state
|
||||||
|
|||||||
38
events.asm
38
events.asm
@@ -38,7 +38,7 @@ RTL
|
|||||||
OnPlayerDead:
|
OnPlayerDead:
|
||||||
PHA
|
PHA
|
||||||
JSL SetDeathWorldChecked
|
JSL SetDeathWorldChecked
|
||||||
JSL DynamicDropGFXClear
|
JSL DynamicDropGFXClear
|
||||||
JSL SetSilverBowMode
|
JSL SetSilverBowMode
|
||||||
JSL RefreshRainAmmo
|
JSL RefreshRainAmmo
|
||||||
PLA
|
PLA
|
||||||
@@ -79,30 +79,20 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnUncleItemGet:
|
OnUncleItemGet:
|
||||||
PHA
|
PHA
|
||||||
|
|
||||||
LDA.l EscapeAssist
|
|
||||||
BIT.b #$04 : BEQ + : STA.l InfiniteMagic : +
|
|
||||||
BIT.b #$02 : BEQ + : STA.l InfiniteBombs : +
|
|
||||||
BIT.b #$01 : BEQ + : STA.l InfiniteArrows : +
|
|
||||||
|
|
||||||
LDA.l UncleItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
LDA.l UncleItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||||
PLA
|
PLA
|
||||||
JSL Link_ReceiveItem
|
JSL Link_ReceiveItem
|
||||||
|
|
||||||
LDA.l UncleRefill : BIT.b #$04 : BEQ + : LDA.b #$80 : STA.l MagicFiller : + ; refill magic
|
LDA.l ProgressIndicator : BNE +
|
||||||
LDA.l UncleRefill : BIT.b #$02 : BEQ + : LDA.b #50 : STA.l BombsFiller : + ; refill bombs
|
LDA.b #$01 : STA.l ProgressIndicator ; set rain state
|
||||||
LDA.l UncleRefill : BIT.b #$01 : BEQ + ; refill arrows
|
JSL SetEscapeAssist
|
||||||
LDA.b #70 : STA.l ArrowsFiller
|
JSL RefreshRainAmmo
|
||||||
|
|
||||||
|
; grant arrows if we started with a bow in retro mode
|
||||||
LDA.l ArrowMode : BEQ +
|
LDA.l ArrowMode : BEQ +
|
||||||
LDA.l BowTracking : ORA.b #$80 : STA.l BowTracking ; enable bow toggle
|
LDA.l RainDeathRefillRupeeBow : ORA.l RainDeathRefillRupeeBow+1 : BEQ +
|
||||||
REP #$20 ; set 16-bit accumulator
|
LDA.b #$01 : STA.l ArrowsFiller
|
||||||
LDA.l CurrentRupees : !ADD.l FreeUncleItemAmount : STA.l CurrentRupees ; rupee arrows, so also give the player some money to start
|
|
||||||
SEP #$20 ; set 8-bit accumulator
|
|
||||||
+
|
+
|
||||||
LDA.l ProgressIndicator : BNE +
|
|
||||||
LDA.b #$01 : STA.l ProgressIndicator ; handle rain state
|
|
||||||
+
|
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnAga1Defeated:
|
OnAga1Defeated:
|
||||||
@@ -201,12 +191,12 @@ OnNewFile:
|
|||||||
STZ.w TreePullKills
|
STZ.w TreePullKills
|
||||||
STZ.w TreePullHits
|
STZ.w TreePullHits
|
||||||
STZ.w PrizePackIndexes
|
STZ.w PrizePackIndexes
|
||||||
STZ.w PrizePackIndexes+1
|
STZ.w PrizePackIndexes+1
|
||||||
STZ.w PrizePackIndexes+2
|
STZ.w PrizePackIndexes+2
|
||||||
STZ.w PrizePackIndexes+3
|
STZ.w PrizePackIndexes+3
|
||||||
STZ.w PrizePackIndexes+4
|
STZ.w PrizePackIndexes+4
|
||||||
STZ.w PrizePackIndexes+5
|
STZ.w PrizePackIndexes+5
|
||||||
STZ.w PrizePackIndexes+6
|
STZ.w PrizePackIndexes+6
|
||||||
LDA.b #$00 : STA.l MosaicLevel
|
LDA.b #$00 : STA.l MosaicLevel
|
||||||
JSL InitRNGPointerTable
|
JSL InitRNGPointerTable
|
||||||
PLP : PLX
|
PLP : PLX
|
||||||
|
|||||||
10
tables.asm
10
tables.asm
@@ -237,12 +237,8 @@ db $00
|
|||||||
;a - Infinite Arrows
|
;a - Infinite Arrows
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0804E ; PC 0x18004E
|
org $B0804E ; PC 0x18004E
|
||||||
UncleRefill:
|
UncleRefill_deprecated: ; no longer used
|
||||||
db $00
|
db $00
|
||||||
;---- -mba
|
|
||||||
;m - Refill Magic
|
|
||||||
;b - Refill Bombs
|
|
||||||
;a - Refill Arrows
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0804F ; PC 0x18004F
|
org $B0804F ; PC 0x18004F
|
||||||
ByrnaInvulnerability:
|
ByrnaInvulnerability:
|
||||||
@@ -890,8 +886,8 @@ SilverArrowsAutoEquip:
|
|||||||
db $01 ; #$00 = Off - #$01 = Collection Time (Default) - #$02 = Entering Ganon - #$03 = Collection Time & Entering Ganon
|
db $01 ; #$00 = Off - #$01 = Collection Time (Default) - #$02 = Entering Ganon - #$03 = Collection Time & Entering Ganon
|
||||||
;================================================================================
|
;================================================================================
|
||||||
org $B08183 ; PC 0x180183
|
org $B08183 ; PC 0x180183
|
||||||
FreeUncleItemAmount:
|
RainDeathRefillRupeeBow:
|
||||||
dw $12C ; 300 rupees (Default)
|
dw $012C ; 300 rupees (Default)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B08185 ; PC 0x180185
|
org $B08185 ; PC 0x180185
|
||||||
RainDeathRefillTable:
|
RainDeathRefillTable:
|
||||||
|
|||||||
14
zelda.asm
14
zelda.asm
@@ -1,10 +1,14 @@
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
EndRainState:
|
EndRainState:
|
||||||
LDA.l InitProgressIndicator : BIT.b #$80 : BNE + ; check for instant post-aga
|
LDA.l InitProgressIndicator : BIT.b #$80 : BEQ + ; check for instant post-aga
|
||||||
LDA.b #$02 : STA.l ProgressIndicator
|
LDA.l InitLumberjackOW : STA.l OverworldEventDataWRAM+$02
|
||||||
RTL
|
LDA.b #$03
|
||||||
|
BRA ++
|
||||||
+
|
+
|
||||||
LDA.b #$03 : STA.l ProgressIndicator
|
LDA.b #$02
|
||||||
LDA.l InitLumberjackOW : STA.l OverworldEventDataWRAM+$02
|
++
|
||||||
|
STA.l ProgressIndicator
|
||||||
|
|
||||||
|
JSL SetEscapeAssist
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user