diff options
Diffstat (limited to 'scripts/victoryroad1.asm')
-rwxr-xr-x | scripts/victoryroad1.asm | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm index b6d2bf3e..11f5d5db 100755 --- a/scripts/victoryroad1.asm +++ b/scripts/victoryroad1.asm @@ -11,12 +11,11 @@ VictoryRoad1Script: ; 5da0a (17:5a0a) ld [W_VICTORYROAD1CURSCRIPT], a ret .next - ld a, [wd869] - bit 7, a + CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ret z ld a, $1d - ld [wd09f], a - ld bc, $604 + ld [wNewTileBlockID], a + lb bc, 6, 4 predef_jump ReplaceTileBlock VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a) @@ -25,16 +24,14 @@ VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a) dw EndTrainerBattle VictoryRoad1Script0: ; 5da40 (17:5a40) - ld a, [wd869] - bit 7, a + CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH jp nz, CheckFightingMapTrainers - ld hl, CoordsData_5da5c ; $5a5c + ld hl, CoordsData_5da5c call CheckBoulderCoords jp nc, CheckFightingMapTrainers ld hl, wd126 set 5, [hl] - ld hl, wd869 - set 7, [hl] + SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ret CoordsData_5da5c: ; 5da5c (17:5a5c) @@ -43,41 +40,41 @@ CoordsData_5da5c: ; 5da5c (17:5a5c) VictoryRoad1TextPointers: ; 5da5f (17:5a5f) dw VictoryRoad1Text1 dw VictoryRoad1Text2 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw BoulderText dw BoulderText dw BoulderText VictoryRoad1TrainerHeaders: ; 5da6d (17:5a6d) VictoryRoad1TrainerHeader0: ; 5da6d (17:5a6d) - db $1 ; flag's bit + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 db ($2 << 4) ; trainer's view range - dw wd869 ; flag's byte - dw VictoryRoad1BattleText1 ; 0x5a9a TextBeforeBattle - dw VictoryRoad1AfterBattleText1 ; 0x5aa4 TextAfterBattle - dw VictoryRoad1EndBattleText1 ; 0x5a9f TextEndBattle - dw VictoryRoad1EndBattleText1 ; 0x5a9f TextEndBattle + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 + dw VictoryRoad1BattleText1 ; TextBeforeBattle + dw VictoryRoad1AfterBattleText1 ; TextAfterBattle + dw VictoryRoad1EndBattleText1 ; TextEndBattle + dw VictoryRoad1EndBattleText1 ; TextEndBattle VictoryRoad1TrainerHeader1: ; 5da79 (17:5a79) - db $2 ; flag's bit + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 db ($2 << 4) ; trainer's view range - dw wd869 ; flag's byte - dw VictoryRoad1BattleText2 ; 0x5aa9 TextBeforeBattle - dw VictoryRoad1AfterBattleText2 ; 0x5ab3 TextAfterBattle - dw VictoryRoad1EndBattleText2 ; 0x5aae TextEndBattle - dw VictoryRoad1EndBattleText2 ; 0x5aae TextEndBattle + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 + dw VictoryRoad1BattleText2 ; TextBeforeBattle + dw VictoryRoad1AfterBattleText2 ; TextAfterBattle + dw VictoryRoad1EndBattleText2 ; TextEndBattle + dw VictoryRoad1EndBattleText2 ; TextEndBattle db $ff VictoryRoad1Text1: ; 5da86 (17:5a86) - db $08 ; asm + TX_ASM ld hl, VictoryRoad1TrainerHeader0 call TalkToTrainer jp TextScriptEnd VictoryRoad1Text2: ; 5da90 (17:5a90) - db $08 ; asm + TX_ASM ld hl, VictoryRoad1TrainerHeader1 call TalkToTrainer jp TextScriptEnd |