rockethideout1.asm 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. RocketHideout1Script:
  2. call RocketHideout1Script_44be0
  3. call EnableAutoTextBoxDrawing
  4. ld hl, RocketHideout1TrainerHeader0
  5. ld de, RocketHideout1ScriptPointers
  6. ld a, [wRocketHideout1CurScript]
  7. call ExecuteCurMapScriptInTable
  8. ld [wRocketHideout1CurScript], a
  9. ret
  10. RocketHideout1Script_44be0:
  11. ld hl, wCurrentMapScriptFlags
  12. bit 5, [hl]
  13. res 5, [hl]
  14. ret z
  15. CheckEvent EVENT_677
  16. jr nz, .asm_44c01
  17. CheckEventReuseA EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
  18. jr nz, .asm_44bf7
  19. ld a, $54
  20. jr .asm_44c03
  21. .asm_44bf7
  22. ld a, SFX_GO_INSIDE
  23. call PlaySound
  24. CheckEventHL EVENT_677
  25. .asm_44c01
  26. ld a, $e
  27. .asm_44c03
  28. ld [wNewTileBlockID], a
  29. lb bc, 8, 12
  30. predef_jump ReplaceTileBlock
  31. RocketHideout1ScriptPointers:
  32. dw CheckFightingMapTrainers
  33. dw DisplayEnemyTrainerTextAndStartBattle
  34. dw EndTrainerBattle
  35. RocketHideout1TextPointers:
  36. dw RocketHideout1Text1
  37. dw RocketHideout1Text2
  38. dw RocketHideout1Text3
  39. dw RocketHideout1Text4
  40. dw RocketHideout1Text5
  41. dw PickUpItemText
  42. dw PickUpItemText
  43. RocketHideout1TrainerHeader0:
  44. dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
  45. db ($3 << 4) ; trainer's view range
  46. dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
  47. dw RocketHideout1BattleText2 ; TextBeforeBattle
  48. dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle
  49. dw RocketHideout1EndBattleText2 ; TextEndBattle
  50. dw RocketHideout1EndBattleText2 ; TextEndBattle
  51. RocketHideout1TrainerHeader1:
  52. dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1
  53. db ($2 << 4) ; trainer's view range
  54. dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1
  55. dw RocketHideout1BattleText3 ; TextBeforeBattle
  56. dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle
  57. dw RocketHideout1EndBattleText3 ; TextEndBattle
  58. dw RocketHideout1EndBattleText3 ; TextEndBattle
  59. RocketHideout1TrainerHeader2:
  60. dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
  61. db ($2 << 4) ; trainer's view range
  62. dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
  63. dw RocketHideout1BattleText4 ; TextBeforeBattle
  64. dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle
  65. dw RocketHideout1EndBattleText4 ; TextEndBattle
  66. dw RocketHideout1EndBattleText4 ; TextEndBattle
  67. RocketHideout1TrainerHeader3:
  68. dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
  69. db ($3 << 4) ; trainer's view range
  70. dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
  71. dw RocketHideout1BattleText5 ; TextBeforeBattle
  72. dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle
  73. dw RocketHideout1EndBattleText5 ; TextEndBattle
  74. dw RocketHideout1EndBattleText5 ; TextEndBattle
  75. RocketHideout1TrainerHeader4:
  76. dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
  77. db ($3 << 4) ; trainer's view range
  78. dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
  79. dw RocketHideout1BattleText6 ; TextBeforeBattle
  80. dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle
  81. dw RocketHideout1EndBattleText6 ; TextEndBattle
  82. dw RocketHideout1EndBattleText6 ; TextEndBattle
  83. db $ff
  84. RocketHideout1Text1:
  85. TX_ASM
  86. ld hl, RocketHideout1TrainerHeader0
  87. call TalkToTrainer
  88. jp TextScriptEnd
  89. RocketHideout1Text2:
  90. TX_ASM
  91. ld hl, RocketHideout1TrainerHeader1
  92. call TalkToTrainer
  93. jp TextScriptEnd
  94. RocketHideout1Text3:
  95. TX_ASM
  96. ld hl, RocketHideout1TrainerHeader2
  97. call TalkToTrainer
  98. jp TextScriptEnd
  99. RocketHideout1Text4:
  100. TX_ASM
  101. ld hl, RocketHideout1TrainerHeader3
  102. call TalkToTrainer
  103. jp TextScriptEnd
  104. RocketHideout1Text5:
  105. TX_ASM
  106. ld hl, RocketHideout1TrainerHeader4
  107. call TalkToTrainer
  108. jp TextScriptEnd
  109. RocketHideout1EndBattleText6:
  110. TX_FAR _RocketHideout1EndBattleText6
  111. TX_ASM
  112. SetEvent EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
  113. ld hl, RocketHideout1Text_44c9f
  114. ret
  115. RocketHideout1Text_44c9f:
  116. TX_BLINK
  117. db "@"
  118. RocketHideout1BattleText2:
  119. TX_FAR _RocketHideout1BattleText2
  120. db "@"
  121. RocketHideout1EndBattleText2:
  122. TX_FAR _RocketHideout1EndBattleText2
  123. db "@"
  124. RocketHideout1AfterBattleTxt2:
  125. TX_FAR _RocketHideout1AfterBattleTxt2
  126. db "@"
  127. RocketHideout1BattleText3:
  128. TX_FAR _RocketHideout1BattleText3
  129. db "@"
  130. RocketHideout1EndBattleText3:
  131. TX_FAR _RocketHideout1EndBattleText3
  132. db "@"
  133. RocketHideout1AfterBattleTxt3:
  134. TX_FAR _RocketHideout1AfterBattleTxt3
  135. db "@"
  136. RocketHideout1BattleText4:
  137. TX_FAR _RocketHideout1BattleText4
  138. db "@"
  139. RocketHideout1EndBattleText4:
  140. TX_FAR _RocketHideout1EndBattleText4
  141. db "@"
  142. RocketHideout1AfterBattleTxt4:
  143. TX_FAR _RocketHideout1AfterBattleTxt4
  144. db "@"
  145. RocketHideout1BattleText5:
  146. TX_FAR _RocketHideout1BattleText5
  147. db "@"
  148. RocketHideout1EndBattleText5:
  149. TX_FAR _RocketHideout1EndBattleText5
  150. db "@"
  151. RocketHideout1AfterBattleTxt5:
  152. TX_FAR _RocketHideout1AfterBattleTxt5
  153. db "@"
  154. RocketHideout1BattleText6:
  155. TX_FAR _RocketHideout1BattleText6
  156. db "@"
  157. RocketHideout1AfterBattleTxt6:
  158. TX_FAR _RocketHideout1AfterBattleTxt6
  159. db "@"