Advertisement
Z-nogyroP

Untitled

Aug 20th, 2017
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .text
  2. .thumb
  3.  
  4. .align 2
  5. custom_attract_ability:
  6. ldr r0, =(0x0202420B) @attacker
  7. ldrb r0, [r0]
  8. mov r1, #0x58 @size of battle_struct
  9. mul r0, r1
  10. ldr r1, =(0x02024084) @battle_struct
  11. add r1, r0
  12. add r1, #0x20 @ability
  13. ldrb r0, [r1]
  14. cmp r0, #0xE9 @custom ability
  15. bne custom_attract_ability_exit_normal
  16. ldr r0, =(0x0202420C) @defender
  17. ldrb r0, [r0]
  18. mov r1, #0x58
  19. mul r0, r1
  20. ldr r1, =(0x02024084)
  21. add r1, r0
  22. ldr r1, [r1, #0x50]
  23. ldr r0, =(0x000F0000)
  24. and r0, r1
  25. cmp r0, #0
  26. bne custom_attract_ability_exit_fail
  27. ldr r0, =(0x08051E09)
  28. bx r0
  29.  
  30. custom_attract_ability_exit_normal:
  31. mov r0, r10
  32. mov r1, r9
  33. ldr r2, =(0x0806A021)
  34. bl custom_attract_ability_jump
  35. ldr r2, =(0x08051D9D)
  36. custom_attract_ability_jump:
  37. bx r2
  38. custom_attract_ability_exit_fail:
  39. ldr r0, =(0x08051DE5)
  40. bx r0
  41.  
  42. .align 2
  43. .pool
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement