Cobblemon 1.8.4 Battle AI & Catching Architecture

Cobblemon 1.8.4 Battle AI (42 Classes), StrongBattleAI & Catch Rate Modifiers

Bytecode-verified reference to all 42 top-level classes across battles/ai/ (8), api/battles/ (14), and api/pokeball/catching/ (20), including all 16 StrongBattleAI constructor scoring constants, 6 skill tiers (0–5), all 11 static CatchRateModifiers, 3 modifier factories, and 3 post-capture effects.

Total API Classes
42 (8 AI · 14 Battle · 20 Catching)
StrongBattleAI Tuning
16 Constants · Skill 0–5 (0%–100%)
CatchRateModifiers
11 Built-In + 3 Factories + 3 Effects
Actors & Outcomes
3 ActorTypes · 5 BattleEndResults
Package Subsystem
JVM Type
API Surface Size
Inheritance
Battle AI (battles/ai) · ClassRandomBattleAI

Baseline battle AI that picks uniformly at random among usable moves, valid targets, or available switch-in party members.

Methods: RandomBattleAI, choose, onHealthChange

0 fields · 3 methodsStrongBattleAI Math →
Battle AI (battles/ai) · ClassStrongBattleAI

Skill-scaled tactical battle AI (skill 0..5) using ActiveTracker, 16 scoring/threshold constants, damage estimation, matchup scoring, and voluntary switch-out checks.

Fields: skill, speedTierCoefficient, trickRoomCoefficient, typeMatchupWeightConsideration (+14 more) · Methods: StrongBattleAI, checkSkillLevel, checkSwitchOutSkill, calculateDamage (+18)

18 fields · 22 methodsStrongBattleAI Math →
Battle AI (battles/ai) · ObjectAIUtility

Helper calculations supporting StrongBattleAI move scoring, stat stage adjustments, and matchup comparisons.

Fields: typeEffectiveness, multiHitMoves, statusMoves, boostFromMoves (+11 more) · Methods: AIUtility, getDamageMultiplier, getTypeEffectiveness, getMultiHitMoves (+14)

15 fields · 18 methodsStrongBattleAI Math →
Battle AI (battles/ai) · ClassActiveTracker

Tracks active battle sides, actors, and per-Pokémon state snapshots for StrongBattleAI decision evaluation.

Fields: currentRoom, currentTerrain, currentWeather, alliedSide (+1 more) · Methods: ActiveTracker, getCurrentRoom, setCurrentRoom, getCurrentTerrain (+8)

5 fields · 12 methodsStrongBattleAI Math →
Battle AI (battles/ai) · ClassActiveTrackerKt

Kotlin top-level helpers supporting ActiveTracker state lookups during AI evaluation.

Methods: createAllied, createOpposing

0 fields · 2 methodsStrongBattleAI Math →
Battle AI (battles/ai) · ClassTrackerActor

Lightweight per-actor snapshot inside ActiveTracker mirroring an actor's roster for AI scoring.

Fields: uuid, party, activePokemon · Methods: TrackerActor, getUuid, getParty, getActivePokemon (+3)

3 fields · 7 methodsStrongBattleAI Math →
Battle AI (battles/ai) · ClassTrackerPokemon

Per-Pokémon snapshot (HP, stats, types, boosts, status) consumed by StrongBattleAI damage and matchup evaluators.

Fields: id, pokemon, species, form (+9 more) · Methods: TrackerPokemon, getId, setId, getPokemon (+27)

13 fields · 31 methodsStrongBattleAI Math →
Battle AI (battles/ai) · ClassTrackerSide

Per-side battlefield snapshot (hazards, screens, weather/terrain context) consumed by StrongBattleAI.

Fields: screenCondition, tailwindCondition, sideHazards, actors · Methods: TrackerSide, getScreenCondition, setScreenCondition, getTailwindCondition (+7)

4 fields · 11 methodsStrongBattleAI Math →
Battle Model & Interpreter (api/battles) · ClassBasicContext

Standard BattleContext implementation carrying an ID, turn number, type, and optional origin context.

Fields: id, turn, type, origin · Methods: BasicContext, getId, getTurn, getType (+6)

4 fields · 10 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · InterfaceBattleContext

Structured battle history entry tracking moves, statuses, boosts, and origins for Showdown interpretation.

Methods: getId, getTurn, getType, getOrigin (+1)

0 fields · 5 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · ClassBattleMessage

Parsed pipe-delimited Showdown protocol line consumed by BattleInterpreter instruction classes.

Fields: id, rawMessage, args, optionalArguments (+3 more) · Methods: BattleMessage, getId, getRawMessage, argumentAt (+13)

7 fields · 17 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · InterfaceEffect

Wrapper representing a Showdown move, ability, item, or condition effect ID parsed from BattleMessage tokens.

Methods: getId, getType, getRawData, getTypelessData

0 fields · 4 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · ClassInvalidInstructionException

Exception thrown when a Showdown protocol line cannot be parsed into a valid battle instruction.

Methods: InvalidInstructionException

0 fields · 1 method80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · ClassMissingContext

Fallback BattleContext placeholder returned when a referenced battle context entry is absent.

Fields: id, turn, type, origin · Methods: MissingContext, getId, getTurn, getType (+6)

4 fields · 10 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · EnumBattleEndResult

Enum recording how a battle terminated: VICTORY, CAPTURE, FORFEIT, FLED, or STOPPED.

Values: VICTORY, CAPTURE, FORFEIT, FLED, STOPPED · Methods: BattleEndResult, values, valueOf

2 fields · 3 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · ClassPokemonBattle

Central battle controller tracking sides, turns, battle format, Showdown communication, end results, and active actors.

Fields: format, side1, side2, mute (+27 more) · Methods: PokemonBattle, getFormat, getSide1, getSide2 (+78)

31 fields · 82 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · Abstract ClassAIBattleActor

BattleActor implementation delegating every Showdown action request to an attached BattleAI instance.

Fields: battleAI · Methods: AIBattleActor, getBattleAI, sendUpdate, onChoiceRequested

1 field · 4 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · EnumActorType

Enum classifying battle participants: WILD, PLAYER, or NPC.

Values: WILD, PLAYER, NPC · Methods: ActorType, values, valueOf

2 fields · 3 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · Abstract ClassBattleActor

Abstract participant on a BattleSide holding its BattlePokemon roster, type, and action-request lifecycle.

Fields: uuid, pokemonList, struct, showdownId (+9 more) · Methods: BattleActor, getUuid, getPokemonList, getStruct (+38)

13 fields · 42 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · InterfaceEntityBackedBattleActor

Interface for BattleActors tied to a Minecraft world Entity (such as WildPokemon, Player, or NPC).

Methods: getEntity, getInitialPos

0 fields · 2 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · InterfaceFleeableBattleActor

Interface for BattleActors capable of fleeing a battle based on flee distance rules.

Methods: getFleeDistance, getWorldAndPosition

0 fields · 2 methods80 Protocol Tokens →
Battle Model & Interpreter (api/battles) · InterfaceBattleAI

Core interface defining choose(activeBattlePokemon, battle, aiSide, moveset, forceSwitch) and optional health-change hooks.

Methods: choose, onHealthChange

0 fields · 2 methods80 Protocol Tokens →
Catching & Modifiers (api/pokeball/catching) · ClassCaptureContext

Immutable result of a capture calculation (numberOfShakes, isSuccessfulCapture, isCriticalCapture).

Fields: numberOfShakes, isSuccessfulCapture, isCriticalCapture · Methods: CaptureContext, getNumberOfShakes, isSuccessfulCapture, isCriticalCapture (+4)

3 fields · 8 methods48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · InterfaceCaptureEffect

Interface for post-capture callbacks executed on a newly caught Pokémon (e.g., Heal Ball, Friend Ball).

Methods: apply

0 fields · 1 method48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · InterfaceCatchRateModifier

Interface for Poké Ball catch-rate multipliers evaluated against thrower, target Pokémon, and world/battle state.

Methods: isGuaranteed, value, behavior, isValid (+1)

0 fields · 5 methods48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · InterfaceCaptureCalculator

Interface for Poké Ball capture math implementations returning a CaptureContext.

Methods: id, processCapture, getCatchRate

0 fields · 3 methods48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · ObjectCaptureCalculators

Registry holding all 11 built-in capture formula IDs (cobblemon, debug, generation_1..9, generation_2_fixed).

Fields: calculators · Methods: CaptureCalculators, register, fromId, registerDefaults$common

1 field · 4 methods48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · InterfaceCriticalCaptureProvider

Interface defining the 6-tier Pokédex-based Critical Capture multiplier (0× to 2.5×) and 1-shake roll.

Methods: shouldHaveCriticalCapture

0 fields · 1 method48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · InterfacePokedexStatusCaptureInfluencer

Interface adjusting capture animation to a single shake when the target species is already OWNED.

Methods: influence

0 fields · 1 method48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · ObjectCaptureEffects

Singleton defining FULL_RESTORE (Heal Ball) and friendshipSetter(int) (Friend Ball).

Fields: FULL_RESTORE · Methods: CaptureEffects, getFULL_RESTORE, friendshipSetter

1 field · 3 methods48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · ClassFriendshipEarningBoostEffect

CaptureEffect marker carrying a float multiplier (Luxury Ball 2.0×) for future friendship gains.

Fields: multiplier · Methods: FriendshipEarningBoostEffect, getMultiplier, apply

1 field · 3 methods48 Poké Balls →
Catching & Modifiers (api/pokeball/catching) · ClassBaseStatModifier

CatchRateModifier checking a Pokémon's base stat against a threshold (Fast Ball: base Speed ≥ 100 → 4.0×).

Fields: stat, comparator, multiplier · Methods: BaseStatModifier, getStat, getComparator, getMultiplier (+5)

3 fields · 9 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ClassBattleModifier

CatchRateModifier evaluated using active battle state (player's active Pokémon and turn count).

Fields: calculator · Methods: BattleModifier, isGuaranteed, value, behavior (+2)

1 field · 6 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ObjectCatchRateModifiers

Singleton registry of all 11 built-in Poké Ball modifiers plus typeBoosting, statusBoosting, and turnBased factories.

Fields: LEVEL, SUBMERGED_IN_WATER, NEST, LOVE (+7 more) · Methods: CatchRateModifiers, getLEVEL, getSUBMERGED_IN_WATER, getNEST (+11)

11 fields · 15 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ClassDynamicMultiplierModifier

CatchRateModifier computing a variable float multiplier whenever its predicate matches (Nest Ball, Heavy Ball).

Fields: multiplier, condition · Methods: DynamicMultiplierModifier, isGuaranteed, value, behavior (+2)

2 fields · 6 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ClassGuaranteedModifier

CatchRateModifier forcing a guaranteed capture regardless of HP or catch rate (Master Ball, Ancient Origin Ball).

Methods: GuaranteedModifier, isGuaranteed, value, behavior (+2)

0 fields · 6 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ClassLabelModifier

CatchRateModifier multiplying catch rate based on species labels (Beast Ball: 5.0× ultra_beast, 0.1× otherwise).

Fields: multiplier, matching, labels · Methods: LabelModifier, getMultiplier, getMatching, getLabels (+5)

3 fields · 9 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ClassMultiplierModifier

Fixed float CatchRateModifier applied when a (LivingEntity, Pokemon) predicate returns true.

Fields: multiplier, condition · Methods: MultiplierModifier, isGuaranteed, value, behavior (+2)

2 fields · 6 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ClassPropertyBasedModifier

CatchRateModifier evaluating a PokemonProperties filter against the target Pokémon.

Fields: property, multiplier · Methods: PropertyBasedModifier, getProperty, getMultiplier, isGuaranteed (+4)

2 fields · 8 methods11 Catch Modifiers →
Catching & Modifiers (api/pokeball/catching) · ClassWorldStateModifier

CatchRateModifier inspecting live Minecraft world/entity state (brightness, underwater, moon phase, biome tag, aspects).

Fields: calculator · Methods: WorldStateModifier, value, behavior, isValid (+2)

1 field · 6 methods11 Catch Modifiers →

StrongBattleAI Bytecode Constants (16) & Skill Tiers (0–5)

69 NPC & Dialogue Classes →

Verified directly from StrongBattleAI.class and RandomBattleAI.class in Cobblemon 1.8.4: NPC and wild battle actors implement AIBattleActor backed by a BattleAI strategy. RandomBattleAI picks uniformly at random among usable moves and switch candidates, whereas StrongBattleAI(skill) clamps skill to 0..5 via RangesKt.coerceIn(skill, 0, 5), tracks battle state in ActiveTracker (TrackerSide, TrackerActor, TrackerPokemon), and gates tactical evaluations and voluntary switch-outs through checkSkillLevel() and checkSwitchOutSkill(). Every participant has ActorType (WILD, PLAYER, NPC) and terminates with BattleEndResult (VICTORY, CAPTURE, FORFEIT, FLED, STOPPED).

Skill LevelcheckSkillLevel()checkSwitchOutSkill()Bytecode Evaluation Behaviour
Skill 00%0%Never passes checkSkillLevel() or checkSwitchOutSkill(); falls back to non-optimal/basic picks.
Skill 120%0%20% chance to pass checkSkillLevel() (Random.nextInt(100) < 20); never voluntarily switches out.
Skill 240%0%40% chance to pass checkSkillLevel() (Random.nextInt(100) < 40); never voluntarily switches out.
Skill 360%20%60% tactical check rate; unlocks voluntary defensive switching at 20% probability (0.2d).
Skill 480%60%80% tactical check rate; voluntary switch-out probability rises to 60% (0.6d).
Skill 5100%100%Maximum skill (RangesKt.coerceIn(skill, 0, 5)); always passes checkSkillLevel() and checkSwitchOutSkill().
Constructor FieldTypeBytecode DefaultRoleVerified Usage In StrongBattleAI
speedTierCoefficientdouble4.0Scoring WeightMultiplier applied to speed advantage comparisons when evaluating active matchups.
trickRoomCoefficientdouble1.0Scoring WeightSign/scaling factor (initialized to 1.0, inverted under Trick Room) applied to speed comparisons.
typeMatchupWeightConsiderationdouble2.5Scoring WeightWeight assigned to defensive and offensive type-effectiveness matchup ratings.
moveDamageWeightConsiderationdouble0.8Scoring WeightWeight scaling estimated move damage when scoring candidate actions.
antiBoostWeightConsiderationint25Scoring WeightScore weight given to neutralizing or punishing an opponent's stat boosts.
hpWeightConsiderationdouble0.25Scoring WeightWeight assigned to remaining HP advantage during matchup evaluation.
hpFractionCoefficientdouble0.4Scoring WeightCoefficient scaling HP percentage differentials in estimateMatchup().
boostWeightCoefficientint1Scoring WeightBase weight per stat stage boost when evaluating setup moves and current boosts.
switchOutMatchupThresholdint-2Switch & Tactical ThresholdMatchup rating threshold (-2) below which StrongBattleAI considers switching out.
selfKoMoveMatchupThresholddouble0.3Switch & Tactical ThresholdMatchup threshold (0.3) governing when self-KO moves (Explosion/Memento/etc.) are considered.
trickRoomThresholdint85Switch & Tactical ThresholdSpeed threshold (85) used to judge whether setting or exploiting Trick Room favors the AI side.
recoveryMoveThresholddouble0.5Switch & Tactical ThresholdHP fraction threshold (0.5 = 50% HP) below which recovery moves are prioritized.
accuracySwitchThresholdint-3Switch & Tactical ThresholdAccuracy stat stage threshold (-3) at which the AI considers switching to reset lowered accuracy.
hpSwitchOutThresholddouble0.3Switch & Tactical ThresholdHP fraction threshold (0.3 = 30% HP) influencing defensive switch-out evaluation.
randomProtectChancedouble0.3Switch & Tactical ThresholdProbability (0.3 = 30%) applied when evaluating random Protect usage.
statusDamageConsiderationThresholddouble0.8Switch & Tactical ThresholdDamage threshold (0.8) used to decide whether a status move is worth choosing over raw damage.

All 11 Built-In CatchRateModifiers, 3 Factories & CaptureEffects

Catch Rate Calculator →

Verified directly from CatchRateModifiers.class and CaptureEffects.class bytecode: every specialty Poké Ball combines one or more CatchRateModifier implementations (BattleModifier, WorldStateModifier, DynamicMultiplierModifier, MultiplierModifier, BaseStatModifier, LabelModifier, GuaranteedModifier, PropertyBasedModifier) and optional post-capture CaptureEffect hooks. Notice that REPEAT queries PlayerInstancedDataStoreManager.getPokedexData(uuid) directly (3.5× only when PokedexEntryProgress.OWNED).

Static ConstantModifier ClassPoké Ball(s)Bytecode Formula
LEVELBattleModifierLevel Ball4.0× if playerMaxLevel > 4 × targetLevel; 3.0× if > 2 × targetLevel; 2.0× if > targetLevel; else 1.0×.
SUBMERGED_IN_WATERWorldStateModifierDive Ball3.5× when entity.isUnderWater() is true; else 1.0×.
NESTDynamicMultiplierModifierNest Ball(41 - pokemon.level) / 10.0f when pokemon.level < 30; else 1.0× (predicate checks level < 30).
LOVEBattleModifierLove Ball1.0× if target is GENDERLESS; 8.0× if an active player Pokémon is opposite gender AND same species; 2.5× if opposite gender only; else 1.0×.
MOON_PHASESWorldStateModifierMoon BallRequires night ((dayTime % 24000) >= 12000). By moonPhase (0–7): Full (0) = 4.0×; Gibbous (1, 7) = 2.5×; Quarter (2, 6) = 1.5×; Crescent/New (3, 4, 5) or daytime = 1.0×.
LIGHT_LEVELWorldStateModifierDusk BallChecks level.getMaxLocalRawBrightness(blockPos): Light Level 0 = 3.5×; Light Level 1–7 = 3.0×; Light Level 8+ = 1.0×.
SAFARIMultiplierModifierSafari Ball1.5× when the target Pokémon entity is NOT currently in battle (!entity.isBattling()).
PARKWorldStateModifierPark Ball2.5× when the target's biome matches tag #cobblemon:is_temperate (CobblemonBiomeTags.IS_TEMPERATE); else 1.0×.
LUREWorldStateModifierLure Ball4.0× when entity.aspects contains "fished"; else 1.0×.
WEIGHT_BASEDDynamicMultiplierModifierHeavy BallUses form.weight (hectograms): ≥3000 (300 kg) = 4.0×; 2000–2999 = 2.5×; 1000–1999 = 1.5×; <1000 = 1.0× (predicate weight >= 1000.0f).
REPEATWorldStateModifierRepeat BallQueries PlayerInstancedDataStoreManager.getPokedexData(thrower.uuid).getKnowledgeForSpecies(species): OWNED = 3.5×; else 1.0×.
Factory MethodReturned ClassPoké Ball(s)Bytecode Predicate / Formula
typeBoosting(multiplier, ...types)MultiplierModifierNet Ball (3.0× Water/Bug), Sport Ball (1.5× Bug), Beast Ball (5.0× / 0.1× via LabelModifier)Returns multiplier if any of pokemon.types matches the provided ElementalType varargs.
statusBoosting(multiplier, ...statuses)MultiplierModifierDream Ball (4.0× Sleep)Returns multiplier if pokemon.status.status is contained in the provided PersistentStatus varargs.
turnBased(multiplierCalculator)BattleModifierQuick Ball (turn 1 → 5.0×), Timer Ball (min(4.0, 1 + turn × 1229/4096))Looks up BattleRegistry.getBattleByParticipatingPlayer(player).turn and invokes multiplierCalculator(turn).
Capture EffectClassPoké Ball(s)Bytecode Post-Capture Effect
CaptureEffects.FULL_RESTORECaptureEffectsHeal BallInvokes pokemon.heal() immediately on capture, restoring full HP, PP, and clearing persistent status conditions.
CaptureEffects.friendshipSetter(amount)CaptureEffectsFriend Ball (150)Sets the newly captured Pokémon's initial friendship to the specified integer amount (Friend Ball sets 150).
FriendshipEarningBoostEffect(multiplier)FriendshipEarningBoostEffectLuxury Ball (2.0×)Carries a float multiplier inspected by friendship-gain hooks whenever the Pokémon caught in that Poké Ball earns friendship.

Complete 42-Class Battle AI, Model & Catching Reference

Battle Mechanics Guide →
Class & PackageSubsystem & KindInheritanceKey Methods / Enum ValuesVerified Role
RandomBattleAI
battles.ai
Battle AI (battles/ai)
Class
—
implements BattleAI
RandomBattleAI(), choose(), onHealthChange()Baseline battle AI that picks uniformly at random among usable moves, valid targets, or available switch-in party members.
StrongBattleAI
battles.ai
Battle AI (battles/ai)
Class
—
implements BattleAI
StrongBattleAI(), checkSkillLevel(), checkSwitchOutSkill(), calculateDamage(), mostDamagingMove() +17 moreSkill-scaled tactical battle AI (skill 0..5) using ActiveTracker, 16 scoring/threshold constants, damage estimation, matchup scoring, and voluntary switch-out checks.
AIUtility
battles.ai.strongBattleAI
Battle AI (battles/ai)
Object
—AIUtility(), getDamageMultiplier(), getTypeEffectiveness(), getMultiHitMoves(), getStatusMoves() +13 moreHelper calculations supporting StrongBattleAI move scoring, stat stage adjustments, and matchup comparisons.
ActiveTracker
battles.ai.strongBattleAI
Battle AI (battles/ai)
Class
—ActiveTracker(), getCurrentRoom(), setCurrentRoom(), getCurrentTerrain(), setCurrentTerrain() +7 moreTracks active battle sides, actors, and per-Pokémon state snapshots for StrongBattleAI decision evaluation.
ActiveTrackerKt
battles.ai.strongBattleAI
Battle AI (battles/ai)
Class
—createAllied(), createOpposing()Kotlin top-level helpers supporting ActiveTracker state lookups during AI evaluation.
TrackerActor
battles.ai.strongBattleAI
Battle AI (battles/ai)
Class
—TrackerActor(), getUuid(), getParty(), getActivePokemon(), getRemainingMons() +2 moreLightweight per-actor snapshot inside ActiveTracker mirroring an actor's roster for AI scoring.
TrackerPokemon
battles.ai.strongBattleAI
Battle AI (battles/ai)
Class
—TrackerPokemon(), getId(), setId(), getPokemon(), setPokemon() +26 morePer-Pokémon snapshot (HP, stats, types, boosts, status) consumed by StrongBattleAI damage and matchup evaluators.
TrackerSide
battles.ai.strongBattleAI
Battle AI (battles/ai)
Class
—TrackerSide(), getScreenCondition(), setScreenCondition(), getTailwindCondition(), setTailwindCondition() +6 morePer-side battlefield snapshot (hazards, screens, weather/terrain context) consumed by StrongBattleAI.
BasicContext
api.battles.interpreter
Battle Model & Interpreter (api/battles)
Class
—
implements BattleContext
BasicContext(), getId(), getTurn(), getType(), getOrigin() +5 moreStandard BattleContext implementation carrying an ID, turn number, type, and optional origin context.
BattleContext
api.battles.interpreter
Battle Model & Interpreter (api/battles)
Interface
—getId(), getTurn(), getType(), getOrigin(), getStruct()Structured battle history entry tracking moves, statuses, boosts, and origins for Showdown interpretation.
BattleMessage
api.battles.interpreter
Battle Model & Interpreter (api/battles)
Class
—BattleMessage(), getId(), getRawMessage(), argumentAt(), optionalArgument() +12 moreParsed pipe-delimited Showdown protocol line consumed by BattleInterpreter instruction classes.
Effect
api.battles.interpreter
Battle Model & Interpreter (api/battles)
Interface
—getId(), getType(), getRawData(), getTypelessData()Wrapper representing a Showdown move, ability, item, or condition effect ID parsed from BattleMessage tokens.
InvalidInstructionException
api.battles.interpreter
Battle Model & Interpreter (api/battles)
Class
ExceptionInvalidInstructionException()Exception thrown when a Showdown protocol line cannot be parsed into a valid battle instruction.
MissingContext
api.battles.interpreter
Battle Model & Interpreter (api/battles)
Class
—
implements BattleContext
MissingContext(), getId(), getTurn(), getType(), getOrigin() +5 moreFallback BattleContext placeholder returned when a referenced battle context entry is absent.
BattleEndResult
api.battles.model
Battle Model & Interpreter (api/battles)
Enum
—Enum: VICTORY, CAPTURE, FORFEIT, FLED, STOPPEDEnum recording how a battle terminated: VICTORY, CAPTURE, FORFEIT, FLED, or STOPPED.
PokemonBattle
api.battles.model
Battle Model & Interpreter (api/battles)
Class
—PokemonBattle(), getFormat(), getSide1(), getSide2(), getMute() +77 moreCentral battle controller tracking sides, turns, battle format, Showdown communication, end results, and active actors.
AIBattleActor
api.battles.model.actor
Battle Model & Interpreter (api/battles)
Abstract Class
BattleActorAIBattleActor(), getBattleAI(), sendUpdate(), onChoiceRequested()BattleActor implementation delegating every Showdown action request to an attached BattleAI instance.
ActorType
api.battles.model.actor
Battle Model & Interpreter (api/battles)
Enum
—Enum: WILD, PLAYER, NPCEnum classifying battle participants: WILD, PLAYER, or NPC.
BattleActor
api.battles.model.actor
Battle Model & Interpreter (api/battles)
Abstract Class
—BattleActor(), getUuid(), getPokemonList(), getStruct(), getShowdownId() +37 moreAbstract participant on a BattleSide holding its BattlePokemon roster, type, and action-request lifecycle.
EntityBackedBattleActor
api.battles.model.actor
Battle Model & Interpreter (api/battles)
Interface
LivingEntity>getEntity(), getInitialPos()Interface for BattleActors tied to a Minecraft world Entity (such as WildPokemon, Player, or NPC).
FleeableBattleActor
api.battles.model.actor
Battle Model & Interpreter (api/battles)
Interface
—getFleeDistance(), getWorldAndPosition()Interface for BattleActors capable of fleeing a battle based on flee distance rules.
BattleAI
api.battles.model.ai
Battle Model & Interpreter (api/battles)
Interface
—choose(), onHealthChange()Core interface defining choose(activeBattlePokemon, battle, aiSide, moveset, forceSwitch) and optional health-change hooks.
CaptureContext
api.pokeball.catching
Catching & Modifiers (api/pokeball/catching)
Class
—CaptureContext(), getNumberOfShakes(), isSuccessfulCapture(), isCriticalCapture(), copy() +3 moreImmutable result of a capture calculation (numberOfShakes, isSuccessfulCapture, isCriticalCapture).
CaptureEffect
api.pokeball.catching
Catching & Modifiers (api/pokeball/catching)
Interface
—apply()Interface for post-capture callbacks executed on a newly caught Pokémon (e.g., Heal Ball, Friend Ball).
CatchRateModifier
api.pokeball.catching
Catching & Modifiers (api/pokeball/catching)
Interface
—isGuaranteed(), value(), behavior(), isValid(), modifyCatchRate()Interface for Poké Ball catch-rate multipliers evaluated against thrower, target Pokémon, and world/battle state.
CaptureCalculator
api.pokeball.catching.calculators
Catching & Modifiers (api/pokeball/catching)
Interface
—id(), processCapture(), getCatchRate()Interface for Poké Ball capture math implementations returning a CaptureContext.
CaptureCalculators
api.pokeball.catching.calculators
Catching & Modifiers (api/pokeball/catching)
Object
—CaptureCalculators(), register(), fromId(), registerDefaults$common()Registry holding all 11 built-in capture formula IDs (cobblemon, debug, generation_1..9, generation_2_fixed).
CriticalCaptureProvider
api.pokeball.catching.calculators
Catching & Modifiers (api/pokeball/catching)
Interface
—shouldHaveCriticalCapture()Interface defining the 6-tier Pokédex-based Critical Capture multiplier (0× to 2.5×) and 1-shake roll.
PokedexProgressCaptureMultiplierProvider
api.pokeball.catching.calculators
Catching & Modifiers (api/pokeball/catching)
Interface
—caughtMultiplierFor()Interface defining the 6-tier Pokédex completion catch multiplier (1229/4096 up to 1.0×).
PokedexStatusCaptureInfluencer
api.pokeball.catching.calculators
Catching & Modifiers (api/pokeball/catching)
Interface
—influence()Interface adjusting capture animation to a single shake when the target species is already OWNED.
CaptureEffects
api.pokeball.catching.effects
Catching & Modifiers (api/pokeball/catching)
Object
—CaptureEffects(), getFULL_RESTORE(), friendshipSetter()Singleton defining FULL_RESTORE (Heal Ball) and friendshipSetter(int) (Friend Ball).
FriendshipEarningBoostEffect
api.pokeball.catching.effects
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CaptureEffect
FriendshipEarningBoostEffect(), getMultiplier(), apply()CaptureEffect marker carrying a float multiplier (Luxury Ball 2.0×) for future friendship gains.
BaseStatModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
BaseStatModifier(), getStat(), getComparator(), getMultiplier(), isGuaranteed() +4 moreCatchRateModifier checking a Pokémon's base stat against a threshold (Fast Ball: base Speed ≥ 100 → 4.0×).
BattleModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
BattleModifier(), isGuaranteed(), value(), behavior(), isValid() +1 moreCatchRateModifier evaluated using active battle state (player's active Pokémon and turn count).
CatchRateModifierAdapter
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Interface
JsonDeserializerregisterType()Serialization/adapter helper for CatchRateModifier implementations.
CatchRateModifiers
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Object
—CatchRateModifiers(), getLEVEL(), getSUBMERGED_IN_WATER(), getNEST(), getLOVE() +10 moreSingleton registry of all 11 built-in Poké Ball modifiers plus typeBoosting, statusBoosting, and turnBased factories.
DynamicMultiplierModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
DynamicMultiplierModifier(), isGuaranteed(), value(), behavior(), isValid() +1 moreCatchRateModifier computing a variable float multiplier whenever its predicate matches (Nest Ball, Heavy Ball).
GuaranteedModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
GuaranteedModifier(), isGuaranteed(), value(), behavior(), isValid() +1 moreCatchRateModifier forcing a guaranteed capture regardless of HP or catch rate (Master Ball, Ancient Origin Ball).
LabelModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
LabelModifier(), getMultiplier(), getMatching(), getLabels(), isGuaranteed() +4 moreCatchRateModifier multiplying catch rate based on species labels (Beast Ball: 5.0× ultra_beast, 0.1× otherwise).
MultiplierModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
MultiplierModifier(), isGuaranteed(), value(), behavior(), isValid() +1 moreFixed float CatchRateModifier applied when a (LivingEntity, Pokemon) predicate returns true.
PropertyBasedModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
PropertyBasedModifier(), getProperty(), getMultiplier(), isGuaranteed(), value() +3 moreCatchRateModifier evaluating a PokemonProperties filter against the target Pokémon.
WorldStateModifier
api.pokeball.catching.modifiers
Catching & Modifiers (api/pokeball/catching)
Class
—
implements CatchRateModifier
WorldStateModifier(), value(), behavior(), isValid(), modifyCatchRate() +1 moreCatchRateModifier inspecting live Minecraft world/entity state (brightness, underwater, moon phase, biome tag, aspects).