silphco10.asm 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. SilphCo10Script:
  2. call SilphCo10Script_5a14f
  3. call EnableAutoTextBoxDrawing
  4. ld hl, SilphCo10TrainerHeader0
  5. ld de, SilphCo10ScriptPointers
  6. ld a, [wSilphCo10CurScript]
  7. call ExecuteCurMapScriptInTable
  8. ld [wSilphCo10CurScript], a
  9. ret
  10. SilphCo10Script_5a14f:
  11. ld hl, wCurrentMapScriptFlags
  12. bit 5, [hl]
  13. res 5, [hl]
  14. ret z
  15. ld hl, SilphCo10GateCoords
  16. call SilphCo2Script_59d43
  17. call SilphCo10Text_5a176
  18. CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR
  19. ret nz
  20. ld a, $54
  21. ld [wNewTileBlockID], a
  22. lb bc, 4, 5
  23. predef_jump ReplaceTileBlock
  24. SilphCo10GateCoords:
  25. db $04,$05
  26. db $FF
  27. SilphCo10Text_5a176:
  28. ld a, [$ffe0]
  29. and a
  30. ret z
  31. SetEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR
  32. ret
  33. SilphCo10ScriptPointers:
  34. dw CheckFightingMapTrainers
  35. dw DisplayEnemyTrainerTextAndStartBattle
  36. dw EndTrainerBattle
  37. SilphCo10TextPointers:
  38. dw SilphCo10Text1
  39. dw SilphCo10Text2
  40. dw SilphCo10Text3
  41. dw PickUpItemText
  42. dw PickUpItemText
  43. dw PickUpItemText
  44. SilphCo10TrainerHeader0:
  45. dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_0
  46. db ($3 << 4) ; trainer's view range
  47. dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_0
  48. dw SilphCo10BattleText1 ; TextBeforeBattle
  49. dw SilphCo10AfterBattleText1 ; TextAfterBattle
  50. dw SilphCo10EndBattleText1 ; TextEndBattle
  51. dw SilphCo10EndBattleText1 ; TextEndBattle
  52. SilphCo10TrainerHeader1:
  53. dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_1
  54. db ($4 << 4) ; trainer's view range
  55. dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_1
  56. dw SilphCo10BattleText2 ; TextBeforeBattle
  57. dw SilphCo10AfterBattleText2 ; TextAfterBattle
  58. dw SilphCo10EndBattleText2 ; TextEndBattle
  59. dw SilphCo10EndBattleText2 ; TextEndBattle
  60. db $ff
  61. SilphCo10Text1:
  62. TX_ASM
  63. ld hl, SilphCo10TrainerHeader0
  64. call TalkToTrainer
  65. jp TextScriptEnd
  66. SilphCo10Text2:
  67. TX_ASM
  68. ld hl, SilphCo10TrainerHeader1
  69. call TalkToTrainer
  70. jp TextScriptEnd
  71. SilphCo10Text3:
  72. TX_ASM
  73. CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
  74. ld hl, SilphCo10Text_5a1d8
  75. jr nz, .asm_cf85f
  76. ld hl, SilphCo10Text_5a1d3
  77. .asm_cf85f
  78. call PrintText
  79. jp TextScriptEnd
  80. SilphCo10Text_5a1d3:
  81. TX_FAR _SilphCo10Text_5a1d3
  82. db "@"
  83. SilphCo10Text_5a1d8:
  84. TX_FAR _SilphCo10Text_5a1d8
  85. db "@"
  86. SilphCo10BattleText1:
  87. TX_FAR _SilphCo10BattleText1
  88. db "@"
  89. SilphCo10EndBattleText1:
  90. TX_FAR _SilphCo10EndBattleText1
  91. db "@"
  92. SilphCo10AfterBattleText1:
  93. TX_FAR _SilphCo10AfterBattleText1
  94. db "@"
  95. SilphCo10BattleText2:
  96. TX_FAR _SilphCo10BattleText2
  97. db "@"
  98. SilphCo10EndBattleText2:
  99. TX_FAR _SilphCo10EndBattleText2
  100. db "@"
  101. SilphCo10AfterBattleText2:
  102. TX_FAR _SilphCo10AfterBattleText2
  103. db "@"