diff options
| author | dannye <33dannye@gmail.com> | 2023-11-20 00:33:27 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2023-11-20 20:23:27 -0600 |
| commit | 298e99d3776580585c3f434e5d93137ae431bdd3 (patch) | |
| tree | a808c4ffd0fd0f9bd28972bae5236e0d3345c8e5 /scripts/VictoryRoad2F.asm | |
| parent | Add sound bits documentation for wOptions (#110) (diff) | |
| parent | Name 2 unnamed labels I missed in SeafoamIslandsB4F and PokemonMansion3F (#437) (diff) | |
| download | pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.gz pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.xz pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'scripts/VictoryRoad2F.asm')
| -rw-r--r-- | scripts/VictoryRoad2F.asm | 153 |
1 files changed, 78 insertions, 75 deletions
diff --git a/scripts/VictoryRoad2F.asm b/scripts/VictoryRoad2F.asm index 2bf46e98..67244ef4 100644 --- a/scripts/VictoryRoad2F.asm +++ b/scripts/VictoryRoad2F.asm @@ -2,11 +2,11 @@ VictoryRoad2F_Script: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] - call nz, VictoryRoad2Script_517c4 + call nz, VictoryRoad2FResetBoulderEventScript ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] - call nz, VictoryRoad2Script_517c9 + call nz, VictoryRoad2FCheckBoulderEventScript call EnableAutoTextBoxDrawing ld hl, VictoryRoad2TrainerHeaders ld de, VictoryRoad2F_ScriptPointers @@ -15,33 +15,35 @@ VictoryRoad2F_Script: ld [wVictoryRoad2FCurScript], a ret -VictoryRoad2Script_517c4: +VictoryRoad2FResetBoulderEventScript: ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH -VictoryRoad2Script_517c9: +; fallthrough +VictoryRoad2FCheckBoulderEventScript: CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 - jr z, .asm_517da + jr z, .not_on_switch push af ld a, $15 lb bc, 4, 3 - call VictoryRoad2Script_517e2 + call VictoryRoad2FReplaceTileBlockScript pop af -.asm_517da +.not_on_switch bit 7, a ret z ld a, $1d lb bc, 7, 11 -VictoryRoad2Script_517e2: +VictoryRoad2FReplaceTileBlockScript: ld [wNewTileBlockID], a predef ReplaceTileBlock ret VictoryRoad2F_ScriptPointers: - dw VictoryRoad2Script0 - dw DisplayEnemyTrainerTextAndStartBattle - dw EndTrainerBattle + def_script_pointers + dw_const VictoryRoad2FDefaultScript, SCRIPT_VICTORYROAD2F_DEFAULT + dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VICTORYROAD2F_START_BATTLE + dw_const EndTrainerBattle, SCRIPT_VICTORYROAD2F_END_BATTLE -VictoryRoad2Script0: - ld hl, CoordsData_51816 +VictoryRoad2FDefaultScript: + ld hl, .SwitchCoords call CheckBoulderCoords jp nc, CheckFightingMapTrainers ldh a, [hSpriteIndexOrTextID] @@ -50,156 +52,157 @@ VictoryRoad2Script0: EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ld a, [wCoordIndex] cp $2 - jr z, .asm_5180b + jr z, .second_switch CheckEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ret nz - jr .asm_51810 -.asm_5180b + jr .set_script_flag +.second_switch CheckEventAfterBranchReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2 ret nz -.asm_51810 +.set_script_flag ld hl, wCurrentMapScriptFlags set 5, [hl] ret -CoordsData_51816: +.SwitchCoords: dbmapcoord 1, 16 dbmapcoord 9, 16 db -1 ; end VictoryRoad2F_TextPointers: - dw VictoryRoad2Text1 - dw VictoryRoad2Text2 - dw VictoryRoad2Text3 - dw VictoryRoad2Text4 - dw VictoryRoad2Text5 - dw MoltresText - dw PickUpItemText - dw PickUpItemText - dw PickUpItemText - dw PickUpItemText - dw BoulderText - dw BoulderText - dw BoulderText + def_text_pointers + dw_const VictoryRoad2FHikerText, TEXT_VICTORYROAD2F_HIKER + dw_const VictoryRoad2FSuperNerd1Text, TEXT_VICTORYROAD2F_SUPER_NERD1 + dw_const VictoryRoad2FCooltrainerMText, TEXT_VICTORYROAD2F_COOLTRAINER_M + dw_const VictoryRoad2FSuperNerd2Text, TEXT_VICTORYROAD2F_SUPER_NERD2 + dw_const VictoryRoad2FSuperNerd3Text, TEXT_VICTORYROAD2F_SUPER_NERD3 + dw_const VictoryRoad2FMoltresText, TEXT_VICTORYROAD2F_MOLTRES + dw_const PickUpItemText, TEXT_VICTORYROAD2F_TM_SUBMISSION + dw_const PickUpItemText, TEXT_VICTORYROAD2F_FULL_HEAL + dw_const PickUpItemText, TEXT_VICTORYROAD2F_TM_MEGA_KICK + dw_const PickUpItemText, TEXT_VICTORYROAD2F_GUARD_SPEC + dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER1 + dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER2 + dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER3 VictoryRoad2TrainerHeaders: def_trainers VictoryRoad2TrainerHeader0: - trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0, 4, VictoryRoad2BattleText1, VictoryRoad2EndBattleText1, VictoryRoad2AfterBattleText1 + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0, 4, VictoryRoad2FHikerBattleText, VictoryRoad2FHikerEndBattleText, VictoryRoad2FHikerAfterBattleText VictoryRoad2TrainerHeader1: - trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1, 3, VictoryRoad2BattleText2, VictoryRoad2EndBattleText2, VictoryRoad2AfterBattleText2 + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1, 3, VictoryRoad2FSuperNerd1BattleText, VictoryRoad2FSuperNerd1EndBattleText, VictoryRoad2FSuperNerd1AfterBattleText VictoryRoad2TrainerHeader2: - trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2, 3, VictoryRoad2BattleText3, VictoryRoad2EndBattleText3, VictoryRoad2AfterBattleText3 + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2, 3, VictoryRoad2FCooltrainerMBattleText, VictoryRoad2FCooltrainerMEndBattleText, VictoryRoad2FCooltrainerMAfterBattleText VictoryRoad2TrainerHeader3: - trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3, 1, VictoryRoad2BattleText4, VictoryRoad2EndBattleText4, VictoryRoad2AfterBattleText4 + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3, 1, VictoryRoad2FSuperNerd2BattleText, VictoryRoad2FSuperNerd2EndBattleText, VictoryRoad2FSuperNerd2AfterBattleText VictoryRoad2TrainerHeader4: - trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4, 3, VictoryRoad2BattleText5, VictoryRoad2EndBattleText5, VictoryRoad2AfterBattleText5 + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4, 3, VictoryRoad2FSuperNerd3BattleText, VictoryRoad2FSuperNerd3EndBattleText, VictoryRoad2FSuperNerd3AfterBattleText MoltresTrainerHeader: - trainer EVENT_BEAT_MOLTRES, 0, MoltresBattleText, MoltresBattleText, MoltresBattleText + trainer EVENT_BEAT_MOLTRES, 0, VictoryRoad2FMoltresBattleText, VictoryRoad2FMoltresBattleText, VictoryRoad2FMoltresBattleText db -1 ; end -VictoryRoad2Text1: +VictoryRoad2FHikerText: text_asm ld hl, VictoryRoad2TrainerHeader0 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text2: +VictoryRoad2FSuperNerd1Text: text_asm ld hl, VictoryRoad2TrainerHeader1 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text3: +VictoryRoad2FCooltrainerMText: text_asm ld hl, VictoryRoad2TrainerHeader2 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text4: +VictoryRoad2FSuperNerd2Text: text_asm ld hl, VictoryRoad2TrainerHeader3 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text5: +VictoryRoad2FSuperNerd3Text: text_asm ld hl, VictoryRoad2TrainerHeader4 call TalkToTrainer jp TextScriptEnd -MoltresText: +VictoryRoad2FMoltresText: text_asm ld hl, MoltresTrainerHeader call TalkToTrainer jp TextScriptEnd -MoltresBattleText: - text_far _MoltresBattleText +VictoryRoad2FMoltresBattleText: + text_far _VictoryRoad2FMoltresBattleText text_asm ld a, MOLTRES call PlayCry call WaitForSoundToFinish jp TextScriptEnd -VictoryRoad2BattleText1: - text_far _VictoryRoad2BattleText1 +VictoryRoad2FHikerBattleText: + text_far _VictoryRoad2FHikerBattleText text_end -VictoryRoad2EndBattleText1: - text_far _VictoryRoad2EndBattleText1 +VictoryRoad2FHikerEndBattleText: + text_far _VictoryRoad2FHikerEndBattleText text_end -VictoryRoad2AfterBattleText1: - text_far _VictoryRoad2AfterBattleText1 +VictoryRoad2FHikerAfterBattleText: + text_far _VictoryRoad2FHikerAfterBattleText text_end -VictoryRoad2BattleText2: - text_far _VictoryRoad2BattleText2 +VictoryRoad2FSuperNerd1BattleText: + text_far _VictoryRoad2FSuperNerd1BattleText text_end -VictoryRoad2EndBattleText2: - text_far _VictoryRoad2EndBattleText2 +VictoryRoad2FSuperNerd1EndBattleText: + text_far _VictoryRoad2FSuperNerd1EndBattleText text_end -VictoryRoad2AfterBattleText2: - text_far _VictoryRoad2AfterBattleText2 +VictoryRoad2FSuperNerd1AfterBattleText: + text_far _VictoryRoad2FSuperNerd1AfterBattleText text_end -VictoryRoad2BattleText3: - text_far _VictoryRoad2BattleText3 +VictoryRoad2FCooltrainerMBattleText: + text_far _VictoryRoad2FCooltrainerMBattleText text_end -VictoryRoad2EndBattleText3: - text_far _VictoryRoad2EndBattleText3 +VictoryRoad2FCooltrainerMEndBattleText: + text_far _VictoryRoad2FCooltrainerMEndBattleText text_end -VictoryRoad2AfterBattleText3: - text_far _VictoryRoad2AfterBattleText3 +VictoryRoad2FCooltrainerMAfterBattleText: + text_far _VictoryRoad2FCooltrainerMAfterBattleText text_end -VictoryRoad2BattleText4: - text_far _VictoryRoad2BattleText4 +VictoryRoad2FSuperNerd2BattleText: + text_far _VictoryRoad2FSuperNerd2BattleText text_end -VictoryRoad2EndBattleText4: - text_far _VictoryRoad2EndBattleText4 +VictoryRoad2FSuperNerd2EndBattleText: + text_far _VictoryRoad2FSuperNerd2EndBattleText text_end -VictoryRoad2AfterBattleText4: - text_far _VictoryRoad2AfterBattleText4 +VictoryRoad2FSuperNerd2AfterBattleText: + text_far _VictoryRoad2FSuperNerd2AfterBattleText text_end -VictoryRoad2BattleText5: - text_far _VictoryRoad2BattleText5 +VictoryRoad2FSuperNerd3BattleText: + text_far _VictoryRoad2FSuperNerd3BattleText text_end -VictoryRoad2EndBattleText5: - text_far _VictoryRoad2EndBattleText5 +VictoryRoad2FSuperNerd3EndBattleText: + text_far _VictoryRoad2FSuperNerd3EndBattleText text_end -VictoryRoad2AfterBattleText5: - text_far _VictoryRoad2AfterBattleText5 +VictoryRoad2FSuperNerd3AfterBattleText: + text_far _VictoryRoad2FSuperNerd3AfterBattleText text_end |
