Spaces:
Running
Running
File size: 21,466 Bytes
5c2ed06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
/* eslint-disable @typescript-eslint/no-unused-vars */
type Mutable<T> = {
-readonly [P in keyof T]: T[P];
};
type Battle = import('./battle').Battle;
type BattleQueue = import('./battle-queue').BattleQueue;
type BattleActions = import('./battle-actions').BattleActions;
type Field = import('./field').Field;
type Action = import('./battle-queue').Action;
type MoveAction = import('./battle-queue').MoveAction;
type ActionChoice = import('./battle-queue').ActionChoice;
type ModdedDex = import('./dex').ModdedDex;
type Pokemon = import('./pokemon').Pokemon;
type PRNGSeed = import('./prng').PRNGSeed;
type Side = import('./side').Side;
type TeamValidator = import('./team-validator').TeamValidator;
type PokemonSources = import('./team-validator').PokemonSources;
/** An ID must be lowercase alphanumeric. */
type ID = '' | Lowercase<string> & { __isID: true };
/** Like ID, but doesn't require you to type `as ID` to define it. For data files and object keys. */
type IDEntry = Lowercase<string>;
type PokemonSlot = '' | IDEntry & { __isSlot: true };
interface AnyObject { [k: string]: any }
type GenderName = 'M' | 'F' | 'N' | '';
type StatIDExceptHP = 'atk' | 'def' | 'spa' | 'spd' | 'spe';
type StatID = 'hp' | StatIDExceptHP;
type StatsExceptHPTable = { [stat in StatIDExceptHP]: number };
type StatsTable = { [stat in StatID]: number };
type SparseStatsTable = Partial<StatsTable>;
type BoostID = StatIDExceptHP | 'accuracy' | 'evasion';
type BoostsTable = { [boost in BoostID]: number };
type SparseBoostsTable = Partial<BoostsTable>;
type Nonstandard = 'Past' | 'Future' | 'Unobtainable' | 'CAP' | 'LGPE' | 'Custom' | 'Gigantamax';
type PokemonSet = import('./teams').PokemonSet;
declare namespace TierTypes {
export type Singles = "AG" | "Uber" | "(Uber)" | "OU" | "(OU)" | "UUBL" | "UU" | "RUBL" | "RU" | "NUBL" | "NU" |
"(NU)" | "PUBL" | "PU" | "(PU)" | "ZUBL" | "ZU" | "NFE" | "LC";
export type Doubles = "DUber" | "(DUber)" | "DOU" | "(DOU)" | "DBL" | "DUU" | "(DUU)" | "NFE" | "LC";
export type Other = "Unreleased" | "Illegal" | "CAP" | "CAP NFE" | "CAP LC";
}
interface EventInfo {
generation: number;
level?: number;
/** true: always shiny, 1: sometimes shiny, false | undefined: never shiny */
shiny?: boolean | 1;
gender?: GenderName;
nature?: string;
ivs?: SparseStatsTable;
perfectIVs?: number;
/** true: has hidden ability, false | undefined: never has hidden ability */
isHidden?: boolean;
abilities?: IDEntry[];
maxEggMoves?: number;
moves?: IDEntry[];
pokeball?: IDEntry;
from?: string;
/** Japan-only events can't be transferred to international games in Gen 1 */
japan?: boolean;
/** For Emerald event eggs to allow Pomeg glitched moves */
emeraldEventEgg?: boolean;
}
type Effect = Ability | Item | ActiveMove | Species | Condition | Format;
interface CommonHandlers {
ModifierEffect: (this: Battle, relayVar: number, target: Pokemon, source: Pokemon, effect: Effect) => number | void;
ModifierMove: (this: Battle, relayVar: number, target: Pokemon, source: Pokemon, move: ActiveMove) => number | void;
ResultMove: boolean | (
(this: Battle, target: Pokemon, source: Pokemon, move: ActiveMove) => boolean | null | "" | void
);
ExtResultMove: boolean | (
(this: Battle, target: Pokemon, source: Pokemon, move: ActiveMove) => boolean | null | number | "" | void
);
VoidEffect: (this: Battle, target: Pokemon, source: Pokemon, effect: Effect) => void;
VoidMove: (this: Battle, target: Pokemon, source: Pokemon, move: ActiveMove) => void;
ModifierSourceEffect: (
this: Battle, relayVar: number, source: Pokemon, target: Pokemon, effect: Effect
) => number | void;
ModifierSourceMove: (
this: Battle, relayVar: number, source: Pokemon, target: Pokemon, move: ActiveMove
) => number | void;
ResultSourceMove: boolean | (
(this: Battle, source: Pokemon, target: Pokemon, move: ActiveMove) => boolean | null | "" | void
);
ExtResultSourceMove: boolean | (
(this: Battle, source: Pokemon, target: Pokemon, move: ActiveMove) => boolean | null | number | "" | void
);
VoidSourceEffect: (this: Battle, source: Pokemon, target: Pokemon, effect: Effect) => void;
VoidSourceMove: (this: Battle, source: Pokemon, target: Pokemon, move: ActiveMove) => void;
}
interface EffectData {
name?: string;
desc?: string;
duration?: number;
durationCallback?: (this: Battle, target: Pokemon, source: Pokemon, effect: Effect | null) => number;
effectType?: string;
infiltrates?: boolean;
isNonstandard?: Nonstandard | null;
shortDesc?: string;
}
type ModdedEffectData = EffectData | Partial<EffectData> & { inherit: true };
type EffectType =
'Condition' | 'Pokemon' | 'Move' | 'Item' | 'Ability' | 'Format' |
'Nature' | 'Ruleset' | 'Weather' | 'Status' | 'Terastal' | 'Rule' | 'ValidatorRule';
interface BasicEffect extends EffectData {
id: ID;
effectType: EffectType;
exists: boolean;
fullname: string;
gen: number;
sourceEffect: string;
toString: () => string;
}
type Condition = import('./dex-conditions').Condition;
type ActiveMove = import('./dex-moves').ActiveMove;
type Move = import('./dex-moves').Move;
type MoveTarget = import('./dex-moves').MoveTarget;
type Item = import('./dex-items').Item;
type Ability = import('./dex-abilities').Ability;
type Species = import('./dex-species').Species;
type Format = import('./dex-formats').Format;
type Nature = import('./dex-data').Nature;
type GameType = 'singles' | 'doubles' | 'triples' | 'rotation' | 'multi' | 'freeforall';
type SideID = 'p1' | 'p2' | 'p3' | 'p4';
type SpreadMoveTargets = (Pokemon | false | null)[];
type SpreadMoveDamage = (number | boolean | undefined)[];
type ZMoveOptions = ({ move: string, target: MoveTarget } | null)[];
interface BattleScriptsData {
gen: number;
}
interface ModdedBattleActions {
inherit?: true;
afterMoveSecondaryEvent?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => undefined;
calcRecoilDamage?: (this: BattleActions, damageDealt: number, move: Move, pokemon: Pokemon) => number;
canMegaEvo?: (this: BattleActions, pokemon: Pokemon) => string | undefined | null;
canMegaEvoX?: (this: BattleActions, pokemon: Pokemon) => string | undefined | null;
canMegaEvoY?: (this: BattleActions, pokemon: Pokemon) => string | undefined | null;
canTerastallize?: (this: BattleActions, pokemon: Pokemon) => string | null;
canUltraBurst?: (this: BattleActions, pokemon: Pokemon) => string | null;
canZMove?: (this: BattleActions, pokemon: Pokemon) => ZMoveOptions | void;
canDynamax?: (this: BattleActions, pokemon: Pokemon, skipChecks?: boolean) => import('./side').DynamaxOptions | void;
forceSwitch?: (
this: BattleActions, damage: SpreadMoveDamage, targets: SpreadMoveTargets, source: Pokemon,
move: ActiveMove, moveData: ActiveMove, isSecondary?: boolean, isSelf?: boolean
) => SpreadMoveDamage;
getActiveMaxMove?: (this: BattleActions, move: Move, pokemon: Pokemon) => ActiveMove;
getActiveZMove?: (this: BattleActions, move: Move, pokemon: Pokemon) => ActiveMove;
getMaxMove?: (this: BattleActions, move: Move, pokemon: Pokemon) => Move | undefined;
getSpreadDamage?: (
this: BattleActions, damage: SpreadMoveDamage, targets: SpreadMoveTargets, source: Pokemon,
move: ActiveMove, moveData: ActiveMove, isSecondary?: boolean, isSelf?: boolean
) => SpreadMoveDamage;
getZMove?: (this: BattleActions, move: Move, pokemon: Pokemon, skipChecks?: boolean) => string | true | undefined;
hitStepAccuracy?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => boolean[];
hitStepBreakProtect?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => undefined;
hitStepMoveHitLoop?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => SpreadMoveDamage;
hitStepTryImmunity?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => boolean[];
hitStepStealBoosts?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => undefined;
hitStepTryHitEvent?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => (boolean | '')[];
hitStepInvulnerabilityEvent?: (
this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove
) => boolean[];
hitStepTypeImmunity?: (this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) => boolean[];
moveHit?: (
this: BattleActions, target: Pokemon | null, pokemon: Pokemon, move: ActiveMove,
moveData?: ActiveMove, isSecondary?: boolean, isSelf?: boolean
) => number | undefined | false;
runAction?: (this: BattleActions, action: Action) => void;
runMegaEvo?: (this: BattleActions, pokemon: Pokemon) => boolean;
runMegaEvoX?: (this: BattleActions, pokemon: Pokemon) => boolean;
runMegaEvoY?: (this: BattleActions, pokemon: Pokemon) => boolean;
runMove?: (
this: BattleActions, moveOrMoveName: Move | string, pokemon: Pokemon, targetLoc: number, options?: {
sourceEffect?: Effect | null, zMove?: string, externalMove?: boolean,
maxMove?: string, originalTarget?: Pokemon,
}
) => void;
runMoveEffects?: (
this: BattleActions, damage: SpreadMoveDamage, targets: SpreadMoveTargets, source: Pokemon,
move: ActiveMove, moveData: ActiveMove, isSecondary?: boolean, isSelf?: boolean
) => SpreadMoveDamage;
runSwitch?: (this: BattleActions, pokemon: Pokemon) => boolean;
runZPower?: (this: BattleActions, move: ActiveMove, pokemon: Pokemon) => void;
secondaries?: (
this: BattleActions, targets: SpreadMoveTargets, source: Pokemon, move: ActiveMove,
moveData: ActiveMove, isSelf?: boolean
) => void;
selfDrops?: (
this: BattleActions, targets: SpreadMoveTargets, source: Pokemon,
move: ActiveMove, moveData: ActiveMove, isSecondary?: boolean
) => void;
spreadMoveHit?: (
this: BattleActions, targets: SpreadMoveTargets, pokemon: Pokemon, move: ActiveMove,
moveData?: ActiveMove, isSecondary?: boolean, isSelf?: boolean
) => [SpreadMoveDamage, SpreadMoveTargets];
switchIn?: (
this: BattleActions, pokemon: Pokemon, pos: number, sourceEffect: Effect | null, isDrag?: boolean
) => boolean | "pursuitfaint";
targetTypeChoices?: (this: BattleActions, targetType: string) => boolean;
terastallize?: (this: BattleActions, pokemon: Pokemon) => void;
tryMoveHit?: (
this: BattleActions, target: Pokemon, pokemon: Pokemon, move: ActiveMove
) => number | undefined | false | '';
tryPrimaryHitEvent?: (
this: BattleActions, damage: SpreadMoveDamage, targets: SpreadMoveTargets, pokemon: Pokemon,
move: ActiveMove, moveData: ActiveMove, isSecondary?: boolean
) => SpreadMoveDamage;
trySpreadMoveHit?: (
this: BattleActions, targets: Pokemon[], pokemon: Pokemon, move: ActiveMove, notActive?: boolean
) => boolean;
useMove?: (
this: BattleActions, move: Move, pokemon: Pokemon, options?: {
target?: Pokemon | null, sourceEffect?: Effect | null,
zMove?: string, maxMove?: string,
}
) => boolean;
useMoveInner?: (
this: BattleActions, move: Move, pokemon: Pokemon, options?: {
target?: Pokemon | null, sourceEffect?: Effect | null,
zMove?: string, maxMove?: string,
}
) => boolean;
getDamage?: (
this: BattleActions, pokemon: Pokemon, target: Pokemon, move: string | number | ActiveMove, suppressMessages: boolean
) => number | undefined | null | false;
modifyDamage?: (
this: BattleActions, baseDamage: number, pokemon: Pokemon, target: Pokemon, move: ActiveMove, suppressMessages?: boolean
) => void;
// oms
mutateOriginalSpecies?: (this: BattleActions, species: Species, deltas: AnyObject) => Species;
getFormeChangeDeltas?: (this: BattleActions, formeChangeSpecies: Species, pokemon?: Pokemon) => AnyObject;
getMixedSpecies?: (this: BattleActions, originalName: string, megaName: string, pokemon?: Pokemon) => Species;
}
interface ModdedBattleSide {
inherit?: true;
allies?: (this: Side, all?: boolean) => Pokemon[];
canDynamaxNow?: (this: Side) => boolean;
chooseSwitch?: (this: Side, slotText?: string) => any;
getChoice?: (this: Side) => string;
getRequestData?: (this: Side, forAlly?: boolean) => { name: string, id: ID, pokemon: AnyObject[] };
}
interface ModdedBattlePokemon {
inherit?: true;
lostItemForDelibird?: Item | null;
boostBy?: (this: Pokemon, boost: SparseBoostsTable) => boolean | number;
clearBoosts?: (this: Pokemon) => void;
calculateStat?: (this: Pokemon, statName: StatIDExceptHP, boost: number, modifier?: number) => number;
cureStatus?: (this: Pokemon, silent?: boolean) => boolean;
deductPP?: (
this: Pokemon, move: string | Move, amount?: number | null, target?: Pokemon | null | false
) => number;
eatItem?: (this: Pokemon, force?: boolean, source?: Pokemon, sourceEffect?: Effect) => boolean;
effectiveWeather?: (this: Pokemon) => ID;
formeChange?: (
this: Pokemon, speciesId: string | Species, source: Effect, isPermanent?: boolean, message?: string
) => boolean;
hasType?: (this: Pokemon, type: string | string[]) => boolean;
getAbility?: (this: Pokemon) => Ability;
getActionSpeed?: (this: Pokemon) => number;
getItem?: (this: Pokemon) => Item;
getMoveRequestData?: (this: Pokemon) => {
moves: { move: string, id: ID, target?: string, disabled?: boolean }[],
maybeDisabled?: boolean, trapped?: boolean, maybeTrapped?: boolean,
canMegaEvo?: boolean, canUltraBurst?: boolean, canZMove?: ZMoveOptions,
};
getMoves?: (this: Pokemon, lockedMove?: string | null, restrictData?: boolean) => {
move: string, id: string, disabled?: string | boolean, disabledSource?: string,
target?: string, pp?: number, maxpp?: number,
}[];
getMoveTargets?: (this: Pokemon, move: ActiveMove, target: Pokemon) => {
targets: Pokemon[], pressureTargets: Pokemon[],
};
getStat?: (
this: Pokemon, statName: StatIDExceptHP, unboosted?: boolean, unmodified?: boolean, fastReturn?: boolean
) => number;
getTypes?: (this: Pokemon, excludeAdded?: boolean, preterastallized?: boolean) => string[];
getWeight?: (this: Pokemon) => number;
hasAbility?: (this: Pokemon, ability: string | string[]) => boolean;
hasItem?: (this: Pokemon, item: string | string[]) => boolean;
isGrounded?: (this: Pokemon, negateImmunity: boolean | undefined) => boolean | null;
modifyStat?: (this: Pokemon, statName: StatIDExceptHP, modifier: number) => void;
moveUsed?: (this: Pokemon, move: ActiveMove, targetLoc?: number) => void;
recalculateStats?: (this: Pokemon) => void;
runEffectiveness?: (this: Pokemon, move: ActiveMove) => number;
runImmunity?: (this: Pokemon, type: string, message?: string | boolean) => boolean;
setAbility?: (
this: Pokemon, ability: string | Ability, source: Pokemon | null, isFromFormeChange: boolean
) => string | false;
setItem?: (this: Pokemon, item: string | Item, source?: Pokemon, effect?: Effect) => boolean;
setStatus?: (
this: Pokemon, status: string | Condition, source: Pokemon | null,
sourceEffect: Effect | null, ignoreImmunities: boolean
) => boolean;
takeItem?: (this: Pokemon, source: Pokemon | undefined) => boolean | Item;
transformInto?: (this: Pokemon, pokemon: Pokemon, effect: Effect | null) => boolean;
useItem?: (this: Pokemon, source?: Pokemon, sourceEffect?: Effect) => boolean;
ignoringAbility?: (this: Pokemon) => boolean;
ignoringItem?: (this: Pokemon) => boolean;
// OM
getLinkedMoves?: (this: Pokemon, ignoreDisabled?: boolean) => string[];
hasLinkedMove?: (this: Pokemon, moveid: string) => boolean;
}
interface ModdedBattleQueue extends Partial<BattleQueue> {
inherit?: true;
resolveAction?: (this: BattleQueue, action: ActionChoice, midTurn?: boolean) => Action[];
}
interface ModdedField extends Partial<Field> {
inherit?: true;
suppressingWeather?: (this: Field) => boolean;
}
interface ModdedBattleScriptsData extends Partial<BattleScriptsData> {
inherit?: string;
actions?: ModdedBattleActions;
pokemon?: ModdedBattlePokemon;
queue?: ModdedBattleQueue;
field?: ModdedField;
side?: ModdedBattleSide;
boost?: (
this: Battle, boost: SparseBoostsTable, target: Pokemon, source?: Pokemon | null,
effect?: Effect | null, isSecondary?: boolean, isSelf?: boolean
) => boolean | null | 0;
debug?: (this: Battle, activity: string) => void;
getActionSpeed?: (this: Battle, action: AnyObject) => void;
init?: (this: ModdedDex) => void;
maybeTriggerEndlessBattleClause?: (
this: Battle, trappedBySide: boolean[], stalenessBySide: ('internal' | 'external' | undefined)[]
) => boolean | undefined;
natureModify?: (this: Battle, stats: StatsTable, set: PokemonSet) => StatsTable;
endTurn?: (this: Battle) => void;
runAction?: (this: Battle, action: Action) => void;
spreadModify?: (this: Battle, baseStats: StatsTable, set: PokemonSet) => StatsTable;
start?: (this: Battle) => void;
suppressingWeather?: (this: Battle) => boolean;
trunc?: (n: number) => number;
win?: (this: Battle, side?: SideID | '' | Side | null) => boolean;
faintMessages?: (this: Battle, lastFirst?: boolean, forceCheck?: boolean, checkWin?: boolean) => boolean | undefined;
tiebreak?: (this: Battle) => boolean;
checkMoveMakesContact?: (
this: Battle, move: ActiveMove, attacker: Pokemon, defender: Pokemon, announcePads?: boolean
) => boolean;
checkWin?: (this: Battle, faintQueue?: Battle['faintQueue'][0]) => true | undefined;
fieldEvent?: (this: Battle, eventid: string, targets?: Pokemon[]) => void;
getAllActive?: (this: Battle, includeFainted?: boolean, includeCommanding?: boolean) => Pokemon[];
}
type TypeInfo = import('./dex-data').TypeInfo;
interface PlayerOptions {
name?: string;
avatar?: string;
rating?: number;
team?: PokemonSet[] | string | null;
seed?: PRNGSeed;
}
interface BasicTextData {
desc?: string;
shortDesc?: string;
}
interface ConditionTextData extends BasicTextData {
activate?: string;
addItem?: string;
block?: string;
boost?: string;
cant?: string;
changeAbility?: string;
damage?: string;
end?: string;
heal?: string;
move?: string;
start?: string;
transform?: string;
}
interface MoveTextData extends ConditionTextData {
alreadyStarted?: string;
blockSelf?: string;
clearBoost?: string;
endFromItem?: string;
fail?: string;
failSelect?: string;
failTooHeavy?: string;
failWrongForme?: string;
megaNoItem?: string;
prepare?: string;
removeItem?: string;
startFromItem?: string;
startFromZEffect?: string;
switchOut?: string;
takeItem?: string;
typeChange?: string;
upkeep?: string;
}
type TextFile<T> = T & {
name: string,
gen1?: T,
gen2?: T,
gen3?: T,
gen4?: T,
gen5?: T,
gen6?: T,
gen7?: T,
gen8?: T,
};
type AbilityText = TextFile<ConditionTextData & {
activateFromItem?: string,
activateNoTarget?: string,
copyBoost?: string,
transformEnd?: string,
}>;
type MoveText = TextFile<MoveTextData>;
type ItemText = TextFile<ConditionTextData>;
type PokedexText = TextFile<BasicTextData>;
type DefaultText = AnyObject;
declare namespace RandomTeamsTypes {
export interface TeamDetails {
megaStone?: number;
zMove?: number;
snow?: number;
hail?: number;
rain?: number;
sand?: number;
sun?: number;
stealthRock?: number;
spikes?: number;
toxicSpikes?: number;
stickyWeb?: number;
rapidSpin?: number;
defog?: number;
screens?: number;
illusion?: number;
statusCure?: number;
teraBlast?: number;
}
export interface FactoryTeamDetails {
megaCount?: number;
zCount?: number;
wantsTeraCount?: number;
forceResult: boolean;
weather?: string;
terrain?: string[];
typeCount: { [k: string]: number };
typeComboCount: { [k: string]: number };
baseFormes: { [k: string]: number };
has: { [k: string]: number };
weaknesses: { [k: string]: number };
resistances: { [k: string]: number };
gigantamax?: boolean;
}
export interface RandomSet {
name: string;
species: string;
gender: string | boolean;
moves: string[];
ability: string;
evs: SparseStatsTable;
ivs: SparseStatsTable;
item: string;
level: number;
shiny: boolean;
nature?: string;
happiness?: number;
dynamaxLevel?: number;
gigantamax?: boolean;
teraType?: string;
role?: Role;
}
export interface RandomFactorySet {
name: string;
species: string;
gender: string;
item: string;
ability: string;
shiny: boolean;
level: number;
happiness: number;
evs: SparseStatsTable;
ivs: SparseStatsTable;
nature: string;
moves: string[];
dynamaxLevel?: number;
gigantamax?: boolean;
wantsTera?: boolean;
teraType?: string;
}
export interface RandomDraftFactorySet {
name: string;
species: string;
gender: string;
moves: string[];
ability: string;
evs: SparseStatsTable;
ivs: SparseStatsTable;
item: string;
level: number;
shiny: boolean;
nature?: string;
happiness?: number;
dynamaxLevel?: number;
gigantamax?: boolean;
teraType?: string;
teraCaptain?: boolean;
}
export interface RandomSetData {
role: Role;
movepool: string[];
abilities?: string[];
teraTypes?: string[];
preferredTypes?: string[];
}
export interface RandomSpeciesData {
level?: number;
sets: RandomSetData[];
}
export type Role = '' | 'Fast Attacker' | 'Setup Sweeper' | 'Wallbreaker' | 'Tera Blast user' |
'Bulky Attacker' | 'Bulky Setup' | 'Fast Bulky Setup' | 'Bulky Support' | 'Fast Support' | 'AV Pivot' |
'Doubles Fast Attacker' | 'Doubles Setup Sweeper' | 'Doubles Wallbreaker' | 'Doubles Bulky Attacker' |
'Doubles Bulky Setup' | 'Offensive Protect' | 'Bulky Protect' | 'Doubles Support' | 'Choice Item user' |
'Z-Move user' | 'Staller' | 'Spinner' | 'Generalist' | 'Berry Sweeper' | 'Thief user';
}
|