Advertisement
EliteAnax17

Untitled

May 26th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. .type BattleAICmd_get_highest_possible_damage,function
  2. .thumb_func
  3. BattleAICmd_get_highest_possible_damage:
  4. push {r4, r5, r6, r7, lr}
  5. mov r7, r8
  6. push {r7}
  7. ldr r0, .L500
  8. mov r2, #0x0
  9. strh r2, [r0]
  10. ldr r1, .L500+0x4
  11. ldr r3, .L500+0x8
  12. add r0, r1, r3
  13. mov r4, #0x0
  14. strb r2, [r0]
  15. add r3, r3, #0x3
  16. add r0, r1, r3
  17. mov r3, #0x1
  18. strb r3, [r0]
  19. ldr r0, .L500+0xc
  20. strb r2, [r0]
  21. ldr r0, .L500+0x10
  22. strb r3, [r0]
  23. mov r0, #0xb4
  24. lsl r0, r0, #0x9
  25. add r1, r1, r0
  26. str r4, [r1, #0x8]
  27. mov r5, #0x0
  28. ldr r4, .L500+0x14
  29. ldr r7, .L500+0x18
  30. ldr r3, .L500+0x1c
  31. mov r8, r3
  32. ldr r6, .L500+0x20
  33. .L491:
  34. mov r0, #0x28
  35. str r0, [r4]
  36. lsl r1, r5, #0x1
  37. ldrb r2, [r6]
  38. mov r0, #0x58
  39. mul r0, r0, r2
  40. add r1, r1, r0
  41. add r1, r1, r8
  42. ldrh r0, [r1]
  43. strh r0, [r7]
  44. lsl r0, r0, #0x10
  45. cmp r0, #0
  46. beq .L490 @cond_branch
  47. ldrh r0, [r7]
  48. ldrb r1, [r6]
  49. ldr r2, .L500+0x24
  50. ldrb r2, [r2]
  51. bl move_effectiveness_something
  52. ldr r0, [r4]
  53. cmp r0, #0x78
  54. bne .L493 @cond_branch
  55. mov r0, #0x50
  56. str r0, [r4]
  57. .L493:
  58. ldr r0, [r4]
  59. cmp r0, #0xf0
  60. bne .L494 @cond_branch
  61. mov r0, #0xa0
  62. str r0, [r4]
  63. .L494:
  64. ldr r0, [r4]
  65. cmp r0, #0x1e
  66. bne .L495 @cond_branch
  67. mov r0, #0x14
  68. str r0, [r4]
  69. .L495:
  70. ldr r0, [r4]
  71. cmp r0, #0xf
  72. bne .L496 @cond_branch
  73. mov r0, #0xa
  74. str r0, [r4]
  75. .L496:
  76. ldr r0, .L500+0xc
  77. ldrb r1, [r0]
  78. mov r0, #0x8
  79. and r0, r0, r1
  80. cmp r0, #0
  81. beq .L497 @cond_branch
  82. mov r0, #0x0
  83. str r0, [r4]
  84. .L497:
  85. ldr r2, .L500+0x28
  86. ldr r0, [r2, #0x8]
  87. ldr r1, [r4]
  88. cmp r0, r1
  89. bcs .L490 @cond_branch
  90. str r1, [r2, #0x8]
  91. .L490:
  92. add r5, r5, #0x1
  93. cmp r5, #0x3
  94. ble .L491 @cond_branch
  95. ldr r1, .L500+0x2c
  96. ldr r0, [r1]
  97. add r0, r0, #0x1
  98. str r0, [r1]
  99. pop {r3}
  100. mov r8, r3
  101. pop {r4, r5, r6, r7}
  102. pop {r0}
  103. bx r0
  104. .L501:
  105. .align 2, 0
  106. .L500:
  107. .word gUnknown_02024DEC
  108. .word unk_2000000
  109. .word 0x1601c
  110. .word gBattleMoveFlags
  111. .word gCritMultiplier
  112. .word gBattleMoveDamage
  113. .word gUnknown_02024BE6
  114. .word gBattleMons+0xc
  115. .word gPlayerMonIndex
  116. .word gEnemyMonIndex
  117. .word unk_2000000+0x16800
  118. .word gAIScriptPtr
  119. .Lfe57:
  120. .size BattleAICmd_get_highest_possible_damage,.Lfe57-BattleAICmd_get_highest_possible_damage
  121. .align 2, 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement