Advertisement
KDS

Unaware + Sacred Sword

KDS
Dec 14th, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.89 KB | None | 0 0
  1. UNAWARE + SACRED SWORD FOR FIRE RED by KDS
  2.  
  3. First of all it only works with Doesn't Split so keep this in mind.
  4. --------------------------------------------------------------------
  5. 1. Accuracy & Evasion Unaware When Foresight is in effect (also updates foresight):
  6. --------------------------------------------------------------------
  7. At 1DF80: 00 49 08 47 XX XX XX 08
  8.  
  9. -------------------------------------------------------
  10. .text
  11. .align 2
  12. .thumb
  13. .thumb_func
  14.  
  15. main:
  16. mul r0, r2
  17. add r0, r0, r3
  18. mov r2, #0x20
  19. add r1, r4, r3
  20. ldrb r1, [r1, r2]
  21. cmp r1, #0xKK
  22. beq foeunaware
  23. ldrb r5, [r0, #0x1e]
  24. b cont
  25.  
  26. foeunaware:
  27. mov r5, #0x6
  28.  
  29. cont:
  30. ldrb r1, [r0, r2]
  31. cmp r1, #0xKK
  32. beq ignorestat
  33.  
  34. ldr r1, currMove
  35. ldrh r1, [r1, #0x0]
  36. mov r0, #0xC
  37. mul r1, r0
  38. ldr r0, moveTable
  39. add r0, r0, r1
  40. ldrb r1, [r0, #0x0]
  41. cmp r1, #0xLL
  42. beq ignorestat
  43.  
  44. add r1, r4, r3
  45. ldrb r1, [r1, #0x1f]
  46. cmp r1, #0x5
  47. bgt ignorestat
  48.  
  49. lsl r0, r5, #0x0
  50. add r0, #0x6
  51. ldr r2, return
  52. bx r2
  53.  
  54. ignorestat:
  55. ldr r2, return2
  56. bx r2
  57.  
  58. .align 2
  59. currMove: .word 0x02023D4C
  60. moveTable: .word 0x08250C04
  61. return: .word 0x0801DFA9
  62. return2: .word 0x0801DFAF
  63.  
  64. -------------------------------------------------------------
  65. ------------------------------------------------------------
  66. 2. Accuracy & Evasion Unaware Without Foresight
  67. ----------------------------------------------------------
  68. At 1DFA0: 00 4A 10 47 XX XX XX 08
  69.  
  70. --------------------------------------------------------
  71. .text
  72. .align 2
  73. .thumb
  74. .thumb_func
  75.  
  76. main:
  77. mov r2, #0x20
  78. add r1, r4, r3
  79. ldrb r1, [r1, r2]
  80. cmp r1, #0xKK
  81. beq foeunaware
  82. ldrb r5, [r0, #0x1e]
  83. b cont
  84.  
  85. foeunaware:
  86. mov r5, #0x6
  87.  
  88. cont:
  89. ldrb r1, [r0, r2]
  90. cmp r1, #0xKK
  91. beq ignorestat
  92.  
  93. ldr r1, currMove
  94. ldrh r1, [r1, #0x0]
  95. mov r0, #0xC
  96. mul r1, r0
  97. ldr r0, moveTable
  98. add r0, r0, r1
  99. ldrb r1, [r0, #0x0]
  100. cmp r1, #0xLL
  101. beq ignorestat
  102.  
  103. add r1, r4, r3
  104. ldrb r1, [r1, #0x1f]
  105. lsl r0, r5, #0x0
  106. add r0, #0x6
  107. ldr r2, return
  108. bx r2
  109.  
  110. ignorestat:
  111. ldr r2, return2
  112. bx r2
  113.  
  114. .align 2
  115. currMove: .word 0x02023D4C
  116. moveTable: .word 0x08250C04
  117. return: .word 0x0801DFA9
  118. return2: .word 0x0801DFAF
  119.  
  120. -------------------------------------------------------
  121. -------------------------------------------------
  122. 3. Attack & Sp. Attack Unaware
  123. ------------------------------------------------------
  124. At 3F3C8: 00 49 08 47 XX XX XX 08
  125.  
  126. ------------------------------------------------------
  127. .text
  128. .align 2
  129. .thumb
  130. .thumb_func
  131. .global unwareattack
  132.  
  133. main:
  134. cmp r4, #0x2
  135. bne nocrit
  136. cmp r2, #0x6
  137. ble ignorestat
  138.  
  139. nocrit:
  140. mov r0, #0x20
  141. ldr r1, [sp, #0x4]
  142. ldrb r1, [r1, r0]
  143. cmp r1, #0xKK
  144. beq ignorestat
  145. ldr r1, return1
  146. bx r1
  147.  
  148. ignorestat:
  149. ldr r1, return2
  150. bx r1
  151.  
  152. .align 2
  153. return1: .word 0x0803F3D1
  154. return2: .word 0x0803F3E1
  155.  
  156. -------------------------------------------------------------
  157. ---------------------------------------------------------
  158. 4. Defense & Sp. Defense Unaware
  159. ---------------------------------------------------------
  160. At 3F410: 00 49 08 47 XX XX XX 08
  161.  
  162. ---------------------------------------------------------
  163. .text
  164. .align 2
  165. .thumb
  166. .thumb_func
  167. .global unwaredefense
  168.  
  169. main:
  170. cmp r4, #0x2
  171. bne nocrit
  172. cmp r2, #0x5
  173. bgt ignorestat
  174.  
  175. nocrit:
  176. mov r0, #0x20
  177. ldrb r1, [r6, r0]
  178. cmp r1, #0xKK
  179. beq ignorestat
  180.  
  181. ldr r1, currMove
  182. ldrh r1, [r1, #0x0]
  183. mov r0, #0xC
  184. mul r1, r0
  185. ldr r0, moveTable
  186. add r0, r0, r1
  187. ldrb r1, [r0, #0x0]
  188. cmp r1, #0xLL
  189. beq ignorestat
  190.  
  191. ldr r1, return1
  192. bx r1
  193.  
  194. ignorestat:
  195. ldr r1, return2
  196. bx r1
  197.  
  198. .align 2
  199. currMove: .word 0x02023D4C
  200. moveTable: .word 0x08250C04
  201. return1: .word 0x0803F419
  202. return2: .word 0x0803F429
  203. ----------------------------------------------------------
  204.  
  205. Where XX XX XX 08 are respective pointers to their corresponding routine.
  206.  
  207. KK is the index of Unaware
  208.  
  209. LL is the index for Sacred SWord. Give it just a basic damaging script i.e 1D6926 my routines will handle the rest.
  210.  
  211. Replace the pointers to the move table if you need to.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement