pokered/scripts/route12.asm

289 lines
5.9 KiB
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
Route12Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
ld hl, Route12TrainerHeader0
2014-05-18 18:19:10 +00:00
ld de, Route12ScriptPointers
2015-08-31 02:38:41 +00:00
ld a, [wRoute12CurScript]
2014-05-18 18:19:10 +00:00
call ExecuteCurMapScriptInTable
2015-08-31 02:38:41 +00:00
ld [wRoute12CurScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
Route12Script_59606:
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 [wRoute12CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
Route12ScriptPointers:
2014-05-18 18:19:10 +00:00
dw Route12Script0
2014-09-14 18:29:18 +00:00
dw DisplayEnemyTrainerTextAndStartBattle
2014-05-18 18:19:10 +00:00
dw EndTrainerBattle
dw Route12Script3
2016-06-12 00:24:04 +00:00
Route12Script0:
2015-07-21 01:32:02 +00:00
CheckEventHL EVENT_BEAT_ROUTE12_SNORLAX
2014-05-18 18:19:10 +00:00
jp nz, CheckFightingMapTrainers
2015-07-21 01:32:02 +00:00
CheckEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
2014-05-18 18:19:10 +00:00
jp z, CheckFightingMapTrainers
ld a, $d
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
ld a, HS_ROUTE_12_SNORLAX
2015-07-25 03:27:59 +00:00
ld [wMissableObjectIndex], a
predef HideObject
2014-05-18 18:19:10 +00:00
ld a, $3
2015-08-31 02:38:41 +00:00
ld [wRoute12CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
Route12Script3:
2015-08-31 02:38:41 +00:00
ld a, [wIsInBattle]
2014-05-18 18:19:10 +00:00
cp $ff
jr z, Route12Script_59606
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_59664
ld a, $e
2015-07-18 15:17:29 +00:00
ld [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
.asm_59664
2015-07-21 01:32:02 +00:00
SetEvent EVENT_BEAT_ROUTE12_SNORLAX
2014-05-18 18:19:10 +00:00
call Delay3
ld a, $0
2015-08-31 02:38:41 +00:00
ld [wRoute12CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
Route12TextPointers:
2014-05-18 18:19:10 +00:00
dw Route12Text1
dw Route12Text2
dw Route12Text3
dw Route12Text4
dw Route12Text5
dw Route12Text6
dw Route12Text7
dw Route12Text8
2015-07-18 15:17:29 +00:00
dw PickUpItemText
dw PickUpItemText
2014-05-18 18:19:10 +00:00
dw Route12Text11
dw Route12Text12
dw Route12Text13
dw Route12Text14
2016-06-12 00:24:04 +00:00
Route12TrainerHeader0:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_ROUTE_12_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_ROUTE_12_TRAINER_0
dw Route12BattleText1 ; TextBeforeBattle
dw Route12AfterBattleText1 ; TextAfterBattle
dw Route12EndBattleText1 ; TextEndBattle
dw Route12EndBattleText1 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route12TrainerHeader1:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_1
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_12_TRAINER_1
dw Route12BattleText2 ; TextBeforeBattle
dw Route12AfterBattleText2 ; TextAfterBattle
dw Route12EndBattleText2 ; TextEndBattle
dw Route12EndBattleText2 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route12TrainerHeader2:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_2
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_12_TRAINER_2
dw Route12BattleText3 ; TextBeforeBattle
dw Route12AfterBattleText3 ; TextAfterBattle
dw Route12EndBattleText3 ; TextEndBattle
dw Route12EndBattleText3 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route12TrainerHeader3:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_3
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_12_TRAINER_3
dw Route12BattleText4 ; TextBeforeBattle
dw Route12AfterBattleText4 ; TextAfterBattle
dw Route12EndBattleText4 ; TextEndBattle
dw Route12EndBattleText4 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route12TrainerHeader4:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_4
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_12_TRAINER_4
dw Route12BattleText5 ; TextBeforeBattle
dw Route12AfterBattleText5 ; TextAfterBattle
dw Route12EndBattleText5 ; TextEndBattle
dw Route12EndBattleText5 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route12TrainerHeader5:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_ROUTE_12_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_12_TRAINER_5
dw Route12BattleText6 ; TextBeforeBattle
dw Route12AfterBattleText6 ; TextAfterBattle
dw Route12EndBattleText6 ; TextEndBattle
dw Route12EndBattleText6 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route12TrainerHeader6:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_6, 1
2014-05-18 18:19:10 +00:00
db ($1 << 4) ; trainer's view range
2015-07-21 01:32:02 +00:00
dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_6, 1
dw Route12BattleText7 ; TextBeforeBattle
dw Route12AfterBattleText7 ; TextAfterBattle
dw Route12EndBattleText7 ; TextEndBattle
dw Route12EndBattleText7 ; TextEndBattle
2014-05-18 18:19:10 +00:00
db $ff
2016-06-12 00:24:04 +00:00
Route12Text1:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12Text1
db "@"
2016-06-12 00:24:04 +00:00
Route12Text13:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12Text13
db "@"
2016-06-12 00:24:04 +00:00
Route12Text14:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12Text14
db "@"
2016-06-12 00:24:04 +00:00
Route12Text2:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, Route12TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route12BattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12BattleText1
db "@"
2016-06-12 00:24:04 +00:00
Route12EndBattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12EndBattleText1
db "@"
2016-06-12 00:24:04 +00:00
Route12AfterBattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12AfterBattleText1
db "@"
2016-06-12 00:24:04 +00:00
Route12Text3:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, Route12TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route12BattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12BattleText2
db "@"
2016-06-12 00:24:04 +00:00
Route12EndBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12EndBattleText2
db "@"
2016-06-12 00:24:04 +00:00
Route12AfterBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12AfterBattleText2
db "@"
2016-06-12 00:24:04 +00:00
Route12Text4:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, Route12TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route12BattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12BattleText3
db "@"
2016-06-12 00:24:04 +00:00
Route12EndBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12EndBattleText3
db "@"
2016-06-12 00:24:04 +00:00
Route12AfterBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12AfterBattleText3
db "@"
2016-06-12 00:24:04 +00:00
Route12Text5:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, Route12TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route12BattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12BattleText4
db "@"
2016-06-12 00:24:04 +00:00
Route12EndBattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12EndBattleText4
db "@"
2016-06-12 00:24:04 +00:00
Route12AfterBattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12AfterBattleText4
db "@"
2016-06-12 00:24:04 +00:00
Route12Text6:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, Route12TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route12BattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12BattleText5
db "@"
2016-06-12 00:24:04 +00:00
Route12EndBattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12EndBattleText5
db "@"
2016-06-12 00:24:04 +00:00
Route12AfterBattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12AfterBattleText5
db "@"
2016-06-12 00:24:04 +00:00
Route12Text7:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, Route12TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route12BattleText6:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12BattleText6
db "@"
2016-06-12 00:24:04 +00:00
Route12EndBattleText6:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12EndBattleText6
db "@"
2016-06-12 00:24:04 +00:00
Route12AfterBattleText6:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12AfterBattleText6
db "@"
2016-06-12 00:24:04 +00:00
Route12Text8:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, Route12TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route12BattleText7:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12BattleText7
db "@"
2016-06-12 00:24:04 +00:00
Route12EndBattleText7:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12EndBattleText7
db "@"
2016-06-12 00:24:04 +00:00
Route12AfterBattleText7:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12AfterBattleText7
db "@"
2016-06-12 00:24:04 +00:00
Route12Text11:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12Text11
db "@"
2016-06-12 00:24:04 +00:00
Route12Text12:
2014-05-18 18:19:10 +00:00
TX_FAR _Route12Text12
db "@"