summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-04-26 12:03:56 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-04-26 12:03:56 -0400
commit74c6ca3a2cd0b7d176dce7fd3817512e6ccdf701 (patch)
treef98909593671d8c211156efb9f71333b39d8e245
parentf20d8628170c618de26091b2095f775fb4f43890 (diff)
fixed in pokecrystal
-rw-r--r--Physical-Special-split.md15
1 files changed, 7 insertions, 8 deletions
diff --git a/Physical-Special-split.md b/Physical-Special-split.md
index e25e903..96e6c70 100644
--- a/Physical-Special-split.md
+++ b/Physical-Special-split.md
@@ -9,7 +9,7 @@ In Gen 2 (and Gen 3), some types were always physical and some were always speci
2. [Update moves with their categories](#2-update-moves-with-their-categories)
3. [Mask out the category in `PrintMoveType`](#3-mask-out-the-category-in-printmovetype)
4. [Mask out the category in nine places in the battle engine](#4-mask-out-the-category-in-nine-places-in-the-battle-engine)
-5. [Update Hidden Power](#5-update-hidden-power)
+5. [Make Hidden Power special](#5-make-hidden-power-special)
6. [Update the AI to understand categories](#6-update-the-ai-to-understand-categories)
7. [Support printing category names](#7-support-printing-category-names)
8. [Display categories in battle](#8-display-categories-in-battle)
@@ -169,9 +169,9 @@ And edit [engine/battle/move_effects/thunder.asm](../blob/master/engine/battle/m
That's nine additions of `and TYPE_MASK` to mask out the category bits and leave only the type.
-## 5. Update Hidden Power
+## 5. Make Hidden Power special
-Edit [engine/battle/hidden_power.asm](../blob/master/engine/battle/hidden_power.asm). First, we make sure that Hidden Power will be a special move.
+Edit [engine/battle/hidden_power.asm](../blob/master/engine/battle/hidden_power.asm):
```diff
; Overwrite the current move type.
@@ -183,16 +183,15 @@ Edit [engine/battle/hidden_power.asm](../blob/master/engine/battle/hidden_power.
ld [hl], a
```
-We also have to replace in this file an occurence of `SPECIAL` that relies on this constant's value as the first one after the `UNUSED_TYPES` in [constants/type_constants.asm](../blob/master/constants/type_constants.asm), which it isn't anymore. This alters the way Hidden Power type is calculated. Fortunately, `UNUSED_TYPES_END` fulfills the same role as `SPECIAL` here, so we can use it instead.
+If you're using an older version of pokecrystal, you may also have to edit another line to make sure Hidden Power's type is calculated correctly:
```diff
-; Skip unused types
- cp UNUSED_TYPES
- jr c, .done
+ ; Skip unused types
+ cp UNUSED_TYPES
+ jr c, .done
- add SPECIAL - UNUSED_TYPES
+ add UNUSED_TYPES_END - UNUSED_TYPES
```
-This will keep Hidden Power type's calculation as it is in base Crystal.
## 6. Update the AI to understand categories