2019-01-01 20:06:23 +00:00
|
|
|
Route16_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2021-04-13 22:24:37 +00:00
|
|
|
ld hl, Route16TrainerHeaders
|
2019-01-01 20:06:23 +00:00
|
|
|
ld de, Route16_ScriptPointers
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wRoute16CurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
call ExecuteCurMapScriptInTable
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute16CurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
Route16ResetScripts:
|
2023-07-14 01:27:56 +00:00
|
|
|
xor a ; SCRIPT_ROUTE16_DEFAULT
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute16CurScript], a
|
|
|
|
ld [wCurMapScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
Route16_ScriptPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_script_pointers
|
|
|
|
dw_const Route16DefaultScript, SCRIPT_ROUTE16_DEFAULT
|
|
|
|
dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE16_START_BATTLE
|
|
|
|
dw_const EndTrainerBattle, SCRIPT_ROUTE16_END_BATTLE
|
2023-11-19 00:44:03 +00:00
|
|
|
dw_const Route16SnorlaxPostBattleScript, SCRIPT_ROUTE16_SNORLAX_POST_BATTLE
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16DefaultScript:
|
2015-07-21 01:32:02 +00:00
|
|
|
CheckEventHL EVENT_BEAT_ROUTE16_SNORLAX
|
2014-05-18 18:19:10 +00:00
|
|
|
jp nz, CheckFightingMapTrainers
|
2015-07-21 01:32:02 +00:00
|
|
|
CheckEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX
|
|
|
|
ResetEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX
|
2014-05-18 18:19:10 +00:00
|
|
|
jp z, CheckFightingMapTrainers
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, TEXT_ROUTE16_SNORLAX_WOKE_UP
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
|
|
|
ld a, SNORLAX
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCurOpponent], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, 30
|
2024-07-16 17:02:54 +00:00
|
|
|
ld [wCurEnemyLevel], a
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_ROUTE_16_SNORLAX
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef HideObject
|
2014-05-18 18:19:10 +00:00
|
|
|
call UpdateSprites
|
2023-11-19 00:44:03 +00:00
|
|
|
ld a, SCRIPT_ROUTE16_SNORLAX_POST_BATTLE
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute16CurScript], a
|
|
|
|
ld [wCurMapScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
Route16SnorlaxPostBattleScript:
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wIsInBattle]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $ff
|
2023-11-19 00:44:03 +00:00
|
|
|
jp z, Route16ResetScripts
|
2014-05-18 18:19:10 +00:00
|
|
|
call UpdateSprites
|
2014-08-09 05:39:13 +00:00
|
|
|
ld a, [wBattleResult]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $2
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .caught
|
|
|
|
ld a, TEXT_ROUTE16_SNORLAX_RETURNED_TO_MOUNTAINS
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2023-07-14 01:27:56 +00:00
|
|
|
.caught
|
2015-07-21 01:32:02 +00:00
|
|
|
SetEvent EVENT_BEAT_ROUTE16_SNORLAX
|
2014-05-18 18:19:10 +00:00
|
|
|
call Delay3
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_ROUTE16_DEFAULT
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute16CurScript], a
|
|
|
|
ld [wCurMapScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
Route16_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const Route16Biker1Text, TEXT_ROUTE16_BIKER1
|
|
|
|
dw_const Route16Biker2Text, TEXT_ROUTE16_BIKER2
|
|
|
|
dw_const Route16Biker3Text, TEXT_ROUTE16_BIKER3
|
|
|
|
dw_const Route16Biker4Text, TEXT_ROUTE16_BIKER4
|
|
|
|
dw_const Route16Biker5Text, TEXT_ROUTE16_BIKER5
|
|
|
|
dw_const Route16Biker6Text, TEXT_ROUTE16_BIKER6
|
|
|
|
dw_const Route16SnorlaxText, TEXT_ROUTE16_SNORLAX
|
|
|
|
dw_const Route16CyclingRoadSignText, TEXT_ROUTE16_CYCLING_ROAD_SIGN
|
|
|
|
dw_const Route16SignText, TEXT_ROUTE16_SIGN
|
|
|
|
dw_const Route16SnorlaxWokeUpText, TEXT_ROUTE16_SNORLAX_WOKE_UP
|
|
|
|
dw_const Route16SnorlaxReturnedToMountainsText, TEXT_ROUTE16_SNORLAX_RETURNED_TO_MOUNTAINS
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2021-04-13 22:24:37 +00:00
|
|
|
Route16TrainerHeaders:
|
|
|
|
def_trainers
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader0:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_ROUTE_16_TRAINER_0, 3, Route16Biker1BattleText, Route16Biker1EndBattleText, Route16Biker1AfterBattleText
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader1:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_ROUTE_16_TRAINER_1, 2, Route16Biker2BattleText, Route16Biker2EndBattleText, Route16Biker2AfterBattleText
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader2:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_ROUTE_16_TRAINER_2, 2, Route16Biker3BattleText, Route16Biker3EndBattleText, Route16Biker3AfterBattleText
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader3:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_ROUTE_16_TRAINER_3, 2, Route16biker4BattleText, Route16Biker4EndBattleText, Route16Biker4AfterBattleText
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader4:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_ROUTE_16_TRAINER_4, 2, Route16Biker5BattleText, Route16Biker5EndBattleText, Route16Biker5AfterBattleText
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader5:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_ROUTE_16_TRAINER_5, 4, Route16Biker6BattleText, Route16Biker6EndBattleText, Route16Biker6AfterBattleText
|
2020-07-14 19:45:36 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker1Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader0
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker1BattleText:
|
|
|
|
text_far _Route16Biker1BattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker1EndBattleText:
|
|
|
|
text_far _Route16Biker1EndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker1AfterBattleText:
|
|
|
|
text_far _Route16Biker1AfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker2Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader1
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker2BattleText:
|
|
|
|
text_far _Route16Biker2BattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker2EndBattleText:
|
|
|
|
text_far _Route16Biker2EndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker2AfterBattleText:
|
|
|
|
text_far _Route16Biker2AfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker3Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader2
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker3BattleText:
|
|
|
|
text_far _Route16Biker3BattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker3EndBattleText:
|
|
|
|
text_far _Route16Biker3EndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker3AfterBattleText:
|
|
|
|
text_far _Route16Biker3AfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker4Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader3
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16biker4BattleText:
|
|
|
|
text_far _Route16biker4BattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker4EndBattleText:
|
|
|
|
text_far _Route16Biker4EndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker4AfterBattleText:
|
|
|
|
text_far _Route16Biker4AfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker5Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader4
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker5BattleText:
|
|
|
|
text_far _Route16Biker5BattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker5EndBattleText:
|
|
|
|
text_far _Route16Biker5EndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker5AfterBattleText:
|
|
|
|
text_far _Route16Biker5AfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker6Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader5
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker6BattleText:
|
|
|
|
text_far _Route16Biker6BattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker6EndBattleText:
|
|
|
|
text_far _Route16Biker6EndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16Biker6AfterBattleText:
|
|
|
|
text_far _Route16Biker6AfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16SnorlaxText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _Route16Text7
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16SnorlaxWokeUpText:
|
|
|
|
text_far _Route16SnorlaxWokeUpText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16SnorlaxReturnedToMountainsText:
|
|
|
|
text_far _Route16SnorlaxReturnedToMountainsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16CyclingRoadSignText:
|
|
|
|
text_far _Route16CyclingRoadSignText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
Route16SignText:
|
|
|
|
text_far _Route16SignText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|