1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
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_TYPE
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_TYPE` 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_TYPE, PSYCHIC_TYPE` → `PSYCHIC_TYPE, 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!

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.
|