silphco6.asm 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. SilphCo6Script:
  2. call SilphCo6Script_1a1bf
  3. call EnableAutoTextBoxDrawing
  4. ld hl, SilphCo6TrainerHeader0
  5. ld de, SilphCo6ScriptPointers
  6. ld a, [wSilphCo6CurScript]
  7. call ExecuteCurMapScriptInTable
  8. ld [wSilphCo6CurScript], a
  9. ret
  10. SilphCo6Script_1a1bf:
  11. ld hl, wCurrentMapScriptFlags
  12. bit 5, [hl]
  13. res 5, [hl]
  14. ret z
  15. ld hl, SilphCo6GateCoords
  16. call SilphCo4Script_19d5d
  17. call SilphCo6Script_1a1e6
  18. CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR
  19. ret nz
  20. ld a, $5f
  21. ld [wNewTileBlockID], a
  22. lb bc, 6, 2
  23. predef_jump ReplaceTileBlock
  24. SilphCo6GateCoords:
  25. db $06,$02
  26. db $FF
  27. SilphCo6Script_1a1e6:
  28. ld a, [$ffe0]
  29. and a
  30. ret z
  31. SetEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR
  32. ret
  33. SilphCo6ScriptPointers:
  34. dw CheckFightingMapTrainers
  35. dw DisplayEnemyTrainerTextAndStartBattle
  36. dw EndTrainerBattle
  37. SilphCo6TextPointers:
  38. dw SilphCo6Text1
  39. dw SilphCo6Text2
  40. dw SilphCo6Text3
  41. dw SilphCo6Text4
  42. dw SilphCo6Text5
  43. dw SilphCo6Text6
  44. dw SilphCo6Text7
  45. dw SilphCo6Text8
  46. dw PickUpItemText
  47. dw PickUpItemText
  48. SilphCo6TrainerHeader0:
  49. dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_0
  50. db ($2 << 4) ; trainer's view range
  51. dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_0
  52. dw SilphCo6BattleText2 ; TextBeforeBattle
  53. dw SilphCo6AfterBattleText2 ; TextAfterBattle
  54. dw SilphCo6EndBattleText2 ; TextEndBattle
  55. dw SilphCo6EndBattleText2 ; TextEndBattle
  56. SilphCo6TrainerHeader1:
  57. dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_1
  58. db ($3 << 4) ; trainer's view range
  59. dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_1
  60. dw SilphCo6BattleText3 ; TextBeforeBattle
  61. dw SilphCo6AfterBattleText3 ; TextAfterBattle
  62. dw SilphCo6EndBattleText3 ; TextEndBattle
  63. dw SilphCo6EndBattleText3 ; TextEndBattle
  64. SilphCo6TrainerHeader2:
  65. dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1
  66. db ($2 << 4) ; trainer's view range
  67. dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1
  68. dw SilphCo6BattleText4 ; TextBeforeBattle
  69. dw SilphCo6AfterBattleText4 ; TextAfterBattle
  70. dw SilphCo6EndBattleText4 ; TextEndBattle
  71. dw SilphCo6EndBattleText4 ; TextEndBattle
  72. db $ff
  73. SilphCo6Script_1a22f:
  74. CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
  75. jr nz, .asm_1a238
  76. jr .asm_1a23a
  77. .asm_1a238
  78. ld h, d
  79. ld l, e
  80. .asm_1a23a
  81. jp PrintText
  82. SilphCo6Text1:
  83. TX_ASM
  84. ld hl, SilphCo6Text_1a24a
  85. ld de, SilphCo6Text_1a24f
  86. call SilphCo6Script_1a22f
  87. jp TextScriptEnd
  88. SilphCo6Text_1a24a:
  89. TX_FAR _SilphCo6Text_1a24a
  90. db "@"
  91. SilphCo6Text_1a24f:
  92. TX_FAR _SilphCo6Text_1a24f
  93. db "@"
  94. SilphCo6Text2:
  95. TX_ASM
  96. ld hl, SilphCo6Text_1a261
  97. ld de, SilphCo6Text_1a266
  98. call SilphCo6Script_1a22f
  99. jp TextScriptEnd
  100. SilphCo6Text_1a261:
  101. TX_FAR _SilphCo6Text_1a261
  102. db "@"
  103. SilphCo6Text_1a266:
  104. TX_FAR _SilphCo6Text_1a266
  105. db "@"
  106. SilphCo6Text3:
  107. TX_ASM
  108. ld hl, SilphCo6Text_1a278
  109. ld de, SilphCo6Text_1a27d
  110. call SilphCo6Script_1a22f
  111. jp TextScriptEnd
  112. SilphCo6Text_1a278:
  113. TX_FAR _SilphCo6Text_1a278
  114. db "@"
  115. SilphCo6Text_1a27d:
  116. TX_FAR _SilphCo6Text_1a27d
  117. db "@"
  118. SilphCo6Text4:
  119. TX_ASM
  120. ld hl, SilphCo6Text_1a28f
  121. ld de, SilphCo6Text_1a294
  122. call SilphCo6Script_1a22f
  123. jp TextScriptEnd
  124. SilphCo6Text_1a28f:
  125. TX_FAR _SilphCo6Text_1a28f
  126. db "@"
  127. SilphCo6Text_1a294:
  128. TX_FAR _SilphCo6Text_1a294
  129. db "@"
  130. SilphCo6Text5:
  131. TX_ASM
  132. ld hl, SilphCo6Text_1a2a6
  133. ld de, SilphCo6Text_1a2ab
  134. call SilphCo6Script_1a22f
  135. jp TextScriptEnd
  136. SilphCo6Text_1a2a6:
  137. TX_FAR _SilphCo6Text_1a2a6
  138. db "@"
  139. SilphCo6Text_1a2ab:
  140. TX_FAR _SilphCo6Text_1a2ab
  141. db "@"
  142. SilphCo6Text6:
  143. TX_ASM
  144. ld hl, SilphCo6TrainerHeader0
  145. call TalkToTrainer
  146. jp TextScriptEnd
  147. SilphCo6BattleText2:
  148. TX_FAR _SilphCo6BattleText2
  149. db "@"
  150. SilphCo6EndBattleText2:
  151. TX_FAR _SilphCo6EndBattleText2
  152. db "@"
  153. SilphCo6AfterBattleText2:
  154. TX_FAR _SilphCo6AfterBattleText2
  155. db "@"
  156. SilphCo6Text7:
  157. TX_ASM
  158. ld hl, SilphCo6TrainerHeader1
  159. call TalkToTrainer
  160. jp TextScriptEnd
  161. SilphCo6BattleText3:
  162. TX_FAR _SilphCo6BattleText3
  163. db "@"
  164. SilphCo6EndBattleText3:
  165. TX_FAR _SilphCo6EndBattleText3
  166. db "@"
  167. SilphCo6AfterBattleText3:
  168. TX_FAR _SilphCo6AfterBattleText3
  169. db "@"
  170. SilphCo6Text8:
  171. TX_ASM
  172. ld hl, SilphCo6TrainerHeader2
  173. call TalkToTrainer
  174. jp TextScriptEnd
  175. SilphCo6BattleText4:
  176. TX_FAR _SilphCo6BattleText4
  177. db "@"
  178. SilphCo6EndBattleText4:
  179. TX_FAR _SilphCo6EndBattleText4
  180. db "@"
  181. SilphCo6AfterBattleText4:
  182. TX_FAR _SilphCo6AfterBattleText4
  183. db "@"