@pkmn/sim 0.8.3 → 0.8.4
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 +92 -89
- package/build/cjs/config/formats.js.map +1 -1
- package/build/cjs/data/abilities.js +361 -163
- package/build/cjs/data/abilities.js.map +1 -1
- package/build/cjs/data/formats-data.js +326 -311
- package/build/cjs/data/formats-data.js.map +1 -1
- package/build/cjs/data/mods/gen3/abilities.js +6 -5
- package/build/cjs/data/mods/gen3/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen4/abilities.js +8 -2
- package/build/cjs/data/mods/gen4/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen4/moves.js +1 -2
- package/build/cjs/data/mods/gen4/moves.js.map +1 -1
- package/build/cjs/data/mods/gen5/abilities.js +1 -0
- package/build/cjs/data/mods/gen5/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen6/abilities.js +1 -1
- package/build/cjs/data/mods/gen6/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen7/abilities.js +2 -2
- package/build/cjs/data/mods/gen7/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen8/abilities.js +3 -1
- package/build/cjs/data/mods/gen8/abilities.js.map +1 -1
- package/build/cjs/data/moves.js +27 -38
- package/build/cjs/data/moves.js.map +1 -1
- package/build/cjs/data/rulesets.js +10 -18
- package/build/cjs/data/rulesets.js.map +1 -1
- package/build/cjs/data/text/abilities.js +32 -11
- package/build/cjs/data/text/abilities.js.map +1 -1
- package/build/cjs/data/text/moves.js +8 -8
- package/build/cjs/data/text/moves.js.map +1 -1
- package/build/cjs/sim/battle-actions.js +2 -1
- package/build/cjs/sim/battle-actions.js.map +1 -1
- package/build/cjs/sim/battle.js +2 -2
- package/build/cjs/sim/battle.js.map +1 -1
- package/build/cjs/sim/dex-abilities.d.ts +11 -2
- package/build/cjs/sim/dex-abilities.js +1 -0
- package/build/cjs/sim/dex-abilities.js.map +1 -1
- package/build/cjs/sim/exported-global-types.d.ts +2 -2
- package/build/cjs/sim/global-types.d.ts +2 -2
- package/build/cjs/sim/pokemon.js +7 -4
- package/build/cjs/sim/pokemon.js.map +1 -1
- package/build/esm/config/formats.mjs +92 -89
- package/build/esm/config/formats.mjs.map +1 -1
- package/build/esm/data/abilities.mjs +361 -163
- package/build/esm/data/abilities.mjs.map +1 -1
- package/build/esm/data/formats-data.mjs +326 -311
- package/build/esm/data/formats-data.mjs.map +1 -1
- package/build/esm/data/mods/gen3/abilities.mjs +6 -5
- package/build/esm/data/mods/gen3/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen4/abilities.mjs +8 -2
- package/build/esm/data/mods/gen4/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen4/moves.mjs +1 -2
- package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen5/abilities.mjs +1 -0
- package/build/esm/data/mods/gen5/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen6/abilities.mjs +1 -1
- package/build/esm/data/mods/gen6/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen7/abilities.mjs +2 -2
- package/build/esm/data/mods/gen7/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen8/abilities.mjs +3 -1
- package/build/esm/data/mods/gen8/abilities.mjs.map +1 -1
- package/build/esm/data/moves.mjs +27 -38
- package/build/esm/data/moves.mjs.map +1 -1
- package/build/esm/data/rulesets.mjs +10 -18
- package/build/esm/data/rulesets.mjs.map +1 -1
- package/build/esm/data/text/abilities.mjs +32 -11
- package/build/esm/data/text/abilities.mjs.map +1 -1
- package/build/esm/data/text/moves.mjs +8 -8
- package/build/esm/data/text/moves.mjs.map +1 -1
- package/build/esm/sim/battle-actions.mjs +2 -1
- package/build/esm/sim/battle-actions.mjs.map +1 -1
- package/build/esm/sim/battle.mjs +2 -2
- package/build/esm/sim/battle.mjs.map +1 -1
- package/build/esm/sim/dex-abilities.d.mts +11 -2
- package/build/esm/sim/dex-abilities.mjs +1 -0
- package/build/esm/sim/dex-abilities.mjs.map +1 -1
- package/build/esm/sim/exported-global-types.d.mts +2 -2
- package/build/esm/sim/global-types.d.mts +2 -2
- package/build/esm/sim/pokemon.mjs +7 -4
- package/build/esm/sim/pokemon.mjs.map +1 -1
- package/package.json +1 -1
package/build/cjs/data/moves.js
CHANGED
|
@@ -2975,14 +2975,14 @@ exports.Moves = {
|
|
|
2975
2975
|
priority: 0,
|
|
2976
2976
|
flags: { protect: 1, mirror: 1 },
|
|
2977
2977
|
onHit(target) {
|
|
2978
|
-
if (target.getAbility().
|
|
2978
|
+
if (target.getAbility().flags['cantsuppress'])
|
|
2979
2979
|
return;
|
|
2980
2980
|
if (target.newlySwitched || this.queue.willMove(target))
|
|
2981
2981
|
return;
|
|
2982
2982
|
target.addVolatile('gastroacid');
|
|
2983
2983
|
},
|
|
2984
2984
|
onAfterSubDamage(damage, target) {
|
|
2985
|
-
if (target.getAbility().
|
|
2985
|
+
if (target.getAbility().flags['cantsuppress'])
|
|
2986
2986
|
return;
|
|
2987
2987
|
if (target.newlySwitched || this.queue.willMove(target))
|
|
2988
2988
|
return;
|
|
@@ -3978,16 +3978,18 @@ exports.Moves = {
|
|
|
3978
3978
|
flags: {},
|
|
3979
3979
|
onHit(target, source, move) {
|
|
3980
3980
|
let success = false;
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
success
|
|
3981
|
+
if (!target.getAbility().flags['failroleplay']) {
|
|
3982
|
+
for (const pokemon of source.alliesAndSelf()) {
|
|
3983
|
+
if (pokemon.ability === target.ability || pokemon.getAbility().flags['cantsuppress'])
|
|
3984
|
+
continue;
|
|
3985
|
+
const oldAbility = pokemon.setAbility(target.ability);
|
|
3986
|
+
if (oldAbility) {
|
|
3987
|
+
this.add('-ability', pokemon, target.getAbility().name, '[from] move: Doodle');
|
|
3988
|
+
success = true;
|
|
3989
|
+
}
|
|
3990
|
+
else if (!success && oldAbility === null) {
|
|
3991
|
+
success = null;
|
|
3992
|
+
}
|
|
3991
3993
|
}
|
|
3992
3994
|
}
|
|
3993
3995
|
if (!success) {
|
|
@@ -5075,13 +5077,9 @@ exports.Moves = {
|
|
|
5075
5077
|
onTryHit(target, source) {
|
|
5076
5078
|
if (target === source || target.volatiles['dynamax'])
|
|
5077
5079
|
return false;
|
|
5078
|
-
const additionalBannedSourceAbilities = [
|
|
5079
|
-
// Zen Mode included here for compatability with Gen 5-6
|
|
5080
|
-
'commander', 'flowergift', 'forecast', 'hungerswitch', 'illusion', 'imposter', 'neutralizinggas', 'powerofalchemy', 'receiver', 'trace', 'zenmode',
|
|
5081
|
-
];
|
|
5082
5080
|
if (target.ability === source.ability ||
|
|
5083
|
-
target.getAbility().
|
|
5084
|
-
source.getAbility().
|
|
5081
|
+
target.getAbility().flags['cantsuppress'] || target.ability === 'truant' ||
|
|
5082
|
+
source.getAbility().flags['noentrain']) {
|
|
5085
5083
|
return false;
|
|
5086
5084
|
}
|
|
5087
5085
|
},
|
|
@@ -5460,6 +5458,7 @@ exports.Moves = {
|
|
|
5460
5458
|
flags: { protect: 1, mirror: 1 },
|
|
5461
5459
|
onBasePower(basePower, pokemon) {
|
|
5462
5460
|
if (this.randomChance(3, 10)) {
|
|
5461
|
+
this.attrLastMove('[anim] Fickle Beam All Out');
|
|
5463
5462
|
this.add('-activate', pokemon, 'move: Fickle Beam');
|
|
5464
5463
|
return this.chainModify(2);
|
|
5465
5464
|
}
|
|
@@ -5623,7 +5622,7 @@ exports.Moves = {
|
|
|
5623
5622
|
this.add('-combine');
|
|
5624
5623
|
return 150;
|
|
5625
5624
|
}
|
|
5626
|
-
return
|
|
5625
|
+
return move.basePower;
|
|
5627
5626
|
},
|
|
5628
5627
|
category: "Special",
|
|
5629
5628
|
name: "Fire Pledge",
|
|
@@ -6724,7 +6723,7 @@ exports.Moves = {
|
|
|
6724
6723
|
flags: { protect: 1, reflectable: 1, mirror: 1, allyanim: 1 },
|
|
6725
6724
|
volatileStatus: 'gastroacid',
|
|
6726
6725
|
onTryHit(target) {
|
|
6727
|
-
if (target.getAbility().
|
|
6726
|
+
if (target.getAbility().flags['cantsuppress']) {
|
|
6728
6727
|
return false;
|
|
6729
6728
|
}
|
|
6730
6729
|
if (target.hasItem('Ability Shield')) {
|
|
@@ -6741,7 +6740,7 @@ exports.Moves = {
|
|
|
6741
6740
|
this.singleEvent('End', pokemon.getAbility(), pokemon.abilityState, pokemon, pokemon, 'gastroacid');
|
|
6742
6741
|
},
|
|
6743
6742
|
onCopy(pokemon) {
|
|
6744
|
-
if (pokemon.getAbility().
|
|
6743
|
+
if (pokemon.getAbility().flags['cantsuppress'])
|
|
6745
6744
|
pokemon.removeVolatile('gastroacid');
|
|
6746
6745
|
},
|
|
6747
6746
|
},
|
|
@@ -7948,7 +7947,7 @@ exports.Moves = {
|
|
|
7948
7947
|
this.add('-combine');
|
|
7949
7948
|
return 150;
|
|
7950
7949
|
}
|
|
7951
|
-
return
|
|
7950
|
+
return move.basePower;
|
|
7952
7951
|
},
|
|
7953
7952
|
category: "Special",
|
|
7954
7953
|
name: "Grass Pledge",
|
|
@@ -16115,14 +16114,8 @@ exports.Moves = {
|
|
|
16115
16114
|
onTryHit(target, source) {
|
|
16116
16115
|
if (target.ability === source.ability)
|
|
16117
16116
|
return false;
|
|
16118
|
-
|
|
16119
|
-
// Zen Mode included here for compatability with Gen 5-6
|
|
16120
|
-
'commander', 'flowergift', 'forecast', 'hungerswitch', 'illusion', 'imposter', 'neutralizinggas', 'powerofalchemy', 'receiver', 'trace', 'wonderguard', 'zenmode',
|
|
16121
|
-
];
|
|
16122
|
-
if (target.getAbility().isPermanent || additionalBannedTargetAbilities.includes(target.ability) ||
|
|
16123
|
-
source.getAbility().isPermanent) {
|
|
16117
|
+
if (target.getAbility().flags['failroleplay'] || source.getAbility().flags['cantsuppress'])
|
|
16124
16118
|
return false;
|
|
16125
|
-
}
|
|
16126
16119
|
},
|
|
16127
16120
|
onHit(target, source) {
|
|
16128
16121
|
const oldAbility = source.setAbility(target.ability);
|
|
@@ -17365,7 +17358,7 @@ exports.Moves = {
|
|
|
17365
17358
|
priority: 0,
|
|
17366
17359
|
flags: { protect: 1, reflectable: 1, mirror: 1, allyanim: 1 },
|
|
17367
17360
|
onTryHit(target) {
|
|
17368
|
-
if (target.getAbility().
|
|
17361
|
+
if (target.getAbility().flags['cantsuppress'] || target.ability === 'simple' || target.ability === 'truant') {
|
|
17369
17362
|
return false;
|
|
17370
17363
|
}
|
|
17371
17364
|
},
|
|
@@ -17484,13 +17477,9 @@ exports.Moves = {
|
|
|
17484
17477
|
priority: 0,
|
|
17485
17478
|
flags: { protect: 1, mirror: 1, bypasssub: 1, allyanim: 1 },
|
|
17486
17479
|
onTryHit(target, source) {
|
|
17487
|
-
const additionalBannedAbilities = ['hungerswitch', 'illusion', 'neutralizinggas', 'wonderguard', 'terashell'];
|
|
17488
17480
|
const targetAbility = target.getAbility();
|
|
17489
17481
|
const sourceAbility = source.getAbility();
|
|
17490
|
-
|
|
17491
|
-
if (target.volatiles['dynamax'] ||
|
|
17492
|
-
targetAbility.isPermanent || sourceAbility.isPermanent ||
|
|
17493
|
-
additionalBannedAbilities.includes(target.ability) || additionalBannedAbilities.includes(source.ability)) {
|
|
17482
|
+
if (sourceAbility.flags['failskillswap'] || targetAbility.flags['failskillswap'] || target.volatiles['dynamax']) {
|
|
17494
17483
|
return false;
|
|
17495
17484
|
}
|
|
17496
17485
|
const sourceCanBeSet = this.runEvent('SetAbility', source, source, this.effect, targetAbility);
|
|
@@ -20273,7 +20262,7 @@ exports.Moves = {
|
|
|
20273
20262
|
if (pokemon.terastallized === 'Stellar') {
|
|
20274
20263
|
return 100;
|
|
20275
20264
|
}
|
|
20276
|
-
return
|
|
20265
|
+
return move.basePower;
|
|
20277
20266
|
},
|
|
20278
20267
|
category: "Special",
|
|
20279
20268
|
name: "Tera Blast",
|
|
@@ -21669,7 +21658,7 @@ exports.Moves = {
|
|
|
21669
21658
|
this.add('-combine');
|
|
21670
21659
|
return 150;
|
|
21671
21660
|
}
|
|
21672
|
-
return
|
|
21661
|
+
return move.basePower;
|
|
21673
21662
|
},
|
|
21674
21663
|
category: "Special",
|
|
21675
21664
|
name: "Water Pledge",
|
|
@@ -22230,7 +22219,7 @@ exports.Moves = {
|
|
|
22230
22219
|
}
|
|
22231
22220
|
},
|
|
22232
22221
|
onTryHit(target) {
|
|
22233
|
-
if (target.getAbility().
|
|
22222
|
+
if (target.getAbility().flags['cantsuppress']) {
|
|
22234
22223
|
return false;
|
|
22235
22224
|
}
|
|
22236
22225
|
},
|