2014-05-18 18:19:10 +00:00
|
|
|
FuchsiaGymScript: ; 7543d (1d:543d)
|
|
|
|
call FuchsiaGymScript_75453
|
|
|
|
call EnableAutoTextBoxDrawing
|
|
|
|
ld hl, FuchsiaGymTrainerHeaders
|
|
|
|
ld de, FuchsiaGymScriptPointers
|
|
|
|
ld a, [W_FUCHSIAGYMCURSCRIPT]
|
|
|
|
call ExecuteCurMapScriptInTable
|
|
|
|
ld [W_FUCHSIAGYMCURSCRIPT], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
FuchsiaGymScript_75453: ; 75453 (1d:5453)
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd126
|
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
|
|
|
|
|
|
|
|
Gym5CityName: ; 75465 (1d:5465)
|
|
|
|
db "FUCHSIA CITY@"
|
|
|
|
Gym5LeaderName: ; 75472 (1d:5472)
|
|
|
|
db "KOGA@"
|
|
|
|
|
|
|
|
FuchsiaGymScript_75477: ; 75477 (1d:5477)
|
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld [W_FUCHSIAGYMCURSCRIPT], a
|
|
|
|
ld [W_CURMAPSCRIPT], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
FuchsiaGymScriptPointers: ; 75482 (1d:5482)
|
|
|
|
dw CheckFightingMapTrainers
|
2014-09-14 18:29:18 +00:00
|
|
|
dw DisplayEnemyTrainerTextAndStartBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
dw EndTrainerBattle
|
|
|
|
dw FuchsiaGymScript3
|
|
|
|
|
|
|
|
FuchsiaGymScript3: ; 7548a (1d:548a)
|
2015-07-03 19:38:12 +00:00
|
|
|
ld a, [W_ISINBATTLE]
|
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
|
2014-05-18 18:19:10 +00:00
|
|
|
FuchsiaGymScript3_75497: ; 75497 (1d:5497)
|
|
|
|
ld a, $9
|
2015-07-03 19:38:12 +00:00
|
|
|
ld [H_DOWNARROWBLINKCNT2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd792
|
2014-05-18 18:19:10 +00:00
|
|
|
set 1, [hl]
|
|
|
|
ld bc, (TM_06 << 8) | 1
|
|
|
|
call GiveItem
|
|
|
|
jr nc, .BagFull
|
|
|
|
ld a, $a
|
2015-07-03 19:38:12 +00:00
|
|
|
ld [H_DOWNARROWBLINKCNT2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd792
|
2014-05-18 18:19:10 +00:00
|
|
|
set 0, [hl]
|
|
|
|
jr .asm_754c0
|
|
|
|
.BagFull
|
|
|
|
ld a, $b
|
2015-07-03 19:38:12 +00:00
|
|
|
ld [H_DOWNARROWBLINKCNT2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
|
|
|
.asm_754c0
|
|
|
|
ld hl, W_OBTAINEDBADGES
|
|
|
|
set 4, [hl]
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd72a
|
2014-05-18 18:19:10 +00:00
|
|
|
set 4, [hl]
|
|
|
|
|
|
|
|
; deactivate gym trainers
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd792]
|
2014-05-18 18:19:10 +00:00
|
|
|
or %11111100
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wd792], a
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
jp FuchsiaGymScript_75477
|
|
|
|
|
|
|
|
FuchsiaGymTextPointers: ; 754d5 (1d:54d5)
|
|
|
|
dw FuchsiaGymText1
|
|
|
|
dw FuchsiaGymText2
|
|
|
|
dw FuchsiaGymText3
|
|
|
|
dw FuchsiaGymText4
|
|
|
|
dw FuchsiaGymText5
|
|
|
|
dw FuchsiaGymText6
|
|
|
|
dw FuchsiaGymText7
|
|
|
|
dw FuchsiaGymText8
|
|
|
|
dw FuchsiaGymText9
|
|
|
|
dw FuchsiaGymText10
|
|
|
|
dw FuchsiaGymText11
|
|
|
|
|
|
|
|
FuchsiaGymTrainerHeaders: ; 754eb (1d:54eb)
|
|
|
|
FuchsiaGymTrainerHeader0: ; 754eb (1d:54eb)
|
|
|
|
db $2 ; flag's bit
|
|
|
|
db ($2 << 4) ; trainer's view range
|
2014-05-26 21:04:56 +00:00
|
|
|
dw wd792 ; flag's byte
|
2015-07-03 19:38:12 +00:00
|
|
|
dw FuchsiaGymBattleText1 ; TextBeforeBattle
|
|
|
|
dw FuchsiaGymAfterBattleText1 ; TextAfterBattle
|
|
|
|
dw FuchsiaGymEndBattleText1 ; TextEndBattle
|
|
|
|
dw FuchsiaGymEndBattleText1 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
FuchsiaGymTrainerHeader2: ; 754f7 (1d:54f7)
|
|
|
|
db $3 ; flag's bit
|
|
|
|
db ($2 << 4) ; trainer's view range
|
2014-05-26 21:04:56 +00:00
|
|
|
dw wd792 ; flag's byte
|
2015-07-03 19:38:12 +00:00
|
|
|
dw FuchsiaGymBattleText2 ; TextBeforeBattle
|
|
|
|
dw FuchsiaGymAfterBattleText2 ; TextAfterBattle
|
|
|
|
dw FuchsiaGymEndBattleText2 ; TextEndBattle
|
|
|
|
dw FuchsiaGymEndBattleText2 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
FuchsiaGymTrainerHeader3: ; 75503 (1d:5503)
|
|
|
|
db $4 ; flag's bit
|
|
|
|
db ($4 << 4) ; trainer's view range
|
2014-05-26 21:04:56 +00:00
|
|
|
dw wd792 ; flag's byte
|
2015-07-03 19:38:12 +00:00
|
|
|
dw FuchsiaGymBattleText3 ; TextBeforeBattle
|
|
|
|
dw FuchsiaGymAfterBattleText3 ; TextAfterBattle
|
|
|
|
dw FuchsiaGymEndBattleText3 ; TextEndBattle
|
|
|
|
dw FuchsiaGymEndBattleText3 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
FuchsiaGymTrainerHeader4: ; 7550f (1d:550f)
|
|
|
|
db $5 ; flag's bit
|
|
|
|
db ($2 << 4) ; trainer's view range
|
2014-05-26 21:04:56 +00:00
|
|
|
dw wd792 ; flag's byte
|
2015-07-03 19:38:12 +00:00
|
|
|
dw FuchsiaGymBattleText4 ; TextBeforeBattle
|
|
|
|
dw FuchsiaGymAfterBattleText4 ; TextAfterBattle
|
|
|
|
dw FuchsiaGymEndBattleText4 ; TextEndBattle
|
|
|
|
dw FuchsiaGymEndBattleText4 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
FuchsiaGymTrainerHeader5: ; 7551b (1d:551b)
|
|
|
|
db $6 ; flag's bit
|
|
|
|
db ($2 << 4) ; trainer's view range
|
2014-05-26 21:04:56 +00:00
|
|
|
dw wd792 ; flag's byte
|
2015-07-03 19:38:12 +00:00
|
|
|
dw FuchsiaGymBattleText5 ; TextBeforeBattle
|
|
|
|
dw FuchsiaGymAfterBattleText5 ; TextAfterBattle
|
|
|
|
dw FuchsiaGymEndBattleText5 ; TextEndBattle
|
|
|
|
dw FuchsiaGymEndBattleText5 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
FuchsiaGymTrainerHeader6: ; 75527 (1d:5527)
|
|
|
|
db $7 ; flag's bit
|
|
|
|
db ($2 << 4) ; trainer's view range
|
2014-05-26 21:04:56 +00:00
|
|
|
dw wd792 ; flag's byte
|
2015-07-03 19:38:12 +00:00
|
|
|
dw FuchsiaGymBattleText6 ; TextBeforeBattle
|
|
|
|
dw FuchsiaGymAfterBattleText6 ; TextAfterBattle
|
|
|
|
dw FuchsiaGymEndBattleText6 ; TextEndBattle
|
|
|
|
dw FuchsiaGymEndBattleText6 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
db $ff
|
|
|
|
|
|
|
|
FuchsiaGymText1: ; 75534 (1d:5534)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd792]
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 1, a
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_181b6
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 0, a
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .asm_adc3b
|
2014-05-18 18:19:10 +00:00
|
|
|
call z, FuchsiaGymScript3_75497
|
|
|
|
call DisableWaitingAfterTextDisplay
|
2015-07-03 19:38:12 +00:00
|
|
|
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
|
2015-07-03 19:38:12 +00:00
|
|
|
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
|
2014-05-26 21:04:56 +00:00
|
|
|
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
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [W_GYMLEADERNO], 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
|
|
|
|
ld [W_FUCHSIAGYMCURSCRIPT], a
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_e84c6
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2015-06-12 15:26:00 +00:00
|
|
|
KogaBeforeBattleText: ; 75581 (1d:5581)
|
|
|
|
TX_FAR _KogaBeforeBattleText
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
2015-06-12 15:26:00 +00:00
|
|
|
KogaAfterBattleText: ; 75586 (1d:5586)
|
|
|
|
TX_FAR _KogaAfterBattleText
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
2015-06-12 15:26:00 +00:00
|
|
|
KogaExplainToxicText: ; 7558b (1d:558b)
|
|
|
|
TX_FAR _KogaExplainToxicText
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText9: ; 75590 (1d:5590)
|
2015-06-12 15:26:00 +00:00
|
|
|
TX_FAR _FuchsiaGymText9
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText10: ; 75595 (1d:5595)
|
|
|
|
TX_FAR _ReceivedTM06Text
|
|
|
|
db $11
|
|
|
|
|
|
|
|
TM06ExplanationText: ; 7559a (1d:559a)
|
|
|
|
TX_FAR _TM06ExplanationText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText11: ; 7559f (1d:559f)
|
|
|
|
TX_FAR _TM06NoRoomText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText2: ; 755a4 (1d:55a4)
|
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
|
|
|
|
|
|
|
|
FuchsiaGymBattleText1: ; 755ae (1d:55ae)
|
|
|
|
TX_FAR _FuchsiaGymBattleText1
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymEndBattleText1: ; 755b3 (1d:55b3)
|
|
|
|
TX_FAR _FuchsiaGymEndBattleText1
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymAfterBattleText1: ; 755b8 (1d:55b8)
|
|
|
|
TX_FAR _FuchsiaGymAfterBattleText1
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText3: ; 755bd (1d:55bd)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, FuchsiaGymTrainerHeader2
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
FuchsiaGymBattleText2: ; 755c7 (1d:55c7)
|
|
|
|
TX_FAR _FuchsiaGymBattleText2
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymEndBattleText2: ; 755cc (1d:55cc)
|
|
|
|
TX_FAR _FuchsiaGymEndBattleText2
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymAfterBattleText2: ; 755d1 (1d:55d1)
|
|
|
|
TX_FAR _FuchsiaGymAfterBattleText2
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText4: ; 755d6 (1d:55d6)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, FuchsiaGymTrainerHeader3
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
FuchsiaGymBattleText3: ; 755e0 (1d:55e0)
|
|
|
|
TX_FAR _FuchsiaGymBattleText3
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymEndBattleText3: ; 755e5 (1d:55e5)
|
|
|
|
TX_FAR _FuchsiaGymEndBattleText3
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymAfterBattleText3: ; 755ea (1d:55ea)
|
|
|
|
TX_FAR _FuchsiaGymAfterBattleText3
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText5: ; 755ef (1d:55ef)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, FuchsiaGymTrainerHeader4
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
FuchsiaGymBattleText4: ; 755f9 (1d:55f9)
|
|
|
|
TX_FAR _FuchsiaGymBattleText4
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymEndBattleText4: ; 755fe (1d:55fe)
|
|
|
|
TX_FAR _FuchsiaGymEndBattleText4
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymAfterBattleText4: ; 75603 (1d:5603)
|
|
|
|
TX_FAR _FuchsiaGymAfterBattleText4
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText6: ; 75608 (1d:5608)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, FuchsiaGymTrainerHeader5
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
FuchsiaGymBattleText5: ; 75612 (1d:5612)
|
|
|
|
TX_FAR _FuchsiaGymBattleText5
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymEndBattleText5: ; 75617 (1d:5617)
|
|
|
|
TX_FAR _FuchsiaGymEndBattleText5
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymAfterBattleText5: ; 7561c (1d:561c)
|
|
|
|
TX_FAR _FuchsiaGymAfterBattleText5
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText7: ; 75621 (1d:5621)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, FuchsiaGymTrainerHeader6
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
FuchsiaGymBattleText6: ; 7562b (1d:562b)
|
|
|
|
TX_FAR _FuchsiaGymBattleText6
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymEndBattleText6: ; 75630 (1d:5630)
|
|
|
|
TX_FAR _FuchsiaGymEndBattleText6
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymAfterBattleText6: ; 75635 (1d:5635)
|
|
|
|
TX_FAR _FuchsiaGymAfterBattleText6
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
FuchsiaGymText8: ; 7563a (1d:563a)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd792]
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 1, a
|
2015-06-12 15:26:00 +00:00
|
|
|
ld hl, FuchsiaGymText_75653
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .asm_50671
|
2015-06-12 15:26:00 +00:00
|
|
|
ld hl, FuchsiaGymText_7564e
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_50671
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2015-06-12 15:26:00 +00:00
|
|
|
FuchsiaGymText_7564e: ; 7564e (1d:564e)
|
|
|
|
TX_FAR _FuchsiaGymText_7564e
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
2015-06-12 15:26:00 +00:00
|
|
|
FuchsiaGymText_75653: ; 75653 (1d:5653)
|
|
|
|
TX_FAR _FuchsiaGymText_75653
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|