route25.asm 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. Route25Script:
  2. call Route25Script_515e1
  3. call EnableAutoTextBoxDrawing
  4. ld hl, Route25TrainerHeader0
  5. ld de, Route25ScriptPointers
  6. ld a, [wRoute25CurScript]
  7. call ExecuteCurMapScriptInTable
  8. ld [wRoute25CurScript], a
  9. ret
  10. Route25Script_515e1:
  11. ld hl, wCurrentMapScriptFlags
  12. bit 6, [hl]
  13. res 6, [hl]
  14. ret z
  15. CheckEventHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
  16. ret nz
  17. CheckEventReuseHL EVENT_MET_BILL_2
  18. jr nz, .asm_515ff
  19. ResetEventReuseHL EVENT_BILL_SAID_USE_CELL_SEPARATOR
  20. ld a, HS_BILL_POKEMON
  21. ld [wMissableObjectIndex], a
  22. predef_jump ShowObject
  23. .asm_515ff
  24. CheckEventAfterBranchReuseHL EVENT_GOT_SS_TICKET, EVENT_MET_BILL_2
  25. ret z
  26. SetEventReuseHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
  27. ld a, HS_NUGGET_BRIDGE_GUY
  28. ld [wMissableObjectIndex], a
  29. predef HideObject
  30. ld a, HS_BILL_1
  31. ld [wMissableObjectIndex], a
  32. predef HideObject
  33. ld a, HS_BILL_2
  34. ld [wMissableObjectIndex], a
  35. predef_jump ShowObject
  36. Route25ScriptPointers:
  37. dw CheckFightingMapTrainers
  38. dw DisplayEnemyTrainerTextAndStartBattle
  39. dw EndTrainerBattle
  40. Route25TextPointers:
  41. dw Route25Text1
  42. dw Route25Text2
  43. dw Route25Text3
  44. dw Route25Text4
  45. dw Route25Text5
  46. dw Route25Text6
  47. dw Route25Text7
  48. dw Route25Text8
  49. dw Route25Text9
  50. dw PickUpItemText
  51. dw Route25Text11
  52. Route25TrainerHeader0:
  53. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_0
  54. db ($2 << 4) ; trainer's view range
  55. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_0
  56. dw Route25BattleText1 ; TextBeforeBattle
  57. dw Route25AfterBattleText1 ; TextAfterBattle
  58. dw Route25EndBattleText1 ; TextEndBattle
  59. dw Route25EndBattleText1 ; TextEndBattle
  60. Route25TrainerHeader1:
  61. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_1
  62. db ($3 << 4) ; trainer's view range
  63. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_1
  64. dw Route25BattleText2 ; TextBeforeBattle
  65. dw Route25AfterBattleText2 ; TextAfterBattle
  66. dw Route25EndBattleText2 ; TextEndBattle
  67. dw Route25EndBattleText2 ; TextEndBattle
  68. Route25TrainerHeader2:
  69. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_2
  70. db ($3 << 4) ; trainer's view range
  71. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_2
  72. dw Route25BattleText3 ; TextBeforeBattle
  73. dw Route25AfterBattleText3 ; TextAfterBattle
  74. dw Route25EndBattleText3 ; TextEndBattle
  75. dw Route25EndBattleText3 ; TextEndBattle
  76. Route25TrainerHeader3:
  77. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_3
  78. db ($2 << 4) ; trainer's view range
  79. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_3
  80. dw Route25BattleText4 ; TextBeforeBattle
  81. dw Route25AfterBattleText4 ; TextAfterBattle
  82. dw Route25EndBattleText4 ; TextEndBattle
  83. dw Route25EndBattleText4 ; TextEndBattle
  84. Route25TrainerHeader4:
  85. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_4
  86. db ($4 << 4) ; trainer's view range
  87. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_4
  88. dw Route25BattleText5 ; TextBeforeBattle
  89. dw Route25AfterBattleText5 ; TextAfterBattle
  90. dw Route25EndBattleText5 ; TextEndBattle
  91. dw Route25EndBattleText5 ; TextEndBattle
  92. Route25TrainerHeader5:
  93. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_5
  94. db ($4 << 4) ; trainer's view range
  95. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_5
  96. dw Route25BattleText6 ; TextBeforeBattle
  97. dw Route25AfterBattleText6 ; TextAfterBattle
  98. dw Route25EndBattleText6 ; TextEndBattle
  99. dw Route25EndBattleText6 ; TextEndBattle
  100. Route25TrainerHeader6:
  101. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_6
  102. db ($3 << 4) ; trainer's view range
  103. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_6
  104. dw Route25BattleText7 ; TextBeforeBattle
  105. dw Route25AfterBattleText7 ; TextAfterBattle
  106. dw Route25EndBattleText7 ; TextEndBattle
  107. dw Route25EndBattleText7 ; TextEndBattle
  108. Route25TrainerHeader7:
  109. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_7, 1
  110. db ($2 << 4) ; trainer's view range
  111. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_7, 1
  112. dw Route25BattleText8 ; TextBeforeBattle
  113. dw Route25AfterBattleText8 ; TextAfterBattle
  114. dw Route25EndBattleText8 ; TextEndBattle
  115. dw Route25EndBattleText8 ; TextEndBattle
  116. Route25TrainerHeader8:
  117. dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_8, 1
  118. db ($2 << 4) ; trainer's view range
  119. dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_8, 1
  120. dw Route25BattleText9 ; TextBeforeBattle
  121. dw Route25AfterBattleText9 ; TextAfterBattle
  122. dw Route25EndBattleText9 ; TextEndBattle
  123. dw Route25EndBattleText9 ; TextEndBattle
  124. db $ff
  125. Route25Text1:
  126. TX_ASM
  127. ld hl, Route25TrainerHeader0
  128. call TalkToTrainer
  129. jp TextScriptEnd
  130. Route25Text2:
  131. TX_ASM
  132. ld hl, Route25TrainerHeader1
  133. call TalkToTrainer
  134. jp TextScriptEnd
  135. Route25Text3:
  136. TX_ASM
  137. ld hl, Route25TrainerHeader2
  138. call TalkToTrainer
  139. jp TextScriptEnd
  140. Route25Text4:
  141. TX_ASM
  142. ld hl, Route25TrainerHeader3
  143. call TalkToTrainer
  144. jp TextScriptEnd
  145. Route25Text5:
  146. TX_ASM
  147. ld hl, Route25TrainerHeader4
  148. call TalkToTrainer
  149. jp TextScriptEnd
  150. Route25Text6:
  151. TX_ASM
  152. ld hl, Route25TrainerHeader5
  153. call TalkToTrainer
  154. jp TextScriptEnd
  155. Route25Text7:
  156. TX_ASM
  157. ld hl, Route25TrainerHeader6
  158. call TalkToTrainer
  159. jp TextScriptEnd
  160. Route25Text8:
  161. TX_ASM
  162. ld hl, Route25TrainerHeader7
  163. call TalkToTrainer
  164. jp TextScriptEnd
  165. Route25Text9:
  166. TX_ASM
  167. ld hl, Route25TrainerHeader8
  168. call TalkToTrainer
  169. jp TextScriptEnd
  170. Route25BattleText1:
  171. TX_FAR _Route25BattleText1
  172. db "@"
  173. Route25EndBattleText1:
  174. TX_FAR _Route25EndBattleText1
  175. db "@"
  176. Route25AfterBattleText1:
  177. TX_FAR _Route25AfterBattleText1
  178. db "@"
  179. Route25BattleText2:
  180. TX_FAR _Route25BattleText2
  181. db "@"
  182. Route25EndBattleText2:
  183. TX_FAR _Route25EndBattleText2
  184. db "@"
  185. Route25AfterBattleText2:
  186. TX_FAR _Route25AfterBattleText2
  187. db "@"
  188. Route25BattleText3:
  189. TX_FAR _Route25BattleText3
  190. db "@"
  191. Route25EndBattleText3:
  192. TX_FAR _Route25EndBattleText3
  193. db "@"
  194. Route25AfterBattleText3:
  195. TX_FAR _Route25AfterBattleText3
  196. db "@"
  197. Route25BattleText4:
  198. TX_FAR _Route25BattleText4
  199. db "@"
  200. Route25EndBattleText4:
  201. TX_FAR _Route25EndBattleText4
  202. db "@"
  203. Route25AfterBattleText4:
  204. TX_FAR _Route25AfterBattleText4
  205. db "@"
  206. Route25BattleText5:
  207. TX_FAR _Route25BattleText5
  208. db "@"
  209. Route25EndBattleText5:
  210. TX_FAR _Route25EndBattleText5
  211. db "@"
  212. Route25AfterBattleText5:
  213. TX_FAR _Route25AfterBattleText5
  214. db "@"
  215. Route25BattleText6:
  216. TX_FAR _Route25BattleText6
  217. db "@"
  218. Route25EndBattleText6:
  219. TX_FAR _Route25EndBattleText6
  220. db "@"
  221. Route25AfterBattleText6:
  222. TX_FAR _Route25AfterBattleText6
  223. db "@"
  224. Route25BattleText7:
  225. TX_FAR _Route25BattleText7
  226. db "@"
  227. Route25EndBattleText7:
  228. TX_FAR _Route25EndBattleText7
  229. db "@"
  230. Route25AfterBattleText7:
  231. TX_FAR _Route25AfterBattleText7
  232. db "@"
  233. Route25BattleText8:
  234. TX_FAR _Route25BattleText8
  235. db "@"
  236. Route25EndBattleText8:
  237. TX_FAR _Route25EndBattleText8
  238. db "@"
  239. Route25AfterBattleText8:
  240. TX_FAR _Route25AfterBattleText8
  241. db "@"
  242. Route25BattleText9:
  243. TX_FAR _Route25BattleText9
  244. db "@"
  245. Route25EndBattleText9:
  246. TX_FAR _Route25EndBattleText9
  247. db "@"
  248. Route25AfterBattleText9:
  249. TX_FAR _Route25AfterBattleText9
  250. db "@"
  251. Route25Text11:
  252. TX_FAR _Route25Text11
  253. db "@"