pokecenter.asm 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. DisplayPokemonCenterDialogue_:
  2. call SaveScreenTilesToBuffer1 ; save screen
  3. ld hl, PokemonCenterWelcomeText
  4. call PrintText
  5. ld hl, wd72e
  6. bit 2, [hl]
  7. set 1, [hl]
  8. set 2, [hl]
  9. jr nz, .skipShallWeHealYourPokemon
  10. ld hl, ShallWeHealYourPokemonText
  11. call PrintText
  12. .skipShallWeHealYourPokemon
  13. call YesNoChoicePokeCenter ; yes/no menu
  14. ld a, [wCurrentMenuItem]
  15. and a
  16. jr nz, .declinedHealing ; if the player chose No
  17. call SetLastBlackoutMap
  18. call LoadScreenTilesFromBuffer1 ; restore screen
  19. ld hl, NeedYourPokemonText
  20. call PrintText
  21. ld a, $18
  22. ld [wSpriteStateData1 + $12], a ; make the nurse turn to face the machine
  23. call Delay3
  24. predef HealParty
  25. callba AnimateHealingMachine ; do the healing machine animation
  26. xor a
  27. ld [wAudioFadeOutControl], a
  28. ld a, [wAudioSavedROMBank]
  29. ld [wAudioROMBank], a
  30. ld a, [wMapMusicSoundID]
  31. ld [wLastMusicSoundID], a
  32. ld [wNewSoundID], a
  33. call PlaySound
  34. ld hl, PokemonFightingFitText
  35. call PrintText
  36. ld a, $14
  37. ld [wSpriteStateData1 + $12], a ; make the nurse bow
  38. ld c, a
  39. call DelayFrames
  40. jr .done
  41. .declinedHealing
  42. call LoadScreenTilesFromBuffer1 ; restore screen
  43. .done
  44. ld hl, PokemonCenterFarewellText
  45. call PrintText
  46. jp UpdateSprites
  47. PokemonCenterWelcomeText:
  48. TX_FAR _PokemonCenterWelcomeText
  49. db "@"
  50. ShallWeHealYourPokemonText:
  51. TX_DELAY
  52. TX_FAR _ShallWeHealYourPokemonText
  53. db "@"
  54. NeedYourPokemonText:
  55. TX_FAR _NeedYourPokemonText
  56. db "@"
  57. PokemonFightingFitText:
  58. TX_FAR _PokemonFightingFitText
  59. db "@"
  60. PokemonCenterFarewellText:
  61. TX_DELAY
  62. TX_FAR _PokemonCenterFarewellText
  63. db "@"