diff options
-rw-r--r-- | Physical-Special-split.md | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Physical-Special-split.md b/Physical-Special-split.md index e2f9ccb..e25e903 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. [Make Hidden Power special](#5-make-hidden-power-special) +5. [Update Hidden Power](#5-update-hidden-power) 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. Make Hidden Power special +## 5. Update Hidden Power -Edit [engine/battle/hidden_power.asm](../blob/master/engine/battle/hidden_power.asm): +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. ```diff ; Overwrite the current move type. @@ -183,6 +183,17 @@ 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. + +```diff +; 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 |