Pokémon Emerald
A Generation III Pokémon game for Game Boy Advance.
Facts
- Released
- 2004-09-16 (JP); 2005-05-01 (NA)
- Genre
- Japanese role-playing game, Monster-taming
- Platforms
- Game Boy Advance
- Developer
- Game Freak
- Publisher
- Nintendo
- Series
- Pokémon
- Code
- Decompilation by pret contributors
- Evidence
- Code (4)
Wiki (1) - Sources
- 4
On this page
Pokémon Emerald is a Generation III Game Boy Advance game, released in Japan in September 2004 and North America in May 20051. The code read here is pret’s pokeemerald decompilation, C that compiles to the original ROM.
Its type effectiveness table is Pokémon Crystal’s, row for row2. Effectiveness text now comes from flags, where a ½ row and a 2× row cancel3. Levitate acts before the rows, and Wonder Guard after4,5.
Data
Mechanics
| Mechanic | Kind | How |
|---|---|---|
| Type effectiveness | 17 types | Crystal's 17-type chart, with abilities such as Levitate and Wonder Guard on top |
| Same-type attack bonus | Half again | damage × 15 / 10, just before the type rows |
| Damage formula | Attack over defense | a critical doubles the base damage, and the random factor becomes 85–100% |
| Critical hit | From stages | stages from 1 in 16 to 1 in 2, and Battle Armor and Shell Armor block it |
| Hit chance | Move accuracy | accuracy in percent times one combined stage ratio, checked before the damage |
| Multi-hit attack | Per-hit damage | 2–5 hits, each with its own critical and damage roll |
| Random encounter | By area | 16 times the area's rate out of 2,880 per step, with bike, flute, item, and ability modifiers |
| Fleeing | Speed ratio | 128 times Speed over the foe's, plus 30 per try, out of 256; a Smoke Ball or Run Away always escapes |
| Turn order | Priority, then Speed | priority, then Speed after stages, weather abilities, the badge, items, and paralysis |
| Random number generator | Formula | the ISO C example generator, returning the top 16 bits |
| Ability | Levitate, Wonder Guard, Run Away, and the weather-speed abilities bend the rules they touch | |
| Held item | a Scope Lens, a Smoke Ball, a Macho Brace, and a Quick Claw | |
| Capture | Four shake checks | the ball, HP and status set a rate, and four 16-bit rolls under a threshold near 65535 (a/255)^(1/4) catch; a miss shows the shakes it passed |
| Physical/special split | By type | the type decides, as in the earlier games |
Every claim about this game, by concept (35)
References
- ^WikiBulbapedia, “Pokémon Emerald Version”
How we know
Pokémon Emerald (developer Game Freak, publisher Nintendo, Game Boy Advance, and Generation III core series) came out in Japan on 16 September 2004 and North America on 1 May 2005.
Developer: Game Freak … Publisher: Nintendo … Part of: Generation III core series … Japan: September 16, 2004 … North America: May 1, 2005
infobox, Basic info and Release dates · archived copy ↗ - ^Codepret/pokecrystal · pret/pokeemerald · Bulbapedia, “Type/Type chart”type_matchups.asm 1–118; battle_main.c 335–449
How we know
Computed by comparing the two tables row by row: Emerald's type table holds the same 110 rows as Crystal's, in the same order, so no type is new and no matchup changed.
3 db NORMAL, ROCK, NOT_VERY_EFFECTIVE 4 db NORMAL, STEEL, NOT_VERY_EFFECTIVE ⋮ 112 db -2 ; end (with Foresight)
data/types/type_matchups.asm lines 1–118 at 97187cd · upstream ↗ 337 TYPE_NORMAL, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE, 338 TYPE_NORMAL, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, ⋮ 445 TYPE_FORESIGHT, TYPE_FORESIGHT, TYPE_MUL_NO_EFFECT,
src/battle_main.c lines 335–449 at 731ad5b · upstream ↗ This matchup table is used from Generation II to Generation V.
Type charts: Generations II-V · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Codepret/pokeemeraldbattle_script_commands.c 1327–1352
How we know
The text comes from flags the type-damage step sets per row: a 2× row cancels an earlier not-very-effective flag, a ½ row an earlier super-effective one, and ×0 sets "doesn't affect", clearing both.
1331 gMoveResultFlags &= ~MOVE_RESULT_NOT_VERY_EFFECTIVE; ⋮ 1335 if (gBattleMoves[gCurrentMove].power && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) ⋮ 1339 else ⋮ 1343 case TYPE_MUL_SUPER_EFFECTIVE: 1344 if (gBattleMoves[gCurrentMove].power && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) ⋮ 1346 if (gMoveResultFlags & MOVE_RESULT_NOT_VERY_EFFECTIVE) 1347 gMoveResultFlags &= ~MOVE_RESULT_NOT_VERY_EFFECTIVE; 1348 else 1349 gMoveResultFlags |= MOVE_RESULT_SUPER_EFFECTIVE;
src/battle_script_commands.c lines 1327–1352 at 731ad5b · upstream ↗ - ^Codepret/pokeemeraldbattle_script_commands.c 1375–1384
How we know
The type-calculation battle command flags a Ground move against a Levitate target as missed and “doesn't affect”, and walks no type row.
1375 if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND) ⋮ 1377 gLastUsedAbility = gBattleMons[gBattlerTarget].ability; 1378 gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE);
src/battle_script_commands.c lines 1375–1384 at 731ad5b · upstream ↗ - ^Codepret/pokeemeraldbattle_script_commands.c 1409–1414, 8221–8238
How we know
After the type rows, a target with Wonder Guard makes a damaging move miss unless the move carries the super-effective flag without the not-very-effective one. The check is skipped on the charging turn of a two-turn move (Skull Bash, Razor Wind, Sky Attack, Solar Beam outside sunshine, the semi-invulnerable moves, and Bide), so it applies on the turn the move strikes.
1409 if (gBattleMons[gBattlerTarget].ability == ABILITY_WONDER_GUARD && AttacksThisTurn(gBattlerAttacker, gCurrentMove) == 2 1410 && (!(gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE) || ((gMoveResultFlags & (MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE)) == (MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE))) 1411 && gBattleMoves[gCurrentMove].power) ⋮ 1414 gMoveResultFlags |= MOVE_RESULT_MISSED;
src/battle_script_commands.c lines 1409–1414 at 731ad5b · upstream ↗ 8221static u8 AttacksThisTurn(u8 battler, u16 move) // Note: returns 1 if it's a charging turn, otherwise 2 ⋮ 8224 if (gBattleMoves[move].effect == EFFECT_SOLAR_BEAM 8225 && (gBattleWeather & B_WEATHER_SUN)) 8226 return 2; ⋮ 8228 if (gBattleMoves[move].effect == EFFECT_SKULL_BASH 8229 || gBattleMoves[move].effect == EFFECT_RAZOR_WIND 8230 || gBattleMoves[move].effect == EFFECT_SKY_ATTACK 8231 || gBattleMoves[move].effect == EFFECT_SOLAR_BEAM 8232 || gBattleMoves[move].effect == EFFECT_SEMI_INVULNERABLE 8233 || gBattleMoves[move].effect == EFFECT_BIDE) ⋮ 8235 if ((gHitMarker & HITMARKER_CHARGING)) 8236 return 1; ⋮
src/battle_script_commands.c lines 8221–8238 at 731ad5b · upstream ↗
Sources
Code
- pret contributors. 2026. “pokecrystal: disassembly of Pokémon Crystal.” pret. Commit 97187cd. pret/pokecrystal @ 97187cd · licence, all uses
- pret contributors. 2026. “pokeemerald: decompilation of Pokémon Emerald.” pret. Commit 731ad5b. pret/pokeemerald @ 731ad5b · licence, all uses
Secondary
- Bulbapedia contributors. 2026. “Pokémon Emerald Version.” Bulbapedia (Bulbagarden). revision 4629817. original · archived · licence, all uses
- Bulbapedia contributors. 2026. “Type/Type chart.” Bulbapedia (Bulbagarden). revision 4615556. original · archived · licence, all uses