pokered/scripts/fuchsiagym.asm

330 lines
6.8 KiB
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
FuchsiaGymScript:
2014-05-18 18:19:10 +00:00
call FuchsiaGymScript_75453
call EnableAutoTextBoxDrawing
ld hl, FuchsiaGymTrainerHeader0
2014-05-18 18:19:10 +00:00
ld de, FuchsiaGymScriptPointers
2015-08-31 02:38:41 +00:00
ld a, [wFuchsiaGymCurScript]
2014-05-18 18:19:10 +00:00
call ExecuteCurMapScriptInTable
2015-08-31 02:38:41 +00:00
ld [wFuchsiaGymCurScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
FuchsiaGymScript_75453:
2016-01-03 19:17:10 +00:00
ld hl, wCurrentMapScriptFlags
2014-05-18 18:19:10 +00:00
bit 6, [hl]
res 6, [hl]
ret z
ld hl, Gym5CityName
ld de, Gym5LeaderName
call LoadGymLeaderAndCityName
ret
2016-06-12 00:24:04 +00:00
Gym5CityName:
2014-05-18 18:19:10 +00:00
db "FUCHSIA CITY@"
2016-06-12 00:24:04 +00:00
Gym5LeaderName:
2014-05-18 18:19:10 +00:00
db "KOGA@"
2016-06-12 00:24:04 +00:00
FuchsiaGymScript_75477:
2014-05-18 18:19:10 +00:00
xor a
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
2015-08-31 02:38:41 +00:00
ld [wFuchsiaGymCurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
FuchsiaGymScriptPointers:
2014-05-18 18:19:10 +00:00
dw CheckFightingMapTrainers
2014-09-14 18:29:18 +00:00
dw DisplayEnemyTrainerTextAndStartBattle
2014-05-18 18:19:10 +00:00
dw EndTrainerBattle
dw FuchsiaGymScript3
2016-06-12 00:24:04 +00:00
FuchsiaGymScript3:
2015-08-31 02:38:41 +00:00
ld a, [wIsInBattle]
2014-05-18 18:19:10 +00:00
cp $ff
jp z, FuchsiaGymScript_75477
ld a, $f0
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
2016-06-12 00:24:04 +00:00
FuchsiaGymScript3_75497:
2014-05-18 18:19:10 +00:00
ld a, $9
2015-07-18 15:17:29 +00:00
ld [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
2015-07-21 02:41:23 +00:00
SetEvent EVENT_BEAT_KOGA
2015-08-05 21:20:29 +00:00
lb bc, TM_06, 1
2014-05-18 18:19:10 +00:00
call GiveItem
jr nc, .BagFull
ld a, $a
2015-07-18 15:17:29 +00:00
ld [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
2015-07-21 02:41:23 +00:00
SetEvent EVENT_GOT_TM06
2014-05-18 18:19:10 +00:00
jr .asm_754c0
.BagFull
ld a, $b
2015-07-18 15:17:29 +00:00
ld [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
.asm_754c0
2015-08-31 02:38:41 +00:00
ld hl, wObtainedBadges
2014-05-18 18:19:10 +00:00
set 4, [hl]
2015-07-26 02:26:54 +00:00
ld hl, wBeatGymFlags
2014-05-18 18:19:10 +00:00
set 4, [hl]
; deactivate gym trainers
SetEventRange EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
2014-05-18 18:19:10 +00:00
jp FuchsiaGymScript_75477
2016-06-12 00:24:04 +00:00
FuchsiaGymTextPointers:
2014-05-18 18:19:10 +00:00
dw FuchsiaGymText1
dw FuchsiaGymText2
dw FuchsiaGymText3
dw FuchsiaGymText4
dw FuchsiaGymText5
dw FuchsiaGymText6
dw FuchsiaGymText7
dw FuchsiaGymText8
dw FuchsiaGymText9
dw FuchsiaGymText10
dw FuchsiaGymText11
2016-06-12 00:24:04 +00:00
FuchsiaGymTrainerHeader0:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
2014-05-18 18:19:10 +00:00
db ($2 << 4) ; trainer's view range
2015-07-21 01:32:02 +00:00
dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
dw FuchsiaGymBattleText1 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText1 ; TextAfterBattle
dw FuchsiaGymEndBattleText1 ; TextEndBattle
dw FuchsiaGymEndBattleText1 ; TextEndBattle
2014-05-18 18:19:10 +00:00
FuchsiaGymTrainerHeader1:
dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_1
2014-05-18 18:19:10 +00:00
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_1
dw FuchsiaGymBattleText2 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText2 ; TextAfterBattle
dw FuchsiaGymEndBattleText2 ; TextEndBattle
dw FuchsiaGymEndBattleText2 ; TextEndBattle
2014-05-18 18:19:10 +00:00
FuchsiaGymTrainerHeader2:
dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
2014-05-18 18:19:10 +00:00
db ($4 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
dw FuchsiaGymBattleText3 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText3 ; TextAfterBattle
dw FuchsiaGymEndBattleText3 ; TextEndBattle
dw FuchsiaGymEndBattleText3 ; TextEndBattle
2014-05-18 18:19:10 +00:00
FuchsiaGymTrainerHeader3:
dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
2014-05-18 18:19:10 +00:00
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
dw FuchsiaGymBattleText4 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText4 ; TextAfterBattle
dw FuchsiaGymEndBattleText4 ; TextEndBattle
dw FuchsiaGymEndBattleText4 ; TextEndBattle
2014-05-18 18:19:10 +00:00
FuchsiaGymTrainerHeader4:
dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_4
2014-05-18 18:19:10 +00:00
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_4
dw FuchsiaGymBattleText5 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText5 ; TextAfterBattle
dw FuchsiaGymEndBattleText5 ; TextEndBattle
dw FuchsiaGymEndBattleText5 ; TextEndBattle
2014-05-18 18:19:10 +00:00
FuchsiaGymTrainerHeader5:
dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
2014-05-18 18:19:10 +00:00
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
dw FuchsiaGymBattleText6 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText6 ; TextAfterBattle
dw FuchsiaGymEndBattleText6 ; TextEndBattle
dw FuchsiaGymEndBattleText6 ; TextEndBattle
2014-05-18 18:19:10 +00:00
db $ff
2016-06-12 00:24:04 +00:00
FuchsiaGymText1:
2015-07-03 19:58:50 +00:00
TX_ASM
2015-07-21 02:41:23 +00:00
CheckEvent EVENT_BEAT_KOGA
jr z, .asm_181b6
2015-07-21 02:41:23 +00:00
CheckEventReuseA EVENT_GOT_TM06
jr nz, .asm_adc3b
2014-05-18 18:19:10 +00:00
call z, FuchsiaGymScript3_75497
call DisableWaitingAfterTextDisplay
jr .asm_e84c6
.asm_adc3b
2015-06-12 15:26:00 +00:00
ld hl, KogaExplainToxicText
2014-05-18 18:19:10 +00:00
call PrintText
jr .asm_e84c6
.asm_181b6
2015-06-12 15:26:00 +00:00
ld hl, KogaBeforeBattleText
2014-05-18 18:19:10 +00:00
call PrintText
ld hl, wd72d
2014-05-18 18:19:10 +00:00
set 6, [hl]
set 7, [hl]
2015-06-12 15:26:00 +00:00
ld hl, KogaAfterBattleText
ld de, KogaAfterBattleText
2014-09-14 18:29:18 +00:00
call SaveEndBattleTextPointers
2015-07-03 20:13:35 +00:00
ld a, [H_SPRITEINDEX]
2014-09-13 07:50:56 +00:00
ld [wSpriteIndex], a
2014-05-18 18:19:10 +00:00
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $5
2015-08-31 02:38:41 +00:00
ld [wGymLeaderNo], a
2014-05-18 18:19:10 +00:00
xor a
2015-07-03 20:13:35 +00:00
ld [hJoyHeld], a
2014-05-18 18:19:10 +00:00
ld a, $3
2015-08-31 02:38:41 +00:00
ld [wFuchsiaGymCurScript], a
.asm_e84c6
2014-05-18 18:19:10 +00:00
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
KogaBeforeBattleText:
2015-06-12 15:26:00 +00:00
TX_FAR _KogaBeforeBattleText
2014-05-18 18:19:10 +00:00
db "@"
2016-06-12 00:24:04 +00:00
KogaAfterBattleText:
2015-06-12 15:26:00 +00:00
TX_FAR _KogaAfterBattleText
2014-05-18 18:19:10 +00:00
db "@"
2016-06-12 00:24:04 +00:00
KogaExplainToxicText:
2015-06-12 15:26:00 +00:00
TX_FAR _KogaExplainToxicText
2014-05-18 18:19:10 +00:00
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText9:
2015-06-12 15:26:00 +00:00
TX_FAR _FuchsiaGymText9
2014-05-18 18:19:10 +00:00
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText10:
2014-05-18 18:19:10 +00:00
TX_FAR _ReceivedTM06Text
2016-07-18 06:17:03 +00:00
TX_SFX_KEY_ITEM
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
TM06ExplanationText:
2014-05-18 18:19:10 +00:00
TX_FAR _TM06ExplanationText
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText11:
2014-05-18 18:19:10 +00:00
TX_FAR _TM06NoRoomText
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText2:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, FuchsiaGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
FuchsiaGymBattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymBattleText1
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymEndBattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymEndBattleText1
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymAfterBattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymAfterBattleText1
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText3:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, FuchsiaGymTrainerHeader1
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
FuchsiaGymBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymBattleText2
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymEndBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymEndBattleText2
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymAfterBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymAfterBattleText2
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText4:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, FuchsiaGymTrainerHeader2
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
FuchsiaGymBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymBattleText3
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymEndBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymEndBattleText3
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymAfterBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymAfterBattleText3
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText5:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, FuchsiaGymTrainerHeader3
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
FuchsiaGymBattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymBattleText4
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymEndBattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymEndBattleText4
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymAfterBattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymAfterBattleText4
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText6:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, FuchsiaGymTrainerHeader4
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
FuchsiaGymBattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymBattleText5
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymEndBattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymEndBattleText5
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymAfterBattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymAfterBattleText5
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText7:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, FuchsiaGymTrainerHeader5
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
FuchsiaGymBattleText6:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymBattleText6
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymEndBattleText6:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymEndBattleText6
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymAfterBattleText6:
2014-05-18 18:19:10 +00:00
TX_FAR _FuchsiaGymAfterBattleText6
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText8:
2015-07-03 19:58:50 +00:00
TX_ASM
2015-07-21 02:41:23 +00:00
CheckEvent EVENT_BEAT_KOGA
2015-06-12 15:26:00 +00:00
ld hl, FuchsiaGymText_75653
jr nz, .asm_50671
2015-06-12 15:26:00 +00:00
ld hl, FuchsiaGymText_7564e
.asm_50671
2014-05-18 18:19:10 +00:00
call PrintText
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
FuchsiaGymText_7564e:
2015-06-12 15:26:00 +00:00
TX_FAR _FuchsiaGymText_7564e
2014-05-18 18:19:10 +00:00
db "@"
2016-06-12 00:24:04 +00:00
FuchsiaGymText_75653:
2015-06-12 15:26:00 +00:00
TX_FAR _FuchsiaGymText_75653
2014-05-18 18:19:10 +00:00
db "@"