diff options
author | InfernoGear <32606575+InfernoGear@users.noreply.github.com> | 2019-10-04 12:53:48 -0500 |
---|---|---|
committer | InfernoGear <32606575+InfernoGear@users.noreply.github.com> | 2019-10-04 12:53:48 -0500 |
commit | 8da4eff1ed758544beee1a85132c53861627f5be (patch) | |
tree | b762b7d0bc38670fbe20f2864d45cf2755fc268d | |
parent | c1e40eaa1c89f5242863fe55d1f07dc00fc292a8 (diff) |
Started the page.
-rw-r--r-- | Add-a-new-type.md | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/Add-a-new-type.md b/Add-a-new-type.md new file mode 100644 index 0000000..8d62dfc --- /dev/null +++ b/Add-a-new-type.md @@ -0,0 +1,116 @@ +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 + +## 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 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](../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 ++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 +``` + +## 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 .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@" +``` + +## 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 + +WIP |