Advertisement
wolfboyft

new PlayVictoryMusic function, WIP

Jan 3rd, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. PlayVictoryMusic: ; 3d0ea
  2. push de
  3. ld de, MUSIC_NONE
  4. call PlayMusic
  5. call DelayFrame
  6. ld de, MUSIC_WILD_VICTORY
  7. ld a, [wBattleMode]
  8. dec a
  9. jr nz, .trainer_victory
  10. push de
  11. call DoOthersShareExperience
  12. pop de
  13. jr nz, .play_music
  14. ld hl, wPayDayMoney
  15. ld a, [hli]
  16. or [hl]
  17. jr nz, .play_music
  18. ld a, [wBattleParticipantsNotFainted]
  19. and a
  20. jr z, .lost
  21. jr .play_music
  22.  
  23.  
  24. .trainer_victory
  25. ld de, MUSIC_GYM_VICTORY
  26. call IsJohtoGymLeader
  27. jr c, .play_music
  28. ld de, MUSIC_TRAINER_VICTORY
  29.  
  30. .play_music
  31. call PlayMusic
  32. ld a, [wBattleMode]
  33. cp a, 1
  34. jr z, .yes
  35. jp .no
  36. .yes
  37. ld hl, askTake
  38. call PrintText
  39. call YesNoBox
  40. jr nz, .saidyes
  41. .no
  42. .lost
  43. pop de
  44. ret
  45. ; 3d123
  46.  
  47. askTake:
  48. text_jump AskTake
  49. db "@"
  50.  
  51. AskTake:
  52. text "Capture the #-"
  53. line "mon?"
  54. prompt
  55.  
  56. .saidyes
  57. ; insert code for catching the pokémon here
  58. jp .no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement