2019-01-01 20:06:23 +00:00
|
|
|
VictoryRoad2F_Script:
|
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]
|
|
|
|
call nz, VictoryRoad2Script_517c4
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 5, [hl]
|
|
|
|
res 5, [hl]
|
|
|
|
call nz, VictoryRoad2Script_517c9
|
|
|
|
call EnableAutoTextBoxDrawing
|
2016-07-20 05:40:04 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader0
|
2019-01-01 20:06:23 +00:00
|
|
|
ld de, VictoryRoad2F_ScriptPointers
|
|
|
|
ld a, [wVictoryRoad2FCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
call ExecuteCurMapScriptInTable
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wVictoryRoad2FCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Script_517c4:
|
2015-07-21 17:36:03 +00:00
|
|
|
ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Script_517c9:
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
|
2014-05-18 18:19:10 +00:00
|
|
|
jr z, .asm_517da
|
|
|
|
push af
|
|
|
|
ld a, $15
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 4, 3
|
2014-05-18 18:19:10 +00:00
|
|
|
call VictoryRoad2Script_517e2
|
|
|
|
pop af
|
|
|
|
.asm_517da
|
|
|
|
bit 7, a
|
|
|
|
ret z
|
|
|
|
ld a, $1d
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 7, 11
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Script_517e2:
|
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
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
VictoryRoad2F_ScriptPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw VictoryRoad2Script0
|
2014-09-14 18:29:18 +00:00
|
|
|
dw DisplayEnemyTrainerTextAndStartBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
dw EndTrainerBattle
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Script0:
|
2015-07-03 19:38:12 +00:00
|
|
|
ld hl, CoordsData_51816
|
2014-05-18 18:19:10 +00:00
|
|
|
call CheckBoulderCoords
|
|
|
|
jp nc, 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
|
|
|
|
jr z, .asm_5180b
|
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
|
|
|
|
jr .asm_51810
|
|
|
|
.asm_5180b
|
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
|
|
|
|
.asm_51810
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2014-05-18 18:19:10 +00:00
|
|
|
set 5, [hl]
|
|
|
|
ret
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
CoordsData_51816:
|
2014-05-18 18:19:10 +00:00
|
|
|
db $10,$01
|
|
|
|
db $10,$09
|
|
|
|
db $FF
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
VictoryRoad2F_TextPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw VictoryRoad2Text1
|
|
|
|
dw VictoryRoad2Text2
|
|
|
|
dw VictoryRoad2Text3
|
|
|
|
dw VictoryRoad2Text4
|
|
|
|
dw VictoryRoad2Text5
|
2016-04-07 02:58:45 +00:00
|
|
|
dw MoltresText
|
2015-07-18 15:17:29 +00:00
|
|
|
dw PickUpItemText
|
|
|
|
dw PickUpItemText
|
|
|
|
dw PickUpItemText
|
|
|
|
dw PickUpItemText
|
2014-05-18 18:19:10 +00:00
|
|
|
dw BoulderText
|
|
|
|
dw BoulderText
|
|
|
|
dw BoulderText
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2TrainerHeader0:
|
2015-07-21 01:32:02 +00:00
|
|
|
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($4 << 4) ; trainer's view range
|
2015-07-21 01:32:02 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0
|
2015-07-03 19:38:12 +00:00
|
|
|
dw VictoryRoad2BattleText1 ; TextBeforeBattle
|
|
|
|
dw VictoryRoad2AfterBattleText1 ; TextAfterBattle
|
|
|
|
dw VictoryRoad2EndBattleText1 ; TextEndBattle
|
|
|
|
dw VictoryRoad2EndBattleText1 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-07-20 05:40:04 +00:00
|
|
|
VictoryRoad2TrainerHeader1:
|
|
|
|
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($3 << 4) ; trainer's view range
|
2016-07-20 05:40:04 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1
|
2015-07-03 19:38:12 +00:00
|
|
|
dw VictoryRoad2BattleText2 ; TextBeforeBattle
|
|
|
|
dw VictoryRoad2AfterBattleText2 ; TextAfterBattle
|
|
|
|
dw VictoryRoad2EndBattleText2 ; TextEndBattle
|
|
|
|
dw VictoryRoad2EndBattleText2 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-07-20 05:40:04 +00:00
|
|
|
VictoryRoad2TrainerHeader2:
|
|
|
|
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($3 << 4) ; trainer's view range
|
2016-07-20 05:40:04 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2
|
2015-07-03 19:38:12 +00:00
|
|
|
dw VictoryRoad2BattleText3 ; TextBeforeBattle
|
|
|
|
dw VictoryRoad2AfterBattleText3 ; TextAfterBattle
|
|
|
|
dw VictoryRoad2EndBattleText3 ; TextEndBattle
|
|
|
|
dw VictoryRoad2EndBattleText3 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-07-20 05:40:04 +00:00
|
|
|
VictoryRoad2TrainerHeader3:
|
|
|
|
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($1 << 4) ; trainer's view range
|
2016-07-20 05:40:04 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3
|
2015-07-03 19:38:12 +00:00
|
|
|
dw VictoryRoad2BattleText4 ; TextBeforeBattle
|
|
|
|
dw VictoryRoad2AfterBattleText4 ; TextAfterBattle
|
|
|
|
dw VictoryRoad2EndBattleText4 ; TextEndBattle
|
|
|
|
dw VictoryRoad2EndBattleText4 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-07-20 05:40:04 +00:00
|
|
|
VictoryRoad2TrainerHeader4:
|
|
|
|
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($3 << 4) ; trainer's view range
|
2016-07-20 05:40:04 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4
|
2015-07-03 19:38:12 +00:00
|
|
|
dw VictoryRoad2BattleText5 ; TextBeforeBattle
|
|
|
|
dw VictoryRoad2AfterBattleText5 ; TextAfterBattle
|
|
|
|
dw VictoryRoad2EndBattleText5 ; TextEndBattle
|
|
|
|
dw VictoryRoad2EndBattleText5 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
MoltresTrainerHeader:
|
|
|
|
dbEventFlagBit EVENT_BEAT_MOLTRES
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($0 << 4) ; trainer's view range
|
2016-04-07 02:58:45 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_MOLTRES
|
|
|
|
dw MoltresBattleText ; TextBeforeBattle
|
|
|
|
dw MoltresBattleText ; TextAfterBattle
|
|
|
|
dw MoltresBattleText ; TextEndBattle
|
|
|
|
dw MoltresBattleText ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
db $ff
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Text1:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader0
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Text2:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2016-07-20 05:40:04 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader1
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Text3:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2016-07-20 05:40:04 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader2
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Text4:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2016-07-20 05:40:04 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader3
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2Text5:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2016-07-20 05:40:04 +00:00
|
|
|
ld hl, VictoryRoad2TrainerHeader4
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
MoltresText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2016-04-07 02:58:45 +00:00
|
|
|
ld hl, MoltresTrainerHeader
|
2014-05-18 18:19:10 +00:00
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
MoltresBattleText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _MoltresBattleText
|
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, MOLTRES
|
|
|
|
call PlayCry
|
|
|
|
call WaitForSoundToFinish
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2BattleText1:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2BattleText1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2EndBattleText1:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2EndBattleText1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2AfterBattleText1:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2AfterBattleText1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2BattleText2:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2BattleText2
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2EndBattleText2:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2EndBattleText2
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2AfterBattleText2:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2AfterBattleText2
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2BattleText3:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2BattleText3
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2EndBattleText3:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2EndBattleText3
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2AfterBattleText3:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2AfterBattleText3
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2BattleText4:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2BattleText4
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2EndBattleText4:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2EndBattleText4
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2AfterBattleText4:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2AfterBattleText4
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2BattleText5:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2BattleText5
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2EndBattleText5:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2EndBattleText5
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-07 02:58:45 +00:00
|
|
|
VictoryRoad2AfterBattleText5:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _VictoryRoad2AfterBattleText5
|
|
|
|
text_end
|