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 r2, =(0x02024084)
- add r2, r0
- ldr r1, [r2, #0x50]
- ldr r0, =(0x0202420B) @attacker
- ldrb r0, [r0]
- cmp r0, #3
- bne custom_attract_ability_infatuated_partner
- mov r0, #8
- b custom_attract_ability_infatuated_check
- custom_attract_ability_infatuated_partner:
- cmp r0, #2
- bne custom_attract_ability_infatuated_enemy
- mov r0, #4
- b custom_attract_ability_infatuated_check
- custom_attract_ability_infatuated_enemy:
- cmp r0, #1
- bne custom_attract_ability_infatuated_player
- mov r0, #2
- b custom_attract_ability_infatuated_check
- custom_attract_ability_infatuated_player:
- mov r0, #1
- custom_attract_ability_infatuated_check:
- lsl r0, #16
- and r0, r1
- cmp r0, #0
- bne custom_attract_ability_exit_fail
- ldr r0, =(0x0202420B) @attacker
- ldrb r0, [r0]
- cmp r0, #3
- beq custom_attract_ability_2nd_enemy
- cmp r0, #2
- beq custom_attract_ability_partner
- cmp r0, #1
- beq custom_attract_ability_enemy
- mov r0, #1
- b custom_attract_ability_continue
- custom_attract_ability_enemy:
- mov r0, #2
- b custom_attract_ability_continue
- custom_attract_ability_partner:
- mov r0, #4
- b custom_attract_ability_continue
- custom_attract_ability_2nd_enemy:
- mov r0, #8
- custom_attract_ability_continue:
- lsl r0, #16
- orr r0, r1
- str r0, [r2, #0x50]
- ldr r0, =(0x08051E25)
- 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