Advertisement
NewDenverCity

revert

Nov 26th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. .thumb @the hooks decide whether or not to use the enemy's party table or
  2. .align 2 @the player's, that's why they're not here.
  3.  
  4. start:
  5. push {r0-r3, lr}
  6. add r0, r0, #0x20
  7. loop:
  8. ldrh r1, [r0]
  9. cmp r1, #0xF1 @compares the species to pirouette forme
  10. beq push_hp @if the pokemon is pirouette forme, reverts the pokemon
  11. add r0, r0, #0x64 @goes to the next slot
  12. add r2, r2, #0x1 @sets counter to one more
  13. cmp r2, #0x5 @checks if whole party has been scanned
  14. bne loop @if it hasn't happened 6 times it'll loop again
  15. skip:
  16. pop {r0-r3, pc} @ends if nothing in the party is pirouette forme
  17. push_hp:
  18. add r0, r0, #0x36
  19. ldrh r3, [r0]
  20. mov r4, r0
  21. push {r3}
  22. push {r4}
  23. revert:
  24. mov r1, #0x84
  25. strh r1, [r0] @makes species aria forme
  26. sub r0, r0, #0x56 @makes r0 the beginning of the party
  27. mov r1, r0 @r0 and r1 should be the same
  28. ldr r2, calc_stats
  29. bl jump
  30. fix_hp:
  31. pop {r4}
  32. pop {r3} @r3 is the current hp, r4 is the offset of that
  33. strh r3, [r4]
  34. continue:
  35. pop {r0-r3, pc} @ends
  36. jump:
  37. mov pc, r2 @executes calc_stats
  38.  
  39. .align 2
  40. calc_stats: .word 0x0803E47C
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement