The DexAbilities API provides comprehensive data about Pokemon abilities including their effects, ratings, flags, and how they interact in battle. Access it through Dex.abilities.
import { Dex } from './sim/dex';// Get an ability by nameconst intimidate = Dex.abilities.get('Intimidate');console.log(intimidate.name); // 'Intimidate'console.log(intimidate.rating); // 3.5// Get all abilitiesconst allAbilities = Dex.abilities.all();console.log(allAbilities.length); // 307 (in Gen 9)
The flags object contains boolean properties indicating special ability behaviors:
interface AbilityFlags { breakable?: 1; // Suppressed by Mold Breaker and similar cantsuppress?: 1; // Can't be suppressed by Gastro Acid/Neutralizing Gas failroleplay?: 1; // Role Play fails if target has this failskillswap?: 1; // Skill Swap fails if either Pokemon has this noentrain?: 1; // Entrainment fails if user has this noreceiver?: 1; // Receiver/Power of Alchemy won't copy this notrace?: 1; // Trace cannot copy this notransform?: 1; // Disabled when the user is Transformed}
// Find abilities that boost statsconst statBoosters = Dex.abilities.all().filter(ability => { const desc = ability.desc.toLowerCase(); return desc.includes('attack') || desc.includes('defense') || desc.includes('speed');});// Examplesconst hugePower = Dex.abilities.get('Huge Power');console.log(hugePower.shortDesc); // 'Attack is doubled.'const speedBoost = Dex.abilities.get('Speed Boost');console.log(speedBoost.shortDesc); // 'Speed is raised by 1 at the end of each full turn.'
// Immunity-granting abilitiesconst levitate = Dex.abilities.get('Levitate');console.log(levitate.shortDesc); // 'Immune to Ground moves.'const voltAbsorb = Dex.abilities.get('Volt Absorb');console.log(voltAbsorb.shortDesc); // 'Restores 1/4 max HP when hit by Electric moves; Electric immunity.'// Damage reductionconst filter = Dex.abilities.get('Filter');console.log(filter.shortDesc); // 'Super effective moves against this Pokemon deal 0.75x damage.'const solidRock = Dex.abilities.get('Solid Rock');console.log(solidRock.shortDesc); // 'Super effective moves against this Pokemon deal 0.75x damage.'
const adaptability = Dex.abilities.get('Adaptability');console.log(adaptability.shortDesc); // 'STAB moves have 2x power instead of 1.5x.'const sheerForce = Dex.abilities.get('Sheer Force');console.log(sheerForce.shortDesc); // "Moves with secondary effects have 1.3x power; nullifies their effects."const technician = Dex.abilities.get('Technician');console.log(technician.shortDesc); // 'Moves with 60 power or less have 1.5x power.'
const regenerator = Dex.abilities.get('Regenerator');console.log(regenerator.shortDesc); // 'Restores 1/3 max HP on switch-out.'const magicBounce = Dex.abilities.get('Magic Bounce');console.log(magicBounce.shortDesc); // 'Reflects most status moves back at the user.'const prankster = Dex.abilities.get('Prankster');console.log(prankster.shortDesc); // 'Status moves have +1 priority.'
// Get all abilities with rating >= 4const topTier = Dex.abilities.all().filter(a => a.rating >= 4 && !a.isNonstandard);// Get all Gen 3 abilitiesconst gen3Abilities = Dex.abilities.all().filter(a => a.gen === 3);// Get all abilities that can't be tracedconst untraceableAbilities = Dex.abilities.all().filter(a => a.flags.notrace);// Get all abilities that suppress weatherconst weatherSuppressors = Dex.abilities.all().filter(a => a.suppressWeather);// Get all abilities that are breakable by Mold Breakerconst breakableAbilities = Dex.abilities.all().filter(a => a.flags.breakable);
// Abilities were introduced in Gen 3const gen2Dex = Dex.mod('gen2');const gen2Abilities = gen2Dex.abilities.all();console.log(gen2Abilities.length); // 0 or special 'No Ability' entry// Some abilities changed between generationsconst gen4Levitate = Dex.mod('gen4').abilities.get('Levitate');const gen8Levitate = Dex.mod('gen8').abilities.get('Levitate');// Core effect remains the same, but implementation details may differ// New abilities in Gen 9const gen9NewAbilities = Dex.abilities.all().filter(a => a.gen === 9);console.log(`Gen 9 introduced ${gen9NewAbilities.length} new abilities`);