diff options
Diffstat (limited to 'scripts/VermilionGym.asm')
| -rw-r--r-- | scripts/VermilionGym.asm | 166 |
1 files changed, 84 insertions, 82 deletions
diff --git a/scripts/VermilionGym.asm b/scripts/VermilionGym.asm index 3bbb8743..a4fab952 100644 --- a/scripts/VermilionGym.asm +++ b/scripts/VermilionGym.asm @@ -49,36 +49,37 @@ VermilionGymResetScripts: ret VermilionGym_ScriptPointers: - dw CheckFightingMapTrainers - dw DisplayEnemyTrainerTextAndStartBattle - dw EndTrainerBattle - dw VermilionGymLTSurgePostBattle + def_script_pointers + dw_const CheckFightingMapTrainers, SCRIPT_VERMILIONGYM_DEFAULT + dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VERMILIONGYM_START_BATTLE + dw_const EndTrainerBattle, SCRIPT_VERMILIONGYM_END_BATTLE + dw_const VermilionGymLTSurgeAfterBattleScript, SCRIPT_VERMILIONGYM_LT_SURGE_AFTER_BATTLE -VermilionGymLTSurgePostBattle: +VermilionGymLTSurgeAfterBattleScript: ld a, [wIsInBattle] cp $ff ; did we lose? jp z, VermilionGymResetScripts ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a -VermilionGymReceiveTM24: - ld a, $6 +VermilionGymLTSurgeReceiveTM24Script: + ld a, TEXT_VERMILIONGYM_LT_SURGE_THUNDER_BADGE_INFO ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_LT_SURGE lb bc, TM_THUNDERBOLT, 1 call GiveItem - jr nc, .BagFull - ld a, $7 + jr nc, .bag_full + ld a, TEXT_VERMILIONGYM_LT_SURGE_RECEIVED_TM24 ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM24 - jr .gymVictory -.BagFull - ld a, $8 + jr .gym_victory +.bag_full + ld a, TEXT_VERMILIONGYM_LT_SURGE_TM24_NO_ROOM ldh [hSpriteIndexOrTextID], a call DisplayTextID -.gymVictory +.gym_victory ld hl, wObtainedBadges set BIT_THUNDERBADGE, [hl] ld hl, wBeatGymFlags @@ -90,46 +91,47 @@ VermilionGymReceiveTM24: jp VermilionGymResetScripts VermilionGym_TextPointers: - dw LTSurgeText - dw VermilionGymTrainerText1 - dw VermilionGymTrainerText2 - dw VermilionGymTrainerText3 - dw VermilionGymGuideText - dw LTSurgeThunderBadgeInfoText - dw ReceivedTM24Text - dw TM24NoRoomText + def_text_pointers + dw_const VermilionGymLTSurgeText, TEXT_VERMILIONGYM_LT_SURGE + dw_const VermilionGymGentlemanText, TEXT_VERMILIONGYM_GENTLEMAN + dw_const VermilionGymSuperNerdText, TEXT_VERMILIONGYM_SUPER_NERD + dw_const VermilionGymSailorText, TEXT_VERMILIONGYM_SAILOR + dw_const VermilionGymGymGuideText, TEXT_VERMILIONGYM_GYM_GUIDE + dw_const VermilionGymLTSurgeThunderBadgeInfoText, TEXT_VERMILIONGYM_LT_SURGE_THUNDER_BADGE_INFO + dw_const VermilionGymLTSurgeReceivedTM24Text, TEXT_VERMILIONGYM_LT_SURGE_RECEIVED_TM24 + dw_const VermilionGymLTSurgeTM24NoRoomText, TEXT_VERMILIONGYM_LT_SURGE_TM24_NO_ROOM VermilionGymTrainerHeaders: def_trainers 2 VermilionGymTrainerHeader0: - trainer EVENT_BEAT_VERMILION_GYM_TRAINER_0, 3, VermilionGymBattleText1, VermilionGymEndBattleText1, VermilionGymAfterBattleText1 + trainer EVENT_BEAT_VERMILION_GYM_TRAINER_0, 3, VermilionGymGentlemanBattleText, VermilionGymGentlemanEndBattleText, VermilionGymGentlemanAfterBattleText VermilionGymTrainerHeader1: - trainer EVENT_BEAT_VERMILION_GYM_TRAINER_1, 2, VermilionGymBattleText2, VermilionGymEndBattleText2, VermilionGymAfterBattleText2 + trainer EVENT_BEAT_VERMILION_GYM_TRAINER_1, 2, VermilionGymSuperNerdBattleText, VermilionGymSuperNerdEndBattleText, VermilionGymSuperNerdAfterBattleText VermilionGymTrainerHeader2: - trainer EVENT_BEAT_VERMILION_GYM_TRAINER_2, 3, VermilionGymBattleText3, VermilionGymEndBattleText3, VermilionGymAfterBattleText3 + trainer EVENT_BEAT_VERMILION_GYM_TRAINER_2, 3, VermilionGymSailorBattleText, VermilionGymSailorEndBattleText, VermilionGymSailorAfterBattleText db -1 ; end -LTSurgeText: +VermilionGymLTSurgeText: text_asm CheckEvent EVENT_BEAT_LT_SURGE - jr z, .beforeBeat + jr z, .before_beat CheckEventReuseA EVENT_GOT_TM24 - jr nz, .afterBeat - call z, VermilionGymReceiveTM24 + jr nz, .got_tm24_already + call z, VermilionGymLTSurgeReceiveTM24Script call DisableWaitingAfterTextDisplay - jr .done -.afterBeat - ld hl, LTSurgePostBattleAdviceText + jr .text_script_end +.got_tm24_already + ld hl, .PostBattleAdviceText call PrintText - jr .done -.beforeBeat - ld hl, LTSurgePreBattleText + jr .text_script_end +.before_beat + ld hl, .PreBattleText call PrintText ld hl, wd72d set 6, [hl] set 7, [hl] - ld hl, ReceivedThunderBadgeText - ld de, ReceivedThunderBadgeText + ld hl, VermilionGymLTSurgeReceivedThunderBadgeText + ld de, VermilionGymLTSurgeReceivedThunderBadgeText call SaveEndBattleTextPointers ldh a, [hSpriteIndex] ld [wSpriteIndex], a @@ -139,110 +141,110 @@ LTSurgeText: ld [wGymLeaderNo], a xor a ldh [hJoyHeld], a - ld a, $3 ; set script index to LT Surge post-battle script + ld a, SCRIPT_VERMILIONGYM_LT_SURGE_AFTER_BATTLE ld [wVermilionGymCurScript], a ld [wCurMapScript], a -.done +.text_script_end jp TextScriptEnd -LTSurgePreBattleText: - text_far _LTSurgePreBattleText +.PreBattleText: + text_far _VermilionGymLTSurgePreBattleText text_end -LTSurgePostBattleAdviceText: - text_far _LTSurgePostBattleAdviceText +.PostBattleAdviceText: + text_far _VermilionGymLTSurgePostBattleAdviceText text_end -LTSurgeThunderBadgeInfoText: - text_far _LTSurgeThunderBadgeInfoText +VermilionGymLTSurgeThunderBadgeInfoText: + text_far _VermilionGymLTSurgeThunderBadgeInfoText text_end -ReceivedTM24Text: - text_far _ReceivedTM24Text +VermilionGymLTSurgeReceivedTM24Text: + text_far _VermilionGymLTSurgeReceivedTM24Text sound_get_key_item text_far _TM24ExplanationText text_end -TM24NoRoomText: - text_far _TM24NoRoomText +VermilionGymLTSurgeTM24NoRoomText: + text_far _VermilionGymLTSurgeTM24NoRoomText text_end -ReceivedThunderBadgeText: - text_far _ReceivedThunderBadgeText +VermilionGymLTSurgeReceivedThunderBadgeText: + text_far _VermilionGymLTSurgeReceivedThunderBadgeText text_end -VermilionGymTrainerText1: +VermilionGymGentlemanText: text_asm ld hl, VermilionGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -VermilionGymBattleText1: - text_far _VermilionGymBattleText1 +VermilionGymGentlemanBattleText: + text_far _VermilionGymGentlemanBattleText text_end -VermilionGymEndBattleText1: - text_far _VermilionGymEndBattleText1 +VermilionGymGentlemanEndBattleText: + text_far _VermilionGymGentlemanEndBattleText text_end -VermilionGymAfterBattleText1: - text_far _VermilionGymAfterBattleText1 +VermilionGymGentlemanAfterBattleText: + text_far _VermilionGymGentlemanAfterBattleText text_end -VermilionGymTrainerText2: +VermilionGymSuperNerdText: text_asm ld hl, VermilionGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd -VermilionGymBattleText2: - text_far _VermilionGymBattleText2 +VermilionGymSuperNerdBattleText: + text_far _VermilionGymSuperNerdBattleText text_end -VermilionGymEndBattleText2: - text_far _VermilionGymEndBattleText2 +VermilionGymSuperNerdEndBattleText: + text_far _VermilionGymSuperNerdEndBattleText text_end -VermilionGymAfterBattleText2: - text_far _VermilionGymAfterBattleText2 +VermilionGymSuperNerdAfterBattleText: + text_far _VermilionGymSuperNerdAfterBattleText text_end -VermilionGymTrainerText3: +VermilionGymSailorText: text_asm ld hl, VermilionGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd -VermilionGymBattleText3: - text_far _VermilionGymBattleText3 +VermilionGymSailorBattleText: + text_far _VermilionGymSailorBattleText text_end -VermilionGymEndBattleText3: - text_far _VermilionGymEndBattleText3 +VermilionGymSailorEndBattleText: + text_far _VermilionGymSailorEndBattleText text_end -VermilionGymAfterBattleText3: - text_far _VermilionGymAfterBattleText3 +VermilionGymSailorAfterBattleText: + text_far _VermilionGymSailorAfterBattleText text_end -VermilionGymGuideText: +VermilionGymGymGuideText: text_asm ld a, [wBeatGymFlags] bit BIT_THUNDERBADGE, a - jr nz, .afterBeat - ld hl, VermilionGymGuidePreBattleText + jr nz, .got_thunderbadge + ld hl, .ChampInMakingText call PrintText - jr .done -.afterBeat - ld hl, VermilionGymGuidePostBattleText + jr .text_script_end +.got_thunderbadge + ld hl, .BeatLTSurgeText call PrintText -.done +.text_script_end jp TextScriptEnd -VermilionGymGuidePreBattleText: - text_far _VermilionGymGuidePreBattleText +.ChampInMakingText: + text_far _VermilionGymGymGuideChampInMakingText text_end -VermilionGymGuidePostBattleText: - text_far _VermilionGymGuidePostBattleText +.BeatLTSurgeText: + text_far _VermilionGymGymGuideBeatLTSurgeText text_end |
