rocktunnel1.asm 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. RockTunnel1Script:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, RockTunnel1TrainerHeader0
  4. ld de, RockTunnel1ScriptPointers
  5. ld a, [wRockTunnel1CurScript]
  6. call ExecuteCurMapScriptInTable
  7. ld [wRockTunnel1CurScript], a
  8. ret
  9. RockTunnel1ScriptPointers:
  10. dw CheckFightingMapTrainers
  11. dw DisplayEnemyTrainerTextAndStartBattle
  12. dw EndTrainerBattle
  13. RockTunnel1TextPointers:
  14. dw RockTunnel1Text1
  15. dw RockTunnel1Text2
  16. dw RockTunnel1Text3
  17. dw RockTunnel1Text4
  18. dw RockTunnel1Text5
  19. dw RockTunnel1Text6
  20. dw RockTunnel1Text7
  21. dw RockTunnel1Text8
  22. RockTunnel1TrainerHeader0:
  23. dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0
  24. db ($4 << 4) ; trainer's view range
  25. dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0
  26. dw RockTunnel1BattleText1 ; TextBeforeBattle
  27. dw RockTunnel1AfterBattleText1 ; TextAfterBattle
  28. dw RockTunnel1EndBattleText1 ; TextEndBattle
  29. dw RockTunnel1EndBattleText1 ; TextEndBattle
  30. RockTunnel1TrainerHeader1:
  31. dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1
  32. db ($4 << 4) ; trainer's view range
  33. dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1
  34. dw RockTunnel1BattleText2 ; TextBeforeBattle
  35. dw RockTunnel1AfterBattleText2 ; TextAfterBattle
  36. dw RockTunnel1EndBattleText2 ; TextEndBattle
  37. dw RockTunnel1EndBattleText2 ; TextEndBattle
  38. RockTunnel1TrainerHeader2:
  39. dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2
  40. db ($3 << 4) ; trainer's view range
  41. dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2
  42. dw RockTunnel1BattleText3 ; TextBeforeBattle
  43. dw RockTunnel1AfterBattleText3 ; TextAfterBattle
  44. dw RockTunnel1EndBattleText3 ; TextEndBattle
  45. dw RockTunnel1EndBattleText3 ; TextEndBattle
  46. RockTunnel1TrainerHeader3:
  47. dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3
  48. db ($3 << 4) ; trainer's view range
  49. dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3
  50. dw RockTunnel1BattleText4 ; TextBeforeBattle
  51. dw RockTunnel1AfterBattleText4 ; TextAfterBattle
  52. dw RockTunnel1EndBattleText4 ; TextEndBattle
  53. dw RockTunnel1EndBattleText4 ; TextEndBattle
  54. RockTunnel1TrainerHeader4:
  55. dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4
  56. db ($4 << 4) ; trainer's view range
  57. dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4
  58. dw RockTunnel1BattleText5 ; TextBeforeBattle
  59. dw RockTunnel1AfterBattleText5 ; TextAfterBattle
  60. dw RockTunnel1EndBattleText5 ; TextEndBattle
  61. dw RockTunnel1EndBattleText5 ; TextEndBattle
  62. RockTunnel1TrainerHeader5:
  63. dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5
  64. db ($4 << 4) ; trainer's view range
  65. dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5
  66. dw RockTunnel1BattleText6 ; TextBeforeBattle
  67. dw RockTunnel1AfterBattleText6 ; TextAfterBattle
  68. dw RockTunnel1EndBattleText6 ; TextEndBattle
  69. dw RockTunnel1EndBattleText6 ; TextEndBattle
  70. RockTunnel1TrainerHeader6:
  71. dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6
  72. db ($4 << 4) ; trainer's view range
  73. dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6
  74. dw RockTunnel1BattleText7 ; TextBeforeBattle
  75. dw RockTunnel1AfterBattleText7 ; TextAfterBattle
  76. dw RockTunnel1EndBattleText7 ; TextEndBattle
  77. dw RockTunnel1EndBattleText7 ; TextEndBattle
  78. db $ff
  79. RockTunnel1Text1:
  80. TX_ASM
  81. ld hl, RockTunnel1TrainerHeader0
  82. jr RockTunnel1TalkToTrainer
  83. RockTunnel1Text2:
  84. TX_ASM
  85. ld hl, RockTunnel1TrainerHeader1
  86. jr RockTunnel1TalkToTrainer
  87. RockTunnel1Text3:
  88. TX_ASM
  89. ld hl, RockTunnel1TrainerHeader2
  90. jr RockTunnel1TalkToTrainer
  91. RockTunnel1Text4:
  92. TX_ASM
  93. ld hl, RockTunnel1TrainerHeader3
  94. jr RockTunnel1TalkToTrainer
  95. RockTunnel1Text5:
  96. TX_ASM
  97. ld hl, RockTunnel1TrainerHeader4
  98. jr RockTunnel1TalkToTrainer
  99. RockTunnel1Text6:
  100. TX_ASM
  101. ld hl, RockTunnel1TrainerHeader5
  102. jr RockTunnel1TalkToTrainer
  103. RockTunnel1Text7:
  104. TX_ASM
  105. ld hl, RockTunnel1TrainerHeader6
  106. RockTunnel1TalkToTrainer:
  107. call TalkToTrainer
  108. jp TextScriptEnd
  109. RockTunnel1BattleText1:
  110. TX_FAR _RockTunnel1BattleText1
  111. db "@"
  112. RockTunnel1EndBattleText1:
  113. TX_FAR _RockTunnel1EndBattleText1
  114. db "@"
  115. RockTunnel1AfterBattleText1:
  116. TX_FAR _RockTunnel1AfterBattleText1
  117. db "@"
  118. RockTunnel1BattleText2:
  119. TX_FAR _RockTunnel1BattleText2
  120. db "@"
  121. RockTunnel1EndBattleText2:
  122. TX_FAR _RockTunnel1EndBattleText2
  123. db "@"
  124. RockTunnel1AfterBattleText2:
  125. TX_FAR _RockTunnel1AfterBattleText2
  126. db "@"
  127. RockTunnel1BattleText3:
  128. TX_FAR _RockTunnel1BattleText3
  129. db "@"
  130. RockTunnel1EndBattleText3:
  131. TX_FAR _RockTunnel1EndBattleText3
  132. db "@"
  133. RockTunnel1AfterBattleText3:
  134. TX_FAR _RockTunnel1AfterBattleText3
  135. db "@"
  136. RockTunnel1BattleText4:
  137. TX_FAR _RockTunnel1BattleText4
  138. db "@"
  139. RockTunnel1EndBattleText4:
  140. TX_FAR _RockTunnel1EndBattleText4
  141. db "@"
  142. RockTunnel1AfterBattleText4:
  143. TX_FAR _RockTunnel1AfterBattleText4
  144. db "@"
  145. RockTunnel1BattleText5:
  146. TX_FAR _RockTunnel1BattleText5
  147. db "@"
  148. RockTunnel1EndBattleText5:
  149. TX_FAR _RockTunnel1EndBattleText5
  150. db "@"
  151. RockTunnel1AfterBattleText5:
  152. TX_FAR _RockTunnel1AfterBattleText5
  153. db "@"
  154. RockTunnel1BattleText6:
  155. TX_FAR _RockTunnel1BattleText6
  156. db "@"
  157. RockTunnel1EndBattleText6:
  158. TX_FAR _RockTunnel1EndBattleText6
  159. db "@"
  160. RockTunnel1AfterBattleText6:
  161. TX_FAR _RockTunnel1AfterBattleText6
  162. db "@"
  163. RockTunnel1BattleText7:
  164. TX_FAR _RockTunnel1BattleText7
  165. db "@"
  166. RockTunnel1EndBattleText7:
  167. TX_FAR _RockTunnel1EndBattleText7
  168. db "@"
  169. RockTunnel1AfterBattleText7:
  170. TX_FAR _RockTunnel1AfterBattleText7
  171. db "@"
  172. RockTunnel1Text8:
  173. TX_FAR _RockTunnel1Text8
  174. db "@"