@pkmn/sim 0.7.8 → 0.7.10
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 +106 -89
- package/build/cjs/config/formats.js.map +1 -1
- package/build/cjs/data/abilities.js +47 -22
- package/build/cjs/data/abilities.js.map +1 -1
- package/build/cjs/data/aliases.js +2 -2
- package/build/cjs/data/formats-data.js +4 -0
- package/build/cjs/data/formats-data.js.map +1 -1
- package/build/cjs/data/learnsets.js +4793 -4255
- package/build/cjs/data/learnsets.js.map +1 -1
- package/build/cjs/data/mods/gen6/abilities.js +3 -3
- package/build/cjs/data/mods/gen6/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen6/learnsets.js +0 -90
- package/build/cjs/data/mods/gen6/learnsets.js.map +1 -1
- package/build/cjs/data/mods/gen6/legality.js +1 -1
- package/build/cjs/data/mods/gen6/legality.js.map +1 -1
- package/build/cjs/data/mods/gen6/pokedex.js +0 -4
- package/build/cjs/data/mods/gen6/pokedex.js.map +1 -1
- package/build/cjs/data/mods/gen8/abilities.js +1115 -16
- package/build/cjs/data/mods/gen8/abilities.js.map +1 -1
- package/build/cjs/data/moves.js +9 -5
- package/build/cjs/data/moves.js.map +1 -1
- package/build/cjs/data/pokedex.js +18 -2
- package/build/cjs/data/pokedex.js.map +1 -1
- package/build/cjs/data/text/moves.js +1 -1
- package/build/cjs/data/text/moves.js.map +1 -1
- package/build/cjs/sim/battle-actions.js +7 -3
- package/build/cjs/sim/battle-actions.js.map +1 -1
- package/build/cjs/sim/dex-moves.js.map +1 -1
- package/build/cjs/sim/pokemon.js +4 -3
- package/build/cjs/sim/pokemon.js.map +1 -1
- package/build/cjs/sim/team-validator.js +1 -1
- package/build/esm/config/formats.mjs +106 -89
- package/build/esm/config/formats.mjs.map +1 -1
- package/build/esm/data/abilities.mjs +47 -22
- package/build/esm/data/abilities.mjs.map +1 -1
- package/build/esm/data/aliases.mjs +2 -2
- package/build/esm/data/formats-data.mjs +4 -0
- package/build/esm/data/formats-data.mjs.map +1 -1
- package/build/esm/data/learnsets.mjs +4793 -4255
- package/build/esm/data/learnsets.mjs.map +1 -1
- package/build/esm/data/mods/gen6/abilities.mjs +3 -3
- package/build/esm/data/mods/gen6/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen6/learnsets.mjs +0 -90
- package/build/esm/data/mods/gen6/learnsets.mjs.map +1 -1
- package/build/esm/data/mods/gen6/legality.mjs +1 -1
- package/build/esm/data/mods/gen6/legality.mjs.map +1 -1
- package/build/esm/data/mods/gen6/pokedex.mjs +0 -4
- package/build/esm/data/mods/gen6/pokedex.mjs.map +1 -1
- package/build/esm/data/mods/gen8/abilities.mjs +1115 -16
- package/build/esm/data/mods/gen8/abilities.mjs.map +1 -1
- package/build/esm/data/moves.mjs +9 -5
- package/build/esm/data/moves.mjs.map +1 -1
- package/build/esm/data/pokedex.mjs +18 -2
- package/build/esm/data/pokedex.mjs.map +1 -1
- package/build/esm/data/text/moves.mjs +1 -1
- package/build/esm/data/text/moves.mjs.map +1 -1
- package/build/esm/sim/battle-actions.mjs +7 -3
- package/build/esm/sim/battle-actions.mjs.map +1 -1
- package/build/esm/sim/dex-moves.mjs.map +1 -1
- package/build/esm/sim/pokemon.mjs +4 -3
- package/build/esm/sim/pokemon.mjs.map +1 -1
- package/build/esm/sim/team-validator.mjs +1 -1
- package/build/types/sim/dex-moves.d.ts +7 -6
- package/build/types/sim/exported-global-types.d.ts +3 -0
- package/build/types/sim/global-types.d.ts +3 -0
- package/build/types/sim/pokemon.d.ts +1 -1
- package/package.json +2 -2
|
@@ -58,12 +58,12 @@ exports.Abilities = {
|
|
|
58
58
|
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
|
|
59
59
|
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
|
|
60
60
|
move.type = 'Flying';
|
|
61
|
-
move.
|
|
61
|
+
move.typeChangerBoosted = this.effect;
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
onBasePowerPriority: 23,
|
|
65
65
|
onBasePower(basePower, pokemon, target, move) {
|
|
66
|
-
if (move.
|
|
66
|
+
if (move.typeChangerBoosted === this.effect)
|
|
67
67
|
return this.chainModify([4915, 4096]);
|
|
68
68
|
},
|
|
69
69
|
name: "Aerilate",
|
|
@@ -368,8 +368,13 @@ exports.Abilities = {
|
|
|
368
368
|
return;
|
|
369
369
|
this.add('-ability', pokemon, 'Beads of Ruin');
|
|
370
370
|
},
|
|
371
|
-
onAnyModifySpD(spd,
|
|
372
|
-
|
|
371
|
+
onAnyModifySpD(spd, target, source, move) {
|
|
372
|
+
const abilityHolder = this.effectState.target;
|
|
373
|
+
if (abilityHolder === target)
|
|
374
|
+
return;
|
|
375
|
+
if (!move.ruinedSpD?.hasAbility('Beads of Ruin'))
|
|
376
|
+
move.ruinedSpD = abilityHolder;
|
|
377
|
+
if (move.ruinedSpD !== abilityHolder && move.ruinedSpD !== target)
|
|
373
378
|
return;
|
|
374
379
|
this.debug('Beads of Ruin SpD drop');
|
|
375
380
|
return this.chainModify(0.75);
|
|
@@ -527,7 +532,7 @@ exports.Abilities = {
|
|
|
527
532
|
},
|
|
528
533
|
onStart(pokemon) {
|
|
529
534
|
// Cloud Nine does not activate when Skill Swapped or when Neutralizing Gas leaves the field
|
|
530
|
-
if (
|
|
535
|
+
if (this.effectState.switchingIn) {
|
|
531
536
|
this.add('-ability', pokemon, 'Cloud Nine');
|
|
532
537
|
this.effectState.switchingIn = false;
|
|
533
538
|
}
|
|
@@ -710,14 +715,19 @@ exports.Abilities = {
|
|
|
710
715
|
},
|
|
711
716
|
cudchew: {
|
|
712
717
|
onEatItem(item, pokemon) {
|
|
713
|
-
if (item.isBerry) {
|
|
714
|
-
pokemon.addVolatile('cudchew');
|
|
718
|
+
if (item.isBerry && pokemon.addVolatile('cudchew')) {
|
|
715
719
|
pokemon.volatiles['cudchew'].berry = item;
|
|
716
720
|
}
|
|
717
721
|
},
|
|
722
|
+
onEnd(pokemon) {
|
|
723
|
+
delete pokemon.volatiles['cudchew'];
|
|
724
|
+
},
|
|
718
725
|
condition: {
|
|
719
726
|
noCopy: true,
|
|
720
727
|
duration: 2,
|
|
728
|
+
onRestart() {
|
|
729
|
+
this.effectState.duration = 2;
|
|
730
|
+
},
|
|
721
731
|
onResidualOrder: 28,
|
|
722
732
|
onResidualSubOrder: 2,
|
|
723
733
|
onEnd(pokemon) {
|
|
@@ -808,7 +818,7 @@ exports.Abilities = {
|
|
|
808
818
|
onAnyBasePower(basePower, source, target, move) {
|
|
809
819
|
if (target === source || move.category === 'Status' || move.type !== 'Dark')
|
|
810
820
|
return;
|
|
811
|
-
if (!move.auraBooster)
|
|
821
|
+
if (!move.auraBooster?.hasAbility('Dark Aura'))
|
|
812
822
|
move.auraBooster = this.effectState.target;
|
|
813
823
|
if (move.auraBooster !== this.effectState.target)
|
|
814
824
|
return;
|
|
@@ -1167,7 +1177,7 @@ exports.Abilities = {
|
|
|
1167
1177
|
onAnyBasePower(basePower, source, target, move) {
|
|
1168
1178
|
if (target === source || move.category === 'Status' || move.type !== 'Fairy')
|
|
1169
1179
|
return;
|
|
1170
|
-
if (!move.auraBooster)
|
|
1180
|
+
if (!move.auraBooster?.hasAbility('Fairy Aura'))
|
|
1171
1181
|
move.auraBooster = this.effectState.target;
|
|
1172
1182
|
if (move.auraBooster !== this.effectState.target)
|
|
1173
1183
|
return;
|
|
@@ -1491,12 +1501,12 @@ exports.Abilities = {
|
|
|
1491
1501
|
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
|
|
1492
1502
|
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
|
|
1493
1503
|
move.type = 'Electric';
|
|
1494
|
-
move.
|
|
1504
|
+
move.typeChangerBoosted = this.effect;
|
|
1495
1505
|
}
|
|
1496
1506
|
},
|
|
1497
1507
|
onBasePowerPriority: 23,
|
|
1498
1508
|
onBasePower(basePower, pokemon, target, move) {
|
|
1499
|
-
if (move.
|
|
1509
|
+
if (move.typeChangerBoosted === this.effect)
|
|
1500
1510
|
return this.chainModify([4915, 4096]);
|
|
1501
1511
|
},
|
|
1502
1512
|
name: "Galvanize",
|
|
@@ -2807,12 +2817,12 @@ exports.Abilities = {
|
|
|
2807
2817
|
// TODO: Figure out actual interaction
|
|
2808
2818
|
!(move.name === 'Tera Blast' && pokemon.terastallized)) {
|
|
2809
2819
|
move.type = 'Normal';
|
|
2810
|
-
move.
|
|
2820
|
+
move.typeChangerBoosted = this.effect;
|
|
2811
2821
|
}
|
|
2812
2822
|
},
|
|
2813
2823
|
onBasePowerPriority: 23,
|
|
2814
2824
|
onBasePower(basePower, pokemon, target, move) {
|
|
2815
|
-
if (move.
|
|
2825
|
+
if (move.typeChangerBoosted === this.effect)
|
|
2816
2826
|
return this.chainModify([4915, 4096]);
|
|
2817
2827
|
},
|
|
2818
2828
|
name: "Normalize",
|
|
@@ -3095,12 +3105,12 @@ exports.Abilities = {
|
|
|
3095
3105
|
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
|
|
3096
3106
|
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
|
|
3097
3107
|
move.type = 'Fairy';
|
|
3098
|
-
move.
|
|
3108
|
+
move.typeChangerBoosted = this.effect;
|
|
3099
3109
|
}
|
|
3100
3110
|
},
|
|
3101
3111
|
onBasePowerPriority: 23,
|
|
3102
3112
|
onBasePower(basePower, pokemon, target, move) {
|
|
3103
|
-
if (move.
|
|
3113
|
+
if (move.typeChangerBoosted === this.effect)
|
|
3104
3114
|
return this.chainModify([4915, 4096]);
|
|
3105
3115
|
},
|
|
3106
3116
|
name: "Pixilate",
|
|
@@ -3619,12 +3629,12 @@ exports.Abilities = {
|
|
|
3619
3629
|
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
|
|
3620
3630
|
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
|
|
3621
3631
|
move.type = 'Ice';
|
|
3622
|
-
move.
|
|
3632
|
+
move.typeChangerBoosted = this.effect;
|
|
3623
3633
|
}
|
|
3624
3634
|
},
|
|
3625
3635
|
onBasePowerPriority: 23,
|
|
3626
3636
|
onBasePower(basePower, pokemon, target, move) {
|
|
3627
|
-
if (move.
|
|
3637
|
+
if (move.typeChangerBoosted === this.effect)
|
|
3628
3638
|
return this.chainModify([4915, 4096]);
|
|
3629
3639
|
},
|
|
3630
3640
|
name: "Refrigerate",
|
|
@@ -4619,8 +4629,13 @@ exports.Abilities = {
|
|
|
4619
4629
|
return;
|
|
4620
4630
|
this.add('-ability', pokemon, 'Sword of Ruin');
|
|
4621
4631
|
},
|
|
4622
|
-
onAnyModifyDef(def,
|
|
4623
|
-
|
|
4632
|
+
onAnyModifyDef(def, target, source, move) {
|
|
4633
|
+
const abilityHolder = this.effectState.target;
|
|
4634
|
+
if (abilityHolder === target)
|
|
4635
|
+
return;
|
|
4636
|
+
if (!move.ruinedDef?.hasAbility('Sword of Ruin'))
|
|
4637
|
+
move.ruinedDef = abilityHolder;
|
|
4638
|
+
if (move.ruinedDef !== abilityHolder && move.ruinedDef !== target)
|
|
4624
4639
|
return;
|
|
4625
4640
|
this.debug('Sword of Ruin Def drop');
|
|
4626
4641
|
// TODO Placeholder
|
|
@@ -4637,7 +4652,12 @@ exports.Abilities = {
|
|
|
4637
4652
|
this.add('-ability', pokemon, 'Tablets of Ruin');
|
|
4638
4653
|
},
|
|
4639
4654
|
onAnyModifyAtk(atk, source, target, move) {
|
|
4640
|
-
|
|
4655
|
+
const abilityHolder = this.effectState.target;
|
|
4656
|
+
if (abilityHolder === source)
|
|
4657
|
+
return;
|
|
4658
|
+
if (!move.ruinedAtk)
|
|
4659
|
+
move.ruinedAtk = abilityHolder;
|
|
4660
|
+
if (move.ruinedAtk !== abilityHolder)
|
|
4641
4661
|
return;
|
|
4642
4662
|
this.debug('Tablets of Ruin Atk drop');
|
|
4643
4663
|
// TODO Placeholder
|
|
@@ -4987,9 +5007,14 @@ exports.Abilities = {
|
|
|
4987
5007
|
this.add('-ability', pokemon, 'Vessel of Ruin');
|
|
4988
5008
|
},
|
|
4989
5009
|
onAnyModifySpA(spa, source, target, move) {
|
|
4990
|
-
|
|
5010
|
+
const abilityHolder = this.effectState.target;
|
|
5011
|
+
if (abilityHolder === source)
|
|
5012
|
+
return;
|
|
5013
|
+
if (!move.ruinedSpA)
|
|
5014
|
+
move.ruinedSpA = abilityHolder;
|
|
5015
|
+
if (move.ruinedSpA !== abilityHolder)
|
|
4991
5016
|
return;
|
|
4992
|
-
this.debug('Vessel of Ruin
|
|
5017
|
+
this.debug('Vessel of Ruin SpA drop');
|
|
4993
5018
|
// TODO Placeholder
|
|
4994
5019
|
return this.chainModify(0.75);
|
|
4995
5020
|
},
|