Type Chart #322
-
|
Hello, so, when editing the type chart I saw that _ would mean 1, h would mean 1/2 and x would be Nan, but I'm having a hard time understanding it, normal has 2 for its fighting weakness and 0 for its ghost immunity, for example, but if we look for let's say, grass, it also has 2 for water, but grass resists water, how are they differentiated? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
First, make sure you're looking at const typesInPokemondbOrder = [
Type.normal,
Type.fire,
Type.water,
Type.electric,
Type.grass,
Type.ice,
Type.fighting,
Type.poison,
Type.ground,
Type.flying,
Type.psychic,
Type.bug,
Type.rock,
Type.ghost,
Type.dragon,
Type.dark,
Type.steel,
Type.fairy,
Type.stellar,
];Defense types are vertical (columns), offense types are horizontal (rows). So in this image, the green column is the Grass type defense column, and blue row is the Water type offense row. If you look at where they meet, that represents "Water vs Grass", which shows I hope that helps. This file honestly hurts my eyes to look at lol. I might change it in the future because it's really really hard to read and verify that it makes sense. I think it would make a lot more sense like this: const offenseMatchups = {
water: {
ground: 2,
rock: 2,
fire: 2,
water: 1 / 2,
grass: 1 / 2,
dragon: 1 / 2,
}
};
const defenseMatchups = {
water: {
grass: 2,
electric: 2,
fire: 1 / 2,
water: 1 / 2,
ice: 1 / 2,
steel 1 / 2,
}
};It would be a lot easier to look at Bulbapedia and verify the matchups are correct, plus it would be easier to edit them later. The current approach is based on me lazily scraping the original PokemonDB matchup table, but I regret writing it this way lol... |
Beta Was this translation helpful? Give feedback.

First, make sure you're looking at
typesInPokemondbOrder. The filedata-matchups.tsxuses the types in the order from pokemondb.net, which is different from the type order bulbapedia and pkmn.help uses.Defense types are vertical (columns), offense types are horizontal (rows). So in this image, the green column is the Grass type defense column, and blue row is the Water type offense row.