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
|
This tutorial is for how to add new types for Pokemon or moves. As an example, we'll be adding the Dark type first introduced in Generation II.
## Contents
- [Define a type constant](#1-define-a-type-constant)
- [Give the type a name](#2-give-the-type-a-name)
- [List the type matchups](#3-list-the-type-matchups)
- [Update Pokemon types](#4-update-pokemon-types)
- [Update move types](#5-update-move-types)
## 1. Define a type constant
Gen I was before the Physical/Special split, so any types with an index number less than $14 are physical, and anything greater than or equal to it is special. Dark type was classified as a special type in Gen II and III, so we'll include Dark type as Type $1B.
Edit [constants/type_constants.asm](../blob/master/constants/type_constants.asm):
```diff
; Elemental types
NORMAL EQU $00
FIGHTING EQU $01
FLYING EQU $02
POISON EQU $03
GROUND EQU $04
ROCK EQU $05
BUG EQU $07
GHOST EQU $08
FIRE EQU $14
WATER EQU $15
GRASS EQU $16
ELECTRIC EQU $17
PSYCHIC EQU $18
ICE EQU $19
DRAGON EQU $1A
+DARK EQU $1B
TYPES_END EQU const_value
```
## 2. Give the type a name
Edit [text/type_names.asm](../blob/master/text/type_names.asm):
```diff
TypeNames:
dw .Normal
dw .Fighting
dw .Flying
dw .Poison
dw .Ground
dw .Rock
dw .Bird
dw .Bug
dw .Ghost
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Normal
dw .Fire
dw .Water
dw .Grass
dw .Electric
dw .Psychic
dw .Ice
dw .Dragon
+ dw .Dark
.Normal: db "NORMAL@"
.Fighting: db "FIGHTING@"
.Flying: db "FLYING@"
.Poison: db "POISON@"
.Fire: db "FIRE@"
.Water: db "WATER@"
.Grass: db "GRASS@"
.Electric: db "ELECTRIC@"
.Psychic: db "PSYCHIC@"
.Ice: db "ICE@"
.Ground: db "GROUND@"
.Rock: db "ROCK@"
.Bird: db "BIRD@"
.Bug: db "BUG@"
.Ghost: db "GHOST@"
.Dragon: db "DRAGON@"
+.Dark: db "DARK@"
```
## 3. List the type matchups
Edit [data/type_effects.asm](../blob/master/data/type_effects.asm):
```diff
TypeEffects:
; format: attacking type, defending type, damage multiplier
; the multiplier is a (decimal) fixed-point number:
; 20 is ×2.0
; 05 is ×0.5
; 00 is ×0
db WATER,FIRE,20
db FIRE,GRASS,20
...
db ICE,DRAGON,20
db DRAGON,DRAGON,20
+ db DARK,GHOST,20
+ db DARK,PSYCHIC,20
+ db DARK,DARK,05
+ db DARK,FIGHTING,05
+ db GHOST,DARK,05
+ db BUG,DARK,20
+ db FIGHTING,DARK,20
+ db PSYCHIC,DARK,00
db $ff
```
## 4. Update Pokemon Types
Technically, no Gen I Pokemon in their base form had the Dark type retrofitted onto them. So, as an example, we'll give it to Gyarados, who has it in its Mega Evolution.
Edit the following in [data/baseStats/](../blob/master/data/baseStats/):
- [gyarados.asm](../blob/master/data/baseStats/gyarados.asm):
```diff
dex DEX_GYARADOS
...
db 100 ; base special
db WATER ; species type 1
+db DARK ; species type 2
-db FLYING ; species type 2
...
db 0 ; padding
```
## 5. Update the move types
Luckily, one move in Gen I did get retrofitted to be Dark type in Gen II onwards. That move is Bite. So, edit the type column in [data/moves.asm](../blob/master/data/moves.asm):
```diff
Moves:
; Characteristics of each move.
move: macro
db \1 ; animation (interchangeable with move id)
db \2 ; effect
db \3 ; power
db \4 ; type
db \5 percent ; accuracy
db \6 ; pp
endm
move POUND, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35
MoveEnd:
...
move PIN_MISSILE, TWO_TO_FIVE_ATTACKS_EFFECT, 14, BUG, 85, 20
move LEER, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 30
+ move BITE, FLINCH_SIDE_EFFECT1, 60, DARK, 100, 25
- move BITE, FLINCH_SIDE_EFFECT1, 60, NORMAL, 100, 25
...
move STRUGGLE, RECOIL_EFFECT, 50, NORMAL, 100, 10
```
As of now, we have added all that is needed for the Dark type to function. I'd recommend adding some Dark-type Pokemon and moves in order to truly create a polished Dark type.
For adding the Steel and Fairy types, the same steps are done as above, but instead of what changes you made above, you would make the changes that apply to your type.
|