From b880ebc8fcc6f6b630ca6e4a908994199972df56 Mon Sep 17 00:00:00 2001 From: Idain Date: Wed, 19 May 2021 05:27:26 -0400 Subject: Fix to step 11, where `add 10` used to add to `a` which had `e`'s value loaded, basically making `e + 10`, an undesired behavior. --- Replace-stat-experience-with-EVs.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Replace-stat-experience-with-EVs.md b/Replace-stat-experience-with-EVs.md index 6492e71..83421ea 100644 --- a/Replace-stat-experience-with-EVs.md +++ b/Replace-stat-experience-with-EVs.md @@ -859,14 +859,20 @@ VitaminEffect: + pop bc + pop af ++ ld a, e ++ and a ++ jr z, NoEffectMessage + add hl, bc ld a, [hl] cp 100 jr nc, NoEffectMessage - -+ ld a, e -+ and a -+ jr z, NoEffectMessage + +- add 10 ++ add e + ld [hl], a + call UpdateStatsAfterItem + ... ``` This way, not only the limit of 510 EVs is implemented, but it will also display a message if the total EVs has reached the max limit. -- cgit v1.2.3