2020-05-21 00:40:33 +00:00
|
|
|
VictoryRoad2F_Script:
|
2016-06-11 20:45:24 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
bit BIT_CUR_MAP_LOADED_2, [hl]
|
|
|
|
res BIT_CUR_MAP_LOADED_2, [hl]
|
2023-07-14 01:27:56 +00:00
|
|
|
call nz, VictoryRoad2FResetBoulderEventScript
|
2016-06-11 20:45:24 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
bit BIT_CUR_MAP_LOADED_1, [hl]
|
|
|
|
res BIT_CUR_MAP_LOADED_1, [hl]
|
2023-07-14 01:27:56 +00:00
|
|
|
call nz, VictoryRoad2FCheckBoulderEventScript
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2021-04-13 22:24:37 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeaders
|
2020-05-21 00:40:33 +00:00
|
|
|
ld de, VictoryRoad2F_ScriptPointers
|
|
|
|
ld a, [wVictoryRoad2FCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
call ExecuteCurMapScriptInTable
|
2020-05-21 00:40:33 +00:00
|
|
|
ld [wVictoryRoad2FCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FResetBoulderEventScript:
|
2015-07-21 17:36:03 +00:00
|
|
|
ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
|
2023-07-14 01:27:56 +00:00
|
|
|
; fallthrough
|
|
|
|
VictoryRoad2FCheckBoulderEventScript:
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .not_on_switch
|
2014-05-18 18:19:10 +00:00
|
|
|
push af
|
|
|
|
ld a, $15
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 4, 3
|
2023-07-14 01:27:56 +00:00
|
|
|
call VictoryRoad2FReplaceTileBlockScript
|
2014-05-18 18:19:10 +00:00
|
|
|
pop af
|
2023-07-14 01:27:56 +00:00
|
|
|
.not_on_switch
|
2024-09-24 13:33:33 +00:00
|
|
|
CheckEventReuseA EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2
|
2014-05-18 18:19:10 +00:00
|
|
|
ret z
|
|
|
|
ld a, $1d
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 7, 11
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FReplaceTileBlockScript:
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2014-09-14 18:29:18 +00:00
|
|
|
predef ReplaceTileBlock
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2020-05-21 00:40:33 +00:00
|
|
|
VictoryRoad2F_ScriptPointers:
|
2023-08-26 15:08:59 +00:00
|
|
|
def_script_pointers
|
2023-07-14 01:27:56 +00:00
|
|
|
dw_const VictoryRoad2FDefaultScript, SCRIPT_VICTORYROAD2F_DEFAULT
|
|
|
|
dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VICTORYROAD2F_START_BATTLE
|
|
|
|
dw_const EndTrainerBattle, SCRIPT_VICTORYROAD2F_END_BATTLE
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FDefaultScript:
|
|
|
|
ld hl, .SwitchCoords
|
2014-05-18 18:19:10 +00:00
|
|
|
call CheckBoulderCoords
|
|
|
|
jp nc, CheckFightingMapTrainers
|
2024-09-25 05:45:00 +00:00
|
|
|
ldh a, [hSpriteIndex]
|
2016-06-03 04:01:37 +00:00
|
|
|
cp $f
|
|
|
|
jp z, CheckFightingMapTrainers
|
2015-07-21 17:36:03 +00:00
|
|
|
EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, [wCoordIndex]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $2
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .second_switch
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
|
|
|
|
SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
2023-07-14 01:27:56 +00:00
|
|
|
jr .set_script_flag
|
|
|
|
.second_switch
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEventAfterBranchReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
|
|
|
|
SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
2023-07-14 01:27:56 +00:00
|
|
|
.set_script_flag
|
2016-06-11 20:45:24 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
set BIT_CUR_MAP_LOADED_1, [hl]
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.SwitchCoords:
|
2020-11-04 06:06:44 +00:00
|
|
|
dbmapcoord 1, 16
|
|
|
|
dbmapcoord 9, 16
|
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2020-05-21 00:40:33 +00:00
|
|
|
VictoryRoad2F_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const VictoryRoad2FHikerText, TEXT_VICTORYROAD2F_HIKER
|
|
|
|
dw_const VictoryRoad2FSuperNerd1Text, TEXT_VICTORYROAD2F_SUPER_NERD1
|
|
|
|
dw_const VictoryRoad2FCooltrainerMText, TEXT_VICTORYROAD2F_COOLTRAINER_M
|
|
|
|
dw_const VictoryRoad2FSuperNerd2Text, TEXT_VICTORYROAD2F_SUPER_NERD2
|
|
|
|
dw_const VictoryRoad2FSuperNerd3Text, TEXT_VICTORYROAD2F_SUPER_NERD3
|
|
|
|
dw_const VictoryRoad2FMoltresText, TEXT_VICTORYROAD2F_MOLTRES
|
|
|
|
dw_const PickUpItemText, TEXT_VICTORYROAD2F_TM_SUBMISSION
|
|
|
|
dw_const PickUpItemText, TEXT_VICTORYROAD2F_FULL_HEAL
|
|
|
|
dw_const PickUpItemText, TEXT_VICTORYROAD2F_TM_MEGA_KICK
|
|
|
|
dw_const PickUpItemText, TEXT_VICTORYROAD2F_GUARD_SPEC
|
|
|
|
dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER1
|
|
|
|
dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER2
|
|
|
|
dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER3
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2021-04-13 22:24:37 +00:00
|
|
|
VictoryRoad2TrainerHeaders:
|
|
|
|
def_trainers
|
2016-06-11 20:45:24 +00:00
|
|
|
VictoryRoad2TrainerHeader0:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0, 4, VictoryRoad2FHikerBattleText, VictoryRoad2FHikerEndBattleText, VictoryRoad2FHikerAfterBattleText
|
2020-05-21 00:40:33 +00:00
|
|
|
VictoryRoad2TrainerHeader1:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1, 3, VictoryRoad2FSuperNerd1BattleText, VictoryRoad2FSuperNerd1EndBattleText, VictoryRoad2FSuperNerd1AfterBattleText
|
2020-05-21 00:40:33 +00:00
|
|
|
VictoryRoad2TrainerHeader2:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2, 3, VictoryRoad2FCooltrainerMBattleText, VictoryRoad2FCooltrainerMEndBattleText, VictoryRoad2FCooltrainerMAfterBattleText
|
2020-05-21 00:40:33 +00:00
|
|
|
VictoryRoad2TrainerHeader3:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3, 1, VictoryRoad2FSuperNerd2BattleText, VictoryRoad2FSuperNerd2EndBattleText, VictoryRoad2FSuperNerd2AfterBattleText
|
2020-05-21 00:40:33 +00:00
|
|
|
VictoryRoad2TrainerHeader4:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4, 3, VictoryRoad2FSuperNerd3BattleText, VictoryRoad2FSuperNerd3EndBattleText, VictoryRoad2FSuperNerd3AfterBattleText
|
2016-06-11 20:45:24 +00:00
|
|
|
MoltresTrainerHeader:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_MOLTRES, 0, VictoryRoad2FMoltresBattleText, VictoryRoad2FMoltresBattleText, VictoryRoad2FMoltresBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FHikerText:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader0
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd1Text:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2020-05-21 00:40:33 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader1
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FCooltrainerMText:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2020-05-21 00:40:33 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader2
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd2Text:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2020-05-21 00:40:33 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader3
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd3Text:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2020-05-21 00:40:33 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader4
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FMoltresText:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2016-06-11 20:45:24 +00:00
|
|
|
ld hl, MoltresTrainerHeader
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FMoltresBattleText:
|
|
|
|
text_far _VictoryRoad2FMoltresBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, MOLTRES
|
|
|
|
call PlayCry
|
|
|
|
call WaitForSoundToFinish
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FHikerBattleText:
|
|
|
|
text_far _VictoryRoad2FHikerBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FHikerEndBattleText:
|
|
|
|
text_far _VictoryRoad2FHikerEndBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FHikerAfterBattleText:
|
|
|
|
text_far _VictoryRoad2FHikerAfterBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd1BattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd1BattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd1EndBattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd1EndBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd1AfterBattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd1AfterBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FCooltrainerMBattleText:
|
|
|
|
text_far _VictoryRoad2FCooltrainerMBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FCooltrainerMEndBattleText:
|
|
|
|
text_far _VictoryRoad2FCooltrainerMEndBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FCooltrainerMAfterBattleText:
|
|
|
|
text_far _VictoryRoad2FCooltrainerMAfterBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd2BattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd2BattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd2EndBattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd2EndBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd2AfterBattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd2AfterBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd3BattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd3BattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd3EndBattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd3EndBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
VictoryRoad2FSuperNerd3AfterBattleText:
|
|
|
|
text_far _VictoryRoad2FSuperNerd3AfterBattleText
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|