Split type matchup off into a file

This sets precedent for including constants in context.
This commit is contained in:
yenatch 2013-02-04 16:22:10 -05:00
parent 0935908367
commit 28b56c51bb
2 changed files with 130 additions and 119 deletions

128
data/type_matchup.asm Normal file
View File

@ -0,0 +1,128 @@
; The multiplier is divided by 10, so we can use values like 0.5.
SUPER_EFFECTIVE EQU 20
NOT_VERY_EFFECTIVE EQU 05
NO_EFFECT EQU 00
; All other cases are neutral (1x).
; attacker defender*=
db NORMAL, ROCK, NOT_VERY_EFFECTIVE
db NORMAL, STEEL, NOT_VERY_EFFECTIVE
db FIRE, FIRE, NOT_VERY_EFFECTIVE
db FIRE, WATER, NOT_VERY_EFFECTIVE
db FIRE, GRASS, SUPER_EFFECTIVE
db FIRE, ICE, SUPER_EFFECTIVE
db FIRE, BUG, SUPER_EFFECTIVE
db FIRE, ROCK, NOT_VERY_EFFECTIVE
db FIRE, DRAGON, NOT_VERY_EFFECTIVE
db FIRE, STEEL, SUPER_EFFECTIVE
db WATER, FIRE, SUPER_EFFECTIVE
db WATER, WATER, NOT_VERY_EFFECTIVE
db WATER, GRASS, NOT_VERY_EFFECTIVE
db WATER, GROUND, SUPER_EFFECTIVE
db WATER, ROCK, SUPER_EFFECTIVE
db WATER, DRAGON, NOT_VERY_EFFECTIVE
db ELECTRIC, WATER, SUPER_EFFECTIVE
db ELECTRIC, ELECTRIC, NOT_VERY_EFFECTIVE
db ELECTRIC, GRASS, NOT_VERY_EFFECTIVE
db ELECTRIC, GROUND, NO_EFFECT
db ELECTRIC, FLYING, SUPER_EFFECTIVE
db ELECTRIC, DRAGON, NOT_VERY_EFFECTIVE
db GRASS, FIRE, NOT_VERY_EFFECTIVE
db GRASS, WATER, SUPER_EFFECTIVE
db GRASS, GRASS, NOT_VERY_EFFECTIVE
db GRASS, POISON, NOT_VERY_EFFECTIVE
db GRASS, GROUND, SUPER_EFFECTIVE
db GRASS, FLYING, NOT_VERY_EFFECTIVE
db GRASS, BUG, NOT_VERY_EFFECTIVE
db GRASS, ROCK, SUPER_EFFECTIVE
db GRASS, DRAGON, NOT_VERY_EFFECTIVE
db GRASS, STEEL, NOT_VERY_EFFECTIVE
db ICE, WATER, NOT_VERY_EFFECTIVE
db ICE, GRASS, SUPER_EFFECTIVE
db ICE, ICE, NOT_VERY_EFFECTIVE
db ICE, GROUND, SUPER_EFFECTIVE
db ICE, FLYING, SUPER_EFFECTIVE
db ICE, DRAGON, SUPER_EFFECTIVE
db ICE, STEEL, NOT_VERY_EFFECTIVE
db ICE, FIRE, NOT_VERY_EFFECTIVE
db FIGHTING, NORMAL, SUPER_EFFECTIVE
db FIGHTING, ICE, SUPER_EFFECTIVE
db FIGHTING, POISON, NOT_VERY_EFFECTIVE
db FIGHTING, FLYING, NOT_VERY_EFFECTIVE
db FIGHTING, PSYCHIC, NOT_VERY_EFFECTIVE
db FIGHTING, BUG, NOT_VERY_EFFECTIVE
db FIGHTING, ROCK, SUPER_EFFECTIVE
db FIGHTING, DARK, SUPER_EFFECTIVE
db FIGHTING, STEEL, SUPER_EFFECTIVE
db POISON, GRASS, SUPER_EFFECTIVE
db POISON, POISON, NOT_VERY_EFFECTIVE
db POISON, GROUND, NOT_VERY_EFFECTIVE
db POISON, ROCK, NOT_VERY_EFFECTIVE
db POISON, GHOST, NOT_VERY_EFFECTIVE
db POISON, STEEL, NO_EFFECT
db GROUND, FIRE, SUPER_EFFECTIVE
db GROUND, ELECTRIC, SUPER_EFFECTIVE
db GROUND, GRASS, NOT_VERY_EFFECTIVE
db GROUND, POISON, SUPER_EFFECTIVE
db GROUND, FLYING, NO_EFFECT
db GROUND, BUG, NOT_VERY_EFFECTIVE
db GROUND, ROCK, SUPER_EFFECTIVE
db GROUND, STEEL, SUPER_EFFECTIVE
db FLYING, ELECTRIC, NOT_VERY_EFFECTIVE
db FLYING, GRASS, SUPER_EFFECTIVE
db FLYING, FIGHTING, SUPER_EFFECTIVE
db FLYING, BUG, SUPER_EFFECTIVE
db FLYING, ROCK, NOT_VERY_EFFECTIVE
db FLYING, STEEL, NOT_VERY_EFFECTIVE
db PSYCHIC, FIGHTING, SUPER_EFFECTIVE
db PSYCHIC, POISON, SUPER_EFFECTIVE
db PSYCHIC, PSYCHIC, NOT_VERY_EFFECTIVE
db PSYCHIC, DARK, NO_EFFECT
db PSYCHIC, STEEL, NOT_VERY_EFFECTIVE
db BUG, FIRE, NOT_VERY_EFFECTIVE
db BUG, GRASS, SUPER_EFFECTIVE
db BUG, FIGHTING, NOT_VERY_EFFECTIVE
db BUG, POISON, NOT_VERY_EFFECTIVE
db BUG, FLYING, NOT_VERY_EFFECTIVE
db BUG, PSYCHIC, SUPER_EFFECTIVE
db BUG, GHOST, NOT_VERY_EFFECTIVE
db BUG, DARK, SUPER_EFFECTIVE
db BUG, STEEL, NOT_VERY_EFFECTIVE
db ROCK, FIRE, SUPER_EFFECTIVE
db ROCK, ICE, SUPER_EFFECTIVE
db ROCK, FIGHTING, NOT_VERY_EFFECTIVE
db ROCK, GROUND, NOT_VERY_EFFECTIVE
db ROCK, FLYING, SUPER_EFFECTIVE
db ROCK, BUG, SUPER_EFFECTIVE
db ROCK, STEEL, NOT_VERY_EFFECTIVE
db GHOST, NORMAL, NO_EFFECT
db GHOST, PSYCHIC, SUPER_EFFECTIVE
db GHOST, DARK, NOT_VERY_EFFECTIVE
db GHOST, STEEL, NOT_VERY_EFFECTIVE
db GHOST, GHOST, SUPER_EFFECTIVE
db DRAGON, DRAGON, SUPER_EFFECTIVE
db DRAGON, STEEL, NOT_VERY_EFFECTIVE
db DARK, FIGHTING, NOT_VERY_EFFECTIVE
db DARK, PSYCHIC, SUPER_EFFECTIVE
db DARK, GHOST, SUPER_EFFECTIVE
db DARK, DARK, NOT_VERY_EFFECTIVE
db DARK, STEEL, NOT_VERY_EFFECTIVE
db STEEL, FIRE, NOT_VERY_EFFECTIVE
db STEEL, WATER, NOT_VERY_EFFECTIVE
db STEEL, ELECTRIC, NOT_VERY_EFFECTIVE
db STEEL, ICE, SUPER_EFFECTIVE
db STEEL, ROCK, SUPER_EFFECTIVE
db STEEL, STEEL, NOT_VERY_EFFECTIVE
; Foresight removes Ghost's immunities.
db $fe
db NORMAL, GHOST, NO_EFFECT
db FIGHTING, GHOST, NO_EFFECT
db $ff ; end

121
main.asm
View File

@ -5976,125 +5976,8 @@ SECTION "bankD",DATA,BANK[$D]
INCBIN "baserom.gbc",$34000,$34bb1 - $34000
TypeEffects: ; 34bb1
; multiplier /= 10 (20 = 2.0 etc)
; attacker defender *=
db NORMAL, ROCK, 05
db NORMAL, STEEL, 05
db FIRE, FIRE, 05
db FIRE, WATER, 05
db FIRE, GRASS, 20
db FIRE, ICE, 20
db FIRE, BUG, 20
db FIRE, ROCK, 05
db FIRE, DRAGON, 05
db FIRE, STEEL, 20
db WATER, FIRE, 20
db WATER, WATER, 05
db WATER, GRASS, 05
db WATER, GROUND, 20
db WATER, ROCK, 20
db WATER, DRAGON, 05
db ELECTRIC, WATER, 20
db ELECTRIC, ELECTRIC, 05
db ELECTRIC, GRASS, 05
db ELECTRIC, GROUND, 00
db ELECTRIC, FLYING, 20
db ELECTRIC, DRAGON, 05
db GRASS, FIRE, 05
db GRASS, WATER, 20
db GRASS, GRASS, 05
db GRASS, POISON, 05
db GRASS, GROUND, 20
db GRASS, FLYING, 05
db GRASS, BUG, 05
db GRASS, ROCK, 20
db GRASS, DRAGON, 05
db GRASS, STEEL, 05
db ICE, WATER, 05
db ICE, GRASS, 20
db ICE, ICE, 05
db ICE, GROUND, 20
db ICE, FLYING, 20
db ICE, DRAGON, 20
db ICE, STEEL, 05
db ICE, FIRE, 05
db FIGHTING, NORMAL, 20
db FIGHTING, ICE, 20
db FIGHTING, POISON, 05
db FIGHTING, FLYING, 05
db FIGHTING, PSYCHIC, 05
db FIGHTING, BUG, 05
db FIGHTING, ROCK, 20
db FIGHTING, DARK, 20
db FIGHTING, STEEL, 20
db POISON, GRASS, 20
db POISON, POISON, 05
db POISON, GROUND, 05
db POISON, ROCK, 05
db POISON, GHOST, 05
db POISON, STEEL, 00
db GROUND, FIRE, 20
db GROUND, ELECTRIC, 20
db GROUND, GRASS, 05
db GROUND, POISON, 20
db GROUND, FLYING, 00
db GROUND, BUG, 05
db GROUND, ROCK, 20
db GROUND, STEEL, 20
db FLYING, ELECTRIC, 05
db FLYING, GRASS, 20
db FLYING, FIGHTING, 20
db FLYING, BUG, 20
db FLYING, ROCK, 05
db FLYING, STEEL, 05
db PSYCHIC, FIGHTING, 20
db PSYCHIC, POISON, 20
db PSYCHIC, PSYCHIC, 05
db PSYCHIC, DARK, 00
db PSYCHIC, STEEL, 05
db BUG, FIRE, 05
db BUG, GRASS, 20
db BUG, FIGHTING, 05
db BUG, POISON, 05
db BUG, FLYING, 05
db BUG, PSYCHIC, 20
db BUG, GHOST, 05
db BUG, DARK, 20
db BUG, STEEL, 05
db ROCK, FIRE, 20
db ROCK, ICE, 20
db ROCK, FIGHTING, 05
db ROCK, GROUND, 05
db ROCK, FLYING, 20
db ROCK, BUG, 20
db ROCK, STEEL, 05
db GHOST, NORMAL, 00
db GHOST, PSYCHIC, 20
db GHOST, DARK, 05
db GHOST, STEEL, 05
db GHOST, GHOST, 20
db DRAGON, DRAGON, 20
db DRAGON, STEEL, 05
db DARK, FIGHTING, 05
db DARK, PSYCHIC, 20
db DARK, GHOST, 20
db DARK, DARK, 05
db DARK, STEEL, 05
db STEEL, FIRE, 05
db STEEL, WATER, 05
db STEEL, ELECTRIC, 05
db STEEL, ICE, 20
db STEEL, ROCK, 20
db STEEL, STEEL, 05
db $fe ; foresight
db NORMAL, GHOST, 00
db FIGHTING, GHOST, 00
db $ff ; end
TypeMatchup: ; 34bb1
INCLUDE "data/type_matchup.asm"
; 34cfd
INCBIN "baserom.gbc",$34cfd,$38000 - $34cfd