summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdain <luiscarlosholguinperez@outlook.com>2021-06-14 22:15:43 -0400
committerIdain <luiscarlosholguinperez@outlook.com>2021-06-14 22:15:43 -0400
commit6111d6a6623f063999fec7a1e538118565b7a94f (patch)
tree5969ae16431f8cfdadd0a4e2214015ec0661b42d
parent409cb2bc6445b3e692c882048136bbf2d930268b (diff)
Ok... Mistakes were made. Sorry.
-rw-r--r--Replace-stat-experience-with-EVs.md67
1 files changed, 20 insertions, 47 deletions
diff --git a/Replace-stat-experience-with-EVs.md b/Replace-stat-experience-with-EVs.md
index 5f538a5..a68dc97 100644
--- a/Replace-stat-experience-with-EVs.md
+++ b/Replace-stat-experience-with-EVs.md
@@ -7,17 +7,16 @@ Gen 3 replaced stat experience with EVs, which are different in a number of ways
1. [Replace stat experience with EVs in the Pokémon data structure](#1-replace-stat-experience-with-evs-in-the-pokémon-data-structure)
2. [Replace stat experience with EVs in base data](#2-replace-stat-experience-with-evs-in-base-data)
-3. [Clear EVs when caught Pokémon is sent into a box](#3-clear-evs-when-caught-pok%C3%A9mon-is-sent-into-a-box)
-4. [Gain EVs from winning battles](#4-gain-evs-from-winning-battles)
-5. [Calculate stats based on EVs](#5-calculate-stats-based-on-evs)
-6. [Vitamins give EVs, not stat experience](#6-vitamins-give-evs-not-stat-experience)
-7. [Replace Odd Egg and Battle Tower stat experience with EVs](#7-replace-odd-egg-and-battle-tower-stat-experience-with-evs)
-8. [Replace `MON_STAT_EXP` with `MON_EVS` everywhere](#8-replace-mon_stat_exp-with-mon_evs-everywhere)
-9. [Replace some more labels](#9-replace-some-more-labels)
-10. [Remove unused square root code](#10-remove-unused-square-root-code)
-11. [Add Zinc to boost Special Defense EVs](#11-add-zinc-to-boost-special-defense-evs)
-12. [Limit total EVs to 510](#12-limit-total-evs-to-510)
-13. [Replace stat experience with EVs in the Debug Room](#13-replace-stat-experience-with-evs-in-the-debug-room)
+3. [Gain EVs from winning battles](#3-gain-evs-from-winning-battles)
+4. [Calculate stats based on EVs](#4-calculate-stats-based-on-evs)
+5. [Vitamins give EVs, not stat experience](#5-vitamins-give-evs-not-stat-experience)
+6. [Replace Odd Egg and Battle Tower stat experience with EVs](#6-replace-odd-egg-and-battle-tower-stat-experience-with-evs)
+7. [Replace `MON_STAT_EXP` with `MON_EVS` everywhere](#7-replace-mon_stat_exp-with-mon_evs-everywhere)
+8. [Replace some more labels](#8-replace-some-more-labels)
+9. [Remove unused square root code](#9-remove-unused-square-root-code)
+10. [Add Zinc to boost Special Defense EVs](#10-add-zinc-to-boost-special-defense-evs)
+11. [Limit total EVs to 510](#11-limit-total-evs-to-510)
+12. [Replace stat experience with EVs in the Debug Room](#12-replace-stat-experience-with-evs-in-the-debug-room)
## 1. Replace stat experience with EVs in the Pokémon data structure
@@ -263,34 +262,8 @@ Update data/pokemon/base_stats/zubat.asm
That will format all the base data files correctly, but with zero EV yields. You'll have to fill in the correct values yourself.
-## 3. Clear EVs when caught Pokémon is sent into a box
-Edit [engine/pokemon/move_mon.asm](../blob/master/engine/pokemon/move_mon.asm):
-
-```diff
- SendMonIntoBox:
- ; Sends the mon into one of Bills Boxes
- ; the data comes mainly from 'wEnemyMon:'
-
- ...
-- ; Set all 5 Experience Values to 0
-+ ; Set all 6 EVs to 0
- xor a
-- ld b, 2 * 5
-+ ld b, NUM_STATS
- .loop2
- ld [de], a
- inc de
- dec b
- jr nz, .loop2
-
- ld hl, wEnemyMonDVs
- ld b, 2 + NUM_MOVES ; DVs and PP ; wEnemyMonHappiness - wEnemyMonDVs
- ...
-```
-
-
-## 4. Gain EVs from winning battles
+## 3. Gain EVs from winning battles
Edit [engine/battle/core.asm](../blob/master/engine/battle/core.asm):
@@ -431,7 +404,7 @@ Now instead of gaining the enemy's base stats toward your stat experience, you'l
Also, since we're not using stat experience, we no longer need to divide the enemy's base stats among the battle participants.
-## 5. Calculate stats based on EVs
+## 4. Calculate stats based on EVs
Edit [engine/pokemon/move_mon.asm](../blob/master/engine/pokemon/move_mon.asm):
@@ -530,7 +503,7 @@ For example, 50 EVs are equivalent to 50² = 2,500 stat exp, and 100 EVs are e
Eventually this won't matter, since the maximum 252 EVs or 65,535 stat exp both result in the same stats (252 / 4 = √65,535 / 4 = 63). But you may notice your Pokémon stats growing more slowly at first, and more quickly later on than you're used to.
-## 6. Vitamins give EVs, not stat experience
+## 5. Vitamins give EVs, not stat experience
Edit [engine/items/item_effects.asm](../blob/master/engine/items/item_effects.asm):
@@ -624,7 +597,7 @@ Edit [data/items/descriptions.asm](../blob/master/data/items/descriptions.asm):
```
-## 7. Replace Odd Egg and Battle Tower stat experience with EVs
+## 6. Replace Odd Egg and Battle Tower stat experience with EVs
First, edit [data/events/odd_eggs.asm](../blob/master/data/events/odd_eggs.asm). Make this same replacement 14 times, once for each hard-coded Odd Egg Pokémon structure:
@@ -715,7 +688,7 @@ Done!
```
-## 8. Replace `MON_STAT_EXP` with `MON_EVS` everywhere
+## 7. Replace `MON_STAT_EXP` with `MON_EVS` everywhere
Replace every occurrence of `MON_STAT_EXP` with `MON_EVS` in these files:
@@ -732,7 +705,7 @@ Replace every occurrence of `MON_STAT_EXP` with `MON_EVS` in these files:
Most of the `MON_STAT_EXP` occurrences are part of an argument passed to `CalcMonStats`.
-## 9. Replace some more labels
+## 8. Replace some more labels
Edit [engine/events/daycare.asm](../blob/master/engine/events/daycare.asm):
@@ -753,7 +726,7 @@ Edit [engine/events/daycare.asm](../blob/master/engine/events/daycare.asm):
We're technically done now; EVs will work behind the scenes just like stat experience did. But there's room for more improvement.
-## 10. Remove unused square root code
+## 9. Remove unused square root code
The only place `GetSquareRoot` was used was in `CalcMonStatC`. Without that, we can safely remove it.
@@ -766,7 +739,7 @@ Then edit [main.asm](../blob/master/main.asm):
```
-## 11. Add Zinc to boost Special Defense EVs
+## 10. Add Zinc to boost Special Defense EVs
Now that Calcium only boosts Special Attack EVs, we need Zinc for Special Defense. Follow [this tutorial](Add-a-new-item) to add a new item.
@@ -806,7 +779,7 @@ That's all!
![Screenshot](screenshots/zinc.png)
-## 12. Limit total EVs to 510
+## 11. Limit total EVs to 510
This section allows you to limit total EVs of each Pokémon to 510.
@@ -947,7 +920,7 @@ Edit `VitaminEffect` in [engine/items/item_effects.asm](../blob/master/engine/it
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.
-## 13. Replace stat experience with EVs in the Debug Room
+## 12. Replace stat experience with EVs in the Debug Room
This is only relevant if you're building a debug ROM. If you're not, you can skip this step.