Check the Bulbagarden home page for up-to-date Pokémon news and discuss it on the forums or in the Bulbagarden Discord server.
Type chart data structure (Generation III)
The type chart in the Generation III Pokémon games are stored in a 336-byte data structure.
The data structure consists of 112 3-byte entries, all of which use the following format. Data whose names are marked with an asterisk (*) have more information below the table.
|Attacking Type*||byte||The type of the move being used.|
|Defending Type*||byte||The type of the Pokémon being attacked.|
|Effectiveness*||byte||Used to determine the Damage multiplier.|
Types are enumerated like this:
|0x00||0||Totally ineffective, such as Electric on Ground.|
|0x05||5||Not very effective, such as Water on Grass.|
|0x14||20||Supereffective, such as Ice on Dragon|
Normally effective attacks, such as Bug on Normal, assume a default value of 0x0A (10), so they don't need to be listed in this table.
Foresight and Odor Sleuth
Near the end of the data structure, there are three bytes that signal the end of the normal part of the table - FE FE 00. There are only two entries after this, and they are Fighting and Normal on Ghost, respectively.
However, this area of the table is unique in that all entries in it are ignored after Foresight or Odor Sleuth is used, simply reverting to normal damage.
The end of the table is marked with FF FF 00.
00 05 05 // Normal -> Rock (Not very effective) 00 08 05 // Normal -> Steel (Not very effective) 0A 0A 05 // Fire -> Fire (Not very effective) 0A 0B 05 // Fire -> Water (Not very effective) 0A 0C 14 // Fire -> Grass (Super effective) 0A 0F 14 // Fire -> Ice (Super effective) 0A 06 14 // Fire -> Bug (Super effective) 0A 05 05 // Fire -> Rock (Not very effective) 0A 10 05 // Fire -> Dragon (Not very effective) 0A 08 14 // Fire -> Steel (Super effective) 0B 0A 14 // Water -> Fire (Super effective)
|This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.|