summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElectroDeoxys <40245959+ElectroDeoxys@users.noreply.github.com>2019-07-20 11:43:11 +0100
committerElectroDeoxys <40245959+ElectroDeoxys@users.noreply.github.com>2019-07-20 11:43:11 +0100
commita97b61112a83855e9f1ed994aa3562ea952dabe5 (patch)
treed02d211ff753771103dc89b52c05a3df1fc08b47
parent6558b11aa5be6aafe1d5cf06f82ba83d75348165 (diff)
Updated Gain experience from catching Pokémon (markdown)
-rw-r--r--Gain-experience-from-catching-Pokémon.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/Gain-experience-from-catching-Pokémon.md b/Gain-experience-from-catching-Pokémon.md
index 53bc9d1..0fea05c 100644
--- a/Gain-experience-from-catching-Pokémon.md
+++ b/Gain-experience-from-catching-Pokémon.md
@@ -61,7 +61,7 @@ IsAnyMonHoldingExpShare:
ld a, [wPartyCount]
```
-Here we made a new function called ApplyExperienceAfterEnemyCaught. Basically, everything is copied except anything related to Trainers, since you wouldn't capture a Trainer's Pokémon ever (you don't want to be a thief). Moreover, there's no need to update the battle scene or change the music to the victory jingle since the game already does this for us once the wild Pokémon is successfully captured.
+Here we made a new function called ApplyExperienceAfterEnemyCaught. Basically, everything is copied except anything related to Trainers, since you wouldn't capture a Trainer's Pokémon ever (you don't want to be a thief), and also the check to see if you have a fit Pokémon (it's already a precondition to throw a ball in the first place). Moreover, there's no need to update the battle scene or change the music to the victory jingle since the game already does this for us once the wild Pokémon is successfully captured. Everything else, including calculating boosts and Exp. Share divisions, is done in the function GiveExperiencePoints.
## 2. Call the function
@@ -94,7 +94,7 @@ Edit [engine/items/item_effects.asm](../blob/master/engine/items/item_effects.as
```
-Turns out just doing the farcall isn't enough. Indeed, if your Pokémon happens to level up, wCurPartyLevel gets overwritten. Even worse, the species also gets overwritten which would cause you to capture the wrong species! To get the intended result, we need to store the values the game needs to add the proper Pokémon to your collection, and then retrieve them after the experience routine is over with.
+Here we placed the code right after the game determines that the foe is captured, and is about to switch to the Pokédex/naming screen. Turns out just doing the farcall isn't enough. Indeed, if your Pokémon happens to level up, wCurPartyLevel gets overwritten. Even worse, wCurPartySpecies also gets overwritten which would cause you to capture the wrong species at a wrong level! To get the intended result, we need to store the values the game needs to add the proper Pokémon to your collection, and then retrieve them after the experience routine is over with.
And just like that, you're ready to catch 'em all and raise your Pokémon in one fell swoop.