class PBTypes
NORMAL=0
FIGHTING=1
FLYING=2
POISON=3
GROUND=4
ROCK=5
BUG=6
GHOST=7
STEEL=8
QMARKS=9
FIRE=10
WATER=11
GRASS=12
ELECTRIC=13
PSYCHIC=14
ICE=15
DRAGON=16
DARK=17
LIGHT=18
def PBTypes.getCount
# Change this number if you add a new type
# This number doesn't include QMARKS
return 18
end
PBTypeChart=[
# Rows indicate the attack's type
# Columns indicate the opponent's type
# 0 - Immune
# 1 - "Not very effective"
# 2 - Normal
# 4 - "Super effective"
# When you add a new type, add a number showing effect
# on opponents with that type to each line, then add a
# new line showing effect on attacks with the new type
# on opponents.
2,2,2,2,2,1,2,0,1,2,2,2,2,2,2,2,2,
4,2,1,1,2,4,1,0,4,2,2,2,1,4,2,4,2,
2,4,2,2,2,1,4,2,1,2,4,1,2,2,2,2,2,
2,2,2,1,1,1,2,1,0,2,4,2,2,2,2,2,2,
2,2,0,4,2,4,1,2,4,2,1,4,2,2,2,2,2,
2,1,4,2,1,2,4,2,1,2,2,2,2,4,2,2,2,
2,1,1,1,2,2,2,1,1,2,4,2,4,2,2,4,2,
0,2,2,2,2,2,2,4,1,2,2,2,4,2,2,1,0,
2,2,2,2,2,4,2,2,1,1,2,1,2,4,2,2,2,
2,2,2,2,2,1,4,2,4,1,4,2,2,4,1,2,2,
2,2,2,2,4,4,2,2,2,1,1,2,2,2,1,2,2,
2,2,1,1,4,4,1,2,1,4,1,2,2,2,1,2,2,
2,2,4,2,0,2,2,2,2,4,1,1,2,2,1,2,2,
2,4,2,4,2,2,2,2,1,2,2,2,1,2,2,0,2,
2,2,4,2,4,2,2,2,1,1,4,2,2,1,4,2,2,
2,2,2,2,2,2,2,2,1,2,2,2,2,2,4,2,2,
2,1,2,2,2,2,2,4,1,2,2,2,4,2,2,1,0,
2,1,2,2,2,2,2,4,1,2,2,2,4,2,2,1,1,
2,2,2,2,2,2,2,4,2,2,2,2,2,2,2,4,1
]
def PBTypes.getName(type)
# Add the names of new types at the end of
# this list
types=[
_INTL("NORMAL"),
_INTL("FIGHTING"),
_INTL("FLYING"),
_INTL("POISON"),
_INTL("GROUND"),
_INTL("ROCK"),
_INTL("BUG"),
_INTL("GHOST"),
_INTL("STEEL"),
_INTL("???"),
_INTL("FIRE"),
_INTL("WATER"),
_INTL("GRASS"),
_INTL("ELECTRIC"),
_INTL("PSYCHIC"),
_INTL("ICE"),
_INTL("DRAGON"),
_INTL("DARK"),
_INTL("LIGHT")
]
return types[type]
end
end