diff options
author | Idain <luiscarlosholguinperez@outlook.com> | 2022-01-08 14:42:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-08 13:42:40 -0500 |
commit | 67207fab94bbe24c79260dd0ad1be4e0579552c4 (patch) | |
tree | 535d0e8c7d2d65b7baa5a825be17a5d301c225ef | |
parent | 288532131b12f71ca6fd962d0ce6d68ab88199e8 (diff) |
Identify why five of six enemy mon base stats are copied (#866)
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
-rw-r--r-- | engine/battle/core.asm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 5345d7e72..a7c761ee2 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3980,9 +3980,11 @@ InitEnemyMon: inc de ld a, [hl] ld [de], a + ; The enemy mon's base Sp. Def isn't needed since its base + ; Sp. Atk is also used to calculate Sp. Def stat experience. ld hl, wBaseStats ld de, wEnemyMonBaseStats - ld b, 5 + ld b, NUM_STATS - 1 .loop ld a, [hli] ld [de], a @@ -6364,10 +6366,11 @@ LoadEnemyMon: call CopyBytes .Finish: -; Only the first five base stats are copied.. +; Copy the first five base stats (the enemy mon's base Sp. Atk +; is also used to calculate Sp. Def stat experience) ld hl, wBaseStats ld de, wEnemyMonBaseStats - ld b, wBaseSpecialDefense - wBaseStats + ld b, NUM_STATS - 1 .loop ld a, [hli] ld [de], a |