diff options
author | Rangi42 <remy.oukaour+rangi42@gmail.com> | 2018-02-04 13:16:17 -0500 |
---|---|---|
committer | Rangi42 <remy.oukaour+rangi42@gmail.com> | 2018-02-04 13:16:17 -0500 |
commit | 79f0488743d35dcfe25a7ef96107ca19af13a72c (patch) | |
tree | b6698cdfc132badcc808be4408e5988d0ecbf780 /Hard-coded-logic.md | |
parent | 5a23ac37ba792ecd31e47c0b6c27f89704e2431c (diff) |
Update WRAM labels
Diffstat (limited to 'Hard-coded-logic.md')
-rw-r--r-- | Hard-coded-logic.md | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Hard-coded-logic.md b/Hard-coded-logic.md index b38819a..4e0b271 100644 --- a/Hard-coded-logic.md +++ b/Hard-coded-logic.md @@ -54,7 +54,7 @@ This is caused by `ReturnFromMapSetupScript.CheckSpecialMap` in [engine/events/m ret z cp POWER_PLANT ret z - ld a, $1 + ld a, 1 and a ret ; b8089 @@ -88,11 +88,11 @@ This is caused by `InitEnemyTrainer` in [engine/battle/core.asm](../blob/master/ ```asm ; RIVAL1's first mon has no held item - ld a, [TrainerClass] + ld a, [wTrainerClass] cp RIVAL1 jr nz, .ok xor a - ld [OTPartyMon1Item], a + ld [wOTPartyMon1Item], a .ok ``` @@ -101,14 +101,14 @@ This is caused by `InitEnemyTrainer` in [engine/battle/core.asm](../blob/master/ This is caused by `PlayBattleMusic` in [engine/battle/start_battle.asm](../blob/master/engine/battle/start_battle.asm). The routine's logic is: -1. If `[BattleType]` is `BATTLETYPE_SUICUNE` or `BATTLETYPE_ROAMING`, play `MUSIC_SUICUNE_BATTLE`. +1. If `[wBattleType]` is `BATTLETYPE_SUICUNE` or `BATTLETYPE_ROAMING`, play `MUSIC_SUICUNE_BATTLE`. 2. If it's a wild battle, play `MUSIC_KANTO_WILD_BATTLE` if we're in Kanto, `MUSIC_JOHTO_WILD_BATTLE_NIGHT` in Johto at night, or `MUSIC_JOHTO_WILD_BATTLE` during morning and day. -3. If `[OtherTrainerClass]` is `CHAMPION` or `RED`, play `MUSIC_CHAMPION_BATTLE`. -4. If `[OtherTrainerClass]` is `GRUNTM` or `GRUNTF`, play `MUSIC_ROCKET_BATTLE`. (They should have included `EXECUTIVEM`, `EXECUTIVEF`, and `SCIENTIST` too…) -5. If `[OtherTrainerClass]` is listed under `KantoGymLeaders` in [data/trainers/leaders.asm](../blob/master/data/trainers/leaders.asm), play `MUSIC_KANTO_GYM_LEADER_BATTLE`. -6. If `[OtherTrainerClass]` is listed under `GymLeaders` in [data/trainers/leaders.asm](../blob/master/data/trainers/leaders.asm), play `MUSIC_JOHTO_GYM_LEADER_BATTLE`. (`CHAMPION`, `RED`, and the Kanto Gym leaders are listed but have already been accounted for at this point.) -7. If `[OtherTrainerClass]` is `RIVAL2` and `[OtherTrainerID]` is at least `RIVAL2_2_CHIKORITA` (i.e. we're battling our rival in Indigo Plateau), play `MUSIC_CHAMPION_BATTLE`. -8. If `[OtherTrainerClass]` is `RIVAL1` or `RIVAL2`, play `MUSIC_RIVAL_BATTLE`. +3. If `[wOtherTrainerClass]` is `CHAMPION` or `RED`, play `MUSIC_CHAMPION_BATTLE`. +4. If `[wOtherTrainerClass]` is `GRUNTM` or `GRUNTF`, play `MUSIC_ROCKET_BATTLE`. (They should have included `EXECUTIVEM`, `EXECUTIVEF`, and `SCIENTIST` too…) +5. If `[wOtherTrainerClass]` is listed under `KantoGymLeaders` in [data/trainers/leaders.asm](../blob/master/data/trainers/leaders.asm), play `MUSIC_KANTO_GYM_LEADER_BATTLE`. +6. If `[wOtherTrainerClass]` is listed under `GymLeaders` in [data/trainers/leaders.asm](../blob/master/data/trainers/leaders.asm), play `MUSIC_JOHTO_GYM_LEADER_BATTLE`. (`CHAMPION`, `RED`, and the Kanto Gym leaders are listed but have already been accounted for at this point.) +7. If `[wOtherTrainerClass]` is `RIVAL2` and `[wOtherTrainerID]` is at least `RIVAL2_2_CHIKORITA` (i.e. we're battling our rival in Indigo Plateau), play `MUSIC_CHAMPION_BATTLE`. +8. If `[wOtherTrainerClass]` is `RIVAL1` or `RIVAL2`, play `MUSIC_RIVAL_BATTLE`. 9. If it's a link battle, play `MUSIC_JOHTO_TRAINER_BATTLE`. 10. Play `MUSIC_KANTO_TRAINER_BATTLE` if we're in Kanto or `MUSIC_JOHTO_TRAINER_BATTLE` if we're in Johto. @@ -120,7 +120,7 @@ Both of these classes are named "RIVAL", but battles just print "SILVER wants to This is caused by `PlaceEnemysName` in [home/text.asm](../blob/master/home/text.asm): ```asm - ld a, [TrainerClass] + ld a, [wTrainerClass] cp RIVAL1 jr z, .rival cp RIVAL2 |