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/FightingDojo.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/FightingDojo.asm')
| -rw-r--r-- | scripts/FightingDojo.asm | 187 |
1 files changed, 93 insertions, 94 deletions
diff --git a/scripts/FightingDojo.asm b/scripts/FightingDojo.asm index fc9f68ea..298c2fcb 100644 --- a/scripts/FightingDojo.asm +++ b/scripts/FightingDojo.asm @@ -7,20 +7,21 @@ FightingDojo_Script: ld [wFightingDojoCurScript], a ret -FightingDojoScript_5cd70: - xor a +FightingDojoResetScripts: + xor a ; SCRIPT_FIGHTINGDOJO_DEFAULT ld [wJoyIgnore], a ld [wFightingDojoCurScript], a ld [wCurMapScript], a ret FightingDojo_ScriptPointers: - dw FightingDojoScript1 - dw DisplayEnemyTrainerTextAndStartBattle - dw EndTrainerBattle - dw FightingDojoScript3 + def_script_pointers + dw_const FightingDojoDefaultScript, SCRIPT_FIGHTINGDOJO_DEFAULT + dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_FIGHTINGDOJO_START_BATTLE + dw_const EndTrainerBattle, SCRIPT_FIGHTINGDOJO_END_BATTLE + dw_const FightingDojoKarateMasterPostBattleScript, SCRIPT_FIGHTINGDOJO_KARATE_MASTER_POST_BATTLE -FightingDojoScript1: +FightingDojoDefaultScript: CheckEvent EVENT_DEFEATED_FIGHTING_DOJO ret nz call CheckFightingMapTrainers @@ -42,198 +43,197 @@ FightingDojoScript1: ld [wcf0d], a ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a - ld a, $1 + ld a, FIGHTINGDOJO_KARATE_MASTER ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay - ld a, $1 + ld a, TEXT_FIGHTINGDOJO_KARATE_MASTER ldh [hSpriteIndexOrTextID], a call DisplayTextID ret -FightingDojoScript3: +FightingDojoKarateMasterPostBattleScript: ld a, [wIsInBattle] cp $ff - jp z, FightingDojoScript_5cd70 + jp z, FightingDojoResetScripts ld a, [wcf0d] and a - jr z, .asm_5cde4 + jr z, .already_facing ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a - ld a, $1 + ld a, FIGHTINGDOJO_KARATE_MASTER ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay - -.asm_5cde4 - ld a, $f0 +.already_facing + ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a SetEventRange EVENT_BEAT_KARATE_MASTER, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 - ld a, $8 + ld a, TEXT_FIGHTINGDOJO_KARATE_MASTER_I_WILL_GIVE_YOU_A_POKEMON ldh [hSpriteIndexOrTextID], a call DisplayTextID - xor a + xor a ; SCRIPT_FIGHTINGDOJO_DEFAULT ld [wJoyIgnore], a ld [wFightingDojoCurScript], a ld [wCurMapScript], a ret FightingDojo_TextPointers: - dw FightingDojoText1 - dw FightingDojoText2 - dw FightingDojoText3 - dw FightingDojoText4 - dw FightingDojoText5 - dw FightingDojoText6 - dw FightingDojoText7 - dw FightingDojoText8 + def_text_pointers + dw_const FightingDojoKarateMasterText, TEXT_FIGHTINGDOJO_KARATE_MASTER + dw_const FightingDojoBlackbelt1Text, TEXT_FIGHTINGDOJO_BLACKBELT1 + dw_const FightingDojoBlackbelt2Text, TEXT_FIGHTINGDOJO_BLACKBELT2 + dw_const FightingDojoBlackbelt3Text, TEXT_FIGHTINGDOJO_BLACKBELT3 + dw_const FightingDojoBlackbelt4Text, TEXT_FIGHTINGDOJO_BLACKBELT4 + dw_const FightingDojoHitmonleePokeBallText, TEXT_FIGHTINGDOJO_HITMONLEE_POKE_BALL + dw_const FightingDojoHitmonchanPokeBallText, TEXT_FIGHTINGDOJO_HITMONCHAN_POKE_BALL + dw_const FightingDojoKarateMasterText.IWillGiveYouAPokemonText, TEXT_FIGHTINGDOJO_KARATE_MASTER_I_WILL_GIVE_YOU_A_POKEMON FightingDojoTrainerHeaders: def_trainers 2 FightingDojoTrainerHeader0: - trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_0, 4, FightingDojoBattleText1, FightingDojoEndBattleText1, FightingDojoAfterBattleText1 + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_0, 4, FightingDojoBlackbelt1BattleText, FightingDojoBlackbelt1EndBattleText, FightingDojoBlackbelt1AfterBattleText FightingDojoTrainerHeader1: - trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_1, 4, FightingDojoBattleText2, FightingDojoEndBattleText2, FightingDojoAfterBattleText2 + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_1, 4, FightingDojoBlackbelt2BattleText, FightingDojoBlackbelt2EndBattleText, FightingDojoBlackbelt2AfterBattleText FightingDojoTrainerHeader2: - trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_2, 3, FightingDojoBattleText3, FightingDojoEndBattleText3, FightingDojoAfterBattleText3 + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_2, 3, FightingDojoBlackbelt3BattleText, FightingDojoBlackbelt3EndBattleText, FightingDojoBlackbelt3AfterBattleText FightingDojoTrainerHeader3: - trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_3, 3, FightingDojoBattleText4, FightingDojoEndBattleText4, FightingDojoAfterBattleText4 + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_3, 3, FightingDojoBlackbelt4BattleText, FightingDojoBlackbelt4EndBattleText, FightingDojoBlackbelt4AfterBattleText db -1 ; end -FightingDojoText1: +FightingDojoKarateMasterText: text_asm CheckEvent EVENT_DEFEATED_FIGHTING_DOJO - jp nz, .continue1 + jp nz, .defeated_dojo CheckEventReuseA EVENT_BEAT_KARATE_MASTER - jp nz, .continue2 - ld hl, FightingDojoText_5ce8e + jp nz, .defeated_master + ld hl, .Text call PrintText ld hl, wd72d set 6, [hl] set 7, [hl] - ld hl, FightingDojoText_5ce93 - ld de, FightingDojoText_5ce93 + ld hl, .DefeatedText + ld de, .DefeatedText call SaveEndBattleTextPointers ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters - ld a, $3 + ld a, SCRIPT_FIGHTINGDOJO_KARATE_MASTER_POST_BATTLE ld [wFightingDojoCurScript], a ld [wCurMapScript], a - jr .asm_9dba4 -.continue1 - ld hl, FightingDojoText_5ce9d + jr .end +.defeated_dojo + ld hl, .StayAndTrainWithUsText call PrintText - jr .asm_9dba4 -.continue2 - ld hl, FightingDojoText8 + jr .end +.defeated_master + ld hl, .IWillGiveYouAPokemonText call PrintText -.asm_9dba4 +.end jp TextScriptEnd -FightingDojoText_5ce8e: - text_far _FightingDojoText_5ce8e +.Text: + text_far _FightingDojoKarateMasterText text_end -FightingDojoText_5ce93: - text_far _FightingDojoText_5ce93 +.DefeatedText: + text_far _FightingDojoKarateMasterDefeatedText text_end -FightingDojoText8: - text_far _FightingDojoText_5ce98 +.IWillGiveYouAPokemonText: + text_far _FightingDojoKarateMasterIWillGiveYouAPokemonText text_end -FightingDojoText_5ce9d: - text_far _FightingDojoText_5ce9d +.StayAndTrainWithUsText: + text_far _FightingDojoKarateMasterStayAndTrainWithUsText text_end -FightingDojoText2: +FightingDojoBlackbelt1Text: text_asm ld hl, FightingDojoTrainerHeader0 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText1: - text_far _FightingDojoBattleText1 +FightingDojoBlackbelt1BattleText: + text_far _FightingDojoBlackbelt1BattleText text_end -FightingDojoEndBattleText1: - text_far _FightingDojoEndBattleText1 +FightingDojoBlackbelt1EndBattleText: + text_far _FightingDojoBlackbelt1EndBattleText text_end -FightingDojoAfterBattleText1: - text_far _FightingDojoAfterBattleText1 +FightingDojoBlackbelt1AfterBattleText: + text_far _FightingDojoBlackbelt1AfterBattleText text_end -FightingDojoText3: +FightingDojoBlackbelt2Text: text_asm ld hl, FightingDojoTrainerHeader1 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText2: - text_far _FightingDojoBattleText2 +FightingDojoBlackbelt2BattleText: + text_far _FightingDojoBlackbelt2BattleText text_end -FightingDojoEndBattleText2: - text_far _FightingDojoEndBattleText2 +FightingDojoBlackbelt2EndBattleText: + text_far _FightingDojoBlackbelt2EndBattleText text_end -FightingDojoAfterBattleText2: - text_far _FightingDojoAfterBattleText2 +FightingDojoBlackbelt2AfterBattleText: + text_far _FightingDojoBlackbelt2AfterBattleText text_end -FightingDojoText4: +FightingDojoBlackbelt3Text: text_asm ld hl, FightingDojoTrainerHeader2 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText3: - text_far _FightingDojoBattleText3 +FightingDojoBlackbelt3BattleText: + text_far _FightingDojoBlackbelt3BattleText text_end -FightingDojoEndBattleText3: - text_far _FightingDojoEndBattleText3 +FightingDojoBlackbelt3EndBattleText: + text_far _FightingDojoBlackbelt3EndBattleText text_end -FightingDojoAfterBattleText3: - text_far _FightingDojoAfterBattleText3 +FightingDojoBlackbelt3AfterBattleText: + text_far _FightingDojoBlackbelt3AfterBattleText text_end -FightingDojoText5: +FightingDojoBlackbelt4Text: text_asm ld hl, FightingDojoTrainerHeader3 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText4: - text_far _FightingDojoBattleText4 +FightingDojoBlackbelt4BattleText: + text_far _FightingDojoBlackbelt4BattleText text_end -FightingDojoEndBattleText4: - text_far _FightingDojoEndBattleText4 +FightingDojoBlackbelt4EndBattleText: + text_far _FightingDojoBlackbelt4EndBattleText text_end -FightingDojoAfterBattleText4: - text_far _FightingDojoAfterBattleText4 +FightingDojoBlackbelt4AfterBattleText: + text_far _FightingDojoBlackbelt4AfterBattleText text_end -FightingDojoText6: -; Hitmonlee Poké Ball +FightingDojoHitmonleePokeBallText: text_asm CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon - ld hl, OtherHitmonText + ld hl, FightingDojoBetterNotGetGreedyText call PrintText jr .done .GetMon ld a, HITMONLEE call DisplayPokedex - ld hl, WantHitmonleeText + ld hl, .Text call PrintText call YesNoChoice ld a, [wCurrentMenuItem] @@ -253,22 +253,21 @@ FightingDojoText6: .done jp TextScriptEnd -WantHitmonleeText: - text_far _WantHitmonleeText +.Text: + text_far _FightingDojoHitmonleePokeBallText text_end -FightingDojoText7: -; Hitmonchan Poké Ball +FightingDojoHitmonchanPokeBallText: text_asm CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon - ld hl, OtherHitmonText + ld hl, FightingDojoBetterNotGetGreedyText call PrintText jr .done .GetMon ld a, HITMONCHAN call DisplayPokedex - ld hl, WantHitmonchanText + ld hl, .Text call PrintText call YesNoChoice ld a, [wCurrentMenuItem] @@ -288,10 +287,10 @@ FightingDojoText7: .done jp TextScriptEnd -WantHitmonchanText: - text_far _WantHitmonchanText +.Text: + text_far _FightingDojoHitmonchanPokeBallText text_end -OtherHitmonText: - text_far _OtherHitmonText +FightingDojoBetterNotGetGreedyText: + text_far _FightingDojoBetterNotGetGreedyText text_end |
