@pkmn/sim 0.8.4 → 0.8.5
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 +1 -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,169 +0,0 @@
|
|
|
1
|
-
import { AnyObject, EffectData, EffectType, ID, ModdedDex, NatureData, Nonstandard, SparseStatsTable, StatID, StatIDExceptHP, TypeData } from './exported-global-types';
|
|
2
|
-
/**
|
|
3
|
-
* Converts anything to an ID. An ID must have only lowercase alphanumeric
|
|
4
|
-
* characters.
|
|
5
|
-
*
|
|
6
|
-
* If a string is passed, it will be converted to lowercase and
|
|
7
|
-
* non-alphanumeric characters will be stripped.
|
|
8
|
-
*
|
|
9
|
-
* If an object with an ID is passed, its ID will be returned.
|
|
10
|
-
* Otherwise, an empty string will be returned.
|
|
11
|
-
*
|
|
12
|
-
* Generally assigned to the global toID, because of how
|
|
13
|
-
* commonly it's used.
|
|
14
|
-
*/
|
|
15
|
-
export declare function toID(text: any): ID;
|
|
16
|
-
export declare class BasicEffect implements EffectData {
|
|
17
|
-
/**
|
|
18
|
-
* ID. This will be a lowercase version of the name with all the
|
|
19
|
-
* non-alphanumeric characters removed. So, for instance, "Mr. Mime"
|
|
20
|
-
* becomes "mrmime", and "Basculin-Blue-Striped" becomes
|
|
21
|
-
* "basculinbluestriped".
|
|
22
|
-
*/
|
|
23
|
-
id: ID;
|
|
24
|
-
/**
|
|
25
|
-
* Name. Currently does not support Unicode letters, so "Flabébé"
|
|
26
|
-
* is "Flabebe" and "Nidoran♀" is "Nidoran-F".
|
|
27
|
-
*/
|
|
28
|
-
name: string;
|
|
29
|
-
/**
|
|
30
|
-
* Full name. Prefixes the name with the effect type. For instance,
|
|
31
|
-
* Leftovers would be "item: Leftovers", confusion the status
|
|
32
|
-
* condition would be "confusion", etc.
|
|
33
|
-
*/
|
|
34
|
-
fullname: string;
|
|
35
|
-
/** Effect type. */
|
|
36
|
-
effectType: EffectType;
|
|
37
|
-
/**
|
|
38
|
-
* Does it exist? For historical reasons, when you use an accessor
|
|
39
|
-
* for an effect that doesn't exist, you get a dummy effect that
|
|
40
|
-
* doesn't do anything, and this field set to false.
|
|
41
|
-
*/
|
|
42
|
-
exists: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Dex number? For a Pokemon, this is the National Dex number. For
|
|
45
|
-
* other effects, this is often an internal ID (e.g. a move
|
|
46
|
-
* number). Not all effects have numbers, this will be 0 if it
|
|
47
|
-
* doesn't. Nonstandard effects (e.g. CAP effects) will have
|
|
48
|
-
* negative numbers.
|
|
49
|
-
*/
|
|
50
|
-
num: number;
|
|
51
|
-
/**
|
|
52
|
-
* The generation of Pokemon game this was INTRODUCED (NOT
|
|
53
|
-
* necessarily the current gen being simulated.) Not all effects
|
|
54
|
-
* track generation; this will be 0 if not known.
|
|
55
|
-
*/
|
|
56
|
-
gen: number;
|
|
57
|
-
/**
|
|
58
|
-
* A shortened form of the description of this effect.
|
|
59
|
-
* Not all effects have this.
|
|
60
|
-
*/
|
|
61
|
-
shortDesc: string;
|
|
62
|
-
/** The full description for this effect. */
|
|
63
|
-
desc: string;
|
|
64
|
-
/**
|
|
65
|
-
* Is this item/move/ability/pokemon nonstandard? Specified for effects
|
|
66
|
-
* that have no use in standard formats: made-up pokemon (CAP),
|
|
67
|
-
* glitches (MissingNo etc), Pokestar pokemon, etc.
|
|
68
|
-
*/
|
|
69
|
-
isNonstandard: Nonstandard | null;
|
|
70
|
-
/** The duration of the condition - only for pure conditions. */
|
|
71
|
-
duration?: number;
|
|
72
|
-
/** Whether or not the condition is ignored by Baton Pass - only for pure conditions. */
|
|
73
|
-
noCopy: boolean;
|
|
74
|
-
/** Whether or not the condition affects fainted Pokemon. */
|
|
75
|
-
affectsFainted: boolean;
|
|
76
|
-
/** Moves only: what status does it set? */
|
|
77
|
-
status?: ID;
|
|
78
|
-
/** Moves only: what weather does it set? */
|
|
79
|
-
weather?: ID;
|
|
80
|
-
/** ??? */
|
|
81
|
-
sourceEffect: string;
|
|
82
|
-
constructor(data: AnyObject);
|
|
83
|
-
toString(): string;
|
|
84
|
-
}
|
|
85
|
-
export declare class Nature extends BasicEffect implements Readonly<BasicEffect & NatureData> {
|
|
86
|
-
readonly effectType: 'Nature';
|
|
87
|
-
readonly plus?: StatIDExceptHP;
|
|
88
|
-
readonly minus?: StatIDExceptHP;
|
|
89
|
-
constructor(data: AnyObject);
|
|
90
|
-
}
|
|
91
|
-
export declare class DexNatures {
|
|
92
|
-
readonly dex: ModdedDex;
|
|
93
|
-
readonly natureCache: Map<ID, Nature>;
|
|
94
|
-
allCache: readonly Nature[] | null;
|
|
95
|
-
constructor(dex: ModdedDex);
|
|
96
|
-
get(name: string | Nature): Nature;
|
|
97
|
-
getByID(id: ID): Nature;
|
|
98
|
-
all(): readonly Nature[];
|
|
99
|
-
}
|
|
100
|
-
type TypeInfoEffectType = 'Type' | 'EffectType';
|
|
101
|
-
export declare class TypeInfo implements Readonly<TypeData> {
|
|
102
|
-
/**
|
|
103
|
-
* ID. This will be a lowercase version of the name with all the
|
|
104
|
-
* non-alphanumeric characters removed. e.g. 'flying'
|
|
105
|
-
*/
|
|
106
|
-
readonly id: ID;
|
|
107
|
-
/** Name. e.g. 'Flying' */
|
|
108
|
-
readonly name: string;
|
|
109
|
-
/** Effect type. */
|
|
110
|
-
readonly effectType: TypeInfoEffectType;
|
|
111
|
-
/**
|
|
112
|
-
* Does it exist? For historical reasons, when you use an accessor
|
|
113
|
-
* for an effect that doesn't exist, you get a dummy effect that
|
|
114
|
-
* doesn't do anything, and this field set to false.
|
|
115
|
-
*/
|
|
116
|
-
readonly exists: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* The generation of Pokemon game this was INTRODUCED (NOT
|
|
119
|
-
* necessarily the current gen being simulated.) Not all effects
|
|
120
|
-
* track generation; this will be 0 if not known.
|
|
121
|
-
*/
|
|
122
|
-
readonly gen: number;
|
|
123
|
-
/**
|
|
124
|
-
* Set to 'Future' for types before they're released (like Fairy
|
|
125
|
-
* in Gen 5 or Dark in Gen 1).
|
|
126
|
-
*/
|
|
127
|
-
readonly isNonstandard: Nonstandard | null;
|
|
128
|
-
/**
|
|
129
|
-
* Type chart, attackingTypeName:result, effectid:result
|
|
130
|
-
* result is: 0 = normal, 1 = weakness, 2 = resistance, 3 = immunity
|
|
131
|
-
*/
|
|
132
|
-
readonly damageTaken: {
|
|
133
|
-
[attackingTypeNameOrEffectid: string]: number;
|
|
134
|
-
};
|
|
135
|
-
/** The IVs to get this Type Hidden Power (in gen 3 and later) */
|
|
136
|
-
readonly HPivs: SparseStatsTable;
|
|
137
|
-
/** The DVs to get this Type Hidden Power (in gen 2). */
|
|
138
|
-
readonly HPdvs: SparseStatsTable;
|
|
139
|
-
constructor(data: AnyObject);
|
|
140
|
-
toString(): string;
|
|
141
|
-
}
|
|
142
|
-
export declare class DexTypes {
|
|
143
|
-
readonly dex: ModdedDex;
|
|
144
|
-
readonly typeCache: Map<ID, TypeInfo>;
|
|
145
|
-
allCache: readonly TypeInfo[] | null;
|
|
146
|
-
namesCache: readonly string[] | null;
|
|
147
|
-
constructor(dex: ModdedDex);
|
|
148
|
-
get(name: string | TypeInfo): TypeInfo;
|
|
149
|
-
getByID(id: ID): TypeInfo;
|
|
150
|
-
names(): readonly string[];
|
|
151
|
-
isName(name: string): boolean;
|
|
152
|
-
all(): readonly TypeInfo[];
|
|
153
|
-
}
|
|
154
|
-
declare const idsCache: readonly StatID[];
|
|
155
|
-
export declare class DexStats {
|
|
156
|
-
readonly shortNames: {
|
|
157
|
-
readonly [k in StatID]: string;
|
|
158
|
-
};
|
|
159
|
-
readonly mediumNames: {
|
|
160
|
-
readonly [k in StatID]: string;
|
|
161
|
-
};
|
|
162
|
-
readonly names: {
|
|
163
|
-
readonly [k in StatID]: string;
|
|
164
|
-
};
|
|
165
|
-
constructor(dex: ModdedDex);
|
|
166
|
-
getID(name: string): StatID | null;
|
|
167
|
-
ids(): typeof idsCache;
|
|
168
|
-
}
|
|
169
|
-
export {};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { AnyObject, Battle, Effect, GameTimerSettings, GameType, ID, ModdedBattleActions, ModdedBattlePokemon, ModdedBattleQueue, ModdedBattleScriptsData, ModdedDex, ModdedField, Move, Pokemon, PokemonSet, PokemonSources, Species, TeamValidator } from './exported-global-types';
|
|
2
|
-
import { BasicEffect } from './dex-data';
|
|
3
|
-
import { EventMethods } from './dex-conditions';
|
|
4
|
-
export interface FormatData extends Partial<Format>, EventMethods {
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
export type FormatList = (FormatData | {
|
|
8
|
-
section: string;
|
|
9
|
-
column?: number;
|
|
10
|
-
})[];
|
|
11
|
-
export type ModdedFormatData = FormatData | Omit<FormatData, 'name'> & {
|
|
12
|
-
inherit: true;
|
|
13
|
-
};
|
|
14
|
-
type FormatEffectType = 'Format' | 'Ruleset' | 'Rule' | 'ValidatorRule';
|
|
15
|
-
/** rule, source, limit, bans */
|
|
16
|
-
export type ComplexBan = [string, string, number, string[]];
|
|
17
|
-
export type ComplexTeamBan = ComplexBan;
|
|
18
|
-
/**
|
|
19
|
-
* A RuleTable keeps track of the rules that a format has. The key can be:
|
|
20
|
-
* - '[ruleid]' the ID of a rule in effect
|
|
21
|
-
* - '-[thing]' or '-[category]:[thing]' ban a thing
|
|
22
|
-
* - '+[thing]' or '+[category]:[thing]' allow a thing (override a ban)
|
|
23
|
-
* [category] is one of: item, move, ability, species, basespecies
|
|
24
|
-
*
|
|
25
|
-
* The value is the name of the parent rule (blank for the active format).
|
|
26
|
-
*/
|
|
27
|
-
export declare class RuleTable extends Map<string, string> {
|
|
28
|
-
complexBans: ComplexBan[];
|
|
29
|
-
complexTeamBans: ComplexTeamBan[];
|
|
30
|
-
checkCanLearn: [TeamValidator['checkCanLearn'], string] | null;
|
|
31
|
-
timer: [Partial<GameTimerSettings>, string] | null;
|
|
32
|
-
tagRules: string[];
|
|
33
|
-
valueRules: Map<string, string>;
|
|
34
|
-
minTeamSize: number;
|
|
35
|
-
maxTeamSize: number;
|
|
36
|
-
pickedTeamSize: number | null;
|
|
37
|
-
maxTotalLevel: number | null;
|
|
38
|
-
maxMoveCount: number;
|
|
39
|
-
minSourceGen: number;
|
|
40
|
-
minLevel: number;
|
|
41
|
-
maxLevel: number;
|
|
42
|
-
defaultLevel: number;
|
|
43
|
-
adjustLevel: number | null;
|
|
44
|
-
adjustLevelDown: number | null;
|
|
45
|
-
evLimit: number | null;
|
|
46
|
-
constructor();
|
|
47
|
-
isBanned(thing: string): boolean;
|
|
48
|
-
isBannedSpecies(species: Species): boolean;
|
|
49
|
-
isRestricted(thing: string): boolean;
|
|
50
|
-
isRestrictedSpecies(species: Species): boolean;
|
|
51
|
-
getTagRules(): string[];
|
|
52
|
-
/**
|
|
53
|
-
* - non-empty string: banned, string is the reason
|
|
54
|
-
* - '': whitelisted
|
|
55
|
-
* - null: neither whitelisted nor banned
|
|
56
|
-
*/
|
|
57
|
-
check(thing: string, setHas?: {
|
|
58
|
-
[id: string]: true;
|
|
59
|
-
} | null): string | null;
|
|
60
|
-
getReason(key: string): string | null;
|
|
61
|
-
blame(key: string): string;
|
|
62
|
-
getComplexBanIndex(complexBans: ComplexBan[], rule: string): number;
|
|
63
|
-
addComplexBan(rule: string, source: string, limit: number, bans: string[]): void;
|
|
64
|
-
addComplexTeamBan(rule: string, source: string, limit: number, bans: string[]): void;
|
|
65
|
-
/** After a RuleTable has been filled out, resolve its hardcoded numeric properties */
|
|
66
|
-
resolveNumbers(format: Format, dex: ModdedDex): void;
|
|
67
|
-
hasComplexBans(): boolean;
|
|
68
|
-
}
|
|
69
|
-
export declare class Format extends BasicEffect implements Readonly<BasicEffect> {
|
|
70
|
-
readonly mod: string;
|
|
71
|
-
/**
|
|
72
|
-
* Name of the team generator algorithm, if this format uses
|
|
73
|
-
* random/fixed teams. null if players can bring teams.
|
|
74
|
-
*/
|
|
75
|
-
readonly team?: string;
|
|
76
|
-
readonly effectType: FormatEffectType;
|
|
77
|
-
readonly debug: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Whether or not a format will update ladder points if searched
|
|
80
|
-
* for using the "Battle!" button.
|
|
81
|
-
* (Challenge and tournament games will never update ladder points.)
|
|
82
|
-
* (Defaults to `true`.)
|
|
83
|
-
*/
|
|
84
|
-
readonly rated: boolean | string;
|
|
85
|
-
/** Game type. */
|
|
86
|
-
readonly gameType: GameType;
|
|
87
|
-
/** List of rule names. */
|
|
88
|
-
readonly ruleset: string[];
|
|
89
|
-
/**
|
|
90
|
-
* Base list of rule names as specified in "./config/formats.ts".
|
|
91
|
-
* Used in a custom format to correctly display the altered ruleset.
|
|
92
|
-
*/
|
|
93
|
-
readonly baseRuleset: string[];
|
|
94
|
-
/** List of banned effects. */
|
|
95
|
-
readonly banlist: string[];
|
|
96
|
-
/** List of effects that aren't completely banned. */
|
|
97
|
-
readonly restricted: string[];
|
|
98
|
-
/** List of inherited banned effects to override. */
|
|
99
|
-
readonly unbanlist: string[];
|
|
100
|
-
/** List of ruleset and banlist changes in a custom format. */
|
|
101
|
-
readonly customRules: string[] | null;
|
|
102
|
-
/** Table of rule names and banned effects. */
|
|
103
|
-
ruleTable: RuleTable | null;
|
|
104
|
-
/** An optional function that runs at the start of a battle. */
|
|
105
|
-
readonly onBegin?: (this: Battle) => void;
|
|
106
|
-
readonly noLog: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Only applies to rules, not formats
|
|
109
|
-
*/
|
|
110
|
-
readonly hasValue?: boolean | 'integer' | 'positive-integer';
|
|
111
|
-
readonly onValidateRule?: (this: {
|
|
112
|
-
format: Format;
|
|
113
|
-
ruleTable: RuleTable;
|
|
114
|
-
dex: ModdedDex;
|
|
115
|
-
}, value: string) => string | void;
|
|
116
|
-
/** ID of rule that can't be combined with this rule */
|
|
117
|
-
readonly mutuallyExclusiveWith?: string;
|
|
118
|
-
readonly battle?: ModdedBattleScriptsData;
|
|
119
|
-
readonly pokemon?: ModdedBattlePokemon;
|
|
120
|
-
readonly queue?: ModdedBattleQueue;
|
|
121
|
-
readonly field?: ModdedField;
|
|
122
|
-
readonly actions?: ModdedBattleActions;
|
|
123
|
-
readonly challengeShow?: boolean;
|
|
124
|
-
readonly searchShow?: boolean;
|
|
125
|
-
readonly bestOfDefault?: boolean;
|
|
126
|
-
readonly threads?: string[];
|
|
127
|
-
readonly timer?: Partial<GameTimerSettings>;
|
|
128
|
-
readonly tournamentShow?: boolean;
|
|
129
|
-
readonly checkCanLearn?: (this: TeamValidator, move: Move, species: Species, setSources: PokemonSources, set: PokemonSet) => string | null;
|
|
130
|
-
readonly getEvoFamily?: (this: Format, speciesid: string) => ID;
|
|
131
|
-
readonly getSharedPower?: (this: Format, pokemon: Pokemon) => Set<string>;
|
|
132
|
-
readonly getSharedItems?: (this: Format, pokemon: Pokemon) => Set<string>;
|
|
133
|
-
readonly onChangeSet?: (this: TeamValidator, set: PokemonSet, format: Format, setHas?: AnyObject, teamHas?: AnyObject) => string[] | void;
|
|
134
|
-
readonly onModifySpeciesPriority?: number;
|
|
135
|
-
readonly onModifySpecies?: (this: Battle, species: Species, target?: Pokemon, source?: Pokemon, effect?: Effect) => Species | void;
|
|
136
|
-
readonly onBattleStart?: (this: Battle) => void;
|
|
137
|
-
readonly onTeamPreview?: (this: Battle) => void;
|
|
138
|
-
readonly onValidateSet?: (this: TeamValidator, set: PokemonSet, format: Format, setHas: AnyObject, teamHas: AnyObject) => string[] | void;
|
|
139
|
-
readonly onValidateTeam?: (this: TeamValidator, team: PokemonSet[], format: Format, teamHas: AnyObject) => string[] | void;
|
|
140
|
-
readonly validateSet?: (this: TeamValidator, set: PokemonSet, teamHas: AnyObject) => string[] | null;
|
|
141
|
-
readonly validateTeam?: (this: TeamValidator, team: PokemonSet[], options?: {
|
|
142
|
-
removeNicknames?: boolean;
|
|
143
|
-
skipSets?: {
|
|
144
|
-
[name: string]: {
|
|
145
|
-
[key: string]: boolean;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
}) => string[] | void;
|
|
149
|
-
readonly section?: string;
|
|
150
|
-
readonly column?: number;
|
|
151
|
-
constructor(data: AnyObject);
|
|
152
|
-
}
|
|
153
|
-
export declare class DexFormats {
|
|
154
|
-
readonly dex: ModdedDex;
|
|
155
|
-
rulesetCache: Map<ID, Format>;
|
|
156
|
-
formatsListCache: readonly Format[] | null;
|
|
157
|
-
constructor(dex: ModdedDex);
|
|
158
|
-
load(): this;
|
|
159
|
-
/**
|
|
160
|
-
* Returns a sanitized format ID if valid, or throws if invalid.
|
|
161
|
-
*/
|
|
162
|
-
validate(name: string): string;
|
|
163
|
-
get(name?: string | Format, isTrusted?: boolean): Format;
|
|
164
|
-
all(): readonly Format[];
|
|
165
|
-
getRuleTable(format: Format, depth?: number, repeals?: Map<string, number>): RuleTable;
|
|
166
|
-
validateRule(rule: string, format?: Format | null): string | (string | number | string[])[];
|
|
167
|
-
validPokemonTag(tagid: ID): boolean;
|
|
168
|
-
validateBanRule(rule: string): string;
|
|
169
|
-
}
|
|
170
|
-
export {};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { AnyObject, Battle, CommonHandlers, ConditionData, ID, ModdedDex, Pokemon, SparseBoostsTable } from './exported-global-types';
|
|
2
|
-
import { PokemonEventMethods } from './dex-conditions';
|
|
3
|
-
import { BasicEffect } from './dex-data';
|
|
4
|
-
interface FlingData {
|
|
5
|
-
basePower: number;
|
|
6
|
-
status?: string;
|
|
7
|
-
volatileStatus?: string;
|
|
8
|
-
effect?: CommonHandlers['ResultMove'];
|
|
9
|
-
}
|
|
10
|
-
export interface ItemData extends Partial<Item>, PokemonEventMethods {
|
|
11
|
-
name: string;
|
|
12
|
-
}
|
|
13
|
-
export type ModdedItemData = ItemData | (Partial<Omit<ItemData, 'name'>> & {
|
|
14
|
-
inherit: true;
|
|
15
|
-
onCustap?: (this: Battle, pokemon: Pokemon) => void;
|
|
16
|
-
});
|
|
17
|
-
export declare class Item extends BasicEffect implements Readonly<BasicEffect> {
|
|
18
|
-
readonly effectType: 'Item';
|
|
19
|
-
/** just controls location on the item spritesheet */
|
|
20
|
-
readonly num: number;
|
|
21
|
-
/**
|
|
22
|
-
* A Move-like object depicting what happens when Fling is used on
|
|
23
|
-
* this item.
|
|
24
|
-
*/
|
|
25
|
-
readonly fling?: FlingData;
|
|
26
|
-
/**
|
|
27
|
-
* If this is a Drive: The type it turns Techno Blast into.
|
|
28
|
-
* undefined, if not a Drive.
|
|
29
|
-
*/
|
|
30
|
-
readonly onDrive?: string;
|
|
31
|
-
/**
|
|
32
|
-
* If this is a Memory: The type it turns Multi-Attack into.
|
|
33
|
-
* undefined, if not a Memory.
|
|
34
|
-
*/
|
|
35
|
-
readonly onMemory?: string;
|
|
36
|
-
/**
|
|
37
|
-
* If this is a mega stone: The name (e.g. Charizard-Mega-X) of the
|
|
38
|
-
* forme this allows transformation into.
|
|
39
|
-
* undefined, if not a mega stone.
|
|
40
|
-
*/
|
|
41
|
-
readonly megaStone?: string;
|
|
42
|
-
/**
|
|
43
|
-
* If this is a mega stone: The name (e.g. Charizard) of the
|
|
44
|
-
* forme this allows transformation from.
|
|
45
|
-
* undefined, if not a mega stone.
|
|
46
|
-
*/
|
|
47
|
-
readonly megaEvolves?: string;
|
|
48
|
-
/**
|
|
49
|
-
* If this is a Z crystal: true if the Z Crystal is generic
|
|
50
|
-
* (e.g. Firium Z). If species-specific, the name
|
|
51
|
-
* (e.g. Inferno Overdrive) of the Z Move this crystal allows
|
|
52
|
-
* the use of.
|
|
53
|
-
* undefined, if not a Z crystal.
|
|
54
|
-
*/
|
|
55
|
-
readonly zMove?: true | string;
|
|
56
|
-
/**
|
|
57
|
-
* If this is a generic Z crystal: The type (e.g. Fire) of the
|
|
58
|
-
* Z Move this crystal allows the use of (e.g. Fire)
|
|
59
|
-
* undefined, if not a generic Z crystal
|
|
60
|
-
*/
|
|
61
|
-
readonly zMoveType?: string;
|
|
62
|
-
/**
|
|
63
|
-
* If this is a species-specific Z crystal: The name
|
|
64
|
-
* (e.g. Play Rough) of the move this crystal requires its
|
|
65
|
-
* holder to know to use its Z move.
|
|
66
|
-
* undefined, if not a species-specific Z crystal
|
|
67
|
-
*/
|
|
68
|
-
readonly zMoveFrom?: string;
|
|
69
|
-
/**
|
|
70
|
-
* If this is a species-specific Z crystal: An array of the
|
|
71
|
-
* species of Pokemon that can use this crystal's Z move.
|
|
72
|
-
* Note that these are the full names, e.g. 'Mimikyu-Busted'
|
|
73
|
-
* undefined, if not a species-specific Z crystal
|
|
74
|
-
*/
|
|
75
|
-
readonly itemUser?: string[];
|
|
76
|
-
/** Is this item a Berry? */
|
|
77
|
-
readonly isBerry: boolean;
|
|
78
|
-
/** Whether or not this item ignores the Klutz ability. */
|
|
79
|
-
readonly ignoreKlutz: boolean;
|
|
80
|
-
/** The type the holder will change into if it is an Arceus. */
|
|
81
|
-
readonly onPlate?: string;
|
|
82
|
-
/** Is this item a Gem? */
|
|
83
|
-
readonly isGem: boolean;
|
|
84
|
-
/** Is this item a Pokeball? */
|
|
85
|
-
readonly isPokeball: boolean;
|
|
86
|
-
readonly condition?: ConditionData;
|
|
87
|
-
readonly forcedForme?: string;
|
|
88
|
-
readonly isChoice?: boolean;
|
|
89
|
-
readonly naturalGift?: {
|
|
90
|
-
basePower: number;
|
|
91
|
-
type: string;
|
|
92
|
-
};
|
|
93
|
-
readonly spritenum?: number;
|
|
94
|
-
readonly boosts?: SparseBoostsTable | false;
|
|
95
|
-
readonly onEat?: ((this: Battle, pokemon: Pokemon) => void) | false;
|
|
96
|
-
readonly onPrimal?: (this: Battle, pokemon: Pokemon) => void;
|
|
97
|
-
readonly onStart?: (this: Battle, target: Pokemon) => void;
|
|
98
|
-
readonly onEnd?: (this: Battle, target: Pokemon) => void;
|
|
99
|
-
constructor(data: AnyObject);
|
|
100
|
-
}
|
|
101
|
-
export declare class DexItems {
|
|
102
|
-
readonly dex: ModdedDex;
|
|
103
|
-
readonly itemCache: Map<ID, Item>;
|
|
104
|
-
allCache: readonly Item[] | null;
|
|
105
|
-
constructor(dex: ModdedDex);
|
|
106
|
-
get(name?: string | Item): Item;
|
|
107
|
-
getByID(id: ID): Item;
|
|
108
|
-
all(): readonly Item[];
|
|
109
|
-
}
|
|
110
|
-
export {};
|