summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWasabiRaptor <ketchupraptor@gmail.com>2019-02-23 02:13:44 -0500
committerWasabiRaptor <ketchupraptor@gmail.com>2019-02-23 02:13:44 -0500
commitca2fe1ef313661ea54d8089bdd4d537204f0d3f2 (patch)
tree73fc85ba5e13fe2f007054a66b004dea53bd60cf
parent459d7b797b8167579080370b00eb0bd6b579244b (diff)
got ahead of myself, removed my nonfunctional limiter
-rw-r--r--Replace-stat-experience-with-EVs.md22
1 files changed, 1 insertions, 21 deletions
diff --git a/Replace-stat-experience-with-EVs.md b/Replace-stat-experience-with-EVs.md
index 697294a..17851d8 100644
--- a/Replace-stat-experience-with-EVs.md
+++ b/Replace-stat-experience-with-EVs.md
@@ -91,7 +91,6 @@ And edit [constants/pokemon_data_constants.asm](../blob/master/constants/pokemon
+; significant EV values
+MAX_EV EQU 252
-+MAX_EVS_TOTAL EQU 510
```
By replacing the 10 stat experience bytes with 6 EV bytes, we've freed up 4 bytes in `box_struct`. That's valuable space, since it gets saved when Pokémon are deposited in the PC. Making use of it is beyond the scope of this tutorial, so we'll leave it as padding for now.
@@ -288,22 +287,6 @@ GiveExperiencePoints:
+ add hl, bc
+ push bc
+
-+;get total EVS
-+ ld d, 6 ;six EVs
-+.ev_total_loop
-+ ld a, [hli]
-+ ;add a to bc
-+ add c
-+ ld c, a
-+ adc b
-+ sub c
-+ ld b, a
-+ cp MAX_EVS_TOTAL - $ff
-+ jr z, .evs_done ;don't add anymore evs if greater than the const for max which is set to 510
-+ dec d
-+ jr nz, .ev_total_loop
-+ ;after totaling all 6 evs if it not too much then go on to add more
-+
+ ld a, [wEnemyMonSpecies]
+ ld [wCurSpecies], a
+ call GetBaseData
@@ -344,9 +327,6 @@ GiveExperiencePoints:
Now instead of gaining the enemy's base stats toward your stat experience, you'll gain their base EV yields toward your EV totals. Having Pokérus will double EV gain.
-If the total amount of EVs a pokemon has is greater than or equal to MAX_EVS_TOTAL, which is set to 510, then no more EVs will be added to the pokemon.
-
-
## 4. Calculate stats based on EVs
Edit [engine/pokemon/move_mon.asm](../blob/master/engine/pokemon/move_mon.asm):
@@ -720,5 +700,5 @@ Then edit [engine/items/item_effects.asm](../blob/master/engine/items/item_effec
That's all!
![Screenshot](screenshots/zinc.png)
-
+TODO: limit total EVs to 510
TODO: add Macho Brace.