summaryrefslogtreecommitdiff
path: root/Add-a-new-type.md
diff options
context:
space:
mode:
authorThomas Winwood <twwinwood@gmail.com>2018-07-12 06:18:16 +0100
committerThomas Winwood <twwinwood@gmail.com>2018-07-12 06:18:16 +0100
commit020a57fcd2b0210d68933f533ceebe96c12d6a58 (patch)
treeb7be86ce19ef4bf478b658661053f48195377405 /Add-a-new-type.md
parent86f8467041b368278cc6c706e96c519176e94e8b (diff)
Updated Add a new Fairy type (markdown)
Diffstat (limited to 'Add-a-new-type.md')
-rw-r--r--Add-a-new-type.md209
1 files changed, 209 insertions, 0 deletions
diff --git a/Add-a-new-type.md b/Add-a-new-type.md
new file mode 100644
index 0000000..2936074
--- /dev/null
+++ b/Add-a-new-type.md
@@ -0,0 +1,209 @@
+This tutorial is for how to add a new type for Pokémon or moves. As an example, we'll add the Fairy type introduced in Gen 6.
+
+
+## Contents
+
+1. [Define a type constant](#1-define-a-type-constant)
+2. [Give the type a name](#2-give-the-type-a-name)
+3. [List the type matchups](#3-list-the-type-matchups)
+4. [Make it searchable in the Pokédex](#4-make-it-searchable-in-the-pokédex)
+5. [Update Pokémon types](#5-update-pokémon-types)
+6. [Update move types](#6-update-move-types)
+7. [Change Polkadot Bow to boost Fairy moves](#7-change-polkadot-bow-to-boost-fairy-moves)
+
+
+## 1. Define a type constant
+
+Gen 2 was before the physical/special split, so the types after `SPECIAL` count as special, and the rest count as physical. Fairy moves are mostly special, so we'll add it there.
+
+Edit [constants/type_constants.asm](../blob/master/constants/type_constants.asm):
+
+```diff
+ SPECIAL EQU const_value
+ const FIRE
+ const WATER
+ const GRASS
+ const ELECTRIC
+ const PSYCHIC
+ const ICE
+ const DRAGON
+ const DARK
++ const FAIRY
+ TYPES_END EQU const_value
+```
+
+(If you're using an old version of pokecrystal where the `EGG_FAIRY` egg group constant was still called `FAIRY`, you'll have to name the type something different, like `FAIRY_T` or `FAERIE`.)
+
+
+## 2. Give the type a name
+
+Edit [data/types/names.asm](../blob/master/data/types/names.asm):
+
+```diff
+ TypeNames:
+ ; entries correspond to types (see constants/type_constants.asm)
+ dw Normal
+ ...
+ dw Dark
++ dw Fairy
+
+ Normal: db "NORMAL@"
+ ...
+ Dark: db "DARK@"
++Fairy: db "FAIRY@"
+```
+
+
+## 3. List the type matchups
+
+Edit [data/types/type_matchups.asm](../blob/master/data/types/type_matchups.asm):
+
+```diff
+ TypeMatchups:
+ ; attacker, defender, *=
+ db NORMAL, ROCK, NOT_VERY_EFFECTIVE
+ db NORMAL, STEEL, NOT_VERY_EFFECTIVE
+ ...
+ db FIGHTING, STEEL, SUPER_EFFECTIVE
++ db FIGHTING, FAIRY, NOT_VERY_EFFECTIVE
+ ...
+ db POISON, STEEL, NO_EFFECT
++ db POISON, FAIRY, SUPER_EFFECTIVE
+ ...
+ db BUG, STEEL, NOT_VERY_EFFECTIVE
++ db BUG, FAIRY, NOT_VERY_EFFECTIVE
+ ...
+ db DRAGON, STEEL, NOT_VERY_EFFECTIVE
++ db DRAGON, FAIRY, NO_EFFECT
+ ...
+ db DARK, STEEL, NOT_VERY_EFFECTIVE
++ db DARK, FAIRY, NOT_VERY_EFFECTIVE
+ ...
+ db STEEL, STEEL, NOT_VERY_EFFECTIVE
++ db STEEL, FAIRY, SUPER_EFFECTIVE
++ db FAIRY, FIRE, NOT_VERY_EFFECTIVE
++ db FAIRY, FIGHTING, SUPER_EFFECTIVE
++ db FAIRY, POISON, NOT_VERY_EFFECTIVE
++ db FAIRY, DRAGON, SUPER_EFFECTIVE
++ db FAIRY, DARK, SUPER_EFFECTIVE
++ db FAIRY, STEEL, NOT_VERY_EFFECTIVE
+
+ db -2 ; end (with Foresight)
+
+ ; Foresight removes Ghost's immunities.
+ db NORMAL, GHOST, NO_EFFECT
+ db FIGHTING, GHOST, NO_EFFECT
+
+ db -1 ; end
+```
+
+
+## 4. Make it searchable in the Pokédex
+
+These tables are used for the Pokédex's type search feature.
+
+Edit [data/types/search_types.asm](../blob/master/data/types/search_types.asm):
+
+```diff
+ PokedexTypeSearchConversionTable:
+ ; entries correspond with PokedexTypeSearchStrings (see data/types/search_strings.asm)
+ db NORMAL
+ ...
+ db STEEL
++ db FAIRY
+```
+
+Edit [data/types/search_strings.asm](../blob/master/data/types/search_strings.asm):
+
+```diff
+ PokedexTypeSearchStrings:
+ ; entries correspond with PokedexTypeSearchConversionTable (see data/types/search_types.asm)
+ db " ---- @"
+ db " NORMAL @"
+ ...
+ db " STEEL @"
++ db " FAIRY @"
+```
+
+
+## 5. Update Pokémon types
+
+Edit the type entries in [data/pokemon/base_stats/](../blob/master/data/pokemon/base_stats/):
+
+- [azumarill.asm](../blob/master/data/pokemon/base_stats/azumarill.asm): `WATER, WATER` → `WATER, FAIRY`
+- [clefable.asm](../blob/master/data/pokemon/base_stats/clefable.asm): `NORMAL, NORMAL` → `FAIRY, FAIRY`
+- [clefairy.asm](../blob/master/data/pokemon/base_stats/clefairy.asm): `NORMAL, NORMAL` → `FAIRY, FAIRY`
+- [cleffa.asm](../blob/master/data/pokemon/base_stats/cleffa.asm): `NORMAL, NORMAL` → `FAIRY, FAIRY`
+- [granbull.asm](../blob/master/data/pokemon/base_stats/granbull.asm): `NORMAL, NORMAL` → `FAIRY, FAIRY`
+- [igglybuff.asm](../blob/master/data/pokemon/base_stats/igglybuff.asm): `NORMAL, NORMAL` → `NORMAL, FAIRY`
+- [jigglypuff.asm](../blob/master/data/pokemon/base_stats/jigglypuff.asm): `NORMAL, NORMAL` → `NORMAL, FAIRY`
+- [marill.asm](../blob/master/data/pokemon/base_stats/marill.asm): `WATER, WATER` → `WATER, FAIRY`
+- [mr__mime.asm](../blob/master/data/pokemon/base_stats/mr__mime.asm): `PSYCHIC, PSYCHIC` → `PSYCHIC, FAIRY`
+- [snubbull.asm](../blob/master/data/pokemon/base_stats/snubbull.asm): `NORMAL, NORMAL` → `FAIRY, FAIRY`
+- [togepi.asm](../blob/master/data/pokemon/base_stats/togepi.asm): `NORMAL, NORMAL` → `FAIRY, FAIRY`
+- [togetic.asm](../blob/master/data/pokemon/base_stats/togetic.asm): `NORMAL, FLYING` → `FAIRY, FLYING`
+- [wigglytuff.asm](../blob/master/data/pokemon/base_stats/wigglytuff.asm): `NORMAL, NORMAL` → `NORMAL, FAIRY`
+
+
+## 6. Update move types
+
+Edit the type columns in [data/moves/moves.asm](../blob/master/data/moves/moves.asm):
+
+- `CHARM`: `NORMAL` → `FAIRY`
+- `SWEET_KISS`: `NORMAL` → `FAIRY`
+- `MOONLIGHT`: `NORMAL` → `FAIRY`
+
+
+## 7. Change Polkadot Bow to boost Fairy moves
+
+At this point we're technically done: all the canon aspects of the Fairy type are implemented. (If you want to add new Fairy-type Pokémon or moves, check out different tutorials.) But there's no held type-boosting item for it, and Gen 2 happens to have the unavailable `POLKADOT_BOW` item that boosts Normal moves like `PINK_BOW`, so let's change it to boost Fairy moves instead.
+
+Edit [constants/item_data_constants.asm](../blob/master/constants/item_data_constants.asm):
+
+```diff
+ const_value set 50
+ const HELD_NORMAL_BOOST
+ ...
+ const HELD_STEEL_BOOST
++ const HELD_FAIRY_BOOST
+```
+
+Edit [data/types/type_boost_items.asm](../blob/master/data/types/type_boost_items.asm):
+
+```diff
+ TypeBoostItems:
+- db HELD_NORMAL_BOOST, NORMAL ; PINK_BOW/POLKADOT_BOW
++ db HELD_NORMAL_BOOST, NORMAL ; PINK_BOW
+ ...
+ db HELD_STEEL_BOOST, STEEL ; METAL_COAT
++ db HELD_FAIRY_BOOST, FAIRY ; POLKADOT_BOW
+ db -1
+```
+
+Edit [data/items/attributes.asm](../blob/master/data/items/attributes.asm):
+
+```diff
+ ItemAttributes:
+ ; entries correspond to constants/item_constants.asm
+ ...
+ ; POLKADOT_BOW
+- item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
++ item_attribute 100, HELD_FAIRY_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+```
+
+And lastly, edit [data/items/descriptions.asm](../blob/master/data/items/descriptions.asm):
+
+```diff
+ PolkadotBowDesc:
+- db "Powers up normal-"
++ db "Powers up fairy-"
+ next "type moves. (HOLD)@"
+```
+
+*Now* we're done!
+
+![Screenshot](screenshots/fairy-type.png)
+
+If you're just varying the original Crystal game, note that you can get three Pink Bows (one from Tuscany on Tuesdays, one from Mary after clearing Team Rocket from Radio Tower, and one from Picnicker Tiffany if you get her phone number), so one of those can be replaced with a Fairy-boosting Polkadot Bow.
+
+You'll also need damaging Fairy moves like Moonblast and Dazzling Gleam, so look up how to add those in the new move tutorial.