pokeyellow/scripts/Route16.asm

222 lines
5.6 KiB
NASM
Raw Normal View History

Route16_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
ld hl, Route16TrainerHeaders
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:
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
Route16_ScriptPointers:
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
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
ld a, TEXT_ROUTE16_SNORLAX_WOKE_UP
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
ld [wCurEnemyLevel], a
ld a, HS_ROUTE_16_SNORLAX
2015-07-25 03:27:59 +00:00
ld [wMissableObjectIndex], a
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
jr z, .caught
ld a, TEXT_ROUTE16_SNORLAX_RETURNED_TO_MOUNTAINS
ldh [hTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
.caught
2015-07-21 01:32:02 +00:00
SetEvent EVENT_BEAT_ROUTE16_SNORLAX
2014-05-18 18:19:10 +00:00
call Delay3
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
Route16_TextPointers:
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
Route16TrainerHeaders:
def_trainers
2016-06-12 00:24:04 +00:00
Route16TrainerHeader0:
trainer EVENT_BEAT_ROUTE_16_TRAINER_0, 3, Route16Biker1BattleText, Route16Biker1EndBattleText, Route16Biker1AfterBattleText
2016-06-12 00:24:04 +00:00
Route16TrainerHeader1:
trainer EVENT_BEAT_ROUTE_16_TRAINER_1, 2, Route16Biker2BattleText, Route16Biker2EndBattleText, Route16Biker2AfterBattleText
2016-06-12 00:24:04 +00:00
Route16TrainerHeader2:
trainer EVENT_BEAT_ROUTE_16_TRAINER_2, 2, Route16Biker3BattleText, Route16Biker3EndBattleText, Route16Biker3AfterBattleText
2016-06-12 00:24:04 +00:00
Route16TrainerHeader3:
trainer EVENT_BEAT_ROUTE_16_TRAINER_3, 2, Route16biker4BattleText, Route16Biker4EndBattleText, Route16Biker4AfterBattleText
2016-06-12 00:24:04 +00:00
Route16TrainerHeader4:
trainer EVENT_BEAT_ROUTE_16_TRAINER_4, 2, Route16Biker5BattleText, Route16Biker5EndBattleText, Route16Biker5AfterBattleText
2016-06-12 00:24:04 +00:00
Route16TrainerHeader5:
trainer EVENT_BEAT_ROUTE_16_TRAINER_5, 4, Route16Biker6BattleText, Route16Biker6EndBattleText, Route16Biker6AfterBattleText
db -1 ; end
2014-05-18 18:19:10 +00:00
Route16Biker1Text:
text_asm
2014-05-18 18:19:10 +00:00
ld hl, Route16TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route16Biker1BattleText:
text_far _Route16Biker1BattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker1EndBattleText:
text_far _Route16Biker1EndBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker1AfterBattleText:
text_far _Route16Biker1AfterBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker2Text:
text_asm
2014-05-18 18:19:10 +00:00
ld hl, Route16TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route16Biker2BattleText:
text_far _Route16Biker2BattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker2EndBattleText:
text_far _Route16Biker2EndBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker2AfterBattleText:
text_far _Route16Biker2AfterBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker3Text:
text_asm
2014-05-18 18:19:10 +00:00
ld hl, Route16TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route16Biker3BattleText:
text_far _Route16Biker3BattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker3EndBattleText:
text_far _Route16Biker3EndBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker3AfterBattleText:
text_far _Route16Biker3AfterBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker4Text:
text_asm
2014-05-18 18:19:10 +00:00
ld hl, Route16TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route16biker4BattleText:
text_far _Route16biker4BattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker4EndBattleText:
text_far _Route16Biker4EndBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker4AfterBattleText:
text_far _Route16Biker4AfterBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker5Text:
text_asm
2014-05-18 18:19:10 +00:00
ld hl, Route16TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route16Biker5BattleText:
text_far _Route16Biker5BattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker5EndBattleText:
text_far _Route16Biker5EndBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker5AfterBattleText:
text_far _Route16Biker5AfterBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker6Text:
text_asm
2014-05-18 18:19:10 +00:00
ld hl, Route16TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route16Biker6BattleText:
text_far _Route16Biker6BattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker6EndBattleText:
text_far _Route16Biker6EndBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16Biker6AfterBattleText:
text_far _Route16Biker6AfterBattleText
text_end
2014-05-18 18:19:10 +00:00
Route16SnorlaxText:
text_far _Route16Text7
text_end
2014-05-18 18:19:10 +00:00
Route16SnorlaxWokeUpText:
text_far _Route16SnorlaxWokeUpText
text_end
2014-05-18 18:19:10 +00:00
Route16SnorlaxReturnedToMountainsText:
text_far _Route16SnorlaxReturnedToMountainsText
text_end
2014-05-18 18:19:10 +00:00
Route16CyclingRoadSignText:
text_far _Route16CyclingRoadSignText
text_end
2014-05-18 18:19:10 +00:00
Route16SignText:
text_far _Route16SignText
text_end