Merged in DR v1.4.1.6
This commit is contained in:
48
hardmode.asm
48
hardmode.asm
@@ -3,22 +3,22 @@
|
||||
;================================================================================
|
||||
CalculateSpikeFloorDamage:
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA $A0 ; these are all decimal because i got them that way
|
||||
LDA.b RoomIndex ; these are all decimal because i got them that way
|
||||
CMP.w #279
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
BNE +
|
||||
LDA.l ByrnaCaveSpikeDamage
|
||||
STA $0373
|
||||
STA.w DamageReceived
|
||||
RTL
|
||||
+
|
||||
LDA $D055, Y
|
||||
STA $0373
|
||||
LDA.w $D055, Y
|
||||
STA.w DamageReceived
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
CalculateByrnaUsage:
|
||||
LDA $1B : BEQ ++
|
||||
LDA.b IndoorsFlag : BEQ ++
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA $A0 ; these are all decimal because i got them that way
|
||||
LDA.b RoomIndex ; these are all decimal because i got them that way
|
||||
CMP.w #95 : BEQ + ; Ice Palace Spike Room
|
||||
CMP.w #172 : BEQ + ; Blind Boss Room
|
||||
CMP.w #179 : BEQ + ; Room in Misery Mire
|
||||
@@ -29,16 +29,16 @@ CalculateByrnaUsage:
|
||||
+
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
PHX : TYX
|
||||
LDA.l HardModeExclusionCaneOfByrnaUsage, X : STA $00
|
||||
LDA.l HardModeExclusionCaneOfByrnaUsage, X : STA.b Scrap00
|
||||
PLX
|
||||
++
|
||||
LDA CurrentMagic ; thing we wrote over
|
||||
LDA.l CurrentMagic ; thing we wrote over
|
||||
JML IncrementMagicUseCounterByrna
|
||||
;--------------------------------------------------------------------------------
|
||||
CalculateCapeUsage:
|
||||
LDA $1B : BEQ ++
|
||||
LDA.b IndoorsFlag : BEQ ++
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA $A0 ; these are all decimal because i got them that way
|
||||
LDA.b RoomIndex ; these are all decimal because i got them that way
|
||||
CMP.w #95 : BEQ + ; Ice Palace Spike Room
|
||||
CMP.w #179 : BEQ + ; Room in Misery Mire
|
||||
CMP.w #213 : BEQ + ; Laser Bridge
|
||||
@@ -48,15 +48,15 @@ CalculateCapeUsage:
|
||||
+
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
PHX : TYX
|
||||
LDA.l HardModeExclusionCapeUsage, X : STA $4C ; set cape decrement timer
|
||||
LDA.l HardModeExclusionCapeUsage, X : STA.b CapeTimer ; set cape decrement timer
|
||||
PLX
|
||||
++
|
||||
JML IncrementMagicUseCounterOne
|
||||
;--------------------------------------------------------------------------------
|
||||
ActivateInvulnerabilityOrDont:
|
||||
LDA $1B : BEQ .nowhere_special
|
||||
LDA.b IndoorsFlag : BEQ .nowhere_special
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA $A0 ; these are all decimal because i got them that way
|
||||
LDA.b RoomIndex ; these are all decimal because i got them that way
|
||||
CMP.w #95 : BEQ .somewhere_cool ; Ice Palace Spike Room
|
||||
CMP.w #179 : BEQ .somewhere_cool ; Room in Misery Mire
|
||||
CMP.w #213 : BEQ .somewhere_cool ; Laser Bridge
|
||||
@@ -66,9 +66,9 @@ ActivateInvulnerabilityOrDont:
|
||||
BRA .nowhere_special
|
||||
.somewhere_cool
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
LDA.b #$01 : STA $037B : RTL
|
||||
LDA.b #$01 : STA.w NoDamage : RTL
|
||||
.nowhere_special
|
||||
LDA.l ByrnaInvulnerability : STA $037B
|
||||
LDA.l ByrnaInvulnerability : STA.w NoDamage
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
GetItemDamageValue:
|
||||
@@ -81,13 +81,13 @@ GetItemDamageValue:
|
||||
CPX.b #$3d : BEQ .hookshot
|
||||
|
||||
.normal
|
||||
lda $0db8f1,x ;what we wrote over
|
||||
LDA.l DamageSubclassValue,x ;what we wrote over
|
||||
RTL
|
||||
.boomerang
|
||||
LDA.l StunItemAction : AND #$01 : BNE .normal
|
||||
LDA.l StunItemAction : AND.b #$01 : BNE .normal
|
||||
BRA .noDamage
|
||||
.hookshot
|
||||
LDA.l StunItemAction : AND #$02 : BNE .normal
|
||||
LDA.l StunItemAction : AND.b #$02 : BNE .normal
|
||||
.noDamage
|
||||
LDA.b #$00
|
||||
RTL
|
||||
@@ -95,17 +95,17 @@ RTL
|
||||
;Argument : A = id we want to find return 00 if none found, 01 if found
|
||||
SearchAncilla:
|
||||
{
|
||||
STA $05
|
||||
STA.b Scrap05
|
||||
PHX
|
||||
LDX #$00
|
||||
LDX.b #$00
|
||||
.loop
|
||||
LDA $0C4A, X
|
||||
LDA.w AncillaID, X
|
||||
INX : CPX #$0A : BEQ .notFound
|
||||
CMP $05 : BNE .loop
|
||||
LDA #$01
|
||||
CMP.b Scrap05 : BNE .loop
|
||||
LDA.b #$01
|
||||
BRA .return
|
||||
.notFound
|
||||
LDA #$00
|
||||
LDA.b #$00
|
||||
.return
|
||||
PLX
|
||||
RTS
|
||||
|
||||
Reference in New Issue
Block a user