@pkmn/sim 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/config/formats.js +101 -153
- package/build/cjs/config/formats.js.map +1 -1
- package/build/cjs/data/abilities.js +9 -2
- package/build/cjs/data/abilities.js.map +1 -1
- package/build/cjs/data/conditions.js +0 -3
- package/build/cjs/data/conditions.js.map +1 -1
- package/build/cjs/data/formats-data.js +28 -25
- package/build/cjs/data/formats-data.js.map +1 -1
- package/build/cjs/data/items.js +2 -2
- package/build/cjs/data/items.js.map +1 -1
- package/build/cjs/data/legality.js +424 -104
- package/build/cjs/data/legality.js.map +1 -1
- package/build/cjs/data/mods/gen1/formats-data.js +22 -22
- package/build/cjs/data/mods/gen1/moves.js +6 -8
- package/build/cjs/data/mods/gen1/moves.js.map +1 -1
- package/build/cjs/data/mods/gen2/formats-data.js +43 -43
- package/build/cjs/data/mods/gen2/formats-data.js.map +1 -1
- package/build/cjs/data/mods/gen2/moves.js +4 -7
- package/build/cjs/data/mods/gen2/moves.js.map +1 -1
- package/build/cjs/data/mods/gen3/formats-data.js +32 -32
- package/build/cjs/data/mods/gen3/formats-data.js.map +1 -1
- package/build/cjs/data/mods/gen3/moves.js +15 -10
- package/build/cjs/data/mods/gen3/moves.js.map +1 -1
- package/build/cjs/data/mods/gen3/scripts.js +11 -6
- package/build/cjs/data/mods/gen3/scripts.js.map +1 -1
- package/build/cjs/data/mods/gen4/moves.js +48 -43
- package/build/cjs/data/mods/gen4/moves.js.map +1 -1
- package/build/cjs/data/mods/gen4/scripts.js +11 -6
- package/build/cjs/data/mods/gen4/scripts.js.map +1 -1
- package/build/cjs/data/mods/gen5/moves.js +44 -66
- package/build/cjs/data/mods/gen5/moves.js.map +1 -1
- package/build/cjs/data/mods/gen6/moves.js +1 -1
- package/build/cjs/data/mods/gen6/moves.js.map +1 -1
- package/build/cjs/data/mods/gen7/moves.js +21 -9
- package/build/cjs/data/mods/gen7/moves.js.map +1 -1
- package/build/cjs/data/mods/gen8/moves.js +6 -2
- package/build/cjs/data/mods/gen8/moves.js.map +1 -1
- package/build/cjs/data/moves.js +733 -732
- package/build/cjs/data/moves.js.map +1 -1
- package/build/cjs/data/rulesets.js +23 -38
- package/build/cjs/data/rulesets.js.map +1 -1
- package/build/cjs/data/text/abilities.js +2 -1
- package/build/cjs/data/text/abilities.js.map +1 -1
- package/build/cjs/data/text/moves.js +1 -1
- package/build/cjs/sim/battle-actions.js +19 -20
- package/build/cjs/sim/battle-actions.js.map +1 -1
- package/build/cjs/sim/battle.js +2 -3
- package/build/cjs/sim/battle.js.map +1 -1
- package/build/cjs/sim/dex-conditions.d.ts +6 -0
- package/build/cjs/sim/dex-conditions.js.map +1 -1
- package/build/cjs/sim/dex-formats.d.ts +2 -0
- package/build/cjs/sim/dex-formats.js +1 -0
- package/build/cjs/sim/dex-formats.js.map +1 -1
- package/build/cjs/sim/dex-moves.d.ts +1 -4
- package/build/cjs/sim/dex-moves.js +0 -1
- package/build/cjs/sim/dex-moves.js.map +1 -1
- package/build/cjs/sim/team-validator.js +1 -1
- package/build/cjs/sim/team-validator.js.map +1 -1
- package/build/cjs/sim/tools/runner.js +1 -1
- package/build/cjs/sim/tools/runner.js.map +1 -1
- package/build/esm/config/formats.mjs +101 -153
- package/build/esm/config/formats.mjs.map +1 -1
- package/build/esm/data/abilities.mjs +9 -2
- package/build/esm/data/abilities.mjs.map +1 -1
- package/build/esm/data/conditions.mjs +0 -3
- package/build/esm/data/conditions.mjs.map +1 -1
- package/build/esm/data/formats-data.mjs +28 -25
- package/build/esm/data/formats-data.mjs.map +1 -1
- package/build/esm/data/items.mjs +2 -2
- package/build/esm/data/items.mjs.map +1 -1
- package/build/esm/data/legality.mjs +424 -104
- package/build/esm/data/legality.mjs.map +1 -1
- package/build/esm/data/mods/gen1/formats-data.mjs +22 -22
- package/build/esm/data/mods/gen1/moves.mjs +6 -8
- package/build/esm/data/mods/gen1/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen2/formats-data.mjs +43 -43
- package/build/esm/data/mods/gen2/formats-data.mjs.map +1 -1
- package/build/esm/data/mods/gen2/moves.mjs +4 -7
- package/build/esm/data/mods/gen2/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen3/formats-data.mjs +32 -32
- package/build/esm/data/mods/gen3/formats-data.mjs.map +1 -1
- package/build/esm/data/mods/gen3/moves.mjs +15 -10
- package/build/esm/data/mods/gen3/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen3/scripts.mjs +11 -6
- package/build/esm/data/mods/gen3/scripts.mjs.map +1 -1
- package/build/esm/data/mods/gen4/moves.mjs +48 -43
- package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen4/scripts.mjs +11 -6
- package/build/esm/data/mods/gen4/scripts.mjs.map +1 -1
- package/build/esm/data/mods/gen5/moves.mjs +44 -66
- package/build/esm/data/mods/gen5/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen6/moves.mjs +1 -1
- package/build/esm/data/mods/gen6/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen7/moves.mjs +21 -9
- package/build/esm/data/mods/gen7/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen8/moves.mjs +6 -2
- package/build/esm/data/mods/gen8/moves.mjs.map +1 -1
- package/build/esm/data/moves.mjs +733 -732
- package/build/esm/data/moves.mjs.map +1 -1
- package/build/esm/data/rulesets.mjs +23 -38
- package/build/esm/data/rulesets.mjs.map +1 -1
- package/build/esm/data/text/abilities.mjs +2 -1
- package/build/esm/data/text/abilities.mjs.map +1 -1
- package/build/esm/data/text/moves.mjs +1 -1
- package/build/esm/sim/battle-actions.mjs +19 -20
- package/build/esm/sim/battle-actions.mjs.map +1 -1
- package/build/esm/sim/battle.mjs +2 -3
- package/build/esm/sim/battle.mjs.map +1 -1
- package/build/esm/sim/dex-conditions.d.mts +6 -0
- package/build/esm/sim/dex-conditions.mjs.map +1 -1
- package/build/esm/sim/dex-formats.d.mts +2 -0
- package/build/esm/sim/dex-formats.mjs +1 -0
- package/build/esm/sim/dex-formats.mjs.map +1 -1
- package/build/esm/sim/dex-moves.d.mts +1 -4
- package/build/esm/sim/dex-moves.mjs +0 -1
- package/build/esm/sim/dex-moves.mjs.map +1 -1
- package/build/esm/sim/team-validator.mjs +1 -1
- package/build/esm/sim/team-validator.mjs.map +1 -1
- package/build/esm/sim/tools/runner.mjs +1 -1
- package/build/esm/sim/tools/runner.mjs.map +1 -1
- package/package.json +3 -1
- package/build/types/config/formats.d.ts +0 -1
- package/build/types/data/abilities.d.ts +0 -3
- package/build/types/data/aliases.d.ts +0 -3
- package/build/types/data/conditions.d.ts +0 -3
- package/build/types/data/formats-data.d.ts +0 -3
- package/build/types/data/index.d.ts +0 -11
- package/build/types/data/items.d.ts +0 -3
- package/build/types/data/learnsets.d.ts +0 -3
- package/build/types/data/legality.d.ts +0 -3
- package/build/types/data/mods/gen1/conditions.d.ts +0 -12
- package/build/types/data/mods/gen1/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen1/index.d.ts +0 -7
- package/build/types/data/mods/gen1/moves.d.ts +0 -7
- package/build/types/data/mods/gen1/pokedex.d.ts +0 -3
- package/build/types/data/mods/gen1/rulesets.d.ts +0 -3
- package/build/types/data/mods/gen1/scripts.d.ts +0 -6
- package/build/types/data/mods/gen1/typechart.d.ts +0 -10
- package/build/types/data/mods/gen2/conditions.d.ts +0 -3
- package/build/types/data/mods/gen2/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen2/index.d.ts +0 -8
- package/build/types/data/mods/gen2/items.d.ts +0 -3
- package/build/types/data/mods/gen2/learnsets.d.ts +0 -3
- package/build/types/data/mods/gen2/legality.d.ts +0 -3
- package/build/types/data/mods/gen2/moves.d.ts +0 -6
- package/build/types/data/mods/gen2/pokedex.d.ts +0 -3
- package/build/types/data/mods/gen2/rulesets.d.ts +0 -3
- package/build/types/data/mods/gen2/scripts.d.ts +0 -4
- package/build/types/data/mods/gen2/typechart.d.ts +0 -3
- package/build/types/data/mods/gen3/abilities.d.ts +0 -3
- package/build/types/data/mods/gen3/conditions.d.ts +0 -3
- package/build/types/data/mods/gen3/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen3/index.d.ts +0 -7
- package/build/types/data/mods/gen3/items.d.ts +0 -3
- package/build/types/data/mods/gen3/moves.d.ts +0 -6
- package/build/types/data/mods/gen3/rulesets.d.ts +0 -3
- package/build/types/data/mods/gen3/scripts.d.ts +0 -1
- package/build/types/data/mods/gen4/abilities.d.ts +0 -3
- package/build/types/data/mods/gen4/conditions.d.ts +0 -3
- package/build/types/data/mods/gen4/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen4/index.d.ts +0 -8
- package/build/types/data/mods/gen4/items.d.ts +0 -3
- package/build/types/data/mods/gen4/moves.d.ts +0 -3
- package/build/types/data/mods/gen4/pokedex.d.ts +0 -3
- package/build/types/data/mods/gen4/rulesets.d.ts +0 -3
- package/build/types/data/mods/gen4/scripts.d.ts +0 -1
- package/build/types/data/mods/gen5/abilities.d.ts +0 -3
- package/build/types/data/mods/gen5/conditions.d.ts +0 -3
- package/build/types/data/mods/gen5/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen5/index.d.ts +0 -9
- package/build/types/data/mods/gen5/items.d.ts +0 -3
- package/build/types/data/mods/gen5/moves.d.ts +0 -3
- package/build/types/data/mods/gen5/pokedex.d.ts +0 -3
- package/build/types/data/mods/gen5/rulesets.d.ts +0 -3
- package/build/types/data/mods/gen5/scripts.d.ts +0 -1
- package/build/types/data/mods/gen5/typechart.d.ts +0 -3
- package/build/types/data/mods/gen6/abilities.d.ts +0 -3
- package/build/types/data/mods/gen6/conditions.d.ts +0 -3
- package/build/types/data/mods/gen6/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen6/index.d.ts +0 -8
- package/build/types/data/mods/gen6/items.d.ts +0 -3
- package/build/types/data/mods/gen6/learnsets.d.ts +0 -3
- package/build/types/data/mods/gen6/legality.d.ts +0 -3
- package/build/types/data/mods/gen6/moves.d.ts +0 -3
- package/build/types/data/mods/gen6/pokedex.d.ts +0 -3
- package/build/types/data/mods/gen6/scripts.d.ts +0 -1
- package/build/types/data/mods/gen6/typechart.d.ts +0 -3
- package/build/types/data/mods/gen7/abilities.d.ts +0 -3
- package/build/types/data/mods/gen7/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen7/index.d.ts +0 -7
- package/build/types/data/mods/gen7/items.d.ts +0 -3
- package/build/types/data/mods/gen7/moves.d.ts +0 -3
- package/build/types/data/mods/gen7/pokedex.d.ts +0 -3
- package/build/types/data/mods/gen7/rulesets.d.ts +0 -3
- package/build/types/data/mods/gen7/scripts.d.ts +0 -1
- package/build/types/data/mods/gen8/abilities.d.ts +0 -3
- package/build/types/data/mods/gen8/formats-data.d.ts +0 -3
- package/build/types/data/mods/gen8/index.d.ts +0 -7
- package/build/types/data/mods/gen8/items.d.ts +0 -3
- package/build/types/data/mods/gen8/learnsets.d.ts +0 -3
- package/build/types/data/mods/gen8/legality.d.ts +0 -3
- package/build/types/data/mods/gen8/moves.d.ts +0 -3
- package/build/types/data/mods/gen8/pokedex.d.ts +0 -3
- package/build/types/data/mods/gen8/rulesets.d.ts +0 -3
- package/build/types/data/mods/gen8/scripts.d.ts +0 -1
- package/build/types/data/moves.d.ts +0 -3
- package/build/types/data/natures.d.ts +0 -3
- package/build/types/data/pokedex.d.ts +0 -3
- package/build/types/data/pokemongo.d.ts +0 -31
- package/build/types/data/rulesets.d.ts +0 -3
- package/build/types/data/scripts.d.ts +0 -1
- package/build/types/data/tags.d.ts +0 -15
- package/build/types/data/text/abilities.d.ts +0 -3
- package/build/types/data/text/default.d.ts +0 -3
- package/build/types/data/text/items.d.ts +0 -3
- package/build/types/data/text/moves.d.ts +0 -3
- package/build/types/data/typechart.d.ts +0 -3
- package/build/types/lib/index.d.ts +0 -2
- package/build/types/lib/streams.d.ts +0 -1
- package/build/types/lib/utils.d.ts +0 -139
- package/build/types/sim/battle-actions.d.ts +0 -90
- package/build/types/sim/battle-queue.d.ts +0 -164
- package/build/types/sim/battle-stream.d.ts +0 -67
- package/build/types/sim/battle.d.ts +0 -396
- package/build/types/sim/dex-abilities.d.ts +0 -35
- package/build/types/sim/dex-conditions.d.ts +0 -518
- package/build/types/sim/dex-data.d.ts +0 -169
- package/build/types/sim/dex-formats.d.ts +0 -170
- package/build/types/sim/dex-items.d.ts +0 -110
- package/build/types/sim/dex-moves.d.ts +0 -441
- package/build/types/sim/dex-species.d.ts +0 -289
- package/build/types/sim/dex.d.ts +0 -162
- package/build/types/sim/exported-global-types.d.ts +0 -510
- package/build/types/sim/field.d.ts +0 -30
- package/build/types/sim/global-types.d.ts +0 -510
- package/build/types/sim/index.d.ts +0 -13
- package/build/types/sim/pokemon.d.ts +0 -427
- package/build/types/sim/prng.d.ts +0 -97
- package/build/types/sim/side.d.ts +0 -127
- package/build/types/sim/state.d.ts +0 -42
- package/build/types/sim/team-validator.d.ts +0 -198
- package/build/types/sim/teams.d.ts +0 -26
- package/build/types/sim/tools/exhaustive-runner.d.ts +0 -52
- package/build/types/sim/tools/index.d.ts +0 -2
- package/build/types/sim/tools/random-player-ai.d.ts +0 -32
- package/build/types/sim/tools/runner.d.ts +0 -41
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { Ability, AnyObject, EventInfo, Format, ID, Item, ModdedDex, Move, Nature, PokemonSet, SparseStatsTable, Species, StatsTable } from './exported-global-types';
|
|
2
|
-
/**
|
|
3
|
-
* Describes a possible way to get a pokemon. Is not exhaustive!
|
|
4
|
-
* sourcesBefore covers all sources that do not have exclusive
|
|
5
|
-
* moves (like catching wild pokemon).
|
|
6
|
-
*
|
|
7
|
-
* First character is a generation number, 1-8.
|
|
8
|
-
* Second character is a source ID, one of:
|
|
9
|
-
*
|
|
10
|
-
* - E = egg, 3rd char+ is the father in gen 2-5, empty in gen 6-7
|
|
11
|
-
* because egg moves aren't restricted to fathers anymore
|
|
12
|
-
* - S = event, 3rd char+ is the index in .eventData
|
|
13
|
-
* - D = Dream World, only 5D is valid
|
|
14
|
-
* - V = Virtual Console or Let's Go transfer, only 7V/8V is valid
|
|
15
|
-
*
|
|
16
|
-
* Designed to match MoveSource where possible.
|
|
17
|
-
*/
|
|
18
|
-
export type PokemonSource = string;
|
|
19
|
-
/**
|
|
20
|
-
* Represents a set of possible ways to get a Pokémon with a given
|
|
21
|
-
* set.
|
|
22
|
-
*
|
|
23
|
-
* `new PokemonSources()` creates an empty set;
|
|
24
|
-
* `new PokemonSources(dex.gen)` allows all Pokemon.
|
|
25
|
-
*
|
|
26
|
-
* The set mainly stored as an Array `sources`, but for sets that
|
|
27
|
-
* could be sourced from anywhere (for instance, TM moves), we
|
|
28
|
-
* instead just set `sourcesBefore` to a number meaning "any
|
|
29
|
-
* source at or before this gen is possible."
|
|
30
|
-
*
|
|
31
|
-
* In other words, this variable represents the set of all
|
|
32
|
-
* sources in `sources`, union all sources at or before
|
|
33
|
-
* gen `sourcesBefore`.
|
|
34
|
-
*/
|
|
35
|
-
export declare class PokemonSources {
|
|
36
|
-
/**
|
|
37
|
-
* A set of specific possible PokemonSources; implemented as
|
|
38
|
-
* an Array rather than a Set for perf reasons.
|
|
39
|
-
*/
|
|
40
|
-
sources: PokemonSource[];
|
|
41
|
-
/**
|
|
42
|
-
* if nonzero: the set also contains all possible sources from
|
|
43
|
-
* this gen and earlier.
|
|
44
|
-
*/
|
|
45
|
-
sourcesBefore: number;
|
|
46
|
-
/**
|
|
47
|
-
* the set requires sources from this gen or later
|
|
48
|
-
* this should be unchanged from the format's minimum past gen
|
|
49
|
-
* (3 in modern games, 6 if pentagon is required, etc)
|
|
50
|
-
*/
|
|
51
|
-
sourcesAfter: number;
|
|
52
|
-
isHidden: boolean | null;
|
|
53
|
-
/**
|
|
54
|
-
* `limitedEggMoves` is a list of moves that can only be obtained from an
|
|
55
|
-
* egg with another father in gen 2-5. If there are multiple such moves,
|
|
56
|
-
* potential fathers need to be checked to see if they can actually
|
|
57
|
-
* learn the move combination in question.
|
|
58
|
-
*
|
|
59
|
-
* `null` = the current move is definitely not a limited egg move
|
|
60
|
-
*
|
|
61
|
-
* `undefined` = the current move may or may not be a limited egg move
|
|
62
|
-
*/
|
|
63
|
-
limitedEggMoves?: ID[] | null;
|
|
64
|
-
/**
|
|
65
|
-
* Moves that should be in limitedEggMoves that would otherwise be skipped
|
|
66
|
-
* because they can be learned universally in a past generation
|
|
67
|
-
*/
|
|
68
|
-
possiblyLimitedEggMoves?: ID[] | null;
|
|
69
|
-
/**
|
|
70
|
-
* Moves that should be in limitedEggMoves that would otherwise be skipped
|
|
71
|
-
* because they can be learned via Gen 1-2 tradeback
|
|
72
|
-
*/
|
|
73
|
-
tradebackLimitedEggMoves?: ID[] | null;
|
|
74
|
-
/**
|
|
75
|
-
* Tracks level up egg moves for female-only Pokemon
|
|
76
|
-
*/
|
|
77
|
-
levelUpEggMoves?: ID[] | null;
|
|
78
|
-
/**
|
|
79
|
-
* Moves that can be learned via Pomeg glitch and does not require a
|
|
80
|
-
* particular parent to learn
|
|
81
|
-
*/
|
|
82
|
-
pomegEggMoves?: ID[] | null;
|
|
83
|
-
/**
|
|
84
|
-
* Event egg source that may be used with the Pomeg glitch
|
|
85
|
-
*
|
|
86
|
-
* `null` = definitely not an event egg that can be used with the Pomeg glitch
|
|
87
|
-
*/
|
|
88
|
-
pomegEventEgg?: string | null;
|
|
89
|
-
/**
|
|
90
|
-
* Some Pokemon evolve by having a move in their learnset (like Piloswine
|
|
91
|
-
* with Ancient Power). These can only carry three other moves from their
|
|
92
|
-
* prevo, because the fourth move must be the evo move. This restriction
|
|
93
|
-
* doesn't apply to gen 6+ eggs, which can get around the restriction with
|
|
94
|
-
* the relearner.
|
|
95
|
-
*/
|
|
96
|
-
moveEvoCarryCount: number;
|
|
97
|
-
babyOnly?: string;
|
|
98
|
-
sketchMove?: string;
|
|
99
|
-
dreamWorldMoveCount: number;
|
|
100
|
-
hm?: string;
|
|
101
|
-
isFromPokemonGo?: boolean;
|
|
102
|
-
pokemonGoSource?: string;
|
|
103
|
-
restrictiveMoves?: string[];
|
|
104
|
-
/** Obscure learn methods */
|
|
105
|
-
restrictedMove?: ID;
|
|
106
|
-
constructor(sourcesBefore?: number, sourcesAfter?: number);
|
|
107
|
-
size(): number;
|
|
108
|
-
add(source: PokemonSource, limitedEggMove?: ID | null): void;
|
|
109
|
-
addGen(sourceGen: number): void;
|
|
110
|
-
minSourceGen(): number;
|
|
111
|
-
maxSourceGen(): number;
|
|
112
|
-
intersectWith(other: PokemonSources): void;
|
|
113
|
-
}
|
|
114
|
-
export declare class TeamValidator {
|
|
115
|
-
readonly format: Format;
|
|
116
|
-
readonly dex: ModdedDex;
|
|
117
|
-
readonly gen: number;
|
|
118
|
-
readonly ruleTable: import('./dex-formats').RuleTable;
|
|
119
|
-
readonly minSourceGen: number;
|
|
120
|
-
readonly toID: (str: any) => ID;
|
|
121
|
-
constructor(format: string | Format, dex?: import("./dex").ModdedDex);
|
|
122
|
-
validateTeam(team: PokemonSet[] | null, options?: {
|
|
123
|
-
removeNicknames?: boolean;
|
|
124
|
-
skipSets?: {
|
|
125
|
-
[name: string]: {
|
|
126
|
-
[key: string]: boolean;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
}): string[] | null;
|
|
130
|
-
baseValidateTeam(team: PokemonSet[] | null, options?: {
|
|
131
|
-
removeNicknames?: boolean;
|
|
132
|
-
skipSets?: {
|
|
133
|
-
[name: string]: {
|
|
134
|
-
[key: string]: boolean;
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
}): string[] | null;
|
|
138
|
-
getEventOnlyData(species: Species, noRecurse?: boolean): {
|
|
139
|
-
species: Species;
|
|
140
|
-
eventData: EventInfo[];
|
|
141
|
-
} | null;
|
|
142
|
-
getValidationSpecies(set: PokemonSet): [Species, Species];
|
|
143
|
-
validateSet(set: PokemonSet, teamHas: AnyObject): string[] | null;
|
|
144
|
-
validateStats(set: PokemonSet, species: Species, setSources: PokemonSources, pokemonGoProblems: string[] | null): string[];
|
|
145
|
-
/**
|
|
146
|
-
* Not exhaustive, just checks Atk and Spe, which are the only competitively
|
|
147
|
-
* relevant IVs outside of extremely obscure situations.
|
|
148
|
-
*/
|
|
149
|
-
possibleBottleCapHpType(type: string, ivs: StatsTable): boolean;
|
|
150
|
-
validateSource(set: PokemonSet, source: PokemonSource, setSources: PokemonSources, species: Species, because: string): string[] | undefined;
|
|
151
|
-
validateSource(set: PokemonSet, source: PokemonSource, setSources: PokemonSources, species: Species): true | undefined;
|
|
152
|
-
findEggMoveFathers(source: PokemonSource, species: Species, setSources: PokemonSources, getAll?: false, pokemonBlacklist?: ID[], noRecurse?: true): boolean;
|
|
153
|
-
findEggMoveFathers(source: PokemonSource, species: Species, setSources: PokemonSources, getAll?: true): ID[] | null;
|
|
154
|
-
/**
|
|
155
|
-
* We could, if we wanted, do a complete move validation of the father's
|
|
156
|
-
* moveset to see if it's valid. This would recurse and be NP-Hard so
|
|
157
|
-
* instead we won't. We'll instead use a simplified algorithm: The father
|
|
158
|
-
* is allowed to have multiple egg moves and a maximum of one move from
|
|
159
|
-
* any other restrictive source; recursion is done only if there are less
|
|
160
|
-
* egg moves to validate or if the father has an egg group it doesn't
|
|
161
|
-
* share with the egg Pokemon. Recursion is also limited to two iterations
|
|
162
|
-
* of calling findEggMoveFathers.
|
|
163
|
-
*/
|
|
164
|
-
fatherCanLearn(baseSpecies: Species, species: Species, moves: ID[], eggGen: number, pokemonBlacklist: ID[], noRecurse: boolean | undefined): boolean;
|
|
165
|
-
validateForme(set: PokemonSet): string[];
|
|
166
|
-
checkSpecies(set: PokemonSet, species: Species, tierSpecies: Species, setHas: {
|
|
167
|
-
[k: string]: true;
|
|
168
|
-
}): string | null;
|
|
169
|
-
checkItem(set: PokemonSet, item: Item, setHas: {
|
|
170
|
-
[k: string]: true;
|
|
171
|
-
}): string | null;
|
|
172
|
-
checkMove(set: PokemonSet, move: Move, setHas: {
|
|
173
|
-
[k: string]: true;
|
|
174
|
-
}): string | null;
|
|
175
|
-
checkAbility(set: PokemonSet, ability: Ability, setHas: {
|
|
176
|
-
[k: string]: true;
|
|
177
|
-
}): string | null;
|
|
178
|
-
checkNature(set: PokemonSet, nature: Nature, setHas: {
|
|
179
|
-
[k: string]: true;
|
|
180
|
-
}): string | null;
|
|
181
|
-
validateEvent(set: PokemonSet, setSources: PokemonSources, eventData: EventInfo, eventSpecies: Species): true | undefined;
|
|
182
|
-
validateEvent(set: PokemonSet, setSources: PokemonSources, eventData: EventInfo, eventSpecies: Species, because: string, from?: string): string[] | undefined;
|
|
183
|
-
allSources(species?: Species): PokemonSources;
|
|
184
|
-
validateMoves(species: Species, moves: string[], setSources: PokemonSources, set?: Partial<PokemonSet>, name?: string, moveLegalityWhitelist?: {
|
|
185
|
-
[k: string]: true | undefined;
|
|
186
|
-
}): string[];
|
|
187
|
-
/**
|
|
188
|
-
* Returns a list of problems regarding a Pokemon's avilability in Pokemon GO (empty list if no problems)
|
|
189
|
-
* If the Pokemon cannot be obtained from Pokemon GO, returns null
|
|
190
|
-
*/
|
|
191
|
-
validatePokemonGo(species: Species, set: Partial<PokemonSet>, setSources: PokemonSources, name?: string): string[] | null;
|
|
192
|
-
omCheckCanLearn(move: Move, s: Species, setSources?: PokemonSources, set?: Partial<PokemonSet>, problem?: string): string | null;
|
|
193
|
-
/** Returns null if you can learn the move, or a string explaining why you can't learn it */
|
|
194
|
-
checkCanLearn(move: Move, s: Species, setSources?: PokemonSources, set?: Partial<PokemonSet>): string | null;
|
|
195
|
-
learnsetParent(species: Species): import("./dex-species").Species | null;
|
|
196
|
-
static fillStats(stats: SparseStatsTable | null, fillNum?: number): StatsTable;
|
|
197
|
-
static get(format: string | Format): TeamValidator;
|
|
198
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as pkmn from '@pkmn/sets';
|
|
2
|
-
import { PokemonSet } from '@pkmn/sets';
|
|
3
|
-
import { PRNG, PRNGSeed } from './prng';
|
|
4
|
-
import { Format, PlayerOptions } from './exported-global-types';
|
|
5
|
-
interface TeamGenerator {
|
|
6
|
-
prng: PRNG;
|
|
7
|
-
getTeam(options?: PlayerOptions): pkmn.PokemonSet[];
|
|
8
|
-
setSeed(prng?: PRNG | PRNGSeed): void;
|
|
9
|
-
}
|
|
10
|
-
interface TeamGeneratorFactory {
|
|
11
|
-
getTeamGenerator(format: Format | string, seed: PRNG | PRNGSeed | null): TeamGenerator;
|
|
12
|
-
}
|
|
13
|
-
export declare const Teams: {
|
|
14
|
-
pack(team: pkmn.PokemonSet[] | null): string;
|
|
15
|
-
unpack(buf: string): pkmn.PokemonSet[] | null;
|
|
16
|
-
export(team: pkmn.PokemonSet[], options?: {
|
|
17
|
-
hideStats?: boolean;
|
|
18
|
-
}): string;
|
|
19
|
-
exportSet(set: pkmn.PokemonSet): string;
|
|
20
|
-
import(buf: string): PokemonSet[] | null;
|
|
21
|
-
getGenerator(format: Format | string, seed?: PRNG | PRNGSeed | null): TeamGenerator;
|
|
22
|
-
setGeneratorFactory(factory: TeamGeneratorFactory): any;
|
|
23
|
-
generate(format: Format | string, options?: PlayerOptions | null): pkmn.PokemonSet[];
|
|
24
|
-
};
|
|
25
|
-
export { PokemonSet } from '@pkmn/sets';
|
|
26
|
-
export default Teams;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ID } from '../exported-global-types';
|
|
2
|
-
import { PRNG, PRNGSeed } from '../prng';
|
|
3
|
-
import { RunnerOptions } from './runner';
|
|
4
|
-
export interface ExhaustiveRunnerOptions {
|
|
5
|
-
format: string;
|
|
6
|
-
cycles?: number;
|
|
7
|
-
prng?: PRNG | PRNGSeed | null;
|
|
8
|
-
log?: boolean;
|
|
9
|
-
maxGames?: number;
|
|
10
|
-
maxFailures?: number;
|
|
11
|
-
dual?: boolean | 'debug';
|
|
12
|
-
possible?: ExhaustiveRunnerPossibilities;
|
|
13
|
-
runner?: (options: RunnerOptions) => Promise<void>;
|
|
14
|
-
cmd?: (cycles: number, format: string, seed: string) => string;
|
|
15
|
-
}
|
|
16
|
-
export interface ExhaustiveRunnerPossibilities {
|
|
17
|
-
pokemon?: ID[];
|
|
18
|
-
items?: ID[];
|
|
19
|
-
abilities?: ID[];
|
|
20
|
-
moves?: ID[];
|
|
21
|
-
}
|
|
22
|
-
export interface ExhaustiveRunnerUsageTracker {
|
|
23
|
-
pokemon(id: ID): void;
|
|
24
|
-
item(id: ID): void;
|
|
25
|
-
ability(id: ID): void;
|
|
26
|
-
move(id: ID): void;
|
|
27
|
-
}
|
|
28
|
-
export declare class ExhaustiveRunner {
|
|
29
|
-
static readonly DEFAULT_CYCLES = 1;
|
|
30
|
-
static readonly MAX_FAILURES = 10;
|
|
31
|
-
static readonly FORMATS: string[];
|
|
32
|
-
private readonly format;
|
|
33
|
-
private readonly cycles;
|
|
34
|
-
private readonly prng;
|
|
35
|
-
private readonly log;
|
|
36
|
-
private readonly maxGames?;
|
|
37
|
-
private readonly maxFailures?;
|
|
38
|
-
private readonly dual;
|
|
39
|
-
private readonly possible?;
|
|
40
|
-
private readonly runner;
|
|
41
|
-
private readonly cmd;
|
|
42
|
-
private failures;
|
|
43
|
-
private games;
|
|
44
|
-
private needsClear;
|
|
45
|
-
constructor(options: ExhaustiveRunnerOptions);
|
|
46
|
-
run(): Promise<number>;
|
|
47
|
-
private maybeClear;
|
|
48
|
-
private createPools;
|
|
49
|
-
private logProgress;
|
|
50
|
-
private static getSignatures;
|
|
51
|
-
private static onlyValid;
|
|
52
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { AnyObject } from '../exported-global-types';
|
|
2
|
-
/**
|
|
3
|
-
* Example random player AI.
|
|
4
|
-
*
|
|
5
|
-
* Pokemon Showdown - http://pokemonshowdown.com/
|
|
6
|
-
*
|
|
7
|
-
* @license MIT
|
|
8
|
-
*/
|
|
9
|
-
import { ObjectReadWriteStream } from '../../lib/streams';
|
|
10
|
-
import { BattlePlayer } from '../battle-stream';
|
|
11
|
-
import { PRNG, PRNGSeed } from '../prng';
|
|
12
|
-
export declare class RandomPlayerAI extends BattlePlayer {
|
|
13
|
-
protected readonly move: number;
|
|
14
|
-
protected readonly mega: number;
|
|
15
|
-
protected readonly prng: PRNG;
|
|
16
|
-
constructor(playerStream: ObjectReadWriteStream<string>, options?: {
|
|
17
|
-
move?: number;
|
|
18
|
-
mega?: number;
|
|
19
|
-
seed?: PRNG | PRNGSeed | null;
|
|
20
|
-
}, debug?: boolean);
|
|
21
|
-
receiveError(error: Error): void;
|
|
22
|
-
receiveRequest(request: AnyObject): void;
|
|
23
|
-
protected chooseTeamPreview(team: AnyObject[]): string;
|
|
24
|
-
protected chooseMove(active: AnyObject, moves: {
|
|
25
|
-
choice: string;
|
|
26
|
-
move: AnyObject;
|
|
27
|
-
}[]): string;
|
|
28
|
-
protected chooseSwitch(active: AnyObject | undefined, switches: {
|
|
29
|
-
slot: number;
|
|
30
|
-
pokemon: AnyObject;
|
|
31
|
-
}[]): number;
|
|
32
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { PokemonSet } from '../exported-global-types';
|
|
2
|
-
import { ObjectReadWriteStream } from '../../lib/streams';
|
|
3
|
-
import { PRNG, PRNGSeed } from '../prng';
|
|
4
|
-
import { RandomPlayerAI } from './random-player-ai';
|
|
5
|
-
export interface AIOptions {
|
|
6
|
-
createAI: (stream: ObjectReadWriteStream<string>, options: AIOptions) => RandomPlayerAI;
|
|
7
|
-
move?: number;
|
|
8
|
-
mega?: number;
|
|
9
|
-
seed?: PRNG | PRNGSeed | null;
|
|
10
|
-
team?: PokemonSet[];
|
|
11
|
-
}
|
|
12
|
-
export interface RunnerOptions {
|
|
13
|
-
format: string;
|
|
14
|
-
prng?: PRNG | PRNGSeed | null;
|
|
15
|
-
p1options?: AIOptions;
|
|
16
|
-
p2options?: AIOptions;
|
|
17
|
-
p3options?: AIOptions;
|
|
18
|
-
p4options?: AIOptions;
|
|
19
|
-
input?: boolean;
|
|
20
|
-
output?: boolean;
|
|
21
|
-
error?: boolean;
|
|
22
|
-
dual?: boolean | 'debug';
|
|
23
|
-
}
|
|
24
|
-
export declare class Runner {
|
|
25
|
-
static readonly AI_OPTIONS: AIOptions;
|
|
26
|
-
private readonly prng;
|
|
27
|
-
private readonly p1options;
|
|
28
|
-
private readonly p2options;
|
|
29
|
-
private readonly p3options;
|
|
30
|
-
private readonly p4options;
|
|
31
|
-
private readonly format;
|
|
32
|
-
private readonly input;
|
|
33
|
-
private readonly output;
|
|
34
|
-
private readonly error;
|
|
35
|
-
private readonly dual;
|
|
36
|
-
constructor(options: RunnerOptions);
|
|
37
|
-
run(): Promise<void>;
|
|
38
|
-
private runGame;
|
|
39
|
-
private newSeed;
|
|
40
|
-
private getPlayerSpec;
|
|
41
|
-
}
|