route21.asm 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. Route21Script:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, Route21TrainerHeader0
  4. ld de, Route21ScriptPointers
  5. ld a, [wRoute21CurScript]
  6. call ExecuteCurMapScriptInTable
  7. ld [wRoute21CurScript], a
  8. ret
  9. Route21ScriptPointers:
  10. dw CheckFightingMapTrainers
  11. dw DisplayEnemyTrainerTextAndStartBattle
  12. dw EndTrainerBattle
  13. Route21TextPointers:
  14. dw Route21Text1
  15. dw Route21Text2
  16. dw Route21Text3
  17. dw Route21Text4
  18. dw Route21Text5
  19. dw Route21Text6
  20. dw Route21Text7
  21. dw Route21Text8
  22. dw Route21Text9
  23. Route21TrainerHeader0:
  24. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_0
  25. db ($0 << 4) ; trainer's view range
  26. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_0
  27. dw Route21BattleText1 ; TextBeforeBattle
  28. dw Route21AfterBattleText1 ; TextAfterBattle
  29. dw Route21EndBattleText1 ; TextEndBattle
  30. dw Route21EndBattleText1 ; TextEndBattle
  31. Route21TrainerHeader1:
  32. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_1
  33. db ($0 << 4) ; trainer's view range
  34. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_1
  35. dw Route21BattleText2 ; TextBeforeBattle
  36. dw Route21AfterBattleText2 ; TextAfterBattle
  37. dw Route21EndBattleText2 ; TextEndBattle
  38. dw Route21EndBattleText2 ; TextEndBattle
  39. Route21TrainerHeader2:
  40. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_2
  41. db ($4 << 4) ; trainer's view range
  42. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_2
  43. dw Route21BattleText3 ; TextBeforeBattle
  44. dw Route21AfterBattleText3 ; TextAfterBattle
  45. dw Route21EndBattleText3 ; TextEndBattle
  46. dw Route21EndBattleText3 ; TextEndBattle
  47. Route21TrainerHeader3:
  48. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_3
  49. db ($4 << 4) ; trainer's view range
  50. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_3
  51. dw Route21BattleText4 ; TextBeforeBattle
  52. dw Route21AfterBattleText4 ; TextAfterBattle
  53. dw Route21EndBattleText4 ; TextEndBattle
  54. dw Route21EndBattleText4 ; TextEndBattle
  55. Route21TrainerHeader4:
  56. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_4
  57. db ($4 << 4) ; trainer's view range
  58. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_4
  59. dw Route21BattleText5 ; TextBeforeBattle
  60. dw Route21AfterBattleText5 ; TextAfterBattle
  61. dw Route21EndBattleText5 ; TextEndBattle
  62. dw Route21EndBattleText5 ; TextEndBattle
  63. Route21TrainerHeader5:
  64. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_5
  65. db ($4 << 4) ; trainer's view range
  66. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_5
  67. dw Route21BattleText6 ; TextBeforeBattle
  68. dw Route21AfterBattleText6 ; TextAfterBattle
  69. dw Route21EndBattleText6 ; TextEndBattle
  70. dw Route21EndBattleText6 ; TextEndBattle
  71. Route21TrainerHeader6:
  72. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_6
  73. db ($3 << 4) ; trainer's view range
  74. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_6
  75. dw Route21BattleText7 ; TextBeforeBattle
  76. dw Route21AfterBattleText7 ; TextAfterBattle
  77. dw Route21EndBattleText7 ; TextEndBattle
  78. dw Route21EndBattleText7 ; TextEndBattle
  79. Route21TrainerHeader7:
  80. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_7, 1
  81. db ($0 << 4) ; trainer's view range
  82. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_7, 1
  83. dw Route21BattleText8 ; TextBeforeBattle
  84. dw Route21AfterBattleText8 ; TextAfterBattle
  85. dw Route21EndBattleText8 ; TextEndBattle
  86. dw Route21EndBattleText8 ; TextEndBattle
  87. Route21TrainerHeader8:
  88. dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_8, 1
  89. db ($0 << 4) ; trainer's view range
  90. dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_8, 1
  91. dw Route21BattleText9 ; TextBeforeBattle
  92. dw Route21AfterBattleText9 ; TextAfterBattle
  93. dw Route21EndBattleText9 ; TextEndBattle
  94. dw Route21EndBattleText9 ; TextEndBattle
  95. db $ff
  96. Route21Text1:
  97. TX_ASM
  98. ld hl, Route21TrainerHeader0
  99. call TalkToTrainer
  100. jp TextScriptEnd
  101. Route21Text2:
  102. TX_ASM
  103. ld hl, Route21TrainerHeader1
  104. call TalkToTrainer
  105. jp TextScriptEnd
  106. Route21Text3:
  107. TX_ASM
  108. ld hl, Route21TrainerHeader2
  109. call TalkToTrainer
  110. jp TextScriptEnd
  111. Route21Text4:
  112. TX_ASM
  113. ld hl, Route21TrainerHeader3
  114. call TalkToTrainer
  115. jp TextScriptEnd
  116. Route21Text5:
  117. TX_ASM
  118. ld hl, Route21TrainerHeader4
  119. call TalkToTrainer
  120. jp TextScriptEnd
  121. Route21Text6:
  122. TX_ASM
  123. ld hl, Route21TrainerHeader5
  124. call TalkToTrainer
  125. jp TextScriptEnd
  126. Route21Text7:
  127. TX_ASM
  128. ld hl, Route21TrainerHeader6
  129. call TalkToTrainer
  130. jp TextScriptEnd
  131. Route21Text8:
  132. TX_ASM
  133. ld hl, Route21TrainerHeader7
  134. call TalkToTrainer
  135. jp TextScriptEnd
  136. Route21Text9:
  137. TX_ASM
  138. ld hl, Route21TrainerHeader8
  139. call TalkToTrainer
  140. jp TextScriptEnd
  141. Route21BattleText1:
  142. TX_FAR _Route21BattleText1
  143. db "@"
  144. Route21EndBattleText1:
  145. TX_FAR _Route21EndBattleText1
  146. db "@"
  147. Route21AfterBattleText1:
  148. TX_FAR _Route21AfterBattleText1
  149. db "@"
  150. Route21BattleText2:
  151. TX_FAR _Route21BattleText2
  152. db "@"
  153. Route21EndBattleText2:
  154. TX_FAR _Route21EndBattleText2
  155. db "@"
  156. Route21AfterBattleText2:
  157. TX_FAR _Route21AfterBattleText2
  158. db "@"
  159. Route21BattleText3:
  160. TX_FAR _Route21BattleText3
  161. db "@"
  162. Route21EndBattleText3:
  163. TX_FAR _Route21EndBattleText3
  164. db "@"
  165. Route21AfterBattleText3:
  166. TX_FAR _Route21AfterBattleText3
  167. db "@"
  168. Route21BattleText4:
  169. TX_FAR _Route21BattleText4
  170. db "@"
  171. Route21EndBattleText4:
  172. TX_FAR _Route21EndBattleText4
  173. db "@"
  174. Route21AfterBattleText4:
  175. TX_FAR _Route21AfterBattleText4
  176. db "@"
  177. Route21BattleText5:
  178. TX_FAR _Route21BattleText5
  179. db "@"
  180. Route21EndBattleText5:
  181. TX_FAR _Route21EndBattleText5
  182. db "@"
  183. Route21AfterBattleText5:
  184. TX_FAR _Route21AfterBattleText5
  185. db "@"
  186. Route21BattleText6:
  187. TX_FAR _Route21BattleText6
  188. db "@"
  189. Route21EndBattleText6:
  190. TX_FAR _Route21EndBattleText6
  191. db "@"
  192. Route21AfterBattleText6:
  193. TX_FAR _Route21AfterBattleText6
  194. db "@"
  195. Route21BattleText7:
  196. TX_FAR _Route21BattleText7
  197. db "@"
  198. Route21EndBattleText7:
  199. TX_FAR _Route21EndBattleText7
  200. db "@"
  201. Route21AfterBattleText7:
  202. TX_FAR _Route21AfterBattleText7
  203. db "@"
  204. Route21BattleText8:
  205. TX_FAR _Route21BattleText8
  206. db "@"
  207. Route21EndBattleText8:
  208. TX_FAR _Route21EndBattleText8
  209. db "@"
  210. Route21AfterBattleText8:
  211. TX_FAR _Route21AfterBattleText8
  212. db "@"
  213. Route21BattleText9:
  214. TX_FAR _Route21BattleText9
  215. db "@"
  216. Route21EndBattleText9:
  217. TX_FAR _Route21EndBattleText9
  218. db "@"
  219. Route21AfterBattleText9:
  220. TX_FAR _Route21AfterBattleText9
  221. db "@"