Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .thumb
- .align 2
- custom_attract_ability:
- ldr r0, =(0x0202420B) @attacker
- ldrb r0, [r0]
- mov r1, #0x58 @size of battle_struct
- mul r0, r1
- ldr r1, =(0x02024084) @battle_struct
- add r1, r0
- add r1, #0x20 @ability
- ldrb r0, [r1]
- cmp r0, #0xE9 @custom ability
- bne custom_attract_ability_exit_normal
- ldr r0, =(0x0202420C) @defender
- ldrb r0, [r0]
- mov r1, #0x58
- mul r0, r1
- ldr r1, =(0x02024084)
- add r1, r0
- ldr r1, [r1, #0x50]
- ldr r0, =(0x000F0000)
- and r0, r1
- cmp r0, #0
- bne custom_attract_ability_exit_fail
- ldr r0, =(0x08051E09)
- bx r0
- custom_attract_ability_exit_normal:
- mov r0, r10
- mov r1, r9
- ldr r2, =(0x0806A021)
- bl custom_attract_ability_jump
- ldr r2, =(0x08051D9D)
- custom_attract_ability_jump:
- bx r2
- custom_attract_ability_exit_fail:
- ldr r0, =(0x08051DE5)
- bx r0
- .align 2
- .pool
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement