-
Notifications
You must be signed in to change notification settings - Fork 1k
Add a new type
InfernoGear edited this page Oct 4, 2019
·
12 revisions
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.
Gen I was before the Physical/Special split, so any types with an index number less than $14 are physical, and anything afterwards or equalivent to is special. Dark type was classified as a physical type in Gen II and III, so we'll include Dark type as Type $09.
Edit constants/type_constants.asm:
; 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
+DARK EQU $09
FIRE EQU $14
WATER EQU $15
GRASS EQU $16
ELECTRIC EQU $17
PSYCHIC EQU $18
ICE EQU $19
DRAGON EQU $1A
TYPES_END EQU const_value
Edit text/type_names.asm:
TypeNames:
dw .Normal
dw .Fighting
dw .Flying
dw .Poison
dw .Ground
dw .Rock
dw .Bird
dw .Bug
dw .Ghost
+ dw .Dark
- 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
.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@"
Edit data/type_effects.asm:
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
WIP