Skip to content

Commit e845e41

Browse files
committed
added ability to set magic usage in spike cave
* byrna cane * magic cape
1 parent 5a4afc7 commit e845e41

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

LTTP_RND_GeneralBugfixes.asm

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
2626
db #$00 ; expand file to 2mb
2727

2828
org $1FFFF8 ; timestamp rom
29-
dl #$20170731
29+
dl #$20170801
3030

3131
;================================================================================
3232

hardmode.asm

+29-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,32 @@ CalculateSpikeFloorDamage:
1414
LDA $D055, Y
1515
STA $0373
1616
RTL
17-
;--------------------------------------------------------------------------------
17+
;--------------------------------------------------------------------------------
18+
CalculateByrnaUsage:
19+
LDA $1B : BEQ +
20+
REP #$20 ; set 16-bit accumulator
21+
LDA $A0 ; these are all decimal because i got them that way
22+
CMP.w #279
23+
SEP #$20 ; set 8-bit accumulator
24+
BNE +
25+
PHX : TYX
26+
LDA.l ByrnaCaveCaneOfByrnaUsage, X : STA $00
27+
PLX
28+
+
29+
LDA $7EF36E ; thing we wrote over
30+
RTL
31+
;--------------------------------------------------------------------------------
32+
CalculateCapeUsage:
33+
LDA $1B : BEQ +
34+
REP #$20 ; set 16-bit accumulator
35+
LDA $A0 ; these are all decimal because i got them that way
36+
CMP.w #279
37+
SEP #$20 ; set 8-bit accumulator
38+
BNE +
39+
PHX : TYX
40+
LDA.l ByrnaCaveCapeUsage, X : STA $4C
41+
PLX
42+
+
43+
LDA $7EF36E ; thing we wrote over
44+
RTL
45+
;--------------------------------------------------------------------------------

hooks.asm

+6
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ NOP #2
202202
org $07D22B ; <- 3D22B - Bank05.asm : 12752 (LDA $D055, Y : STA $0373)
203203
JSL.l CalculateSpikeFloorDamage : NOP #2
204204
;--------------------------------------------------------------------------------
205+
org $08DCC3 ; <- 45CC3 - ancilla_cane_spark.asm : 272 (LDA $7EF36E)
206+
JSL.l CalculateByrnaUsage
207+
;--------------------------------------------------------------------------------
208+
org $07AE17 ; <- 3AE17 - Bank07.asm : 7285 (LDA $7EF36E)
209+
JSL.l CalculateCapeUsage
210+
;--------------------------------------------------------------------------------
205211

206212
;================================================================================
207213
; Misc Stats

tables.asm

+6
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,12 @@ db #$00 ; #00 = Never Locked - #$01 = Locked During Escape (default)
677677
org $30816A ; PC 0x18016A
678678
FreeItemText:
679679
db #$01 ; #00 = Off - #$01 = On (default)
680+
org $30816B ; PC 0x18016B
681+
ByrnaCaveCaneOfByrnaUsage:
682+
db #$04, #$02, #$01 ; normal, 1/2, 1/4 magic
683+
org $30816E ; PC 0x18016E
684+
ByrnaCaveCapeUsage:
685+
db #$04, #$08, #$10 ; normal, 1/2, 1/4 magic
680686
;================================================================================
681687
org $308190 ; PC 0x180190
682688
TimerStyle:

0 commit comments

Comments
 (0)