pokered-rematch/scripts/victoryroad3.asm

198 lines
4.4 KiB
NASM
Raw Permalink Normal View History

VictoryRoad3Script:
2014-05-18 18:19:10 +00:00
call VictoryRoad3Script_44996
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad3TrainerHeader0
2014-05-18 18:19:10 +00:00
ld de, VictoryRoad3ScriptPointers
2015-08-31 02:38:41 +00:00
ld a, [wVictoryRoad3CurScript]
2014-05-18 18:19:10 +00:00
call ExecuteCurMapScriptInTable
2015-08-31 02:38:41 +00:00
ld [wVictoryRoad3CurScript], a
2014-05-18 18:19:10 +00:00
ret
VictoryRoad3Script_44996:
2016-01-03 19:17:10 +00:00
ld hl, wCurrentMapScriptFlags
2014-05-18 18:19:10 +00:00
bit 5, [hl]
res 5, [hl]
ret z
2015-07-21 17:36:03 +00:00
CheckEventHL EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
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, 5, 3
2014-09-14 18:29:18 +00:00
predef_jump ReplaceTileBlock
2014-05-18 18:19:10 +00:00
VictoryRoad3ScriptPointers:
2014-05-18 18:19:10 +00:00
dw VictoryRoad3Script0
2014-09-14 18:29:18 +00:00
dw DisplayEnemyTrainerTextAndStartBattle
2014-05-18 18:19:10 +00:00
dw EndTrainerBattle
VictoryRoad3Script0:
2014-05-18 18:19:10 +00:00
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
jp z, .asm_449fe
ld hl, .coordsData_449f9
2014-05-18 18:19:10 +00:00
call CheckBoulderCoords
jp nc, .asm_449fe
2015-07-19 03:49:52 +00:00
ld a, [wCoordIndex]
2014-05-18 18:19:10 +00:00
cp $1
jr nz, .asm_449dc
2016-01-03 19:17:10 +00:00
ld hl, wCurrentMapScriptFlags
2014-05-18 18:19:10 +00:00
set 5, [hl]
2015-07-21 17:36:03 +00:00
SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
2014-05-18 18:19:10 +00:00
ret
.asm_449dc
2015-07-21 17:36:03 +00:00
CheckAndSetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2
2014-05-18 18:19:10 +00:00
jr nz, .asm_449fe
ld a, HS_VICTORY_ROAD_3_BOULDER
2015-07-25 03:27:59 +00:00
ld [wMissableObjectIndex], a
predef HideObject
ld a, HS_VICTORY_ROAD_2_BOULDER
2015-07-25 03:27:59 +00:00
ld [wMissableObjectIndex], a
predef_jump ShowObject
2014-05-18 18:19:10 +00:00
.coordsData_449f9:
2014-05-18 18:19:10 +00:00
db $05,$03
db $0F,$17
db $FF
.asm_449fe
2015-07-19 03:49:52 +00:00
ld a, VICTORY_ROAD_2
2014-09-13 07:50:56 +00:00
ld [wDungeonWarpDestinationMap], a
ld hl, .coordsData_449f9
2015-07-19 03:49:52 +00:00
call IsPlayerOnDungeonWarp
ld a, [wCoordIndex]
2014-05-18 18:19:10 +00:00
cp $1
jr nz, .asm_44a1b
ld hl, wd72d
2014-05-18 18:19:10 +00:00
res 4, [hl]
ld hl, wd732
2014-05-18 18:19:10 +00:00
res 4, [hl]
ret
.asm_44a1b
ld a, [wd72d]
2014-05-18 18:19:10 +00:00
bit 4, a
jp z, CheckFightingMapTrainers
ret
VictoryRoad3TextPointers:
2014-05-18 18:19:10 +00:00
dw VictoryRoad3Text1
dw VictoryRoad3Text2
dw VictoryRoad3Text3
dw VictoryRoad3Text4
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
dw BoulderText
VictoryRoad3TrainerHeader0:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0
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_VICTORY_ROAD_3_TRAINER_0
dw VictoryRoad3BattleText2 ; TextBeforeBattle
dw VictoryRoad3AfterBattleText2 ; TextAfterBattle
dw VictoryRoad3EndBattleText2 ; TextEndBattle
dw VictoryRoad3EndBattleText2 ; TextEndBattle
2014-05-18 18:19:10 +00:00
VictoryRoad3TrainerHeader1:
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1
2014-05-18 18:19:10 +00:00
db ($4 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1
dw VictoryRoad3BattleText3 ; TextBeforeBattle
dw VictoryRoad3AfterBattleText3 ; TextAfterBattle
dw VictoryRoad3EndBattleText3 ; TextEndBattle
dw VictoryRoad3EndBattleText3 ; TextEndBattle
2014-05-18 18:19:10 +00:00
VictoryRoad3TrainerHeader2:
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2
2014-05-18 18:19:10 +00:00
db ($4 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2
dw VictoryRoad3BattleText4 ; TextBeforeBattle
dw VictoryRoad3AfterBattleText4 ; TextAfterBattle
dw VictoryRoad3EndBattleText4 ; TextEndBattle
dw VictoryRoad3EndBattleText4 ; TextEndBattle
2014-05-18 18:19:10 +00:00
VictoryRoad3TrainerHeader3:
dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3
2014-05-18 18:19:10 +00:00
db ($4 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3
dw VictoryRoad3BattleText5 ; TextBeforeBattle
dw VictoryRoad3AfterBattleText5 ; TextAfterBattle
dw VictoryRoad3EndBattleText5 ; TextEndBattle
dw VictoryRoad3EndBattleText5 ; TextEndBattle
2014-05-18 18:19:10 +00:00
db $ff
VictoryRoad3Text1:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, VictoryRoad3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text2:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, VictoryRoad3TrainerHeader1
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text3:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, VictoryRoad3TrainerHeader2
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text4:
2015-07-03 19:58:50 +00:00
TX_ASM
ld hl, VictoryRoad3TrainerHeader3
2014-05-18 18:19:10 +00:00
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3BattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3BattleText2
db "@"
VictoryRoad3EndBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3EndBattleText2
db "@"
VictoryRoad3AfterBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3AfterBattleText2
db "@"
VictoryRoad3BattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3BattleText3
db "@"
VictoryRoad3EndBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3EndBattleText3
db "@"
VictoryRoad3AfterBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3AfterBattleText3
db "@"
VictoryRoad3BattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3BattleText4
db "@"
VictoryRoad3EndBattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3EndBattleText4
db "@"
VictoryRoad3AfterBattleText4:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3AfterBattleText4
db "@"
VictoryRoad3BattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3BattleText5
db "@"
VictoryRoad3EndBattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3EndBattleText5
db "@"
VictoryRoad3AfterBattleText5:
2014-05-18 18:19:10 +00:00
TX_FAR _VictoryRoad3AfterBattleText5
db "@"