pokered/scripts/victoryroad1.asm

105 lines
2.6 KiB
NASM
Raw Normal View History

2014-05-18 18:19:10 +00:00
VictoryRoad1Script: ; 5da0a (17:5a0a)
ld hl, wd126
2014-05-18 18:19:10 +00:00
bit 5, [hl]
res 5, [hl]
call nz, .next
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad1TrainerHeaders
ld de, VictoryRoad1ScriptPointers
2015-08-31 02:38:41 +00:00
ld a, [wVictoryRoad1CurScript]
2014-05-18 18:19:10 +00:00
call ExecuteCurMapScriptInTable
2015-08-31 02:38:41 +00:00
ld [wVictoryRoad1CurScript], a
2014-05-18 18:19:10 +00:00
ret
.next
2015-07-21 17:36:03 +00:00
CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
2014-05-18 18:19:10 +00:00
ret z
ld a, $1d
2015-07-24 21:39:45 +00:00
ld [wNewTileBlockID], a
2015-08-05 21:20:29 +00:00
lb bc, 6, 4
2014-09-14 18:29:18 +00:00
predef_jump ReplaceTileBlock
2014-05-18 18:19:10 +00:00
VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a)
dw VictoryRoad1Script0
2014-09-14 18:29:18 +00:00
dw DisplayEnemyTrainerTextAndStartBattle
2014-05-18 18:19:10 +00:00
dw EndTrainerBattle
VictoryRoad1Script0: ; 5da40 (17:5a40)
2015-07-21 17:36:03 +00:00
CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
2014-05-18 18:19:10 +00:00
jp nz, CheckFightingMapTrainers
ld hl, CoordsData_5da5c
2014-05-18 18:19:10 +00:00
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
ld hl, wd126
2014-05-18 18:19:10 +00:00
set 5, [hl]
2015-07-21 17:36:03 +00:00
SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
2014-05-18 18:19:10 +00:00
ret
CoordsData_5da5c: ; 5da5c (17:5a5c)
db $0D,$11,$FF
VictoryRoad1TextPointers: ; 5da5f (17:5a5f)
dw VictoryRoad1Text1
dw VictoryRoad1Text2
2015-07-18 15:17:29 +00:00
dw PickUpItemText
dw PickUpItemText
2014-05-18 18:19:10 +00:00
dw BoulderText
dw BoulderText
dw BoulderText
VictoryRoad1TrainerHeaders: ; 5da6d (17:5a6d)
VictoryRoad1TrainerHeader0: ; 5da6d (17:5a6d)
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0
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_VICTORY_ROAD_1_TRAINER_0
dw VictoryRoad1BattleText1 ; TextBeforeBattle
dw VictoryRoad1AfterBattleText1 ; TextAfterBattle
dw VictoryRoad1EndBattleText1 ; TextEndBattle
dw VictoryRoad1EndBattleText1 ; TextEndBattle
2014-05-18 18:19:10 +00:00
VictoryRoad1TrainerHeader1: ; 5da79 (17:5a79)
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_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_VICTORY_ROAD_1_TRAINER_1
dw VictoryRoad1BattleText2 ; TextBeforeBattle
dw VictoryRoad1AfterBattleText2 ; TextAfterBattle
dw VictoryRoad1EndBattleText2 ; TextEndBattle
dw VictoryRoad1EndBattleText2 ; TextEndBattle
2014-05-18 18:19:10 +00:00
db $ff
VictoryRoad1Text1: ; 5da86 (17:5a86)
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, VictoryRoad1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad1Text2: ; 5da90 (17:5a90)
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, VictoryRoad1TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
VictoryRoad1BattleText1: ; 5da9a (17:5a9a)
TX_FAR _VictoryRoad1BattleText1
db "@"
VictoryRoad1EndBattleText1: ; 5da9f (17:5a9f)
TX_FAR _VictoryRoad1EndBattleText1
db "@"
VictoryRoad1AfterBattleText1: ; 5daa4 (17:5aa4)
TX_FAR _VictoryRoad1AfterBattleText1
db "@"
VictoryRoad1BattleText2: ; 5daa9 (17:5aa9)
TX_FAR _VictoryRoad1BattleText2
db "@"
VictoryRoad1EndBattleText2: ; 5daae (17:5aae)
TX_FAR _VictoryRoad1EndBattleText2
db "@"
VictoryRoad1AfterBattleText2: ; 5dab3 (17:5ab3)
TX_FAR _VictoryRoad1AfterBattleText2
db "@"