summaryrefslogtreecommitdiff
path: root/scripts/CeruleanCaveB1F.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2019-01-01 15:06:23 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2019-01-01 23:33:10 -0500
commitc7796024590fec48ac79756793c1a6e3b54daf8f (patch)
tree0d61caa7ebe429995a61e800d1d78c3a82aec886 /scripts/CeruleanCaveB1F.asm
parent90430e6dee9e207dc0b618d07566f83617343f60 (diff)
Rename map files, labels, and constants to be consistent and work with Polished Map
Diffstat (limited to 'scripts/CeruleanCaveB1F.asm')
-rwxr-xr-xscripts/CeruleanCaveB1F.asm43
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/CeruleanCaveB1F.asm b/scripts/CeruleanCaveB1F.asm
new file mode 100755
index 00000000..a570ab18
--- /dev/null
+++ b/scripts/CeruleanCaveB1F.asm
@@ -0,0 +1,43 @@
+CeruleanCaveB1F_Script:
+ call EnableAutoTextBoxDrawing
+ ld hl, MewtwoTrainerHeader
+ ld de, CeruleanCaveB1F_ScriptPointers
+ ld a, [wCeruleanCaveB1FCurScript]
+ call ExecuteCurMapScriptInTable
+ ld [wCeruleanCaveB1FCurScript], a
+ ret
+
+CeruleanCaveB1F_ScriptPointers
+ dw CheckFightingMapTrainers
+ dw DisplayEnemyTrainerTextAndStartBattle
+ dw EndTrainerBattle
+
+CeruleanCaveB1F_TextPointers:
+ dw MewtwoText
+ dw PickUpItemText
+ dw PickUpItemText
+
+MewtwoTrainerHeader:
+ dbEventFlagBit EVENT_BEAT_MEWTWO
+ db ($0 << 4) ; trainer's view range
+ dwEventFlagAddress EVENT_BEAT_MEWTWO
+ dw MewtwoBattleText ; TextBeforeBattle
+ dw MewtwoBattleText ; TextAfterBattle
+ dw MewtwoBattleText ; TextEndBattle
+ dw MewtwoBattleText ; TextEndBattle
+
+ db $ff
+
+MewtwoText:
+ TX_ASM
+ ld hl, MewtwoTrainerHeader
+ call TalkToTrainer
+ jp TextScriptEnd
+
+MewtwoBattleText:
+ TX_FAR _MewtwoBattleText
+ TX_ASM
+ ld a, MEWTWO
+ call PlayCry
+ call WaitForSoundToFinish
+ jp TextScriptEnd