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 | |
parent | 5a23ac37ba792ecd31e47c0b6c27f89704e2431c (diff) |
Update WRAM labels
-rw-r--r-- | Allow-map-tiles-to-appear-above-sprites.md | 26 | ||||
-rw-r--r-- | Automatically-reuse-Repel.md | 6 | ||||
-rw-r--r-- | Hard-coded-logic.md | 22 | ||||
-rw-r--r-- | Remove-the-25%-failure-chance-for-AI-status-moves.md | 30 |
4 files changed, 42 insertions, 42 deletions
diff --git a/Allow-map-tiles-to-appear-above-sprites.md b/Allow-map-tiles-to-appear-above-sprites.md index 5bfb0a8..e91efaf 100644 --- a/Allow-map-tiles-to-appear-above-sprites.md +++ b/Allow-map-tiles-to-appear-above-sprites.md @@ -122,7 +122,7 @@ Edit [engine/map_palettes.asm](../blob/master/engine/map_palettes.asm): ```diff SwapTextboxPalettes:: ; 4c000 hlcoord 0, 0 - decoord 0, 0, AttrMap + decoord 0, 0, wAttrMap ld b, SCREEN_HEIGHT .loop push bc @@ -137,18 +137,18 @@ SwapTextboxPalettes:: ; 4c000 - add [hl] - ld l, a - ld a, [TilesetPalettes + 1] -- adc $0 +- adc 0 - ld h, a - ld a, [hl] - and $f - jr .next - -.UpperNybble: -- ld hl, TilesetPalettes +- ld hl, wTilesetPalettes - add [hl] - ld l, a -- ld a, [TilesetPalettes + 1] -- adc $0 +- ld a, [wTilesetPalettes + 1] +- adc 0 - ld h, a - ld a, [hl] - swap a @@ -168,8 +168,8 @@ SwapTextboxPalettes:: ; 4c000 ret ScrollBGMapPalettes:: ; 4c03f - ld hl, BGMapBuffer - ld de, BGMapPalBuffer + ld hl, wBGMapBuffer + ld de, wBGMapPalBuffer + ; fallthrough +GetBGMapTilePalettes: .loop @@ -179,22 +179,22 @@ ScrollBGMapPalettes:: ; 4c03f - jr c, .UpperNybble - -; .LowerNybble - ld hl, TilesetPalettes + ld hl, wTilesetPalettes add [hl] ld l, a - ld a, [TilesetPalettes + 1] - adc $0 + ld a, [wTilesetPalettes + 1] + adc 0 ld h, a ld a, [hl] - and $f - jr .next - -.UpperNybble: -- ld hl, TilesetPalettes +- ld hl, wTilesetPalettes - add [hl] - ld l, a -- ld a, [TilesetPalettes + 1] -- adc $0 +- ld a, [wTilesetPalettes + 1] +- adc 0 - ld h, a - ld a, [hl] - swap a diff --git a/Automatically-reuse-Repel.md b/Automatically-reuse-Repel.md index 569e730..8c1db9a 100644 --- a/Automatically-reuse-Repel.md +++ b/Automatically-reuse-Repel.md @@ -59,7 +59,7 @@ UseRepel: ; f46c ld a, b ld [wRepelEffect], a -+ ld a, [CurItem] ++ ld a, [wCurItem] + ld [wRepelType], a jp UseItemText @@ -87,8 +87,8 @@ DoRepelStep: ; 96bd7 ret nz + ld a, [wRepelType] -+ ld [CurItem], a -+ ld hl, NumItems ++ ld [wCurItem], a ++ ld hl, wNumItems + call CheckItem ld a, BANK(RepelWoreOffScript) ld hl, RepelWoreOffScript 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 diff --git a/Remove-the-25%-failure-chance-for-AI-status-moves.md b/Remove-the-25%-failure-chance-for-AI-status-moves.md index 5be6719..fb228d6 100644 --- a/Remove-the-25%-failure-chance-for-AI-status-moves.md +++ b/Remove-the-25%-failure-chance-for-AI-status-moves.md @@ -4,7 +4,7 @@ In `BattleCommand_StatDown`: ```diff ; Sharply lower the stat if applicable. - ld a, [LoweredStat] + ld a, [wLoweredStat] and $f0 - jr z, .ComputerMiss + jr z, .GotAmountToLower @@ -23,12 +23,12 @@ In `BattleCommand_StatDown`: - and a - jr nz, .DidntMiss - -- ld a, [InBattleTowerBattle] +- ld a, [wInBattleTowerBattle] - and a - jr nz, .DidntMiss - -; Lock-On still always works. -- ld a, [PlayerSubStatus5] +- ld a, [wPlayerSubStatus5] - bit SUBSTATUS_LOCK_ON, a - jr nz, .DidntMiss - @@ -70,12 +70,12 @@ In `BattleCommand_SleepTarget`: - and a - jr nz, .dont_fail - -- ld a, [InBattleTowerBattle] +- ld a, [wInBattleTowerBattle] - and a - jr nz, .dont_fail - - ; Not locked-on by the enemy -- ld a, [PlayerSubStatus5] +- ld a, [wPlayerSubStatus5] - bit SUBSTATUS_LOCK_ON, a - jr nz, .dont_fail - @@ -93,25 +93,25 @@ In `BattleCommand_Poison`: ```diff - ld a, [hBattleTurn] - and a -- jr z, .mimic_random +- jr z, .dont_sample_failure - - ld a, [wLinkMode] - and a -- jr nz, .mimic_random +- jr nz, .dont_sample_failure - -- ld a, [InBattleTowerBattle] +- ld a, [wInBattleTowerBattle] - and a -- jr nz, .mimic_random +- jr nz, .dont_sample_failure - -- ld a, [PlayerSubStatus5] +- ld a, [wPlayerSubStatus5] - bit SUBSTATUS_LOCK_ON, a -- jr nz, .mimic_random +- jr nz, .dont_sample_failure - - call BattleRandom - cp 25 percent + 1 ; 25% chance AI fails - jr c, .failed - --.mimic_random +-.dont_sample_failure ... ``` @@ -127,16 +127,16 @@ In `BattleCommand_Paralyze`: - and a - jr nz, .dont_sample_failure - -- ld a, [InBattleTowerBattle] +- ld a, [wInBattleTowerBattle] - and a - jr nz, .dont_sample_failure - -- ld a, [PlayerSubStatus5] +- ld a, [wPlayerSubStatus5] - bit SUBSTATUS_LOCK_ON, a - jr nz, .dont_sample_failure - - call BattleRandom -- cp 1 + 25 percent +- cp 25 percent + 1 ; 25% chance AI fails - jr c, .failed - -.dont_sample_failure |