@pkmn/sim 0.7.17 → 0.7.18
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/data/abilities.js +21 -21
- package/build/cjs/data/abilities.js.map +1 -1
- package/build/cjs/data/aliases.js +3 -0
- package/build/cjs/data/aliases.js.map +1 -1
- package/build/cjs/data/formats-data.js +3 -3
- package/build/cjs/data/formats-data.js.map +1 -1
- package/build/cjs/data/items.js +6 -8
- package/build/cjs/data/items.js.map +1 -1
- package/build/cjs/data/learnsets.js +3 -3
- package/build/cjs/data/learnsets.js.map +1 -1
- package/build/cjs/data/mods/gen1/moves.js +1 -1
- package/build/cjs/data/mods/gen1/moves.js.map +1 -1
- package/build/cjs/data/mods/gen1/scripts.js +1 -1
- package/build/cjs/data/mods/gen1/scripts.js.map +1 -1
- package/build/cjs/data/mods/gen2/moves.js +1 -1
- package/build/cjs/data/mods/gen2/moves.js.map +1 -1
- package/build/cjs/data/mods/gen4/moves.js +1 -1
- package/build/cjs/data/mods/gen4/moves.js.map +1 -1
- package/build/cjs/data/mods/gen7/abilities.js +4 -4
- package/build/cjs/data/mods/gen7/abilities.js.map +1 -1
- package/build/cjs/data/moves.js +4 -4
- package/build/cjs/data/moves.js.map +1 -1
- package/build/cjs/data/pokedex.js +11 -11
- package/build/cjs/data/pokedex.js.map +1 -1
- package/build/cjs/sim/battle.js +4 -2
- package/build/cjs/sim/battle.js.map +1 -1
- package/build/cjs/sim/dex-conditions.js.map +1 -1
- package/build/cjs/sim/dex.js +0 -1
- package/build/cjs/sim/dex.js.map +1 -1
- package/build/cjs/sim/pokemon.js +12 -8
- package/build/cjs/sim/pokemon.js.map +1 -1
- package/build/esm/data/abilities.mjs +21 -21
- package/build/esm/data/abilities.mjs.map +1 -1
- package/build/esm/data/aliases.mjs +3 -0
- package/build/esm/data/aliases.mjs.map +1 -1
- package/build/esm/data/formats-data.mjs +3 -3
- package/build/esm/data/formats-data.mjs.map +1 -1
- package/build/esm/data/index.mjs +11 -11
- package/build/esm/data/items.mjs +6 -8
- package/build/esm/data/items.mjs.map +1 -1
- package/build/esm/data/learnsets.mjs +3 -3
- package/build/esm/data/learnsets.mjs.map +1 -1
- package/build/esm/data/mods/gen1/index.mjs +7 -7
- package/build/esm/data/mods/gen1/moves.mjs +1 -1
- package/build/esm/data/mods/gen1/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen1/scripts.mjs +1 -1
- package/build/esm/data/mods/gen1/scripts.mjs.map +1 -1
- package/build/esm/data/mods/gen2/index.mjs +8 -8
- package/build/esm/data/mods/gen2/moves.mjs +1 -1
- package/build/esm/data/mods/gen2/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen3/index.mjs +7 -7
- package/build/esm/data/mods/gen4/index.mjs +8 -8
- package/build/esm/data/mods/gen4/moves.mjs +1 -1
- package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen5/index.mjs +9 -9
- package/build/esm/data/mods/gen6/index.mjs +8 -8
- package/build/esm/data/mods/gen7/abilities.mjs +4 -4
- package/build/esm/data/mods/gen7/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen7/index.mjs +7 -7
- package/build/esm/data/mods/gen8/index.mjs +7 -7
- package/build/esm/data/moves.mjs +4 -4
- package/build/esm/data/moves.mjs.map +1 -1
- package/build/esm/data/pokedex.mjs +11 -11
- package/build/esm/data/pokedex.mjs.map +1 -1
- package/build/esm/lib/index.mjs +2 -2
- package/build/esm/sim/battle-actions.mjs +1 -1
- package/build/esm/sim/battle-stream.mjs +3 -3
- package/build/esm/sim/battle.mjs +14 -12
- package/build/esm/sim/battle.mjs.map +1 -1
- package/build/esm/sim/dex-abilities.mjs +1 -1
- package/build/esm/sim/dex-conditions.mjs +1 -1
- package/build/esm/sim/dex-conditions.mjs.map +1 -1
- package/build/esm/sim/dex-data.mjs +1 -1
- package/build/esm/sim/dex-formats.mjs +4 -4
- package/build/esm/sim/dex-items.mjs +1 -1
- package/build/esm/sim/dex-moves.mjs +2 -2
- package/build/esm/sim/dex-species.mjs +1 -1
- package/build/esm/sim/dex.mjs +30 -31
- package/build/esm/sim/dex.mjs.map +1 -1
- package/build/esm/sim/field.mjs +2 -2
- package/build/esm/sim/index.mjs +13 -13
- package/build/esm/sim/pokemon.mjs +14 -10
- package/build/esm/sim/pokemon.mjs.map +1 -1
- package/build/esm/sim/side.mjs +4 -4
- package/build/esm/sim/state.mjs +6 -6
- package/build/esm/sim/team-validator.mjs +5 -5
- package/build/esm/sim/teams.mjs +1 -1
- package/build/esm/sim/tools/exhaustive-runner.mjs +4 -4
- package/build/esm/sim/tools/index.mjs +2 -2
- package/build/esm/sim/tools/random-player-ai.mjs +2 -2
- package/build/esm/sim/tools/runner.mjs +6 -6
- package/build/types/sim/dex-conditions.d.ts +7 -6
- package/build/types/sim/pokemon.d.ts +1 -0
- package/package.json +1 -1
|
@@ -431,7 +431,7 @@ exports.Abilities = {
|
|
|
431
431
|
num: 201,
|
|
432
432
|
},
|
|
433
433
|
bigpecks: {
|
|
434
|
-
|
|
434
|
+
onTryBoost(boost, target, source, effect) {
|
|
435
435
|
if (source && target === source)
|
|
436
436
|
return;
|
|
437
437
|
if (boost.def && boost.def < 0) {
|
|
@@ -506,7 +506,7 @@ exports.Abilities = {
|
|
|
506
506
|
num: 34,
|
|
507
507
|
},
|
|
508
508
|
clearbody: {
|
|
509
|
-
|
|
509
|
+
onTryBoost(boost, target, source, effect) {
|
|
510
510
|
if (source && target === source)
|
|
511
511
|
return;
|
|
512
512
|
let showMsg = false;
|
|
@@ -652,7 +652,7 @@ exports.Abilities = {
|
|
|
652
652
|
num: 14,
|
|
653
653
|
},
|
|
654
654
|
contrary: {
|
|
655
|
-
|
|
655
|
+
onChangeBoost(boost, target, source, effect) {
|
|
656
656
|
if (effect && effect.id === 'zpower')
|
|
657
657
|
return;
|
|
658
658
|
let i;
|
|
@@ -1306,7 +1306,7 @@ exports.Abilities = {
|
|
|
1306
1306
|
num: 122,
|
|
1307
1307
|
},
|
|
1308
1308
|
flowerveil: {
|
|
1309
|
-
|
|
1309
|
+
onAllyTryBoost(boost, target, source, effect) {
|
|
1310
1310
|
if ((source && target === source) || !target.hasType('Grass'))
|
|
1311
1311
|
return;
|
|
1312
1312
|
let showMsg = false;
|
|
@@ -1455,7 +1455,7 @@ exports.Abilities = {
|
|
|
1455
1455
|
num: 119,
|
|
1456
1456
|
},
|
|
1457
1457
|
fullmetalbody: {
|
|
1458
|
-
|
|
1458
|
+
onTryBoost(boost, target, source, effect) {
|
|
1459
1459
|
if (source && target === source)
|
|
1460
1460
|
return;
|
|
1461
1461
|
let showMsg = false;
|
|
@@ -1630,8 +1630,8 @@ exports.Abilities = {
|
|
|
1630
1630
|
this.add('-activate', pokemon, 'ability: Guard Dog');
|
|
1631
1631
|
return null;
|
|
1632
1632
|
},
|
|
1633
|
-
|
|
1634
|
-
if (effect.name === 'Intimidate') {
|
|
1633
|
+
onTryBoost(boost, target, source, effect) {
|
|
1634
|
+
if (effect.name === 'Intimidate' && boost.atk) {
|
|
1635
1635
|
delete boost.atk;
|
|
1636
1636
|
this.boost({ atk: 1 }, target, target, null, false, true);
|
|
1637
1637
|
}
|
|
@@ -1819,7 +1819,7 @@ exports.Abilities = {
|
|
|
1819
1819
|
num: 93,
|
|
1820
1820
|
},
|
|
1821
1821
|
hypercutter: {
|
|
1822
|
-
|
|
1822
|
+
onTryBoost(boost, target, source, effect) {
|
|
1823
1823
|
if (source && target === source)
|
|
1824
1824
|
return;
|
|
1825
1825
|
if (boost.atk && boost.atk < 0) {
|
|
@@ -2028,8 +2028,8 @@ exports.Abilities = {
|
|
|
2028
2028
|
if (status.id === 'flinch')
|
|
2029
2029
|
return null;
|
|
2030
2030
|
},
|
|
2031
|
-
|
|
2032
|
-
if (effect.name === 'Intimidate') {
|
|
2031
|
+
onTryBoost(boost, target, source, effect) {
|
|
2032
|
+
if (effect.name === 'Intimidate' && boost.atk) {
|
|
2033
2033
|
delete boost.atk;
|
|
2034
2034
|
this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Inner Focus', '[of] ' + target);
|
|
2035
2035
|
}
|
|
@@ -2125,7 +2125,7 @@ exports.Abilities = {
|
|
|
2125
2125
|
num: 154,
|
|
2126
2126
|
},
|
|
2127
2127
|
keeneye: {
|
|
2128
|
-
|
|
2128
|
+
onTryBoost(boost, target, source, effect) {
|
|
2129
2129
|
if (source && target === source)
|
|
2130
2130
|
return;
|
|
2131
2131
|
if (boost.accuracy && boost.accuracy < 0) {
|
|
@@ -2488,7 +2488,7 @@ exports.Abilities = {
|
|
|
2488
2488
|
num: 58,
|
|
2489
2489
|
},
|
|
2490
2490
|
mirrorarmor: {
|
|
2491
|
-
|
|
2491
|
+
onTryBoost(boost, target, source, effect) {
|
|
2492
2492
|
// Don't bounce self stat changes, or boosts that have already bounced
|
|
2493
2493
|
if (target === source || !boost || effect.name === 'Mirror Armor')
|
|
2494
2494
|
return;
|
|
@@ -2853,8 +2853,8 @@ exports.Abilities = {
|
|
|
2853
2853
|
return null;
|
|
2854
2854
|
}
|
|
2855
2855
|
},
|
|
2856
|
-
|
|
2857
|
-
if (effect.name === 'Intimidate') {
|
|
2856
|
+
onTryBoost(boost, target, source, effect) {
|
|
2857
|
+
if (effect.name === 'Intimidate' && boost.atk) {
|
|
2858
2858
|
delete boost.atk;
|
|
2859
2859
|
this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Oblivious', '[of] ' + target);
|
|
2860
2860
|
}
|
|
@@ -2961,8 +2961,8 @@ exports.Abilities = {
|
|
|
2961
2961
|
this.add('-immune', target, 'confusion', '[from] ability: Own Tempo');
|
|
2962
2962
|
}
|
|
2963
2963
|
},
|
|
2964
|
-
|
|
2965
|
-
if (effect.name === 'Intimidate') {
|
|
2964
|
+
onTryBoost(boost, target, source, effect) {
|
|
2965
|
+
if (effect.name === 'Intimidate' && boost.atk) {
|
|
2966
2966
|
delete boost.atk;
|
|
2967
2967
|
this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Own Tempo', '[of] ' + target);
|
|
2968
2968
|
}
|
|
@@ -3668,7 +3668,7 @@ exports.Abilities = {
|
|
|
3668
3668
|
if (effect.isBerry)
|
|
3669
3669
|
return this.chainModify(2);
|
|
3670
3670
|
},
|
|
3671
|
-
|
|
3671
|
+
onChangeBoost(boost, target, source, effect) {
|
|
3672
3672
|
if (effect && effect.isBerry) {
|
|
3673
3673
|
let b;
|
|
3674
3674
|
for (b in boost) {
|
|
@@ -3906,8 +3906,8 @@ exports.Abilities = {
|
|
|
3906
3906
|
move.ignoreImmunity['Normal'] = true;
|
|
3907
3907
|
}
|
|
3908
3908
|
},
|
|
3909
|
-
|
|
3910
|
-
if (effect.name === 'Intimidate') {
|
|
3909
|
+
onTryBoost(boost, target, source, effect) {
|
|
3910
|
+
if (effect.name === 'Intimidate' && boost.atk) {
|
|
3911
3911
|
delete boost.atk;
|
|
3912
3912
|
this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Scrappy', '[of] ' + target);
|
|
3913
3913
|
}
|
|
@@ -4106,7 +4106,7 @@ exports.Abilities = {
|
|
|
4106
4106
|
num: 197,
|
|
4107
4107
|
},
|
|
4108
4108
|
simple: {
|
|
4109
|
-
|
|
4109
|
+
onChangeBoost(boost, target, source, effect) {
|
|
4110
4110
|
if (effect && effect.id === 'zpower')
|
|
4111
4111
|
return;
|
|
4112
4112
|
let i;
|
|
@@ -5211,7 +5211,7 @@ exports.Abilities = {
|
|
|
5211
5211
|
num: 273,
|
|
5212
5212
|
},
|
|
5213
5213
|
whitesmoke: {
|
|
5214
|
-
|
|
5214
|
+
onTryBoost(boost, target, source, effect) {
|
|
5215
5215
|
if (source && target === source)
|
|
5216
5216
|
return;
|
|
5217
5217
|
let showMsg = false;
|