@pkmn/sim 0.7.58 → 0.7.59
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 +83 -61
- package/build/cjs/config/formats.js.map +1 -1
- package/build/cjs/data/aliases.js +4 -2
- package/build/cjs/data/aliases.js.map +1 -1
- package/build/cjs/data/formats-data.js +180 -170
- package/build/cjs/data/formats-data.js.map +1 -1
- package/build/esm/config/formats.mjs +83 -61
- package/build/esm/config/formats.mjs.map +1 -1
- package/build/esm/data/aliases.mjs +4 -2
- package/build/esm/data/aliases.mjs.map +1 -1
- package/build/esm/data/formats-data.mjs +180 -170
- package/build/esm/data/formats-data.mjs.map +1 -1
- package/build/types/config/formats.d.ts +1 -0
- package/build/types/data/abilities.d.ts +3 -0
- package/build/types/data/aliases.d.ts +3 -0
- package/build/types/data/conditions.d.ts +3 -0
- package/build/types/data/formats-data.d.ts +3 -0
- package/build/types/data/index.d.ts +11 -0
- package/build/types/data/items.d.ts +3 -0
- package/build/types/data/learnsets.d.ts +3 -0
- package/build/types/data/legality.d.ts +3 -0
- package/build/types/data/mods/gen1/conditions.d.ts +12 -0
- package/build/types/data/mods/gen1/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen1/index.d.ts +7 -0
- package/build/types/data/mods/gen1/moves.d.ts +7 -0
- package/build/types/data/mods/gen1/pokedex.d.ts +3 -0
- package/build/types/data/mods/gen1/rulesets.d.ts +3 -0
- package/build/types/data/mods/gen1/scripts.d.ts +6 -0
- package/build/types/data/mods/gen1/typechart.d.ts +10 -0
- package/build/types/data/mods/gen2/conditions.d.ts +3 -0
- package/build/types/data/mods/gen2/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen2/index.d.ts +8 -0
- package/build/types/data/mods/gen2/items.d.ts +3 -0
- package/build/types/data/mods/gen2/learnsets.d.ts +3 -0
- package/build/types/data/mods/gen2/legality.d.ts +3 -0
- package/build/types/data/mods/gen2/moves.d.ts +6 -0
- package/build/types/data/mods/gen2/pokedex.d.ts +3 -0
- package/build/types/data/mods/gen2/rulesets.d.ts +3 -0
- package/build/types/data/mods/gen2/scripts.d.ts +4 -0
- package/build/types/data/mods/gen2/typechart.d.ts +3 -0
- package/build/types/data/mods/gen3/abilities.d.ts +3 -0
- package/build/types/data/mods/gen3/conditions.d.ts +3 -0
- package/build/types/data/mods/gen3/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen3/index.d.ts +7 -0
- package/build/types/data/mods/gen3/items.d.ts +3 -0
- package/build/types/data/mods/gen3/moves.d.ts +6 -0
- package/build/types/data/mods/gen3/rulesets.d.ts +3 -0
- package/build/types/data/mods/gen3/scripts.d.ts +1 -0
- package/build/types/data/mods/gen4/abilities.d.ts +3 -0
- package/build/types/data/mods/gen4/conditions.d.ts +3 -0
- package/build/types/data/mods/gen4/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen4/index.d.ts +8 -0
- package/build/types/data/mods/gen4/items.d.ts +3 -0
- package/build/types/data/mods/gen4/moves.d.ts +3 -0
- package/build/types/data/mods/gen4/pokedex.d.ts +3 -0
- package/build/types/data/mods/gen4/rulesets.d.ts +3 -0
- package/build/types/data/mods/gen4/scripts.d.ts +1 -0
- package/build/types/data/mods/gen5/abilities.d.ts +3 -0
- package/build/types/data/mods/gen5/conditions.d.ts +3 -0
- package/build/types/data/mods/gen5/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen5/index.d.ts +9 -0
- package/build/types/data/mods/gen5/items.d.ts +3 -0
- package/build/types/data/mods/gen5/moves.d.ts +3 -0
- package/build/types/data/mods/gen5/pokedex.d.ts +3 -0
- package/build/types/data/mods/gen5/rulesets.d.ts +3 -0
- package/build/types/data/mods/gen5/scripts.d.ts +1 -0
- package/build/types/data/mods/gen5/typechart.d.ts +3 -0
- package/build/types/data/mods/gen6/abilities.d.ts +3 -0
- package/build/types/data/mods/gen6/conditions.d.ts +3 -0
- package/build/types/data/mods/gen6/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen6/index.d.ts +8 -0
- package/build/types/data/mods/gen6/items.d.ts +3 -0
- package/build/types/data/mods/gen6/learnsets.d.ts +3 -0
- package/build/types/data/mods/gen6/legality.d.ts +3 -0
- package/build/types/data/mods/gen6/moves.d.ts +3 -0
- package/build/types/data/mods/gen6/pokedex.d.ts +3 -0
- package/build/types/data/mods/gen6/scripts.d.ts +1 -0
- package/build/types/data/mods/gen6/typechart.d.ts +3 -0
- package/build/types/data/mods/gen7/abilities.d.ts +3 -0
- package/build/types/data/mods/gen7/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen7/index.d.ts +7 -0
- package/build/types/data/mods/gen7/items.d.ts +3 -0
- package/build/types/data/mods/gen7/moves.d.ts +3 -0
- package/build/types/data/mods/gen7/pokedex.d.ts +3 -0
- package/build/types/data/mods/gen7/rulesets.d.ts +3 -0
- package/build/types/data/mods/gen7/scripts.d.ts +1 -0
- package/build/types/data/mods/gen8/abilities.d.ts +3 -0
- package/build/types/data/mods/gen8/formats-data.d.ts +3 -0
- package/build/types/data/mods/gen8/index.d.ts +7 -0
- package/build/types/data/mods/gen8/items.d.ts +3 -0
- package/build/types/data/mods/gen8/learnsets.d.ts +3 -0
- package/build/types/data/mods/gen8/legality.d.ts +3 -0
- package/build/types/data/mods/gen8/moves.d.ts +3 -0
- package/build/types/data/mods/gen8/pokedex.d.ts +3 -0
- package/build/types/data/mods/gen8/rulesets.d.ts +3 -0
- package/build/types/data/mods/gen8/scripts.d.ts +1 -0
- package/build/types/data/moves.d.ts +3 -0
- package/build/types/data/natures.d.ts +3 -0
- package/build/types/data/pokedex.d.ts +3 -0
- package/build/types/data/pokemongo.d.ts +31 -0
- package/build/types/data/rulesets.d.ts +3 -0
- package/build/types/data/scripts.d.ts +1 -0
- package/build/types/data/tags.d.ts +15 -0
- package/build/types/data/text/abilities.d.ts +3 -0
- package/build/types/data/text/default.d.ts +3 -0
- package/build/types/data/text/items.d.ts +3 -0
- package/build/types/data/text/moves.d.ts +3 -0
- package/build/types/data/typechart.d.ts +3 -0
- package/build/types/lib/index.d.ts +2 -0
- package/build/types/lib/streams.d.ts +1 -0
- package/build/types/lib/utils.d.ts +139 -0
- package/build/types/sim/battle-actions.d.ts +90 -0
- package/build/types/sim/battle-queue.d.ts +164 -0
- package/build/types/sim/battle-stream.d.ts +67 -0
- package/build/types/sim/battle.d.ts +396 -0
- package/build/types/sim/dex-abilities.d.ts +35 -0
- package/build/types/sim/dex-conditions.d.ts +518 -0
- package/build/types/sim/dex-data.d.ts +169 -0
- package/build/types/sim/dex-formats.d.ts +170 -0
- package/build/types/sim/dex-items.d.ts +110 -0
- package/build/types/sim/dex-moves.d.ts +441 -0
- package/build/types/sim/dex-species.d.ts +289 -0
- package/build/types/sim/dex.d.ts +162 -0
- package/build/types/sim/exported-global-types.d.ts +510 -0
- package/build/types/sim/field.d.ts +30 -0
- package/build/types/sim/global-types.d.ts +510 -0
- package/build/types/sim/index.d.ts +13 -0
- package/build/types/sim/pokemon.d.ts +427 -0
- package/build/types/sim/prng.d.ts +97 -0
- package/build/types/sim/side.d.ts +127 -0
- package/build/types/sim/state.d.ts +42 -0
- package/build/types/sim/team-validator.d.ts +198 -0
- package/build/types/sim/teams.d.ts +26 -0
- package/build/types/sim/tools/exhaustive-runner.d.ts +52 -0
- package/build/types/sim/tools/index.d.ts +2 -0
- package/build/types/sim/tools/random-player-ai.d.ts +32 -0
- package/build/types/sim/tools/runner.d.ts +41 -0
- package/package.json +1 -1
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { Ability, AnyObject, Battle, CommonHandlers, ConditionData, Effect, EffectData, ID, ModdedDex, Pokemon, Side, SparseBoostsTable, StatIDExceptHP } from './exported-global-types';
|
|
2
|
+
import { BasicEffect } from './dex-data';
|
|
3
|
+
/**
|
|
4
|
+
* Describes the acceptable target(s) of a move.
|
|
5
|
+
* adjacentAlly - Only relevant to Doubles or Triples, the move only targets an ally of the user.
|
|
6
|
+
* adjacentAllyOrSelf - The move can target the user or its ally.
|
|
7
|
+
* adjacentFoe - The move can target a foe, but not (in Triples) a distant foe.
|
|
8
|
+
* all - The move targets the field or all Pokémon at once.
|
|
9
|
+
* allAdjacent - The move is a spread move that also hits the user's ally.
|
|
10
|
+
* allAdjacentFoes - The move is a spread move.
|
|
11
|
+
* allies - The move affects all active Pokémon on the user's team.
|
|
12
|
+
* allySide - The move adds a side condition on the user's side.
|
|
13
|
+
* allyTeam - The move affects all unfainted Pokémon on the user's team.
|
|
14
|
+
* any - The move can hit any other active Pokémon, not just those adjacent.
|
|
15
|
+
* foeSide - The move adds a side condition on the foe's side.
|
|
16
|
+
* normal - The move can hit one adjacent Pokémon of your choice.
|
|
17
|
+
* randomNormal - The move targets an adjacent foe at random.
|
|
18
|
+
* scripted - The move targets the foe that damaged the user.
|
|
19
|
+
* self - The move affects the user of the move.
|
|
20
|
+
*/
|
|
21
|
+
export type MoveTarget = 'adjacentAlly' | 'adjacentAllyOrSelf' | 'adjacentFoe' | 'all' | 'allAdjacent' | 'allAdjacentFoes' | 'allies' | 'allySide' | 'allyTeam' | 'any' | 'foeSide' | 'normal' | 'randomNormal' | 'scripted' | 'self';
|
|
22
|
+
/** Possible move flags. */
|
|
23
|
+
interface MoveFlags {
|
|
24
|
+
allyanim?: 1;
|
|
25
|
+
bypasssub?: 1;
|
|
26
|
+
bite?: 1;
|
|
27
|
+
bullet?: 1;
|
|
28
|
+
cantusetwice?: 1;
|
|
29
|
+
charge?: 1;
|
|
30
|
+
contact?: 1;
|
|
31
|
+
dance?: 1;
|
|
32
|
+
defrost?: 1;
|
|
33
|
+
distance?: 1;
|
|
34
|
+
failcopycat?: 1;
|
|
35
|
+
failencore?: 1;
|
|
36
|
+
failinstruct?: 1;
|
|
37
|
+
failmefirst?: 1;
|
|
38
|
+
failmimic?: 1;
|
|
39
|
+
futuremove?: 1;
|
|
40
|
+
gravity?: 1;
|
|
41
|
+
heal?: 1;
|
|
42
|
+
mirror?: 1;
|
|
43
|
+
mustpressure?: 1;
|
|
44
|
+
noassist?: 1;
|
|
45
|
+
nonsky?: 1;
|
|
46
|
+
noparentalbond?: 1;
|
|
47
|
+
nosleeptalk?: 1;
|
|
48
|
+
pledgecombo?: 1;
|
|
49
|
+
powder?: 1;
|
|
50
|
+
protect?: 1;
|
|
51
|
+
pulse?: 1;
|
|
52
|
+
punch?: 1;
|
|
53
|
+
recharge?: 1;
|
|
54
|
+
reflectable?: 1;
|
|
55
|
+
slicing?: 1;
|
|
56
|
+
snatch?: 1;
|
|
57
|
+
sound?: 1;
|
|
58
|
+
wind?: 1;
|
|
59
|
+
}
|
|
60
|
+
export interface HitEffect {
|
|
61
|
+
onHit?: MoveEventMethods['onHit'];
|
|
62
|
+
boosts?: SparseBoostsTable | null;
|
|
63
|
+
status?: string;
|
|
64
|
+
volatileStatus?: string;
|
|
65
|
+
sideCondition?: string;
|
|
66
|
+
slotCondition?: string;
|
|
67
|
+
pseudoWeather?: string;
|
|
68
|
+
terrain?: string;
|
|
69
|
+
weather?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface SecondaryEffect extends HitEffect {
|
|
72
|
+
chance?: number;
|
|
73
|
+
/** Used to flag a secondary effect as added by Poison Touch */
|
|
74
|
+
ability?: Ability;
|
|
75
|
+
/**
|
|
76
|
+
* Applies to Sparkling Aria's secondary effect: Affected by
|
|
77
|
+
* Sheer Force but not Shield Dust.
|
|
78
|
+
*/
|
|
79
|
+
dustproof?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Gen 2 specific mechanics: Bypasses Substitute only on Twineedle,
|
|
82
|
+
* and allows it to flinch sleeping/frozen targets
|
|
83
|
+
*/
|
|
84
|
+
kingsrock?: boolean;
|
|
85
|
+
self?: HitEffect;
|
|
86
|
+
}
|
|
87
|
+
export interface MoveEventMethods {
|
|
88
|
+
basePowerCallback?: (this: Battle, pokemon: Pokemon, target: Pokemon, move: ActiveMove) => number | false | null;
|
|
89
|
+
/** Return true to stop the move from being used */
|
|
90
|
+
beforeMoveCallback?: (this: Battle, pokemon: Pokemon, target: Pokemon | null, move: ActiveMove) => boolean | void;
|
|
91
|
+
beforeTurnCallback?: (this: Battle, pokemon: Pokemon, target: Pokemon) => void;
|
|
92
|
+
damageCallback?: (this: Battle, pokemon: Pokemon, target: Pokemon) => number | false;
|
|
93
|
+
priorityChargeCallback?: (this: Battle, pokemon: Pokemon) => void;
|
|
94
|
+
onDisableMove?: (this: Battle, pokemon: Pokemon) => void;
|
|
95
|
+
onAfterHit?: CommonHandlers['VoidSourceMove'];
|
|
96
|
+
onAfterSubDamage?: (this: Battle, damage: number, target: Pokemon, source: Pokemon, move: ActiveMove) => void;
|
|
97
|
+
onAfterMoveSecondarySelf?: CommonHandlers['VoidSourceMove'];
|
|
98
|
+
onAfterMoveSecondary?: CommonHandlers['VoidMove'];
|
|
99
|
+
onAfterMove?: CommonHandlers['VoidSourceMove'];
|
|
100
|
+
onDamagePriority?: number;
|
|
101
|
+
onDamage?: (this: Battle, damage: number, target: Pokemon, source: Pokemon, effect: Effect) => number | boolean | null | void;
|
|
102
|
+
onBasePower?: CommonHandlers['ModifierSourceMove'];
|
|
103
|
+
onEffectiveness?: (this: Battle, typeMod: number, target: Pokemon | null, type: string, move: ActiveMove) => number | void;
|
|
104
|
+
onHit?: CommonHandlers['ResultMove'];
|
|
105
|
+
onHitField?: CommonHandlers['ResultMove'];
|
|
106
|
+
onHitSide?: (this: Battle, side: Side, source: Pokemon, move: ActiveMove) => boolean | null | "" | void;
|
|
107
|
+
onModifyMove?: (this: Battle, move: ActiveMove, pokemon: Pokemon, target: Pokemon | null) => void;
|
|
108
|
+
onModifyPriority?: CommonHandlers['ModifierSourceMove'];
|
|
109
|
+
onMoveFail?: CommonHandlers['VoidMove'];
|
|
110
|
+
onModifyType?: (this: Battle, move: ActiveMove, pokemon: Pokemon, target: Pokemon) => void;
|
|
111
|
+
onModifyTarget?: (this: Battle, relayVar: {
|
|
112
|
+
target: Pokemon;
|
|
113
|
+
}, pokemon: Pokemon, target: Pokemon, move: ActiveMove) => void;
|
|
114
|
+
onPrepareHit?: CommonHandlers['ResultMove'];
|
|
115
|
+
onTry?: CommonHandlers['ResultSourceMove'];
|
|
116
|
+
onTryHit?: CommonHandlers['ExtResultSourceMove'];
|
|
117
|
+
onTryHitField?: CommonHandlers['ResultMove'];
|
|
118
|
+
onTryHitSide?: (this: Battle, side: Side, source: Pokemon, move: ActiveMove) => boolean | null | "" | void;
|
|
119
|
+
onTryImmunity?: CommonHandlers['ResultMove'];
|
|
120
|
+
onTryMove?: CommonHandlers['ResultSourceMove'];
|
|
121
|
+
onUseMoveMessage?: CommonHandlers['VoidSourceMove'];
|
|
122
|
+
}
|
|
123
|
+
export interface MoveData extends EffectData, MoveEventMethods, HitEffect {
|
|
124
|
+
name: string;
|
|
125
|
+
/** move index number, used for Metronome rolls */
|
|
126
|
+
num?: number;
|
|
127
|
+
condition?: ConditionData;
|
|
128
|
+
basePower: number;
|
|
129
|
+
accuracy: true | number;
|
|
130
|
+
pp: number;
|
|
131
|
+
category: 'Physical' | 'Special' | 'Status';
|
|
132
|
+
type: string;
|
|
133
|
+
priority: number;
|
|
134
|
+
target: MoveTarget;
|
|
135
|
+
flags: MoveFlags;
|
|
136
|
+
/** Hidden Power */
|
|
137
|
+
realMove?: string;
|
|
138
|
+
damage?: number | 'level' | false | null;
|
|
139
|
+
contestType?: string;
|
|
140
|
+
noPPBoosts?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* ID of the Z-Crystal that calls the move.
|
|
143
|
+
* `true` for Z-Powered status moves like Z-Encore.
|
|
144
|
+
*/
|
|
145
|
+
isZ?: boolean | string;
|
|
146
|
+
zMove?: {
|
|
147
|
+
basePower?: number;
|
|
148
|
+
effect?: string;
|
|
149
|
+
boost?: SparseBoostsTable;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* `true` for Max moves like Max Airstream. If its a G-Max moves, this is
|
|
153
|
+
* the species ID of the Gigantamax Pokemon that can use this G-Max move.
|
|
154
|
+
*/
|
|
155
|
+
isMax?: boolean | string;
|
|
156
|
+
maxMove?: {
|
|
157
|
+
basePower: number;
|
|
158
|
+
};
|
|
159
|
+
ohko?: boolean | string;
|
|
160
|
+
thawsTarget?: boolean;
|
|
161
|
+
heal?: number[] | null;
|
|
162
|
+
forceSwitch?: boolean;
|
|
163
|
+
selfSwitch?: 'copyvolatile' | 'shedtail' | boolean;
|
|
164
|
+
selfBoost?: {
|
|
165
|
+
boosts?: SparseBoostsTable;
|
|
166
|
+
};
|
|
167
|
+
selfdestruct?: 'always' | 'ifHit' | boolean;
|
|
168
|
+
breaksProtect?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Note that this is only "true" recoil. Other self-damage, like Struggle,
|
|
171
|
+
* crash (High Jump Kick), Mind Blown, Life Orb, and even Substitute and
|
|
172
|
+
* Healing Wish, are sometimes called "recoil" by the community, but don't
|
|
173
|
+
* count as "real" recoil.
|
|
174
|
+
*/
|
|
175
|
+
recoil?: [number, number];
|
|
176
|
+
drain?: [number, number];
|
|
177
|
+
mindBlownRecoil?: boolean;
|
|
178
|
+
stealsBoosts?: boolean;
|
|
179
|
+
struggleRecoil?: boolean;
|
|
180
|
+
secondary?: SecondaryEffect | null;
|
|
181
|
+
secondaries?: SecondaryEffect[] | null;
|
|
182
|
+
self?: SecondaryEffect | null;
|
|
183
|
+
hasSheerForce?: boolean;
|
|
184
|
+
alwaysHit?: boolean;
|
|
185
|
+
baseMoveType?: string;
|
|
186
|
+
basePowerModifier?: number;
|
|
187
|
+
critModifier?: number;
|
|
188
|
+
critRatio?: number;
|
|
189
|
+
/**
|
|
190
|
+
* Pokemon for the attack stat. Ability and Item damage modifiers still come from the real attacker.
|
|
191
|
+
*/
|
|
192
|
+
overrideOffensivePokemon?: 'target' | 'source';
|
|
193
|
+
/**
|
|
194
|
+
* Physical moves use attack stat modifiers, special moves use special attack stat modifiers.
|
|
195
|
+
*/
|
|
196
|
+
overrideOffensiveStat?: StatIDExceptHP;
|
|
197
|
+
/**
|
|
198
|
+
* Pokemon for the defense stat. Ability and Item damage modifiers still come from the real defender.
|
|
199
|
+
*/
|
|
200
|
+
overrideDefensivePokemon?: 'target' | 'source';
|
|
201
|
+
/**
|
|
202
|
+
* uses modifiers that match the new stat
|
|
203
|
+
*/
|
|
204
|
+
overrideDefensiveStat?: StatIDExceptHP;
|
|
205
|
+
forceSTAB?: boolean;
|
|
206
|
+
ignoreAbility?: boolean;
|
|
207
|
+
ignoreAccuracy?: boolean;
|
|
208
|
+
ignoreDefensive?: boolean;
|
|
209
|
+
ignoreEvasion?: boolean;
|
|
210
|
+
ignoreImmunity?: boolean | {
|
|
211
|
+
[k: string]: boolean;
|
|
212
|
+
};
|
|
213
|
+
ignoreNegativeOffensive?: boolean;
|
|
214
|
+
ignoreOffensive?: boolean;
|
|
215
|
+
ignorePositiveDefensive?: boolean;
|
|
216
|
+
ignorePositiveEvasion?: boolean;
|
|
217
|
+
multiaccuracy?: boolean;
|
|
218
|
+
multihit?: number | number[];
|
|
219
|
+
multihitType?: string;
|
|
220
|
+
noDamageVariance?: boolean;
|
|
221
|
+
nonGhostTarget?: string;
|
|
222
|
+
pressureTarget?: string;
|
|
223
|
+
spreadModifier?: number;
|
|
224
|
+
sleepUsable?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Will change target if current target is unavailable. (Dragon Darts)
|
|
227
|
+
*/
|
|
228
|
+
smartTarget?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Tracks the original target through Ally Switch and other switch-out-and-back-in
|
|
231
|
+
* situations, rather than just targeting a slot. (Stalwart, Snipe Shot)
|
|
232
|
+
*/
|
|
233
|
+
tracksTarget?: boolean;
|
|
234
|
+
willCrit?: boolean;
|
|
235
|
+
hasCrashDamage?: boolean;
|
|
236
|
+
isConfusionSelfHit?: boolean;
|
|
237
|
+
noMetronome?: string[];
|
|
238
|
+
noSketch?: boolean;
|
|
239
|
+
stallingMove?: boolean;
|
|
240
|
+
baseMove?: string;
|
|
241
|
+
}
|
|
242
|
+
export type ModdedMoveData = MoveData | Partial<Omit<MoveData, 'name'>> & {
|
|
243
|
+
inherit: true;
|
|
244
|
+
igniteBoosted?: boolean;
|
|
245
|
+
settleBoosted?: boolean;
|
|
246
|
+
bodyofwaterBoosted?: boolean;
|
|
247
|
+
longWhipBoost?: boolean;
|
|
248
|
+
gen?: number;
|
|
249
|
+
};
|
|
250
|
+
export interface Move extends Readonly<BasicEffect & MoveData> {
|
|
251
|
+
readonly effectType: 'Move';
|
|
252
|
+
}
|
|
253
|
+
interface MoveHitData {
|
|
254
|
+
[targetSlotid: string]: {
|
|
255
|
+
/** Did this move crit against the target? */
|
|
256
|
+
crit: boolean;
|
|
257
|
+
/** The type effectiveness of this move against the target */
|
|
258
|
+
typeMod: number;
|
|
259
|
+
/**
|
|
260
|
+
* Is this move a Z-Move that broke the target's protection?
|
|
261
|
+
* (does 0.25x regular damage)
|
|
262
|
+
*/
|
|
263
|
+
zBrokeProtect: boolean;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
type MutableMove = BasicEffect & MoveData;
|
|
267
|
+
type RuinableMove = {
|
|
268
|
+
[k in `ruined${'Atk' | 'Def' | 'SpA' | 'SpD'}`]?: Pokemon;
|
|
269
|
+
};
|
|
270
|
+
export interface ActiveMove extends MutableMove, RuinableMove {
|
|
271
|
+
readonly name: string;
|
|
272
|
+
readonly effectType: 'Move';
|
|
273
|
+
readonly id: ID;
|
|
274
|
+
num: number;
|
|
275
|
+
weather?: ID;
|
|
276
|
+
status?: ID;
|
|
277
|
+
hit: number;
|
|
278
|
+
moveHitData?: MoveHitData;
|
|
279
|
+
ability?: Ability;
|
|
280
|
+
allies?: Pokemon[];
|
|
281
|
+
auraBooster?: Pokemon;
|
|
282
|
+
causedCrashDamage?: boolean;
|
|
283
|
+
forceStatus?: ID;
|
|
284
|
+
hasAuraBreak?: boolean;
|
|
285
|
+
hasBounced?: boolean;
|
|
286
|
+
hasSheerForce?: boolean;
|
|
287
|
+
/** Is the move called by Dancer? Used to prevent infinite Dancer recursion. */
|
|
288
|
+
isExternal?: boolean;
|
|
289
|
+
lastHit?: boolean;
|
|
290
|
+
magnitude?: number;
|
|
291
|
+
negateSecondary?: boolean;
|
|
292
|
+
pranksterBoosted?: boolean;
|
|
293
|
+
selfDropped?: boolean;
|
|
294
|
+
selfSwitch?: 'copyvolatile' | 'shedtail' | boolean;
|
|
295
|
+
spreadHit?: boolean;
|
|
296
|
+
stab?: number;
|
|
297
|
+
statusRoll?: string;
|
|
298
|
+
totalDamage?: number | false;
|
|
299
|
+
typeChangerBoosted?: Effect;
|
|
300
|
+
willChangeForme?: boolean;
|
|
301
|
+
infiltrates?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Has this move been boosted by a Z-crystal or used by a Dynamax Pokemon? Usually the same as
|
|
304
|
+
* `isZ` or `isMax`, but hacked moves will have this be `false` and `isZ` / `isMax` be truthy.
|
|
305
|
+
*/
|
|
306
|
+
isZOrMaxPowered?: boolean;
|
|
307
|
+
}
|
|
308
|
+
type MoveCategory = 'Physical' | 'Special' | 'Status';
|
|
309
|
+
export declare class DataMove extends BasicEffect implements Readonly<BasicEffect & MoveData> {
|
|
310
|
+
readonly effectType: 'Move';
|
|
311
|
+
/** Move type. */
|
|
312
|
+
readonly type: string;
|
|
313
|
+
/** Move target. */
|
|
314
|
+
readonly target: MoveTarget;
|
|
315
|
+
/** Move base power. */
|
|
316
|
+
readonly basePower: number;
|
|
317
|
+
/** Move base accuracy. True denotes a move that always hits. */
|
|
318
|
+
readonly accuracy: true | number;
|
|
319
|
+
/** Critical hit ratio. Defaults to 1. */
|
|
320
|
+
readonly critRatio: number;
|
|
321
|
+
/** Will this move always or never be a critical hit? */
|
|
322
|
+
readonly willCrit?: boolean;
|
|
323
|
+
/** Can this move OHKO foes? */
|
|
324
|
+
readonly ohko?: boolean | string;
|
|
325
|
+
/**
|
|
326
|
+
* Base move type. This is the move type as specified by the games,
|
|
327
|
+
* tracked because it often differs from the real move type.
|
|
328
|
+
*/
|
|
329
|
+
readonly baseMoveType: string;
|
|
330
|
+
/**
|
|
331
|
+
* Secondary effect. You usually don't want to access this
|
|
332
|
+
* directly; but through the secondaries array.
|
|
333
|
+
*/
|
|
334
|
+
readonly secondary: SecondaryEffect | null;
|
|
335
|
+
/**
|
|
336
|
+
* Secondary effects. An array because there can be more than one
|
|
337
|
+
* (for instance, Fire Fang has both a burn and a flinch
|
|
338
|
+
* secondary).
|
|
339
|
+
*/
|
|
340
|
+
readonly secondaries: SecondaryEffect[] | null;
|
|
341
|
+
/**
|
|
342
|
+
* Moves manually boosted by Sheer Force that don't have secondary effects.
|
|
343
|
+
* e.g. Jet Punch
|
|
344
|
+
*/
|
|
345
|
+
readonly hasSheerForce: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* Move priority. Higher priorities go before lower priorities,
|
|
348
|
+
* trumping the Speed stat.
|
|
349
|
+
*/
|
|
350
|
+
readonly priority: number;
|
|
351
|
+
/** Move category. */
|
|
352
|
+
readonly category: MoveCategory;
|
|
353
|
+
/**
|
|
354
|
+
* Pokemon for the attack stat. Ability and Item damage modifiers still come from the real attacker.
|
|
355
|
+
*/
|
|
356
|
+
readonly overrideOffensivePokemon?: 'target' | 'source';
|
|
357
|
+
/**
|
|
358
|
+
* Physical moves use attack stat modifiers, special moves use special attack stat modifiers.
|
|
359
|
+
*/
|
|
360
|
+
readonly overrideOffensiveStat?: StatIDExceptHP;
|
|
361
|
+
/**
|
|
362
|
+
* Pokemon for the defense stat. Ability and Item damage modifiers still come from the real defender.
|
|
363
|
+
*/
|
|
364
|
+
readonly overrideDefensivePokemon?: 'target' | 'source';
|
|
365
|
+
/**
|
|
366
|
+
* uses modifiers that match the new stat
|
|
367
|
+
*/
|
|
368
|
+
readonly overrideDefensiveStat?: StatIDExceptHP;
|
|
369
|
+
/** Whether or not this move ignores negative attack boosts. */
|
|
370
|
+
readonly ignoreNegativeOffensive: boolean;
|
|
371
|
+
/** Whether or not this move ignores positive defense boosts. */
|
|
372
|
+
readonly ignorePositiveDefensive: boolean;
|
|
373
|
+
/** Whether or not this move ignores attack boosts. */
|
|
374
|
+
readonly ignoreOffensive: boolean;
|
|
375
|
+
/** Whether or not this move ignores defense boosts. */
|
|
376
|
+
readonly ignoreDefensive: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Whether or not this move ignores type immunities. Defaults to
|
|
379
|
+
* true for Status moves and false for Physical/Special moves.
|
|
380
|
+
*/
|
|
381
|
+
readonly ignoreImmunity: AnyObject | boolean;
|
|
382
|
+
/** Base move PP. */
|
|
383
|
+
readonly pp: number;
|
|
384
|
+
/** Whether or not this move can receive PP boosts. */
|
|
385
|
+
readonly noPPBoosts: boolean;
|
|
386
|
+
/** How many times does this move hit? */
|
|
387
|
+
readonly multihit?: number | number[];
|
|
388
|
+
/** Is this move a Z-Move? */
|
|
389
|
+
readonly isZ: boolean | string;
|
|
390
|
+
readonly zMove?: {
|
|
391
|
+
basePower?: number;
|
|
392
|
+
effect?: string;
|
|
393
|
+
boost?: SparseBoostsTable;
|
|
394
|
+
};
|
|
395
|
+
/** Is this move a Max move? */
|
|
396
|
+
readonly isMax: boolean | string;
|
|
397
|
+
/** Max/G-Max move fields */
|
|
398
|
+
readonly maxMove?: {
|
|
399
|
+
basePower: number;
|
|
400
|
+
};
|
|
401
|
+
readonly flags: MoveFlags;
|
|
402
|
+
/** Whether or not the user must switch after using this move. */
|
|
403
|
+
readonly selfSwitch?: 'copyvolatile' | 'shedtail' | boolean;
|
|
404
|
+
/** Move target only used by Pressure. */
|
|
405
|
+
readonly pressureTarget: string;
|
|
406
|
+
/** Move target used if the user is not a Ghost type (for Curse). */
|
|
407
|
+
readonly nonGhostTarget: string;
|
|
408
|
+
/** Whether or not the move ignores abilities. */
|
|
409
|
+
readonly ignoreAbility: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* Move damage against the current target
|
|
412
|
+
* false = move will always fail with "But it failed!"
|
|
413
|
+
* null = move will always silently fail
|
|
414
|
+
* undefined = move does not deal fixed damage
|
|
415
|
+
*/
|
|
416
|
+
readonly damage: number | 'level' | false | null;
|
|
417
|
+
/** Whether or not this move hit multiple targets. */
|
|
418
|
+
readonly spreadHit: boolean;
|
|
419
|
+
/** Modifier that affects damage when multiple targets are hit. */
|
|
420
|
+
readonly spreadModifier?: number;
|
|
421
|
+
/** Modifier that affects damage when this move is a critical hit. */
|
|
422
|
+
readonly critModifier?: number;
|
|
423
|
+
/** Forces the move to get STAB even if the type doesn't match. */
|
|
424
|
+
readonly forceSTAB: boolean;
|
|
425
|
+
/** True if it can't be copied with Sketch. */
|
|
426
|
+
readonly noSketch: boolean;
|
|
427
|
+
/** STAB multiplier (can be modified by other effects) (default 1.5). */
|
|
428
|
+
readonly stab?: number;
|
|
429
|
+
readonly volatileStatus?: ID;
|
|
430
|
+
constructor(data: AnyObject);
|
|
431
|
+
}
|
|
432
|
+
export declare class DexMoves {
|
|
433
|
+
readonly dex: ModdedDex;
|
|
434
|
+
readonly moveCache: Map<ID, Move>;
|
|
435
|
+
allCache: readonly Move[] | null;
|
|
436
|
+
constructor(dex: ModdedDex);
|
|
437
|
+
get(name?: string | Move): Move;
|
|
438
|
+
getByID(id: ID): Move;
|
|
439
|
+
all(): readonly Move[];
|
|
440
|
+
}
|
|
441
|
+
export {};
|