summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdain <luiscarlosholguinperez@outlook.com>2021-05-02 13:30:04 -0400
committerIdain <luiscarlosholguinperez@outlook.com>2021-05-02 13:30:04 -0400
commit31bb3c3cd2275c06038c16a3d5c8b84d90c0bafa (patch)
treed68ec3273592e8743e0f76df2e85a04cb1363738
parenteacbd9539a01227e6aac1bd693ff4b7a135f239f (diff)
Small improvement.
-rw-r--r--Make-time-and-weather-sensitive-moves-only-weather-dependent.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/Make-time-and-weather-sensitive-moves-only-weather-dependent.md b/Make-time-and-weather-sensitive-moves-only-weather-dependent.md
index 0173b27..1b40f87 100644
--- a/Make-time-and-weather-sensitive-moves-only-weather-dependent.md
+++ b/Make-time-and-weather-sensitive-moves-only-weather-dependent.md
@@ -1,11 +1,11 @@
-In Generation 2 the Day/Night feature was introduced and, along with it, three moves that depend on it: Morning Sun (Morning), Synthesis (Day) and Moonlight (Night). The healing amount is affected by both the active weather and the time of day, according to the following list:
+In Generation 2 the Day/Night feature was introduced and, along with it, three moves that depend on it: Morning Sun (Morning), Synthesis (Day) and Moonlight (Night). The healing amount is affected by both the current weather and the time of day, according to the following list:
* ¼ Max HP (No weather and No matching time of day)
* ½ Max HP (either Harsh Sunlight active or Matching time of day)
* 100% Max HP (both Harsh Sunlight active and Matching time of day)
* ⅛ Max HP (Rain/Sandstorm active and no Matching time of day)
-In Generation 3 onwards it only depends on weather, normally healing ½ max HP with no weather, ⅔ max HP is there's harsh sunlight, and ¼ max HP with any other active weather. The objective of this tutorial will be to make the moves mentioned above behave like in modern generations.
+In Generation 3 onwards it only depends on weather, healing ½ max HP with no weather, ⅔ max HP is there's harsh sunlight, and ¼ max HP with any other weather. The objective of this tutorial will be to make the moves mentioned above behave like in modern generations.
## Contents
@@ -20,7 +20,7 @@ In [engine/battle/core.asm](../blob/master/engine/battle/core.asm) there are fun
GetQuarterMaxHP:
...
-+GetThirdMaxHP::
++GetThirdMaxHP:
+; Assumes HP<768
+ call GetMaxHP
+ xor a
@@ -51,7 +51,7 @@ In [engine/battle/core.asm](../blob/master/engine/battle/core.asm) there are fun
...
```
-Here we're creating two functions, one that calculates ⅓ of max HP, and another one that takes the result and doubles it. `GetThirdMaxHP` gets the Max HP of a Pokémon (which is stored in `bc`), and performs an iterative substraction where `a` is increased once while `bc` is decreased three times, until it goes below 0 (underflow), then `a` is decreased once to discount the underflow, loads the value into `c`, checks if it's 0 (in which case is increased once, since `c` has to be at least 1) and finally returns. `GetTwoThirdsMaxHP` calls this function and doubles the result, since 2 * ⅓ = ⅔.
+Here we're creating two functions, one that calculates ⅓ of max HP, and another one that takes the result and doubles it. `GetThirdMaxHP` gets the Max HP of a Pokémon (which is stored in `bc`), and performs an iterative substraction where `a` is increased once while `bc` is decreased three times, until it goes below 0 (underflow). When this happens, `a` is decreased once to discount the underflow, loads the value into `c`, checks if it's 0 (in which case is increased once, since `c` has to be at least 1) and finally returns. `GetTwoThirdsMaxHP` calls this function and doubles the result, since 2 * ⅓ = ⅔.
Now that we can calculate ⅔ of Max HP, let's go to the next step.
@@ -109,6 +109,6 @@ So let's explain what's happening. `ld c, 1` serves as our index for `.Multiplie
In Link battles the time of day isn't taken into account, but since we're modifying the code to also behave like this in normal gameplay, we no longer need the code block related to it.
-The last change was made to the `.Multipliers` jumptable, where we removed the now useless `GetEightMaxHP` and `GetMaxHP` for `GetTwoThirdsMaxHP` to make it point to functions that heal between ¼ Max HP and ⅔ Max HP.
+The last change was made to the `.Multipliers` jumptable, where we replaced both `GetEightMaxHP` and `GetMaxHP` for `GetTwoThirdsMaxHP` to make it point to functions that heal between ¼ Max HP and ⅔ Max HP.
-And that's it! Now Morning Sun, Synthesis and Moonlight behave like they do in Gen 3+, only taking the active weather into account.
+And that's it! Now Morning Sun, Synthesis and Moonlight behave like they do in Gen 3+, only taking the current weather into account.