2019-01-01 20:06:23 +00:00
|
|
|
Route16_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2016-07-20 05:40:04 +00:00
|
|
|
ld hl, Route16TrainerHeader0
|
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
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Script_59946:
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
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:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw Route16Script0
|
2014-09-14 18:29:18 +00:00
|
|
|
dw DisplayEnemyTrainerTextAndStartBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
dw EndTrainerBattle
|
|
|
|
dw Route16Script3
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Script0:
|
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, $a
|
2015-07-18 15:17:29 +00:00
|
|
|
ld [hSpriteIndexOrTextID], 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
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCurEnemyLVL], 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
|
|
|
|
ld a, $3
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute16CurScript], a
|
|
|
|
ld [wCurMapScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Script3:
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wIsInBattle]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $ff
|
2014-05-31 14:35:46 +00:00
|
|
|
jp z, Route16Script_59946
|
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, .asm_599a8
|
|
|
|
ld a, $b
|
2015-07-18 15:17:29 +00:00
|
|
|
ld [hSpriteIndexOrTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
|
|
|
.asm_599a8
|
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, $0
|
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:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw Route16Text1
|
|
|
|
dw Route16Text2
|
|
|
|
dw Route16Text3
|
|
|
|
dw Route16Text4
|
|
|
|
dw Route16Text5
|
|
|
|
dw Route16Text6
|
|
|
|
dw Route16Text7
|
|
|
|
dw Route16Text8
|
|
|
|
dw Route16Text9
|
|
|
|
dw Route16Text10
|
|
|
|
dw Route16Text11
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader0:
|
2015-07-21 01:32:02 +00:00
|
|
|
dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_0
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($3 << 4) ; trainer's view range
|
2015-07-21 01:32:02 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_0
|
2015-07-03 19:38:12 +00:00
|
|
|
dw Route16BattleText1 ; TextBeforeBattle
|
|
|
|
dw Route16AfterBattleText1 ; TextAfterBattle
|
|
|
|
dw Route16EndBattleText1 ; TextEndBattle
|
|
|
|
dw Route16EndBattleText1 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader1:
|
2015-07-21 01:32:02 +00:00
|
|
|
dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_1
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($2 << 4) ; trainer's view range
|
2015-07-21 01:32:02 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_1
|
2015-07-03 19:38:12 +00:00
|
|
|
dw Route16BattleText2 ; TextBeforeBattle
|
|
|
|
dw Route16AfterBattleText2 ; TextAfterBattle
|
|
|
|
dw Route16EndBattleText2 ; TextEndBattle
|
|
|
|
dw Route16EndBattleText2 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader2:
|
2015-07-21 01:32:02 +00:00
|
|
|
dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_2
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($2 << 4) ; trainer's view range
|
2015-07-21 01:32:02 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_2
|
2015-07-03 19:38:12 +00:00
|
|
|
dw Route16BattleText3 ; TextBeforeBattle
|
|
|
|
dw Route16AfterBattleText3 ; TextAfterBattle
|
|
|
|
dw Route16EndBattleText3 ; TextEndBattle
|
|
|
|
dw Route16EndBattleText3 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader3:
|
2015-07-21 01:32:02 +00:00
|
|
|
dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_3
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($2 << 4) ; trainer's view range
|
2015-07-21 01:32:02 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_3
|
2015-07-03 19:38:12 +00:00
|
|
|
dw Route16BattleText4 ; TextBeforeBattle
|
|
|
|
dw Route16AfterBattleText4 ; TextAfterBattle
|
|
|
|
dw Route16EndBattleText4 ; TextEndBattle
|
|
|
|
dw Route16EndBattleText4 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader4:
|
2015-07-21 01:32:02 +00:00
|
|
|
dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_4
|
2014-05-18 18:19:10 +00:00
|
|
|
db ($2 << 4) ; trainer's view range
|
2015-07-21 01:32:02 +00:00
|
|
|
dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_4
|
2015-07-03 19:38:12 +00:00
|
|
|
dw Route16BattleText5 ; TextBeforeBattle
|
|
|
|
dw Route16AfterBattleText5 ; TextAfterBattle
|
|
|
|
dw Route16EndBattleText5 ; TextEndBattle
|
|
|
|
dw Route16EndBattleText5 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16TrainerHeader5:
|
2015-07-21 01:32:02 +00:00
|
|
|
dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_5
|
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_ROUTE_16_TRAINER_5
|
2015-07-03 19:38:12 +00:00
|
|
|
dw Route16BattleText6 ; TextBeforeBattle
|
|
|
|
dw Route16AfterBattleText6 ; TextAfterBattle
|
|
|
|
dw Route16EndBattleText6 ; TextEndBattle
|
|
|
|
dw Route16EndBattleText6 ; TextEndBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
db $ff
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text1:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader0
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16BattleText1:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16BattleText1
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16EndBattleText1:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16EndBattleText1
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16AfterBattleText1:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16AfterBattleText1
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text2:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader1
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16BattleText2:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16BattleText2
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16EndBattleText2:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16EndBattleText2
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16AfterBattleText2:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16AfterBattleText2
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text3:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader2
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16BattleText3:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16BattleText3
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16EndBattleText3:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16EndBattleText3
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16AfterBattleText3:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16AfterBattleText3
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text4:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader3
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16BattleText4:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16BattleText4
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16EndBattleText4:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16EndBattleText4
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16AfterBattleText4:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16AfterBattleText4
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text5:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader4
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16BattleText5:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16BattleText5
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16EndBattleText5:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16EndBattleText5
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16AfterBattleText5:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16AfterBattleText5
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text6:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16TrainerHeader5
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16BattleText6:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16BattleText6
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16EndBattleText6:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16EndBattleText6
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16AfterBattleText6:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16AfterBattleText6
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text7:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16Text7
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text10:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16Text10
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text11:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16Text11
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text8:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16Text8
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route16Text9:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route16Text9
|
|
|
|
db "@"
|