On this page
  1. Related
  2. Games
  3. References
  4. Sources

Ruby and Sapphire give each species one or two of 77 abilities, and a Pokémon’s personality value picks between two1. An ability reaches into existing rules: Battle Armor blocks critical hits2, Levitate makes Ground moves miss3, and Run Away always escapes4.

Games

GameYearHowNote
Pokémon Ruby and Sapphire200277 abilities, one or two per species, picked by the personality value
Pokémon Emerald2004Levitate, Wonder Guard, Run Away, and the weather-speed abilities bend the rules they touch
Pokémon Platinum2008Technician, Super Luck, Sniper, and Mold Breaker
Pokémon HeartGold and SoulSilver2009lead-Pokémon abilities that double or halve the encounter rate, and the critical-hit abilities
Every claim about this mechanic, by game (12)
Pokémon Ruby and Sapphire 2002Ruby and Sapphire's atk04_critcalc, which Emerald keeps apart from a renamed helper, sums Focus Energy (+2), a move whose effect is high-critical, Sky Attack, Blaze Kick, or Poison Tail (+1), a Scope Lens (+1), and Lucky Punch or Stick on their species (+2), caps the stage at 4, and hits critically 1 time in 16, 8, 4, 3, or 2. Battle Armor or Shell Armor on the target, the STATUS3_CANT_SCORE_A_CRIT flag on the attacker, Wally's tutorial, and the first battle rule it out.Code
Ruby and Sapphire's atk01_accuracycheck, which Emerald keeps with renamed constants, scales a move's percent accuracy by one combined stage ratio, applies Compound Eyes (×1.3), Sand Veil in a sandstorm and Hustle on physical moves (×0.8 each), and a target's evasion item, and misses when a roll from 1 to 100 exceeds the result.Code
Ruby and Sapphire multiply the area's encounter rate by 16, cut it to 80% on the Mach or Acro Bike, apply the flute and Cleanse Tag modifiers, halve it for a lead with Stench and double it for Illuminate, cap it at 2,880, and start a battle when Random() % 2880 is below it. Emerald keeps the roll and adds more ability modifiers.Code
Ruby and Sapphire's TryRunFromBattle always escapes with a Smoke Ball or Run Away; otherwise, in a single battle, a Pokémon at least as fast as the foe escapes, and a slower one when ⌊128P/E⌋+30t, for t earlier tries, beats a random byte. Emerald adds only the Battle Pyramid's and Frontier's rules.Code
Ruby and Sapphire's GetWhoStrikesFirst puts the higher-priority move first; at equal priority the higher adjusted Speed goes first, and a tie is a coin flip. Adjusted Speed applies stat stages, doubles for Swift Swim in rain or Chlorophyll in sun, takes ×1.1 for the player's Pokémon with the third badge outside link battles, halves with a Macho Brace, and quarters under paralysis; a held Quick Claw sets it to the maximum when a per-turn random number is below its parameter, 20, as a percent of 0xFFFF.Code
Ruby and Sapphire define 77 abilities, from Stench (1) to Air Lock (77); a species lists one or two, and when it has two, the lowest bit of the Pokémon's personality value picks which.Code
In Ruby and Sapphire, rain, sandstorm, or drought on the overworld starts a battle in that weather with no turn limit, Drizzle sets lasting rain when its holder enters, and Cloud Nine or Air Lock on the field turns weather's effects off.Code
Pokémon Platinum 2008BattleSystem_CalcCriticalMulti keeps Emerald's stage table, 1 in 16, 8, 4, 3, or 2, capped at stage 4, and its sum: +2 for Focus Energy, +1 for a held item with HOLD_EFFECT_CRITRATE_UP, +2 for Chansey or Farfetch'd holding an item whose hold effect names that species, plus the move's boosts, which in Platinum come from a battle-script variable (criticalBoosts) rather than a list of move effects. It adds +1 for the ability Super Luck, which Emerald's sum doesn't read. Besides Battle Armor and Shell Armor, which an attacker with Mold Breaker ignores, Lucky Chant on the target's side blocks a critical, and so does a MOVE_EFFECT_NO_CRITICAL flag that a comment in the header says is checked but never set. Platinum draws its 16-bit roll before those tests, where Emerald draws it only after its other tests pass.Code
A critical multiplies Platinum's damage by 2 after the base formula (its +2 included), at the same step as Emerald, and by 3 when the attacker has Sniper; Emerald's multiplier has no such case. As in Emerald, the critical then ignores the attacker's lowered attacking stat, the defender's raised defending stat, and Reflect or Light Screen.Code
In Platinum the ability Technician multiplies a move's power by 15/10 (rounded down) when that power is 60 or less, Struggle excepted. The test reads the power after the battle's power multiplier, Charge, and Helping Hand have changed it.Code
Pokémon HeartGold and SoulSilver 2009Before the two rolls, HeartGold and SoulSilver adjust the map's rate in this order: the lead Pokémon's ability (unless it is an Egg) doubles it for Arena Trap, No Guard, or Illuminate, halves it for White Smoke, Quick Feet, or Stench, or for Snow Cloak in snow, capped at 100; the Black Flute halves it and the White Flute raises it by half; and a Cleanse Tag or Pure Incense held by the lead Pokémon cuts it to 2/3. Gold and Silver instead double the rate for the Pokémon March or the Ruins of Alph radio and halve it for the Pokémon Lullaby or a Cleanse Tag.Code
HeartGold and SoulSilver's TryCriticalHit keeps Platinum's critical-hit rule: the stage sum (+2 Focus Energy, +1 for a HOLD_EFFECT_CRITRATE_UP item, +1 Super Luck, +2 for Chansey or Farfetch'd with its own item, plus the move's boosts) capped at 4, a chance of 1 in 16, 8, 4, 3, or 2, blocked by Battle Armor or Shell Armor unless ignored, by Lucky Chant on the target's side, or by bit 15 of the target's move-effect flags (named MOVE_EFFECT_FLAG_LUCKY_CHANT here), and Sniper turning ×2 into ×3.Code

References

  1. ^ abRuby and Sapphire define 77 abilities, from Stench (1) to Air Lock (77); a species lists one or two, and when it has two, the lowest bit of the Pokémon's personality value picks which.Codepret/pokeruby
    How we know
    4#define ABILITY_NONE 0
    5#define ABILITY_STENCH 1
    ⋮
    81#define ABILITY_AIR_LOCK 77
    ⋮
    83#define ABILITIES_COUNT 78
    
    include/constants/abilities.h lines 4–83 at 5784633 · upstream ↗
    1465    if (gBaseStats[species].ability2)
    ⋮
    1467        value = personality & 1;
    1468        SetBoxMonData(boxMon, MON_DATA_ALT_ABILITY, &value);
    
    src/pokemon_1.c lines 1465–1468 at 5784633 · upstream ↗
    1056u8 GetAbilityBySpecies(u16 species, bool8 altAbility)
    ⋮
    1058    if (altAbility)
    1059        gLastUsedAbility = gBaseStats[species].ability2;
    1060    else
    1061        gLastUsedAbility = gBaseStats[species].ability1;
    
    src/pokemon_2.c lines 1056–1063 at 5784633 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  2. ^ abRuby and Sapphire's atk04_critcalc, which Emerald keeps apart from a renamed helper, sums Focus Energy (+2), a move whose effect is high-critical, Sky Attack, Blaze Kick, or Poison Tail (+1), a Scope Lens (+1), and Lucky Punch or Stick on their species (+2), caps the stage at 4, and hits critically 1 time in 16, 8, 4, 3, or 2. Battle Armor or Shell Armor on the target, the STATUS3_CANT_SCORE_A_CRIT flag on the attacker, Wally's tutorial, and the first battle rule it out.Codepret/pokeruby · pret/pokeemeraldrevised
    How we know
    1387    critChance  = 2 * ((gBattleMons[gBattlerAttacker].status2 & STATUS2_FOCUS_ENERGY) != 0)
    1388                + (gBattleMoves[gCurrentMove].effect == EFFECT_HIGH_CRITICAL)
    1389                + (gBattleMoves[gCurrentMove].effect == EFFECT_SKY_ATTACK)
    1390                + (gBattleMoves[gCurrentMove].effect == EFFECT_BLAZE_KICK)
    1391                + (gBattleMoves[gCurrentMove].effect == EFFECT_POISON_TAIL)
    1392                + (holdEffect == HOLD_EFFECT_SCOPE_LENS)
    ⋮
    1399    if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR)
    1400     && !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT)
    1401     && !(gBattleTypeFlags & (BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FIRST_BATTLE))
    1402     && !(Random() % sCriticalHitChance[critChance]))
    
    src/battle_script_commands.c lines 1387–1402 at 5784633 · upstream ↗
    822static const u16 sCriticalHitChance[] = {16, 8, 4, 3, 2};
    
    src/battle_script_commands.c line 822 at 5784633 · upstream ↗
    1253static void Cmd_critcalc(void)
    
    src/battle_script_commands.c lines 1253–1289 at 731ad5b · upstream ↗
    606static const u16 sCriticalHitChance[] = {16, 8, 4, 3, 2};
    
    src/battle_script_commands.c line 606 at 731ad5b · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Revised after a check by a second AI model, 2026-10-21.

    In the claim ledger

  3. ^ abCmd_typecalc flags a Ground move against a Levitate target as missed and “doesn't affect”, and walks no type row.Codepret/pokeemerald
    How we know
    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 ↗

    Checked against the evidence by its author, an AI model, 2026-10-20.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  4. ^Ruby and Sapphire's TryRunFromBattle always escapes with a Smoke Ball or Run Away; otherwise, in a single battle, a Pokémon at least as fast as the foe escapes, and a slower one when ⌊128P/E⌋+30t, for t earlier tries, beats a random byte. Emerald adds only the Battle Pyramid's and Frontier's rules.Codepret/pokeruby · pret/pokeemerald
    How we know
    5465    if (holdEffect == HOLD_EFFECT_CAN_ALWAYS_RUN)
    ⋮
    5471    else if (gBattleMons[bank].ability == ABILITY_RUN_AWAY)
    ⋮
    5477    else
    ⋮
    5481            if (gBattleMons[bank].speed < gBattleMons[bank ^ BIT_SIDE].speed)
    ⋮
    5483                speedVar = (gBattleMons[bank].speed * 128) / (gBattleMons[bank ^ BIT_SIDE].speed) + (gBattleStruct->runTries * 30);
    5484                if (speedVar > (Random() & 0xFF))
    
    src/battle_main.c lines 5465–5490 at 5784633 · upstream ↗
    src/battle_util.c#L407-L485 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  5. ^In Ruby and Sapphire, rain, sandstorm, or drought on the overworld starts a battle in that weather with no turn limit, Drizzle sets lasting rain when its holder enters, and Cloud Nine or Air Lock on the field turns weather's effects off.Codepret/pokeruby
    How we know
    1794            case 0xFF: //weather from overworld
    1795                switch (GetCurrentWeather())
    ⋮
    1797                case WEATHER_RAIN_LIGHT:
    ⋮
    1802                        gBattleWeather = (B_WEATHER_RAIN_TEMPORARY | B_WEATHER_RAIN_PERMANENT);
    ⋮
    1833            case ABILITY_DRIZZLE:
    1834                if (!(gBattleWeather & B_WEATHER_RAIN_PERMANENT))
    ⋮
    1836                    gBattleWeather = (B_WEATHER_RAIN_PERMANENT | B_WEATHER_RAIN_TEMPORARY);
    
    src/battle_util.c lines 1794–1836 at 5784633 · upstream ↗
    50#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0)))
    
    include/battle_util.h line 50 at 5784633 · upstream ↗
    771        case ENDTURN_RAIN:
    772            if (gBattleWeather & B_WEATHER_RAIN)
    ⋮
    774                if (!(gBattleWeather & B_WEATHER_RAIN_PERMANENT))
    ⋮
    776                    if (--gWishFutureKnock.weatherDuration == 0)
    
    src/battle_util.c lines 771–776 at 5784633 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  6. ^After the rows, a Wonder Guard target makes a damaging move miss on the turn it attacks, unless the move carries the super-effective flag without the not-very-effective one.Codepret/pokeemerald
    How we know
    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)
    
    src/battle_script_commands.c lines 1409–1419 at 731ad5b · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-20.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  7. ^TryRunFromBattle always escapes with a Smoke Ball, or with the Run Away ability outside the Battle Pyramid. Otherwise, in a single battle outside the Pyramid, it escapes when the player's Pokémon is at least as fast as the foe, or when ⌊128P/E⌋+30n, stored in a byte, exceeds a random byte, for n earlier attempts.Codepret/pokeemeraldrevised
    How we know
    412    u8 speedVar;
    ⋮
    416    else
    ⋮
    421    if (holdEffect == HOLD_EFFECT_CAN_ALWAYS_RUN)
    ⋮
    425        effect++;
    ⋮
    427    else if (gBattleMons[battler].ability == ABILITY_RUN_AWAY)
    ⋮
    429        if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
    ⋮
    431            gBattleStruct->runTries++;
    ⋮
    434            if (speedVar > (Random() & 0xFF))
    ⋮
    438                effect++;
    ⋮
    441        else
    ⋮
    445            effect++;
    ⋮
    450        effect++;
    ⋮
    
    src/battle_util.c lines 407–475 at 731ad5b · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-20.

    Revised after a check by a second AI model, 2026-10-21: The run formula holds only in single battles outside the Battle Pyramid.

    In the claim ledger

  8. ^GetWhoStrikesFirst puts the higher-priority move first; at equal priority the higher Speed goes first, after stat stages, Swift Swim or Chlorophyll in their weather, the third badge's ×1.1 for the player, Macho Brace, paralysis's ×¼, and a Quick Claw that triggers; a tie is a coin flip.Codepret/pokeemerald
    How we know
    4595u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
    ⋮
    4609        else
    ⋮
    4615        else
    ⋮
    4618    else
    ⋮
    4633    else
    ⋮
    4644        speedBattler1 = (speedBattler1 * 110) / 100;
    ⋮
    4650    if (gBattleMons[battler1].status1 & STATUS1_PARALYSIS)
    4651        speedBattler1 /= 4;
    ⋮
    4653    if (holdEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * holdEffectParam) / 100)
    4654        speedBattler1 = UINT_MAX;
    ⋮
    4667    else
    ⋮
    4687    if (holdEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * holdEffectParam) / 100)
    ⋮
    
    src/battle_main.c lines 4595–4750 at 731ad5b · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-20.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

Sources

Code