-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInfernal_Parade.asm
85 lines (71 loc) · 2.04 KB
/
Infernal_Parade.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
;
; ------------------------------------------------------------------------------
; Gelius 06/16/2024
; Infernal Parade has a 30% chance of burning the Target, and deals twice the damage
; if the taget's already statused.
; Based on Hex from Adex, and Barb Barrage.
; ------------------------------------------------------------------------------
.relativeinclude on
.nds
.arm
.definelabel MaxSize, 0x2598
.definelabel MoveStartAddress, 0x02330134
.definelabel MoveJumpAddress, 0x023326CC
.definelabel DealDamage, 0x2332B20
.definelabel DungeonRandOutcomeUserTargetInteraction, 0x2324934
.definelabel TryInflictBurnStatus, 0x2312338
; For EU
;.include "lib/stdlib_eu.asm"
;.include "lib/dunlib_eu.asm"
;.definelabel MoveStartAddress, 0x02330B74
;.definelabel MoveJumpAddress, 0x0233310C
; File creation
.create "./code_out.bin", 0x02330134 ; Change to the actual offset as this directive doesn't accept labels
.org MoveStartAddress
.area MaxSize ; Define the size of the area
; Usable Variables:
; r6 = Move ID
; r9 = User Monster Structure Pointer
; r4 = Target Monster Structure Pointer
; r8 = Move Data Structure Pointer (8 bytes: flags [4 bytes], move_id [2 bytes], pp_left [1 byte], boosts [1 byte])
; r7 = ID of the item that called this move (0 if the move effect isn't from an item)
; Returns:
; r10 (bool) = ???
; Registers r4 to r9, r11 and r13 must remain unchanged after the execution of that code
sub r13,r13,#0x8
ldr r0,[r4,#+0xb4]
ldrb r1,[r0,#+0xbd]
ldrb r2,[r0,#+0xbf]
cmp r1,#1
cmpne r1,#3
cmpne r1,#5
moveq r3,#0x200
beq myDamageCalculation
cmp r2,#0
movne r3,#0x200
moveq r3,#0x100
myDamageCalculation:
mov r0,r9
mov r1,r4
mov r2,r8
str r7,[sp,#0]
bl DealDamage
movs r10,r0
beq return
mov r0,r9
mov r1,r4
mov r2,#30
bl DungeonRandOutcomeUserTargetInteraction
cmp r0,#1
bne return
mov r0,r9
mov r1,r4
mov r2,#1
mov r3,#0
bl TryInflictBurnStatus
return:
add r13,r13,#0x8
b MoveJumpAddress
.pool
.endarea
.close