route12.asm 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. Route12Script:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, Route12TrainerHeader0
  4. ld de, Route12ScriptPointers
  5. ld a, [wRoute12CurScript]
  6. call ExecuteCurMapScriptInTable
  7. ld [wRoute12CurScript], a
  8. ret
  9. Route12Script_59606:
  10. xor a
  11. ld [wJoyIgnore], a
  12. ld [wRoute12CurScript], a
  13. ld [wCurMapScript], a
  14. ret
  15. Route12ScriptPointers:
  16. dw Route12Script0
  17. dw DisplayEnemyTrainerTextAndStartBattle
  18. dw EndTrainerBattle
  19. dw Route12Script3
  20. Route12Script0:
  21. CheckEventHL EVENT_BEAT_ROUTE12_SNORLAX
  22. jp nz, CheckFightingMapTrainers
  23. CheckEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
  24. ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
  25. jp z, CheckFightingMapTrainers
  26. ld a, $d
  27. ld [hSpriteIndexOrTextID], a
  28. call DisplayTextID
  29. ld a, SNORLAX
  30. ld [wCurOpponent], a
  31. ld a, 30
  32. ld [wCurEnemyLVL], a
  33. ld a, HS_ROUTE_12_SNORLAX
  34. ld [wMissableObjectIndex], a
  35. predef HideObject
  36. ld a, $3
  37. ld [wRoute12CurScript], a
  38. ld [wCurMapScript], a
  39. ret
  40. Route12Script3:
  41. ld a, [wIsInBattle]
  42. cp $ff
  43. jr z, Route12Script_59606
  44. call UpdateSprites
  45. ld a, [wBattleResult]
  46. cp $2
  47. jr z, .asm_59664
  48. ld a, $e
  49. ld [hSpriteIndexOrTextID], a
  50. call DisplayTextID
  51. .asm_59664
  52. SetEvent EVENT_BEAT_ROUTE12_SNORLAX
  53. call Delay3
  54. ld a, $0
  55. ld [wRoute12CurScript], a
  56. ld [wCurMapScript], a
  57. ret
  58. Route12TextPointers:
  59. dw Route12Text1
  60. dw Route12Text2
  61. dw Route12Text3
  62. dw Route12Text4
  63. dw Route12Text5
  64. dw Route12Text6
  65. dw Route12Text7
  66. dw Route12Text8
  67. dw PickUpItemText
  68. dw PickUpItemText
  69. dw Route12Text11
  70. dw Route12Text12
  71. dw Route12Text13
  72. dw Route12Text14
  73. Route12TrainerHeader0:
  74. dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_0
  75. db ($4 << 4) ; trainer's view range
  76. dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_0
  77. dw Route12BattleText1 ; TextBeforeBattle
  78. dw Route12AfterBattleText1 ; TextAfterBattle
  79. dw Route12EndBattleText1 ; TextEndBattle
  80. dw Route12EndBattleText1 ; TextEndBattle
  81. Route12TrainerHeader1:
  82. dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_1
  83. db ($4 << 4) ; trainer's view range
  84. dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_1
  85. dw Route12BattleText2 ; TextBeforeBattle
  86. dw Route12AfterBattleText2 ; TextAfterBattle
  87. dw Route12EndBattleText2 ; TextEndBattle
  88. dw Route12EndBattleText2 ; TextEndBattle
  89. Route12TrainerHeader2:
  90. dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_2
  91. db ($4 << 4) ; trainer's view range
  92. dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_2
  93. dw Route12BattleText3 ; TextBeforeBattle
  94. dw Route12AfterBattleText3 ; TextAfterBattle
  95. dw Route12EndBattleText3 ; TextEndBattle
  96. dw Route12EndBattleText3 ; TextEndBattle
  97. Route12TrainerHeader3:
  98. dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_3
  99. db ($4 << 4) ; trainer's view range
  100. dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_3
  101. dw Route12BattleText4 ; TextBeforeBattle
  102. dw Route12AfterBattleText4 ; TextAfterBattle
  103. dw Route12EndBattleText4 ; TextEndBattle
  104. dw Route12EndBattleText4 ; TextEndBattle
  105. Route12TrainerHeader4:
  106. dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_4
  107. db ($4 << 4) ; trainer's view range
  108. dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_4
  109. dw Route12BattleText5 ; TextBeforeBattle
  110. dw Route12AfterBattleText5 ; TextAfterBattle
  111. dw Route12EndBattleText5 ; TextEndBattle
  112. dw Route12EndBattleText5 ; TextEndBattle
  113. Route12TrainerHeader5:
  114. dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_5
  115. db ($4 << 4) ; trainer's view range
  116. dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_5
  117. dw Route12BattleText6 ; TextBeforeBattle
  118. dw Route12AfterBattleText6 ; TextAfterBattle
  119. dw Route12EndBattleText6 ; TextEndBattle
  120. dw Route12EndBattleText6 ; TextEndBattle
  121. Route12TrainerHeader6:
  122. dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_6, 1
  123. db ($1 << 4) ; trainer's view range
  124. dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_6, 1
  125. dw Route12BattleText7 ; TextBeforeBattle
  126. dw Route12AfterBattleText7 ; TextAfterBattle
  127. dw Route12EndBattleText7 ; TextEndBattle
  128. dw Route12EndBattleText7 ; TextEndBattle
  129. db $ff
  130. Route12Text1:
  131. TX_FAR _Route12Text1
  132. db "@"
  133. Route12Text13:
  134. TX_FAR _Route12Text13
  135. db "@"
  136. Route12Text14:
  137. TX_FAR _Route12Text14
  138. db "@"
  139. Route12Text2:
  140. TX_ASM
  141. ld hl, Route12TrainerHeader0
  142. call TalkToTrainer
  143. jp TextScriptEnd
  144. Route12BattleText1:
  145. TX_FAR _Route12BattleText1
  146. db "@"
  147. Route12EndBattleText1:
  148. TX_FAR _Route12EndBattleText1
  149. db "@"
  150. Route12AfterBattleText1:
  151. TX_FAR _Route12AfterBattleText1
  152. db "@"
  153. Route12Text3:
  154. TX_ASM
  155. ld hl, Route12TrainerHeader1
  156. call TalkToTrainer
  157. jp TextScriptEnd
  158. Route12BattleText2:
  159. TX_FAR _Route12BattleText2
  160. db "@"
  161. Route12EndBattleText2:
  162. TX_FAR _Route12EndBattleText2
  163. db "@"
  164. Route12AfterBattleText2:
  165. TX_FAR _Route12AfterBattleText2
  166. db "@"
  167. Route12Text4:
  168. TX_ASM
  169. ld hl, Route12TrainerHeader2
  170. call TalkToTrainer
  171. jp TextScriptEnd
  172. Route12BattleText3:
  173. TX_FAR _Route12BattleText3
  174. db "@"
  175. Route12EndBattleText3:
  176. TX_FAR _Route12EndBattleText3
  177. db "@"
  178. Route12AfterBattleText3:
  179. TX_FAR _Route12AfterBattleText3
  180. db "@"
  181. Route12Text5:
  182. TX_ASM
  183. ld hl, Route12TrainerHeader3
  184. call TalkToTrainer
  185. jp TextScriptEnd
  186. Route12BattleText4:
  187. TX_FAR _Route12BattleText4
  188. db "@"
  189. Route12EndBattleText4:
  190. TX_FAR _Route12EndBattleText4
  191. db "@"
  192. Route12AfterBattleText4:
  193. TX_FAR _Route12AfterBattleText4
  194. db "@"
  195. Route12Text6:
  196. TX_ASM
  197. ld hl, Route12TrainerHeader4
  198. call TalkToTrainer
  199. jp TextScriptEnd
  200. Route12BattleText5:
  201. TX_FAR _Route12BattleText5
  202. db "@"
  203. Route12EndBattleText5:
  204. TX_FAR _Route12EndBattleText5
  205. db "@"
  206. Route12AfterBattleText5:
  207. TX_FAR _Route12AfterBattleText5
  208. db "@"
  209. Route12Text7:
  210. TX_ASM
  211. ld hl, Route12TrainerHeader5
  212. call TalkToTrainer
  213. jp TextScriptEnd
  214. Route12BattleText6:
  215. TX_FAR _Route12BattleText6
  216. db "@"
  217. Route12EndBattleText6:
  218. TX_FAR _Route12EndBattleText6
  219. db "@"
  220. Route12AfterBattleText6:
  221. TX_FAR _Route12AfterBattleText6
  222. db "@"
  223. Route12Text8:
  224. TX_ASM
  225. ld hl, Route12TrainerHeader6
  226. call TalkToTrainer
  227. jp TextScriptEnd
  228. Route12BattleText7:
  229. TX_FAR _Route12BattleText7
  230. db "@"
  231. Route12EndBattleText7:
  232. TX_FAR _Route12EndBattleText7
  233. db "@"
  234. Route12AfterBattleText7:
  235. TX_FAR _Route12AfterBattleText7
  236. db "@"
  237. Route12Text11:
  238. TX_FAR _Route12Text11
  239. db "@"
  240. Route12Text12:
  241. TX_FAR _Route12Text12
  242. db "@"