@pkmn/sim 0.7.11 → 0.7.12
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 +10 -8
- package/build/cjs/config/formats.js.map +1 -1
- package/build/cjs/data/abilities.js +22 -14
- package/build/cjs/data/abilities.js.map +1 -1
- package/build/cjs/data/items.js +5 -10
- package/build/cjs/data/items.js.map +1 -1
- package/build/cjs/data/mods/gen1/moves.js +18 -60
- package/build/cjs/data/mods/gen1/moves.js.map +1 -1
- package/build/cjs/data/mods/gen4/moves.js +32 -24
- package/build/cjs/data/mods/gen4/moves.js.map +1 -1
- package/build/cjs/data/mods/gen5/formats-data.js +14 -14
- package/build/cjs/data/mods/gen5/formats-data.js.map +1 -1
- package/build/cjs/data/mods/gen8/formats-data.js +1 -1
- package/build/cjs/data/mods/gen8/formats-data.js.map +1 -1
- package/build/cjs/data/moves.js +70 -45
- package/build/cjs/data/moves.js.map +1 -1
- package/build/cjs/data/rulesets.js +1 -1
- package/build/cjs/data/rulesets.js.map +1 -1
- package/build/cjs/data/text/abilities.js +61 -47
- package/build/cjs/data/text/abilities.js.map +1 -1
- package/build/cjs/data/text/items.js +14 -6
- package/build/cjs/data/text/items.js.map +1 -1
- package/build/cjs/data/text/moves.js +178 -103
- package/build/cjs/data/text/moves.js.map +1 -1
- package/build/cjs/sim/battle-actions.js +2 -7
- package/build/cjs/sim/battle-actions.js.map +1 -1
- package/build/cjs/sim/battle-queue.js +1 -0
- package/build/cjs/sim/battle-queue.js.map +1 -1
- package/build/cjs/sim/battle.js +37 -2
- package/build/cjs/sim/battle.js.map +1 -1
- package/build/cjs/sim/pokemon.js +12 -6
- package/build/cjs/sim/pokemon.js.map +1 -1
- package/build/cjs/sim/side.js +7 -12
- package/build/cjs/sim/side.js.map +1 -1
- package/build/esm/config/formats.mjs +10 -8
- package/build/esm/config/formats.mjs.map +1 -1
- package/build/esm/data/abilities.mjs +22 -14
- package/build/esm/data/abilities.mjs.map +1 -1
- package/build/esm/data/items.mjs +5 -10
- package/build/esm/data/items.mjs.map +1 -1
- package/build/esm/data/mods/gen1/moves.mjs +18 -60
- package/build/esm/data/mods/gen1/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen4/moves.mjs +32 -24
- package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen5/formats-data.mjs +14 -14
- package/build/esm/data/mods/gen5/formats-data.mjs.map +1 -1
- package/build/esm/data/mods/gen8/formats-data.mjs +1 -1
- package/build/esm/data/mods/gen8/formats-data.mjs.map +1 -1
- package/build/esm/data/moves.mjs +70 -45
- package/build/esm/data/moves.mjs.map +1 -1
- package/build/esm/data/rulesets.mjs +1 -1
- package/build/esm/data/rulesets.mjs.map +1 -1
- package/build/esm/data/text/abilities.mjs +61 -47
- package/build/esm/data/text/abilities.mjs.map +1 -1
- package/build/esm/data/text/items.mjs +14 -6
- package/build/esm/data/text/items.mjs.map +1 -1
- package/build/esm/data/text/moves.mjs +178 -103
- package/build/esm/data/text/moves.mjs.map +1 -1
- package/build/esm/sim/battle-actions.mjs +2 -7
- package/build/esm/sim/battle-actions.mjs.map +1 -1
- package/build/esm/sim/battle-queue.mjs +1 -0
- package/build/esm/sim/battle-queue.mjs.map +1 -1
- package/build/esm/sim/battle.mjs +37 -2
- package/build/esm/sim/battle.mjs.map +1 -1
- package/build/esm/sim/pokemon.mjs +12 -6
- package/build/esm/sim/pokemon.mjs.map +1 -1
- package/build/esm/sim/side.mjs +7 -12
- package/build/esm/sim/side.mjs.map +1 -1
- package/build/types/sim/battle-queue.d.ts +2 -2
- package/build/types/sim/side.d.ts +1 -1
- package/package.json +1 -1
package/build/cjs/data/moves.js
CHANGED
|
@@ -2654,7 +2654,7 @@ exports.Moves = {
|
|
|
2654
2654
|
if (target.runEffectiveness(move) > 0) {
|
|
2655
2655
|
// Placeholder
|
|
2656
2656
|
this.debug(`collision course super effective buff`);
|
|
2657
|
-
return this.chainModify(
|
|
2657
|
+
return this.chainModify([5461, 4096]);
|
|
2658
2658
|
}
|
|
2659
2659
|
},
|
|
2660
2660
|
secondary: null,
|
|
@@ -4718,7 +4718,7 @@ exports.Moves = {
|
|
|
4718
4718
|
if (target.runEffectiveness(move) > 0) {
|
|
4719
4719
|
// Placeholder
|
|
4720
4720
|
this.debug(`electro drift super effective buff`);
|
|
4721
|
-
return this.chainModify(
|
|
4721
|
+
return this.chainModify([5461, 4096]);
|
|
4722
4722
|
}
|
|
4723
4723
|
},
|
|
4724
4724
|
secondary: null,
|
|
@@ -6760,6 +6760,11 @@ exports.Moves = {
|
|
|
6760
6760
|
if (pokemon.lastMove?.id === 'gigatonhammer')
|
|
6761
6761
|
pokemon.disableMove('gigatonhammer');
|
|
6762
6762
|
},
|
|
6763
|
+
onUseMoveMessage(source) {
|
|
6764
|
+
if (source.lastMove?.id === 'gigatonhammer') {
|
|
6765
|
+
this.add('-hint', "Some effects can force a Pokemon to use Gigaton Hammer again in a row.");
|
|
6766
|
+
}
|
|
6767
|
+
},
|
|
6763
6768
|
secondary: null,
|
|
6764
6769
|
target: "normal",
|
|
6765
6770
|
type: "Steel",
|
|
@@ -6831,17 +6836,11 @@ exports.Moves = {
|
|
|
6831
6836
|
onRestart() {
|
|
6832
6837
|
this.effectState.duration = 2;
|
|
6833
6838
|
},
|
|
6834
|
-
onBeforeTurn() {
|
|
6835
|
-
this.effectState.turnPassed = true;
|
|
6836
|
-
},
|
|
6837
6839
|
onAccuracy() {
|
|
6838
|
-
|
|
6839
|
-
return true;
|
|
6840
|
+
return true;
|
|
6840
6841
|
},
|
|
6841
6842
|
onSourceModifyDamage() {
|
|
6842
|
-
|
|
6843
|
-
return this.chainModify(2);
|
|
6844
|
-
}
|
|
6843
|
+
return this.chainModify(2);
|
|
6845
6844
|
},
|
|
6846
6845
|
},
|
|
6847
6846
|
secondary: null,
|
|
@@ -8003,13 +8002,18 @@ exports.Moves = {
|
|
|
8003
8002
|
duration: 5,
|
|
8004
8003
|
durationCallback(source, effect) {
|
|
8005
8004
|
if (source?.hasAbility('persistent')) {
|
|
8006
|
-
this.add('-activate', source, 'ability: Persistent',
|
|
8005
|
+
this.add('-activate', source, 'ability: Persistent', '[move] Gravity');
|
|
8007
8006
|
return 7;
|
|
8008
8007
|
}
|
|
8009
8008
|
return 5;
|
|
8010
8009
|
},
|
|
8011
|
-
onFieldStart() {
|
|
8012
|
-
|
|
8010
|
+
onFieldStart(target, source) {
|
|
8011
|
+
if (source?.hasAbility('persistent')) {
|
|
8012
|
+
this.add('-fieldstart', 'move: Gravity', '[persistent]');
|
|
8013
|
+
}
|
|
8014
|
+
else {
|
|
8015
|
+
this.add('-fieldstart', 'move: Gravity');
|
|
8016
|
+
}
|
|
8013
8017
|
for (const pokemon of this.getAllActive()) {
|
|
8014
8018
|
let applies = false;
|
|
8015
8019
|
if (pokemon.removeVolatile('bounce') || pokemon.removeVolatile('fly')) {
|
|
@@ -8510,7 +8514,7 @@ exports.Moves = {
|
|
|
8510
8514
|
duration: 5,
|
|
8511
8515
|
durationCallback(target, source, effect) {
|
|
8512
8516
|
if (source?.hasAbility('persistent')) {
|
|
8513
|
-
this.add('-activate', source, 'ability: Persistent',
|
|
8517
|
+
this.add('-activate', source, 'ability: Persistent', '[move] Heal Block');
|
|
8514
8518
|
return 7;
|
|
8515
8519
|
}
|
|
8516
8520
|
return 5;
|
|
@@ -11055,13 +11059,18 @@ exports.Moves = {
|
|
|
11055
11059
|
duration: 5,
|
|
11056
11060
|
durationCallback(source, effect) {
|
|
11057
11061
|
if (source?.hasAbility('persistent')) {
|
|
11058
|
-
this.add('-activate', source, 'ability: Persistent',
|
|
11062
|
+
this.add('-activate', source, 'ability: Persistent', '[move] Magic Room');
|
|
11059
11063
|
return 7;
|
|
11060
11064
|
}
|
|
11061
11065
|
return 5;
|
|
11062
11066
|
},
|
|
11063
11067
|
onFieldStart(target, source) {
|
|
11064
|
-
|
|
11068
|
+
if (source?.hasAbility('persistent')) {
|
|
11069
|
+
this.add('-fieldstart', 'move: Magic Room', '[of] ' + source, '[persistent]');
|
|
11070
|
+
}
|
|
11071
|
+
else {
|
|
11072
|
+
this.add('-fieldstart', 'move: Magic Room', '[of] ' + source);
|
|
11073
|
+
}
|
|
11065
11074
|
for (const mon of this.getAllActive()) {
|
|
11066
11075
|
this.singleEvent('End', mon.getItem(), mon.itemState, mon);
|
|
11067
11076
|
}
|
|
@@ -15081,7 +15090,7 @@ exports.Moves = {
|
|
|
15081
15090
|
pokemon.side.removeSideCondition('auroraveil');
|
|
15082
15091
|
},
|
|
15083
15092
|
onModifyType(move, pokemon) {
|
|
15084
|
-
switch (pokemon.
|
|
15093
|
+
switch (pokemon.species.name) {
|
|
15085
15094
|
case 'Tauros-Paldea':
|
|
15086
15095
|
move.type = 'Fighting';
|
|
15087
15096
|
break;
|
|
@@ -16083,7 +16092,7 @@ exports.Moves = {
|
|
|
16083
16092
|
duration: 5,
|
|
16084
16093
|
durationCallback(target, source, effect) {
|
|
16085
16094
|
if (source?.hasAbility('persistent')) {
|
|
16086
|
-
this.add('-activate', source, 'ability: Persistent',
|
|
16095
|
+
this.add('-activate', source, 'ability: Persistent', '[move] Safeguard');
|
|
16087
16096
|
return 7;
|
|
16088
16097
|
}
|
|
16089
16098
|
return 5;
|
|
@@ -16114,8 +16123,13 @@ exports.Moves = {
|
|
|
16114
16123
|
return null;
|
|
16115
16124
|
}
|
|
16116
16125
|
},
|
|
16117
|
-
onSideStart(side) {
|
|
16118
|
-
|
|
16126
|
+
onSideStart(side, source) {
|
|
16127
|
+
if (source?.hasAbility('persistent')) {
|
|
16128
|
+
this.add('-sidestart', side, 'Safeguard', '[persistent]');
|
|
16129
|
+
}
|
|
16130
|
+
else {
|
|
16131
|
+
this.add('-sidestart', side, 'Safeguard');
|
|
16132
|
+
}
|
|
16119
16133
|
},
|
|
16120
16134
|
onSideResidualOrder: 26,
|
|
16121
16135
|
onSideResidualSubOrder: 3,
|
|
@@ -19542,13 +19556,18 @@ exports.Moves = {
|
|
|
19542
19556
|
duration: 4,
|
|
19543
19557
|
durationCallback(target, source, effect) {
|
|
19544
19558
|
if (source?.hasAbility('persistent')) {
|
|
19545
|
-
this.add('-activate', source, 'ability: Persistent',
|
|
19559
|
+
this.add('-activate', source, 'ability: Persistent', '[move] Tailwind');
|
|
19546
19560
|
return 6;
|
|
19547
19561
|
}
|
|
19548
19562
|
return 4;
|
|
19549
19563
|
},
|
|
19550
|
-
onSideStart(side) {
|
|
19551
|
-
|
|
19564
|
+
onSideStart(side, source) {
|
|
19565
|
+
if (source?.hasAbility('persistent')) {
|
|
19566
|
+
this.add('-sidestart', side, 'move: Tailwind', '[persistent]');
|
|
19567
|
+
}
|
|
19568
|
+
else {
|
|
19569
|
+
this.add('-sidestart', side, 'move: Tailwind');
|
|
19570
|
+
}
|
|
19552
19571
|
},
|
|
19553
19572
|
onModifySpe(spe, pokemon) {
|
|
19554
19573
|
return this.chainModify(2);
|
|
@@ -20242,29 +20261,25 @@ exports.Moves = {
|
|
|
20242
20261
|
pp: 10,
|
|
20243
20262
|
priority: 0,
|
|
20244
20263
|
flags: {},
|
|
20245
|
-
|
|
20246
|
-
atk: 1,
|
|
20247
|
-
spe: 1,
|
|
20248
|
-
},
|
|
20249
|
-
onHit(source) {
|
|
20264
|
+
onHit(pokemon) {
|
|
20250
20265
|
let success = false;
|
|
20251
|
-
const
|
|
20252
|
-
|
|
20253
|
-
if (source.side.removeSideCondition(sideCondition)) {
|
|
20254
|
-
this.add('-sideend', source.side, this.dex.conditions.get(sideCondition).name, '[from] move: Tidy Up', '[of] ' + source);
|
|
20255
|
-
success = true;
|
|
20256
|
-
}
|
|
20257
|
-
if (source.side.foe.removeSideCondition(sideCondition)) {
|
|
20258
|
-
this.add('-sideend', source.side.foe, this.dex.conditions.get(sideCondition).name, '[from] move: Tidy Up', '[of] ' + source);
|
|
20266
|
+
for (const active of this.getAllActive()) {
|
|
20267
|
+
if (active.removeVolatile('substitute'))
|
|
20259
20268
|
success = true;
|
|
20260
|
-
}
|
|
20261
20269
|
}
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20270
|
+
const removeAll = ['spikes', 'toxicspikes', 'stealthrock', 'stickyweb', 'gmaxsteelsurge'];
|
|
20271
|
+
const sides = [pokemon.side, ...pokemon.side.foeSidesWithConditions()];
|
|
20272
|
+
for (const side of sides) {
|
|
20273
|
+
for (const sideCondition of removeAll) {
|
|
20274
|
+
if (side.removeSideCondition(sideCondition)) {
|
|
20275
|
+
this.add('-sideend', side, this.dex.conditions.get(sideCondition).name);
|
|
20276
|
+
success = true;
|
|
20277
|
+
}
|
|
20278
|
+
}
|
|
20265
20279
|
}
|
|
20266
20280
|
if (success)
|
|
20267
|
-
this.add('-activate',
|
|
20281
|
+
this.add('-activate', pokemon, 'move: Tidy Up');
|
|
20282
|
+
return !!this.boost({ atk: 1, spe: 1 }, pokemon, pokemon, null, false, true) || success;
|
|
20268
20283
|
},
|
|
20269
20284
|
secondary: null,
|
|
20270
20285
|
target: "self",
|
|
@@ -20603,13 +20618,18 @@ exports.Moves = {
|
|
|
20603
20618
|
duration: 5,
|
|
20604
20619
|
durationCallback(source, effect) {
|
|
20605
20620
|
if (source?.hasAbility('persistent')) {
|
|
20606
|
-
this.add('-activate', source, 'ability: Persistent',
|
|
20621
|
+
this.add('-activate', source, 'ability: Persistent', '[move] Trick Room');
|
|
20607
20622
|
return 7;
|
|
20608
20623
|
}
|
|
20609
20624
|
return 5;
|
|
20610
20625
|
},
|
|
20611
20626
|
onFieldStart(target, source) {
|
|
20612
|
-
|
|
20627
|
+
if (source?.hasAbility('persistent')) {
|
|
20628
|
+
this.add('-fieldstart', 'move: Trick Room', '[of] ' + source, '[persistent]');
|
|
20629
|
+
}
|
|
20630
|
+
else {
|
|
20631
|
+
this.add('-fieldstart', 'move: Trick Room', '[of] ' + source);
|
|
20632
|
+
}
|
|
20613
20633
|
},
|
|
20614
20634
|
onFieldRestart(target, source) {
|
|
20615
20635
|
this.field.removePseudoWeather('trickroom');
|
|
@@ -21641,7 +21661,7 @@ exports.Moves = {
|
|
|
21641
21661
|
duration: 5,
|
|
21642
21662
|
durationCallback(source, effect) {
|
|
21643
21663
|
if (source?.hasAbility('persistent')) {
|
|
21644
|
-
this.add('-activate', source, 'ability: Persistent',
|
|
21664
|
+
this.add('-activate', source, 'ability: Persistent', '[move] Wonder Room');
|
|
21645
21665
|
return 7;
|
|
21646
21666
|
}
|
|
21647
21667
|
return 5;
|
|
@@ -21657,7 +21677,12 @@ exports.Moves = {
|
|
|
21657
21677
|
this.hint(`${move.name} uses ${statAndBoosts === 'def' ? '' : 'Sp. '}Def boosts when Wonder Room is active.`);
|
|
21658
21678
|
},
|
|
21659
21679
|
onFieldStart(field, source) {
|
|
21660
|
-
|
|
21680
|
+
if (source?.hasAbility('persistent')) {
|
|
21681
|
+
this.add('-fieldstart', 'move: Wonder Room', '[of] ' + source, '[persistent]');
|
|
21682
|
+
}
|
|
21683
|
+
else {
|
|
21684
|
+
this.add('-fieldstart', 'move: Wonder Room', '[of] ' + source);
|
|
21685
|
+
}
|
|
21661
21686
|
},
|
|
21662
21687
|
onFieldRestart(target, source) {
|
|
21663
21688
|
this.field.removePseudoWeather('wonderroom');
|