pokemontower5.asm 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. PokemonTower5Script:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, PokemonTower5TrainerHeader0
  4. ld de, PokemonTower5ScriptPointers
  5. ld a, [wPokemonTower5CurScript]
  6. call ExecuteCurMapScriptInTable
  7. ld [wPokemonTower5CurScript], a
  8. ret
  9. PokemonTower5ScriptPointers:
  10. dw PokemonTower5Script0
  11. dw DisplayEnemyTrainerTextAndStartBattle
  12. dw EndTrainerBattle
  13. PokemonTower5Script0:
  14. ld hl, CoordsData_60992
  15. call ArePlayerCoordsInArray
  16. jr c, .asm_60960
  17. ld hl, wd72e
  18. res 4, [hl]
  19. ResetEvent EVENT_IN_PURIFIED_ZONE
  20. jp CheckFightingMapTrainers
  21. .asm_60960
  22. CheckAndSetEvent EVENT_IN_PURIFIED_ZONE
  23. ret nz
  24. xor a
  25. ld [hJoyHeld], a
  26. ld a, $f0
  27. ld [wJoyIgnore], a
  28. ld hl, wd72e
  29. set 4, [hl]
  30. predef HealParty
  31. call GBFadeOutToWhite
  32. call Delay3
  33. call Delay3
  34. call GBFadeInFromWhite
  35. ld a, $7
  36. ld [hSpriteIndexOrTextID], a
  37. call DisplayTextID
  38. xor a
  39. ld [wJoyIgnore], a
  40. ret
  41. CoordsData_60992:
  42. db $08,$0A
  43. db $08,$0B
  44. db $09,$0A
  45. db $09,$0B
  46. db $FF
  47. PokemonTower5TextPointers:
  48. dw PokemonTower5Text1
  49. dw PokemonTower5Text2
  50. dw PokemonTower5Text3
  51. dw PokemonTower5Text4
  52. dw PokemonTower5Text5
  53. dw PickUpItemText
  54. dw PokemonTower5Text7
  55. PokemonTower5TrainerHeader0:
  56. dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
  57. db ($2 << 4) ; trainer's view range
  58. dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
  59. dw PokemonTower5BattleText1 ; TextBeforeBattle
  60. dw PokemonTower5AfterBattleText1 ; TextAfterBattle
  61. dw PokemonTower5EndBattleText1 ; TextEndBattle
  62. dw PokemonTower5EndBattleText1 ; TextEndBattle
  63. PokemonTower5TrainerHeader1:
  64. dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
  65. db ($3 << 4) ; trainer's view range
  66. dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
  67. dw PokemonTower5BattleText2 ; TextBeforeBattle
  68. dw PokemonTower5AfterBattleText2 ; TextAfterBattle
  69. dw PokemonTower5EndBattleText2 ; TextEndBattle
  70. dw PokemonTower5EndBattleText2 ; TextEndBattle
  71. PokemonTower5TrainerHeader2:
  72. dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
  73. db ($2 << 4) ; trainer's view range
  74. dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
  75. dw PokemonTower5BattleText3 ; TextBeforeBattle
  76. dw PokemonTower5AfterBattleText3 ; TextAfterBattle
  77. dw PokemonTower5EndBattleText3 ; TextEndBattle
  78. dw PokemonTower5EndBattleText3 ; TextEndBattle
  79. PokemonTower5TrainerHeader3:
  80. dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
  81. db ($2 << 4) ; trainer's view range
  82. dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
  83. dw PokemonTower5BattleText4 ; TextBeforeBattle
  84. dw PokemonTower5AfterBattleText4 ; TextAfterBattle
  85. dw PokemonTower5EndBattleText4 ; TextEndBattle
  86. dw PokemonTower5EndBattleText4 ; TextEndBattle
  87. db $ff
  88. PokemonTower5Text1:
  89. TX_FAR _PokemonTower5Text1
  90. db "@"
  91. PokemonTower5Text2:
  92. TX_ASM
  93. ld hl, PokemonTower5TrainerHeader0
  94. call TalkToTrainer
  95. jp TextScriptEnd
  96. PokemonTower5BattleText1:
  97. TX_FAR _PokemonTower5BattleText1
  98. db "@"
  99. PokemonTower5EndBattleText1:
  100. TX_FAR _PokemonTower5EndBattleText1
  101. db "@"
  102. PokemonTower5AfterBattleText1:
  103. TX_FAR _PokemonTower5AfterBattleText1
  104. db "@"
  105. PokemonTower5Text3:
  106. TX_ASM
  107. ld hl, PokemonTower5TrainerHeader1
  108. call TalkToTrainer
  109. jp TextScriptEnd
  110. PokemonTower5BattleText2:
  111. TX_FAR _PokemonTower5BattleText2
  112. db "@"
  113. PokemonTower5EndBattleText2:
  114. TX_FAR _PokemonTower5EndBattleText2
  115. db "@"
  116. PokemonTower5AfterBattleText2:
  117. TX_FAR _PokemonTower5AfterBattleText2
  118. db "@"
  119. PokemonTower5Text4:
  120. TX_ASM
  121. ld hl, PokemonTower5TrainerHeader2
  122. call TalkToTrainer
  123. jp TextScriptEnd
  124. PokemonTower5BattleText3:
  125. TX_FAR _PokemonTower5BattleText3
  126. db "@"
  127. PokemonTower5EndBattleText3:
  128. TX_FAR _PokemonTower5EndBattleText3
  129. db "@"
  130. PokemonTower5AfterBattleText3:
  131. TX_FAR _PokemonTower5AfterBattleText3
  132. db "@"
  133. PokemonTower5Text5:
  134. TX_ASM
  135. ld hl, PokemonTower5TrainerHeader3
  136. call TalkToTrainer
  137. jp TextScriptEnd
  138. PokemonTower5BattleText4:
  139. TX_FAR _PokemonTower5BattleText4
  140. db "@"
  141. PokemonTower5EndBattleText4:
  142. TX_FAR _PokemonTower5EndBattleText4
  143. db "@"
  144. PokemonTower5AfterBattleText4:
  145. TX_FAR _PokemonTower5AfterBattleText4
  146. db "@"
  147. PokemonTower5Text7:
  148. TX_FAR _PokemonTower5Text7
  149. db "@"