route9.asm 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. Route9Script:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, Route9TrainerHeader0
  4. ld de, Route9ScriptPointers
  5. ld a, [wRoute9CurScript]
  6. call ExecuteCurMapScriptInTable
  7. ld [wRoute9CurScript], a
  8. ret
  9. Route9ScriptPointers:
  10. dw CheckFightingMapTrainers
  11. dw DisplayEnemyTrainerTextAndStartBattle
  12. dw EndTrainerBattle
  13. Route9TextPointers:
  14. dw Route9Text1
  15. dw Route9Text2
  16. dw Route9Text3
  17. dw Route9Text4
  18. dw Route9Text5
  19. dw Route9Text6
  20. dw Route9Text7
  21. dw Route9Text8
  22. dw Route9Text9
  23. dw PickUpItemText
  24. dw Route9Text11
  25. Route9TrainerHeader0:
  26. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_0
  27. db ($3 << 4) ; trainer's view range
  28. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_0
  29. dw Route9BattleText1 ; TextBeforeBattle
  30. dw Route9AfterBattleText1 ; TextAfterBattle
  31. dw Route9EndBattleText1 ; TextEndBattle
  32. dw Route9EndBattleText1 ; TextEndBattle
  33. Route9TrainerHeader1:
  34. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_1
  35. db ($2 << 4) ; trainer's view range
  36. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_1
  37. dw Route9BattleText2 ; TextBeforeBattle
  38. dw Route9AfterBattleText2 ; TextAfterBattle
  39. dw Route9EndBattleText2 ; TextEndBattle
  40. dw Route9EndBattleText2 ; TextEndBattle
  41. Route9TrainerHeader2:
  42. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_2
  43. db ($4 << 4) ; trainer's view range
  44. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_2
  45. dw Route9BattleText3 ; TextBeforeBattle
  46. dw Route9AfterBattleText3 ; TextAfterBattle
  47. dw Route9EndBattleText3 ; TextEndBattle
  48. dw Route9EndBattleText3 ; TextEndBattle
  49. Route9TrainerHeader3:
  50. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_3
  51. db ($2 << 4) ; trainer's view range
  52. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_3
  53. dw Route9BattleText4 ; TextBeforeBattle
  54. dw Route9AfterBattleText4 ; TextAfterBattle
  55. dw Route9EndBattleText4 ; TextEndBattle
  56. dw Route9EndBattleText4 ; TextEndBattle
  57. Route9TrainerHeader4:
  58. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_4
  59. db ($2 << 4) ; trainer's view range
  60. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_4
  61. dw Route9BattleText5 ; TextBeforeBattle
  62. dw Route9AfterBattleText5 ; TextAfterBattle
  63. dw Route9EndBattleText5 ; TextEndBattle
  64. dw Route9EndBattleText5 ; TextEndBattle
  65. Route9TrainerHeader5:
  66. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_5
  67. db ($3 << 4) ; trainer's view range
  68. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_5
  69. dw Route9BattleText6 ; TextBeforeBattle
  70. dw Route9AfterBattleText6 ; TextAfterBattle
  71. dw Route9EndBattleText6 ; TextEndBattle
  72. dw Route9EndBattleText6 ; TextEndBattle
  73. Route9TrainerHeader6:
  74. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_6
  75. db ($4 << 4) ; trainer's view range
  76. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_6
  77. dw Route9BattleText7 ; TextBeforeBattle
  78. dw Route9AfterBattleText7 ; TextAfterBattle
  79. dw Route9EndBattleText7 ; TextEndBattle
  80. dw Route9EndBattleText7 ; TextEndBattle
  81. Route9TrainerHeader7:
  82. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_7, 1
  83. db ($2 << 4) ; trainer's view range
  84. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_7, 1
  85. dw Route9BattleText8 ; TextBeforeBattle
  86. dw Route9AfterBattleText8 ; TextAfterBattle
  87. dw Route9EndBattleText8 ; TextEndBattle
  88. dw Route9EndBattleText8 ; TextEndBattle
  89. Route9TrainerHeader8:
  90. dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_8, 1
  91. db ($2 << 4) ; trainer's view range
  92. dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_8, 1
  93. dw Route9BattleText9 ; TextBeforeBattle
  94. dw Route9AfterBattleText9 ; TextAfterBattle
  95. dw Route9EndBattleText9 ; TextEndBattle
  96. dw Route9EndBattleText9 ; TextEndBattle
  97. db $ff
  98. Route9Text1:
  99. TX_ASM
  100. ld hl, Route9TrainerHeader0
  101. jr Route9TalkToTrainer
  102. Route9Text2:
  103. TX_ASM
  104. ld hl, Route9TrainerHeader1
  105. jr Route9TalkToTrainer
  106. Route9Text3:
  107. TX_ASM
  108. ld hl, Route9TrainerHeader2
  109. jr Route9TalkToTrainer
  110. Route9Text4:
  111. TX_ASM
  112. ld hl, Route9TrainerHeader3
  113. jr Route9TalkToTrainer
  114. Route9Text5:
  115. TX_ASM
  116. ld hl, Route9TrainerHeader4
  117. jr Route9TalkToTrainer
  118. Route9Text6:
  119. TX_ASM
  120. ld hl, Route9TrainerHeader5
  121. jr Route9TalkToTrainer
  122. Route9Text7:
  123. TX_ASM
  124. ld hl, Route9TrainerHeader6
  125. jr Route9TalkToTrainer
  126. Route9Text8:
  127. TX_ASM
  128. ld hl, Route9TrainerHeader7
  129. jr Route9TalkToTrainer
  130. Route9Text9:
  131. TX_ASM
  132. ld hl, Route9TrainerHeader8
  133. Route9TalkToTrainer:
  134. call TalkToTrainer
  135. jp TextScriptEnd
  136. Route9BattleText1:
  137. TX_FAR _Route9BattleText1
  138. db "@"
  139. Route9EndBattleText1:
  140. TX_FAR _Route9EndBattleText1
  141. db "@"
  142. Route9AfterBattleText1:
  143. TX_FAR _Route9AfterBattleText1
  144. db "@"
  145. Route9BattleText2:
  146. TX_FAR _Route9BattleText2
  147. db "@"
  148. Route9EndBattleText2:
  149. TX_FAR _Route9EndBattleText2
  150. db "@"
  151. Route9AfterBattleText2:
  152. TX_FAR _Route9AfterBattleText2
  153. db "@"
  154. Route9BattleText3:
  155. TX_FAR _Route9BattleText3
  156. db "@"
  157. Route9EndBattleText3:
  158. TX_FAR _Route9EndBattleText3
  159. db "@"
  160. Route9AfterBattleText3:
  161. TX_FAR _Route9AfterBattleText3
  162. db "@"
  163. Route9BattleText4:
  164. TX_FAR _Route9BattleText4
  165. db "@"
  166. Route9EndBattleText4:
  167. TX_FAR _Route9EndBattleText4
  168. db "@"
  169. Route9AfterBattleText4:
  170. TX_FAR _Route9AfterBattleText4
  171. db "@"
  172. Route9BattleText5:
  173. TX_FAR _Route9BattleText5
  174. db "@"
  175. Route9EndBattleText5:
  176. TX_FAR _Route9EndBattleText5
  177. db "@"
  178. Route9AfterBattleText5:
  179. TX_FAR _Route9AfterBattleText5
  180. db "@"
  181. Route9BattleText6:
  182. TX_FAR _Route9BattleText6
  183. db "@"
  184. Route9EndBattleText6:
  185. TX_FAR _Route9EndBattleText6
  186. db "@"
  187. Route9AfterBattleText6:
  188. TX_FAR _Route9AfterBattleText6
  189. db "@"
  190. Route9BattleText7:
  191. TX_FAR _Route9BattleText7
  192. db "@"
  193. Route9EndBattleText7:
  194. TX_FAR _Route9EndBattleText7
  195. db "@"
  196. Route9AfterBattleText7:
  197. TX_FAR _Route9AfterBattleText7
  198. db "@"
  199. Route9BattleText8:
  200. TX_FAR _Route9BattleText8
  201. db "@"
  202. Route9EndBattleText8:
  203. TX_FAR _Route9EndBattleText8
  204. db "@"
  205. Route9AfterBattleText8:
  206. TX_FAR _Route9AfterBattleText8
  207. db "@"
  208. Route9BattleText9:
  209. TX_FAR _Route9BattleText9
  210. db "@"
  211. Route9EndBattleText9:
  212. TX_FAR _Route9EndBattleText9
  213. db "@"
  214. Route9AfterBattleText9:
  215. TX_FAR _Route9AfterBattleText9
  216. db "@"
  217. Route9Text11:
  218. TX_FAR _Route9Text11
  219. db "@"