@pkmn/sim 0.9.30 → 0.9.31
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 +58 -43
- package/build/cjs/config/formats.js.map +1 -1
- package/build/cjs/data/abilities.js +41 -41
- package/build/cjs/data/abilities.js.map +1 -1
- package/build/cjs/data/aliases.js +2 -2
- package/build/cjs/data/aliases.js.map +1 -1
- package/build/cjs/data/conditions.js +20 -20
- package/build/cjs/data/conditions.js.map +1 -1
- package/build/cjs/data/formats-data.js +1 -1
- package/build/cjs/data/items.js +5 -5
- package/build/cjs/data/items.js.map +1 -1
- package/build/cjs/data/mods/gen1/conditions.js +1 -2
- package/build/cjs/data/mods/gen1/conditions.js.map +1 -1
- package/build/cjs/data/mods/gen1/moves.js +2 -2
- package/build/cjs/data/mods/gen1/moves.js.map +1 -1
- package/build/cjs/data/mods/gen1/pokedex.js.map +1 -1
- package/build/cjs/data/mods/gen1/scripts.js +6 -6
- package/build/cjs/data/mods/gen1/scripts.js.map +1 -1
- package/build/cjs/data/mods/gen2/conditions.js +2 -2
- package/build/cjs/data/mods/gen2/conditions.js.map +1 -1
- package/build/cjs/data/mods/gen2/moves.js +3 -3
- package/build/cjs/data/mods/gen2/moves.js.map +1 -1
- package/build/cjs/data/mods/gen2/rulesets.js.map +1 -1
- package/build/cjs/data/mods/gen2/scripts.js +2 -2
- package/build/cjs/data/mods/gen2/scripts.js.map +1 -1
- package/build/cjs/data/mods/gen3/abilities.js +1 -1
- package/build/cjs/data/mods/gen3/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen3/conditions.js +1 -1
- package/build/cjs/data/mods/gen3/conditions.js.map +1 -1
- package/build/cjs/data/mods/gen3/moves.js +5 -5
- package/build/cjs/data/mods/gen3/moves.js.map +1 -1
- package/build/cjs/data/mods/gen3/scripts.js +2 -2
- package/build/cjs/data/mods/gen3/scripts.js.map +1 -1
- package/build/cjs/data/mods/gen4/abilities.js +4 -4
- package/build/cjs/data/mods/gen4/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen4/conditions.js +1 -1
- package/build/cjs/data/mods/gen4/conditions.js.map +1 -1
- package/build/cjs/data/mods/gen4/items.js +2 -2
- package/build/cjs/data/mods/gen4/items.js.map +1 -1
- package/build/cjs/data/mods/gen4/moves.js +22 -22
- package/build/cjs/data/mods/gen4/moves.js.map +1 -1
- package/build/cjs/data/mods/gen4/scripts.js +1 -1
- package/build/cjs/data/mods/gen4/scripts.js.map +1 -1
- package/build/cjs/data/mods/gen5/abilities.js +1 -1
- package/build/cjs/data/mods/gen5/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen5/conditions.js +2 -2
- package/build/cjs/data/mods/gen5/conditions.js.map +1 -1
- package/build/cjs/data/mods/gen5/moves.js +6 -6
- package/build/cjs/data/mods/gen5/moves.js.map +1 -1
- package/build/cjs/data/mods/gen5/pokedex.js.map +1 -1
- package/build/cjs/data/mods/gen6/abilities.js +2 -2
- package/build/cjs/data/mods/gen6/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen6/moves.js +1 -1
- package/build/cjs/data/mods/gen6/moves.js.map +1 -1
- package/build/cjs/data/mods/gen6/pokedex.js.map +1 -1
- package/build/cjs/data/mods/gen7/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen7/moves.js +8 -8
- package/build/cjs/data/mods/gen7/moves.js.map +1 -1
- package/build/cjs/data/mods/gen7/pokedex.js.map +1 -1
- package/build/cjs/data/mods/gen8/abilities.js.map +1 -1
- package/build/cjs/data/mods/gen8/moves.js.map +1 -1
- package/build/cjs/data/mods/gen8/pokedex.js.map +1 -1
- package/build/cjs/data/moves.js +105 -103
- package/build/cjs/data/moves.js.map +1 -1
- package/build/cjs/data/pokedex.js.map +1 -1
- package/build/cjs/data/pokemongo.js.map +1 -1
- package/build/cjs/data/rulesets.js +0 -1
- package/build/cjs/data/rulesets.js.map +1 -1
- package/build/cjs/data/tags.js.map +1 -1
- package/build/cjs/data/text/abilities.js.map +1 -1
- package/build/cjs/data/text/default.js.map +1 -1
- package/build/cjs/data/text/items.js.map +1 -1
- package/build/cjs/data/text/moves.js.map +1 -1
- package/build/cjs/data/typechart.js.map +1 -1
- package/build/cjs/lib/utils.d.ts +5 -5
- package/build/cjs/lib/utils.js +21 -11
- package/build/cjs/lib/utils.js.map +1 -1
- package/build/cjs/sim/battle-actions.js +8 -8
- package/build/cjs/sim/battle-actions.js.map +1 -1
- package/build/cjs/sim/battle-queue.js +0 -1
- package/build/cjs/sim/battle-queue.js.map +1 -1
- package/build/cjs/sim/battle-stream.d.ts +3 -2
- package/build/cjs/sim/battle-stream.js +1 -1
- package/build/cjs/sim/battle-stream.js.map +1 -1
- package/build/cjs/sim/battle.d.ts +8 -8
- package/build/cjs/sim/battle.js +41 -44
- package/build/cjs/sim/battle.js.map +1 -1
- package/build/cjs/sim/dex-abilities.js.map +1 -1
- package/build/cjs/sim/dex-conditions.js +2 -2
- package/build/cjs/sim/dex-conditions.js.map +1 -1
- package/build/cjs/sim/dex-data.js +1 -1
- package/build/cjs/sim/dex-data.js.map +1 -1
- package/build/cjs/sim/dex-formats.d.ts +1 -0
- package/build/cjs/sim/dex-formats.js +95 -37
- package/build/cjs/sim/dex-formats.js.map +1 -1
- package/build/cjs/sim/dex-items.js.map +1 -1
- package/build/cjs/sim/dex-moves.js +2 -3
- package/build/cjs/sim/dex-moves.js.map +1 -1
- package/build/cjs/sim/exported-global-types.d.ts +1 -9
- package/build/cjs/sim/field.d.ts +1 -1
- package/build/cjs/sim/field.js +3 -3
- package/build/cjs/sim/field.js.map +1 -1
- package/build/cjs/sim/global-types.d.ts +1 -9
- package/build/cjs/sim/pokemon.d.ts +14 -25
- package/build/cjs/sim/pokemon.js +21 -22
- package/build/cjs/sim/pokemon.js.map +1 -1
- package/build/cjs/sim/side.d.ts +105 -11
- package/build/cjs/sim/side.js +6 -6
- package/build/cjs/sim/side.js.map +1 -1
- package/build/cjs/sim/state.d.ts +1 -1
- package/build/cjs/sim/state.js +3 -3
- package/build/cjs/sim/state.js.map +1 -1
- package/build/cjs/sim/team-validator.d.ts +2 -1
- package/build/cjs/sim/team-validator.js +37 -27
- package/build/cjs/sim/team-validator.js.map +1 -1
- package/build/cjs/sim/tools/random-player-ai.d.ts +4 -3
- package/build/cjs/sim/tools/random-player-ai.js +6 -7
- package/build/cjs/sim/tools/random-player-ai.js.map +1 -1
- package/build/cjs/sim/tools/runner.d.ts +2 -2
- package/build/cjs/sim/tools/runner.js +1 -1
- package/build/cjs/sim/tools/runner.js.map +1 -1
- package/build/esm/config/formats.mjs +58 -43
- package/build/esm/config/formats.mjs.map +1 -1
- package/build/esm/data/abilities.mjs +41 -41
- package/build/esm/data/abilities.mjs.map +1 -1
- package/build/esm/data/aliases.mjs +2 -2
- package/build/esm/data/aliases.mjs.map +1 -1
- package/build/esm/data/conditions.mjs +20 -20
- package/build/esm/data/conditions.mjs.map +1 -1
- package/build/esm/data/formats-data.mjs +1 -1
- package/build/esm/data/items.mjs +5 -5
- package/build/esm/data/items.mjs.map +1 -1
- package/build/esm/data/mods/gen1/conditions.mjs +1 -2
- package/build/esm/data/mods/gen1/conditions.mjs.map +1 -1
- package/build/esm/data/mods/gen1/moves.mjs +2 -2
- package/build/esm/data/mods/gen1/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen1/pokedex.mjs.map +1 -1
- package/build/esm/data/mods/gen1/scripts.mjs +6 -6
- package/build/esm/data/mods/gen1/scripts.mjs.map +1 -1
- package/build/esm/data/mods/gen2/conditions.mjs +2 -2
- package/build/esm/data/mods/gen2/conditions.mjs.map +1 -1
- package/build/esm/data/mods/gen2/moves.mjs +3 -3
- package/build/esm/data/mods/gen2/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen2/rulesets.mjs.map +1 -1
- package/build/esm/data/mods/gen2/scripts.mjs +2 -2
- package/build/esm/data/mods/gen2/scripts.mjs.map +1 -1
- package/build/esm/data/mods/gen3/abilities.mjs +1 -1
- package/build/esm/data/mods/gen3/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen3/conditions.mjs +1 -1
- package/build/esm/data/mods/gen3/conditions.mjs.map +1 -1
- package/build/esm/data/mods/gen3/moves.mjs +5 -5
- package/build/esm/data/mods/gen3/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen3/scripts.mjs +2 -2
- package/build/esm/data/mods/gen3/scripts.mjs.map +1 -1
- package/build/esm/data/mods/gen4/abilities.mjs +4 -4
- package/build/esm/data/mods/gen4/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen4/conditions.mjs +1 -1
- package/build/esm/data/mods/gen4/conditions.mjs.map +1 -1
- package/build/esm/data/mods/gen4/items.mjs +2 -2
- package/build/esm/data/mods/gen4/items.mjs.map +1 -1
- package/build/esm/data/mods/gen4/moves.mjs +22 -22
- package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen4/scripts.mjs +1 -1
- package/build/esm/data/mods/gen4/scripts.mjs.map +1 -1
- package/build/esm/data/mods/gen5/abilities.mjs +1 -1
- package/build/esm/data/mods/gen5/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen5/conditions.mjs +2 -2
- package/build/esm/data/mods/gen5/conditions.mjs.map +1 -1
- package/build/esm/data/mods/gen5/moves.mjs +6 -6
- package/build/esm/data/mods/gen5/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen5/pokedex.mjs.map +1 -1
- package/build/esm/data/mods/gen6/abilities.mjs +2 -2
- package/build/esm/data/mods/gen6/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen6/moves.mjs +1 -1
- package/build/esm/data/mods/gen6/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen6/pokedex.mjs.map +1 -1
- package/build/esm/data/mods/gen7/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen7/moves.mjs +8 -8
- package/build/esm/data/mods/gen7/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen7/pokedex.mjs.map +1 -1
- package/build/esm/data/mods/gen8/abilities.mjs.map +1 -1
- package/build/esm/data/mods/gen8/moves.mjs.map +1 -1
- package/build/esm/data/mods/gen8/pokedex.mjs.map +1 -1
- package/build/esm/data/moves.mjs +105 -103
- package/build/esm/data/moves.mjs.map +1 -1
- package/build/esm/data/pokedex.mjs.map +1 -1
- package/build/esm/data/pokemongo.mjs.map +1 -1
- package/build/esm/data/rulesets.mjs +0 -1
- package/build/esm/data/rulesets.mjs.map +1 -1
- package/build/esm/data/tags.mjs.map +1 -1
- package/build/esm/data/text/abilities.mjs.map +1 -1
- package/build/esm/data/text/default.mjs.map +1 -1
- package/build/esm/data/text/items.mjs.map +1 -1
- package/build/esm/data/text/moves.mjs.map +1 -1
- package/build/esm/data/typechart.mjs.map +1 -1
- package/build/esm/lib/utils.d.mts +5 -5
- package/build/esm/lib/utils.mjs +21 -11
- package/build/esm/lib/utils.mjs.map +1 -1
- package/build/esm/sim/battle-actions.mjs +8 -8
- package/build/esm/sim/battle-actions.mjs.map +1 -1
- package/build/esm/sim/battle-queue.mjs +0 -1
- package/build/esm/sim/battle-queue.mjs.map +1 -1
- package/build/esm/sim/battle-stream.d.mts +3 -2
- package/build/esm/sim/battle-stream.mjs +1 -1
- package/build/esm/sim/battle-stream.mjs.map +1 -1
- package/build/esm/sim/battle.d.mts +8 -8
- package/build/esm/sim/battle.mjs +41 -44
- package/build/esm/sim/battle.mjs.map +1 -1
- package/build/esm/sim/dex-abilities.mjs.map +1 -1
- package/build/esm/sim/dex-conditions.mjs +2 -2
- package/build/esm/sim/dex-conditions.mjs.map +1 -1
- package/build/esm/sim/dex-data.mjs +1 -1
- package/build/esm/sim/dex-data.mjs.map +1 -1
- package/build/esm/sim/dex-formats.d.mts +1 -0
- package/build/esm/sim/dex-formats.mjs +95 -37
- package/build/esm/sim/dex-formats.mjs.map +1 -1
- package/build/esm/sim/dex-items.mjs.map +1 -1
- package/build/esm/sim/dex-moves.mjs +2 -3
- package/build/esm/sim/dex-moves.mjs.map +1 -1
- package/build/esm/sim/exported-global-types.d.mts +1 -9
- package/build/esm/sim/field.d.mts +1 -1
- package/build/esm/sim/field.mjs +3 -3
- package/build/esm/sim/field.mjs.map +1 -1
- package/build/esm/sim/global-types.d.mts +1 -9
- package/build/esm/sim/pokemon.d.mts +14 -25
- package/build/esm/sim/pokemon.mjs +21 -22
- package/build/esm/sim/pokemon.mjs.map +1 -1
- package/build/esm/sim/side.d.mts +105 -11
- package/build/esm/sim/side.mjs +6 -6
- package/build/esm/sim/side.mjs.map +1 -1
- package/build/esm/sim/state.d.mts +1 -1
- package/build/esm/sim/state.mjs +3 -3
- package/build/esm/sim/state.mjs.map +1 -1
- package/build/esm/sim/team-validator.d.mts +2 -1
- package/build/esm/sim/team-validator.mjs +37 -27
- package/build/esm/sim/team-validator.mjs.map +1 -1
- package/build/esm/sim/tools/random-player-ai.d.mts +4 -3
- package/build/esm/sim/tools/random-player-ai.mjs +6 -7
- package/build/esm/sim/tools/random-player-ai.mjs.map +1 -1
- package/build/esm/sim/tools/runner.d.mts +2 -2
- package/build/esm/sim/tools/runner.mjs +1 -1
- package/build/esm/sim/tools/runner.mjs.map +1 -1
- package/package.json +1 -1
package/build/esm/data/moves.mjs
CHANGED
|
@@ -356,7 +356,7 @@ export const Moves = {
|
|
|
356
356
|
// this.effectState.counter should never be undefined here.
|
|
357
357
|
// However, just in case, use 1 if it is undefined.
|
|
358
358
|
const counter = this.effectState.counter || 1;
|
|
359
|
-
this.debug(
|
|
359
|
+
this.debug(`Ally Switch success chance: ${Math.round(100 / counter)}%`);
|
|
360
360
|
const success = this.randomChance(1, counter);
|
|
361
361
|
if (!success) {
|
|
362
362
|
delete pokemon.volatiles['allyswitch'];
|
|
@@ -594,7 +594,7 @@ export const Moves = {
|
|
|
594
594
|
let success = false;
|
|
595
595
|
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
596
596
|
for (const ally of allies) {
|
|
597
|
-
if (ally !== source) {
|
|
597
|
+
if (ally !== source && !this.suppressingAbility(ally)) {
|
|
598
598
|
if (ally.hasAbility('sapsipper')) {
|
|
599
599
|
this.add('-immune', ally, '[from] ability: Sap Sipper');
|
|
600
600
|
continue;
|
|
@@ -760,10 +760,10 @@ export const Moves = {
|
|
|
760
760
|
return false;
|
|
761
761
|
}
|
|
762
762
|
if (effect.name === 'Cute Charm') {
|
|
763
|
-
this.add('-start', pokemon, 'Attract', '[from] ability: Cute Charm',
|
|
763
|
+
this.add('-start', pokemon, 'Attract', '[from] ability: Cute Charm', `[of] ${source}`);
|
|
764
764
|
}
|
|
765
765
|
else if (effect.name === 'Destiny Knot') {
|
|
766
|
-
this.add('-start', pokemon, 'Attract', '[from] item: Destiny Knot',
|
|
766
|
+
this.add('-start', pokemon, 'Attract', '[from] item: Destiny Knot', `[of] ${source}`);
|
|
767
767
|
}
|
|
768
768
|
else {
|
|
769
769
|
this.add('-start', pokemon, 'Attract');
|
|
@@ -771,7 +771,7 @@ export const Moves = {
|
|
|
771
771
|
},
|
|
772
772
|
onUpdate(pokemon) {
|
|
773
773
|
if (this.effectState.source && !this.effectState.source.isActive && pokemon.volatiles['attract']) {
|
|
774
|
-
this.debug(
|
|
774
|
+
this.debug(`Removing Attract volatile on ${pokemon}`);
|
|
775
775
|
pokemon.removeVolatile('attract');
|
|
776
776
|
}
|
|
777
777
|
},
|
|
@@ -954,7 +954,7 @@ export const Moves = {
|
|
|
954
954
|
basePowerCallback(pokemon, target, move) {
|
|
955
955
|
const damagedByTarget = pokemon.attackedBy.some(p => p.source === target && p.damage > 0 && p.thisTurn);
|
|
956
956
|
if (damagedByTarget) {
|
|
957
|
-
this.debug(
|
|
957
|
+
this.debug(`BP doubled for getting hit by ${target}`);
|
|
958
958
|
return move.basePower * 2;
|
|
959
959
|
}
|
|
960
960
|
return move.basePower;
|
|
@@ -1209,7 +1209,7 @@ export const Moves = {
|
|
|
1209
1209
|
basePowerCallback(pokemon, target, move) {
|
|
1210
1210
|
const currentSpecies = move.allies.shift().species;
|
|
1211
1211
|
const bp = 5 + Math.floor(currentSpecies.baseStats.atk / 10);
|
|
1212
|
-
this.debug(
|
|
1212
|
+
this.debug(`BP for ${currentSpecies.name} hit: ${bp}`);
|
|
1213
1213
|
return bp;
|
|
1214
1214
|
},
|
|
1215
1215
|
category: "Physical",
|
|
@@ -1313,7 +1313,7 @@ export const Moves = {
|
|
|
1313
1313
|
source.item = myItem.id;
|
|
1314
1314
|
return false;
|
|
1315
1315
|
}
|
|
1316
|
-
this.add('-item', target, myItem.name, '[from] move: Bestow',
|
|
1316
|
+
this.add('-item', target, myItem.name, '[from] move: Bestow', `[of] ${source}`);
|
|
1317
1317
|
},
|
|
1318
1318
|
secondary: null,
|
|
1319
1319
|
target: "normal",
|
|
@@ -2003,7 +2003,7 @@ export const Moves = {
|
|
|
2003
2003
|
onHit(target, source) {
|
|
2004
2004
|
const item = target.getItem();
|
|
2005
2005
|
if (source.hp && item.isBerry && target.takeItem(source)) {
|
|
2006
|
-
this.add('-enditem', target, item.name, '[from] stealeat', '[move] Bug Bite',
|
|
2006
|
+
this.add('-enditem', target, item.name, '[from] stealeat', '[move] Bug Bite', `[of] ${source}`);
|
|
2007
2007
|
if (this.singleEvent('Eat', item, null, source, null, null)) {
|
|
2008
2008
|
this.runEvent('EatItem', source, null, null, item);
|
|
2009
2009
|
if (item.id === 'leppaberry')
|
|
@@ -2811,7 +2811,7 @@ export const Moves = {
|
|
|
2811
2811
|
flags: { contact: 1, protect: 1, mirror: 1, failmefirst: 1 },
|
|
2812
2812
|
onTry(source) {
|
|
2813
2813
|
const lastDamagedBy = source.getLastDamagedBy(true);
|
|
2814
|
-
if (
|
|
2814
|
+
if (!lastDamagedBy?.thisTurn)
|
|
2815
2815
|
return false;
|
|
2816
2816
|
},
|
|
2817
2817
|
onModifyTarget(targetRelayVar, source, target, move) {
|
|
@@ -3056,7 +3056,7 @@ export const Moves = {
|
|
|
3056
3056
|
onHit(target, source) {
|
|
3057
3057
|
const item = target.takeItem(source);
|
|
3058
3058
|
if (item) {
|
|
3059
|
-
this.add('-enditem', target, item.name, '[from] move: Corrosive Gas',
|
|
3059
|
+
this.add('-enditem', target, item.name, '[from] move: Corrosive Gas', `[of] ${source}`);
|
|
3060
3060
|
}
|
|
3061
3061
|
else {
|
|
3062
3062
|
this.add('-fail', target, 'move: Corrosive Gas');
|
|
@@ -3272,7 +3272,7 @@ export const Moves = {
|
|
|
3272
3272
|
target.item = yourItem.id; // bypass setItem so we don't break choicelock or anything
|
|
3273
3273
|
return;
|
|
3274
3274
|
}
|
|
3275
|
-
this.add('-item', source, yourItem, '[from] move: Covet',
|
|
3275
|
+
this.add('-item', source, yourItem, '[from] move: Covet', `[of] ${target}`);
|
|
3276
3276
|
},
|
|
3277
3277
|
secondary: null,
|
|
3278
3278
|
target: "normal",
|
|
@@ -3406,7 +3406,7 @@ export const Moves = {
|
|
|
3406
3406
|
const hp = target.hp;
|
|
3407
3407
|
const maxHP = target.maxhp;
|
|
3408
3408
|
const bp = Math.floor(Math.floor((120 * (100 * Math.floor(hp * 4096 / maxHP)) + 2048 - 1) / 4096) / 100) || 1;
|
|
3409
|
-
this.debug(
|
|
3409
|
+
this.debug(`BP for ${hp}/${maxHP} HP: ${bp}`);
|
|
3410
3410
|
return bp;
|
|
3411
3411
|
},
|
|
3412
3412
|
category: "Physical",
|
|
@@ -3454,7 +3454,7 @@ export const Moves = {
|
|
|
3454
3454
|
},
|
|
3455
3455
|
condition: {
|
|
3456
3456
|
onStart(pokemon, source) {
|
|
3457
|
-
this.add('-start', pokemon, 'Curse',
|
|
3457
|
+
this.add('-start', pokemon, 'Curse', `[of] ${source}`);
|
|
3458
3458
|
},
|
|
3459
3459
|
onResidualOrder: 12,
|
|
3460
3460
|
onResidual(pokemon) {
|
|
@@ -3636,13 +3636,13 @@ export const Moves = {
|
|
|
3636
3636
|
if (target.side.removeSideCondition(targetCondition)) {
|
|
3637
3637
|
if (!removeAll.includes(targetCondition))
|
|
3638
3638
|
continue;
|
|
3639
|
-
this.add('-sideend', target.side, this.dex.conditions.get(targetCondition).name, '[from] move: Defog',
|
|
3639
|
+
this.add('-sideend', target.side, this.dex.conditions.get(targetCondition).name, '[from] move: Defog', `[of] ${source}`);
|
|
3640
3640
|
success = true;
|
|
3641
3641
|
}
|
|
3642
3642
|
}
|
|
3643
3643
|
for (const sideCondition of removeAll) {
|
|
3644
3644
|
if (source.side.removeSideCondition(sideCondition)) {
|
|
3645
|
-
this.add('-sideend', source.side, this.dex.conditions.get(sideCondition).name, '[from] move: Defog',
|
|
3645
|
+
this.add('-sideend', source.side, this.dex.conditions.get(sideCondition).name, '[from] move: Defog', `[of] ${source}`);
|
|
3646
3646
|
success = true;
|
|
3647
3647
|
}
|
|
3648
3648
|
}
|
|
@@ -3845,7 +3845,7 @@ export const Moves = {
|
|
|
3845
3845
|
}
|
|
3846
3846
|
}
|
|
3847
3847
|
if (effect.effectType === 'Ability') {
|
|
3848
|
-
this.add('-start', pokemon, 'Disable', pokemon.lastMove.name, '[from] ability: ' + effect.name,
|
|
3848
|
+
this.add('-start', pokemon, 'Disable', pokemon.lastMove.name, '[from] ability: ' + effect.name, `[of] ${source}`);
|
|
3849
3849
|
}
|
|
3850
3850
|
else {
|
|
3851
3851
|
this.add('-start', pokemon, 'Disable', pokemon.lastMove.name);
|
|
@@ -4054,7 +4054,7 @@ export const Moves = {
|
|
|
4054
4054
|
return false;
|
|
4055
4055
|
Object.assign(target.side.slotConditions[target.position]['futuremove'], {
|
|
4056
4056
|
move: 'doomdesire',
|
|
4057
|
-
source
|
|
4057
|
+
source,
|
|
4058
4058
|
moveData: {
|
|
4059
4059
|
id: 'doomdesire',
|
|
4060
4060
|
name: "Doom Desire",
|
|
@@ -4349,7 +4349,7 @@ export const Moves = {
|
|
|
4349
4349
|
basePower: 150,
|
|
4350
4350
|
basePowerCallback(pokemon, target, move) {
|
|
4351
4351
|
const bp = move.basePower * pokemon.hp / pokemon.maxhp;
|
|
4352
|
-
this.debug(
|
|
4352
|
+
this.debug(`BP: ${bp}`);
|
|
4353
4353
|
return bp;
|
|
4354
4354
|
},
|
|
4355
4355
|
category: "Special",
|
|
@@ -4635,7 +4635,7 @@ export const Moves = {
|
|
|
4635
4635
|
if (this.field.pseudoWeather.echoedvoice) {
|
|
4636
4636
|
bp = move.basePower * this.field.pseudoWeather.echoedvoice.multiplier;
|
|
4637
4637
|
}
|
|
4638
|
-
this.debug(
|
|
4638
|
+
this.debug(`BP: ${move.basePower}`);
|
|
4639
4639
|
return bp;
|
|
4640
4640
|
},
|
|
4641
4641
|
category: "Special",
|
|
@@ -4769,7 +4769,7 @@ export const Moves = {
|
|
|
4769
4769
|
},
|
|
4770
4770
|
onFieldStart(field, source, effect) {
|
|
4771
4771
|
if (effect?.effectType === 'Ability') {
|
|
4772
|
-
this.add('-fieldstart', 'move: Electric Terrain', '[from] ability: ' + effect.name,
|
|
4772
|
+
this.add('-fieldstart', 'move: Electric Terrain', '[from] ability: ' + effect.name, `[of] ${source}`);
|
|
4773
4773
|
}
|
|
4774
4774
|
else {
|
|
4775
4775
|
this.add('-fieldstart', 'move: Electric Terrain');
|
|
@@ -4830,7 +4830,7 @@ export const Moves = {
|
|
|
4830
4830
|
if (!isFinite(ratio))
|
|
4831
4831
|
ratio = 0;
|
|
4832
4832
|
const bp = [40, 60, 80, 120, 150][Math.min(ratio, 4)];
|
|
4833
|
-
this.debug(
|
|
4833
|
+
this.debug(`BP: ${bp}`);
|
|
4834
4834
|
return bp;
|
|
4835
4835
|
},
|
|
4836
4836
|
category: "Special",
|
|
@@ -5141,7 +5141,7 @@ export const Moves = {
|
|
|
5141
5141
|
basePower: 150,
|
|
5142
5142
|
basePowerCallback(pokemon, target, move) {
|
|
5143
5143
|
const bp = move.basePower * pokemon.hp / pokemon.maxhp;
|
|
5144
|
-
this.debug(
|
|
5144
|
+
this.debug(`BP: ${bp}`);
|
|
5145
5145
|
return bp;
|
|
5146
5146
|
},
|
|
5147
5147
|
category: "Special",
|
|
@@ -5828,7 +5828,7 @@ export const Moves = {
|
|
|
5828
5828
|
else {
|
|
5829
5829
|
bp = 20;
|
|
5830
5830
|
}
|
|
5831
|
-
this.debug(
|
|
5831
|
+
this.debug(`BP: ${bp}`);
|
|
5832
5832
|
return bp;
|
|
5833
5833
|
},
|
|
5834
5834
|
category: "Physical",
|
|
@@ -6035,7 +6035,7 @@ export const Moves = {
|
|
|
6035
6035
|
if (!item.fling)
|
|
6036
6036
|
return false;
|
|
6037
6037
|
move.basePower = item.fling.basePower;
|
|
6038
|
-
this.debug(
|
|
6038
|
+
this.debug(`BP: ${move.basePower}`);
|
|
6039
6039
|
if (item.isBerry) {
|
|
6040
6040
|
move.onHit = function (foe) {
|
|
6041
6041
|
if (this.singleEvent('Eat', item, null, foe, null, null)) {
|
|
@@ -6309,7 +6309,9 @@ export const Moves = {
|
|
|
6309
6309
|
name: "Focus Punch",
|
|
6310
6310
|
pp: 20,
|
|
6311
6311
|
priority: -3,
|
|
6312
|
-
flags: {
|
|
6312
|
+
flags: {
|
|
6313
|
+
contact: 1, protect: 1, punch: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1,
|
|
6314
|
+
},
|
|
6313
6315
|
priorityChargeCallback(pokemon) {
|
|
6314
6316
|
pokemon.addVolatile('focuspunch');
|
|
6315
6317
|
},
|
|
@@ -6630,7 +6632,7 @@ export const Moves = {
|
|
|
6630
6632
|
pokemon.addVolatile('furycutter');
|
|
6631
6633
|
}
|
|
6632
6634
|
const bp = this.clampIntRange(move.basePower * pokemon.volatiles['furycutter'].multiplier, 1, 160);
|
|
6633
|
-
this.debug(
|
|
6635
|
+
this.debug(`BP: ${bp}`);
|
|
6634
6636
|
return bp;
|
|
6635
6637
|
},
|
|
6636
6638
|
category: "Physical",
|
|
@@ -6726,7 +6728,7 @@ export const Moves = {
|
|
|
6726
6728
|
return false;
|
|
6727
6729
|
Object.assign(target.side.slotConditions[target.position]['futuremove'], {
|
|
6728
6730
|
move: 'futuresight',
|
|
6729
|
-
source
|
|
6731
|
+
source,
|
|
6730
6732
|
moveData: {
|
|
6731
6733
|
id: 'futuresight',
|
|
6732
6734
|
name: "Future Sight",
|
|
@@ -7614,7 +7616,7 @@ export const Moves = {
|
|
|
7614
7616
|
const steelHazard = this.dex.getActiveMove('Stealth Rock');
|
|
7615
7617
|
steelHazard.type = 'Steel';
|
|
7616
7618
|
const typeMod = this.clampIntRange(pokemon.runEffectiveness(steelHazard), -6, 6);
|
|
7617
|
-
this.damage(pokemon.maxhp *
|
|
7619
|
+
this.damage(pokemon.maxhp * (2 ** typeMod) / 8);
|
|
7618
7620
|
},
|
|
7619
7621
|
},
|
|
7620
7622
|
secondary: null,
|
|
@@ -7908,13 +7910,13 @@ export const Moves = {
|
|
|
7908
7910
|
if (source.side.foe.removeSideCondition(targetCondition)) {
|
|
7909
7911
|
if (!removeAll.includes(targetCondition))
|
|
7910
7912
|
continue;
|
|
7911
|
-
this.add('-sideend', source.side.foe, this.dex.conditions.get(targetCondition).name, '[from] move: G-Max Wind Rage',
|
|
7913
|
+
this.add('-sideend', source.side.foe, this.dex.conditions.get(targetCondition).name, '[from] move: G-Max Wind Rage', `[of] ${source}`);
|
|
7912
7914
|
success = true;
|
|
7913
7915
|
}
|
|
7914
7916
|
}
|
|
7915
7917
|
for (const sideCondition of removeAll) {
|
|
7916
7918
|
if (source.side.removeSideCondition(sideCondition)) {
|
|
7917
|
-
this.add('-sideend', source.side, this.dex.conditions.get(sideCondition).name, '[from] move: G-Max Wind Rage',
|
|
7919
|
+
this.add('-sideend', source.side, this.dex.conditions.get(sideCondition).name, '[from] move: G-Max Wind Rage', `[of] ${source}`);
|
|
7918
7920
|
success = true;
|
|
7919
7921
|
}
|
|
7920
7922
|
}
|
|
@@ -7952,7 +7954,7 @@ export const Moves = {
|
|
|
7952
7954
|
else {
|
|
7953
7955
|
bp = 20;
|
|
7954
7956
|
}
|
|
7955
|
-
this.debug(
|
|
7957
|
+
this.debug(`BP: ${bp}`);
|
|
7956
7958
|
return bp;
|
|
7957
7959
|
},
|
|
7958
7960
|
category: "Special",
|
|
@@ -8102,7 +8104,7 @@ export const Moves = {
|
|
|
8102
8104
|
},
|
|
8103
8105
|
onFieldStart(field, source, effect) {
|
|
8104
8106
|
if (effect?.effectType === 'Ability') {
|
|
8105
|
-
this.add('-fieldstart', 'move: Grassy Terrain', '[from] ability: ' + effect.name,
|
|
8107
|
+
this.add('-fieldstart', 'move: Grassy Terrain', '[from] ability: ' + effect.name, `[of] ${source}`);
|
|
8106
8108
|
}
|
|
8107
8109
|
else {
|
|
8108
8110
|
this.add('-fieldstart', 'move: Grassy Terrain');
|
|
@@ -8369,7 +8371,7 @@ export const Moves = {
|
|
|
8369
8371
|
const newspd = Math.floor((target.storedStats.spd + source.storedStats.spd) / 2);
|
|
8370
8372
|
target.storedStats.spd = newspd;
|
|
8371
8373
|
source.storedStats.spd = newspd;
|
|
8372
|
-
this.add('-activate', source, 'move: Guard Split',
|
|
8374
|
+
this.add('-activate', source, 'move: Guard Split', `[of] ${target}`);
|
|
8373
8375
|
},
|
|
8374
8376
|
secondary: null,
|
|
8375
8377
|
target: "normal",
|
|
@@ -8462,7 +8464,7 @@ export const Moves = {
|
|
|
8462
8464
|
power = 1;
|
|
8463
8465
|
if (power > 150)
|
|
8464
8466
|
power = 150;
|
|
8465
|
-
this.debug(
|
|
8467
|
+
this.debug(`BP: ${power}`);
|
|
8466
8468
|
return power;
|
|
8467
8469
|
},
|
|
8468
8470
|
category: "Physical",
|
|
@@ -8557,7 +8559,7 @@ export const Moves = {
|
|
|
8557
8559
|
const hp = target.hp;
|
|
8558
8560
|
const maxHP = target.maxhp;
|
|
8559
8561
|
const bp = Math.floor(Math.floor((100 * (100 * Math.floor(hp * 4096 / maxHP)) + 2048 - 1) / 4096) / 100) || 1;
|
|
8560
|
-
this.debug(
|
|
8562
|
+
this.debug(`BP for ${hp}/${maxHP} HP: ${bp}`);
|
|
8561
8563
|
return bp;
|
|
8562
8564
|
},
|
|
8563
8565
|
category: "Physical",
|
|
@@ -8671,7 +8673,7 @@ export const Moves = {
|
|
|
8671
8673
|
let success = false;
|
|
8672
8674
|
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
8673
8675
|
for (const ally of allies) {
|
|
8674
|
-
if (ally !== source) {
|
|
8676
|
+
if (ally !== source && !this.suppressingAbility(ally)) {
|
|
8675
8677
|
if (ally.hasAbility('soundproof')) {
|
|
8676
8678
|
this.add('-immune', ally, '[from] ability: Soundproof');
|
|
8677
8679
|
continue;
|
|
@@ -8915,7 +8917,7 @@ export const Moves = {
|
|
|
8915
8917
|
else {
|
|
8916
8918
|
bp = 40;
|
|
8917
8919
|
}
|
|
8918
|
-
this.debug(
|
|
8920
|
+
this.debug(`BP: ${bp}`);
|
|
8919
8921
|
return bp;
|
|
8920
8922
|
},
|
|
8921
8923
|
category: "Physical",
|
|
@@ -8977,7 +8979,7 @@ export const Moves = {
|
|
|
8977
8979
|
else {
|
|
8978
8980
|
bp = 40;
|
|
8979
8981
|
}
|
|
8980
|
-
this.debug(
|
|
8982
|
+
this.debug(`BP: ${bp}`);
|
|
8981
8983
|
return bp;
|
|
8982
8984
|
},
|
|
8983
8985
|
category: "Physical",
|
|
@@ -9017,11 +9019,11 @@ export const Moves = {
|
|
|
9017
9019
|
duration: 1,
|
|
9018
9020
|
onStart(target, source) {
|
|
9019
9021
|
this.effectState.multiplier = 1.5;
|
|
9020
|
-
this.add('-singleturn', target, 'Helping Hand',
|
|
9022
|
+
this.add('-singleturn', target, 'Helping Hand', `[of] ${source}`);
|
|
9021
9023
|
},
|
|
9022
9024
|
onRestart(target, source) {
|
|
9023
9025
|
this.effectState.multiplier *= 1.5;
|
|
9024
|
-
this.add('-singleturn', target, 'Helping Hand',
|
|
9026
|
+
this.add('-singleturn', target, 'Helping Hand', `[of] ${source}`);
|
|
9025
9027
|
},
|
|
9026
9028
|
onBasePowerPriority: 10,
|
|
9027
9029
|
onBasePower(basePower) {
|
|
@@ -9709,7 +9711,7 @@ export const Moves = {
|
|
|
9709
9711
|
let bp = move.basePower;
|
|
9710
9712
|
const iceballData = pokemon.volatiles['iceball'];
|
|
9711
9713
|
if (iceballData?.hitCount) {
|
|
9712
|
-
bp *=
|
|
9714
|
+
bp *= 2 ** iceballData.contactHitCount;
|
|
9713
9715
|
}
|
|
9714
9716
|
if (iceballData && pokemon.status !== 'slp') {
|
|
9715
9717
|
iceballData.hitCount++;
|
|
@@ -9721,7 +9723,7 @@ export const Moves = {
|
|
|
9721
9723
|
if (pokemon.volatiles['defensecurl']) {
|
|
9722
9724
|
bp *= 2;
|
|
9723
9725
|
}
|
|
9724
|
-
this.debug(
|
|
9726
|
+
this.debug(`BP: ${bp}`);
|
|
9725
9727
|
return bp;
|
|
9726
9728
|
},
|
|
9727
9729
|
category: "Physical",
|
|
@@ -10141,7 +10143,7 @@ export const Moves = {
|
|
|
10141
10143
|
(target.moveSlots[moveIndex] && target.moveSlots[moveIndex].pp <= 0)) {
|
|
10142
10144
|
return false;
|
|
10143
10145
|
}
|
|
10144
|
-
this.add('-singleturn', target, 'move: Instruct',
|
|
10146
|
+
this.add('-singleturn', target, 'move: Instruct', `[of] ${source}`);
|
|
10145
10147
|
this.queue.prioritizeAction(this.queue.resolveAction({
|
|
10146
10148
|
choice: 'move',
|
|
10147
10149
|
pokemon: target,
|
|
@@ -10482,7 +10484,7 @@ export const Moves = {
|
|
|
10482
10484
|
if (source.hp) {
|
|
10483
10485
|
const item = target.takeItem();
|
|
10484
10486
|
if (item) {
|
|
10485
|
-
this.add('-enditem', target, item.name, '[from] move: Knock Off',
|
|
10487
|
+
this.add('-enditem', target, item.name, '[from] move: Knock Off', `[of] ${source}`);
|
|
10486
10488
|
}
|
|
10487
10489
|
}
|
|
10488
10490
|
},
|
|
@@ -10936,7 +10938,7 @@ export const Moves = {
|
|
|
10936
10938
|
},
|
|
10937
10939
|
onHit(target, source) {
|
|
10938
10940
|
source.addVolatile('lockon', target);
|
|
10939
|
-
this.add('-activate', source, 'move: Lock-On',
|
|
10941
|
+
this.add('-activate', source, 'move: Lock-On', `[of] ${target}`);
|
|
10940
10942
|
},
|
|
10941
10943
|
condition: {
|
|
10942
10944
|
noCopy: true, // doesn't get copied by Baton Pass
|
|
@@ -10999,7 +11001,7 @@ export const Moves = {
|
|
|
10999
11001
|
else {
|
|
11000
11002
|
bp = 20;
|
|
11001
11003
|
}
|
|
11002
|
-
this.debug(
|
|
11004
|
+
this.debug(`BP: ${bp}`);
|
|
11003
11005
|
return bp;
|
|
11004
11006
|
},
|
|
11005
11007
|
category: "Physical",
|
|
@@ -11316,10 +11318,10 @@ export const Moves = {
|
|
|
11316
11318
|
},
|
|
11317
11319
|
onFieldStart(target, source) {
|
|
11318
11320
|
if (source?.hasAbility('persistent')) {
|
|
11319
|
-
this.add('-fieldstart', 'move: Magic Room',
|
|
11321
|
+
this.add('-fieldstart', 'move: Magic Room', `[of] ${source}`, '[persistent]');
|
|
11320
11322
|
}
|
|
11321
11323
|
else {
|
|
11322
|
-
this.add('-fieldstart', 'move: Magic Room',
|
|
11324
|
+
this.add('-fieldstart', 'move: Magic Room', `[of] ${source}`);
|
|
11323
11325
|
}
|
|
11324
11326
|
for (const mon of this.getAllActive()) {
|
|
11325
11327
|
this.singleEvent('End', mon.getItem(), mon.itemState, mon);
|
|
@@ -12269,7 +12271,7 @@ export const Moves = {
|
|
|
12269
12271
|
flags: { protect: 1, mirror: 1, metronome: 1, failmefirst: 1 },
|
|
12270
12272
|
onTry(source) {
|
|
12271
12273
|
const lastDamagedBy = source.getLastDamagedBy(true);
|
|
12272
|
-
if (
|
|
12274
|
+
if (!lastDamagedBy?.thisTurn)
|
|
12273
12275
|
return false;
|
|
12274
12276
|
},
|
|
12275
12277
|
onModifyTarget(targetRelayVar, source, target, move) {
|
|
@@ -12522,7 +12524,7 @@ export const Moves = {
|
|
|
12522
12524
|
},
|
|
12523
12525
|
onHit(target, source) {
|
|
12524
12526
|
source.addVolatile('lockon', target);
|
|
12525
|
-
this.add('-activate', source, 'move: Mind Reader',
|
|
12527
|
+
this.add('-activate', source, 'move: Mind Reader', `[of] ${target}`);
|
|
12526
12528
|
},
|
|
12527
12529
|
secondary: null,
|
|
12528
12530
|
target: "normal",
|
|
@@ -12828,7 +12830,7 @@ export const Moves = {
|
|
|
12828
12830
|
},
|
|
12829
12831
|
onFieldStart(field, source, effect) {
|
|
12830
12832
|
if (effect?.effectType === 'Ability') {
|
|
12831
|
-
this.add('-fieldstart', 'move: Misty Terrain', '[from] ability: ' + effect.name,
|
|
12833
|
+
this.add('-fieldstart', 'move: Misty Terrain', '[from] ability: ' + effect.name, `[of] ${source}`);
|
|
12832
12834
|
}
|
|
12833
12835
|
else {
|
|
12834
12836
|
this.add('-fieldstart', 'move: Misty Terrain');
|
|
@@ -12966,12 +12968,12 @@ export const Moves = {
|
|
|
12966
12968
|
onAfterHit(target, pokemon, move) {
|
|
12967
12969
|
if (!move.hasSheerForce) {
|
|
12968
12970
|
if (pokemon.hp && pokemon.removeVolatile('leechseed')) {
|
|
12969
|
-
this.add('-end', pokemon, 'Leech Seed', '[from] move: Mortal Spin',
|
|
12971
|
+
this.add('-end', pokemon, 'Leech Seed', '[from] move: Mortal Spin', `[of] ${pokemon}`);
|
|
12970
12972
|
}
|
|
12971
12973
|
const sideConditions = ['spikes', 'toxicspikes', 'stealthrock', 'stickyweb', 'gmaxsteelsurge'];
|
|
12972
12974
|
for (const condition of sideConditions) {
|
|
12973
12975
|
if (pokemon.hp && pokemon.side.removeSideCondition(condition)) {
|
|
12974
|
-
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Mortal Spin',
|
|
12976
|
+
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Mortal Spin', `[of] ${pokemon}`);
|
|
12975
12977
|
}
|
|
12976
12978
|
}
|
|
12977
12979
|
if (pokemon.hp && pokemon.volatiles['partiallytrapped']) {
|
|
@@ -12982,12 +12984,12 @@ export const Moves = {
|
|
|
12982
12984
|
onAfterSubDamage(damage, target, pokemon, move) {
|
|
12983
12985
|
if (!move.hasSheerForce) {
|
|
12984
12986
|
if (pokemon.hp && pokemon.removeVolatile('leechseed')) {
|
|
12985
|
-
this.add('-end', pokemon, 'Leech Seed', '[from] move: Mortal Spin',
|
|
12987
|
+
this.add('-end', pokemon, 'Leech Seed', '[from] move: Mortal Spin', `[of] ${pokemon}`);
|
|
12986
12988
|
}
|
|
12987
12989
|
const sideConditions = ['spikes', 'toxicspikes', 'stealthrock', 'stickyweb', 'gmaxsteelsurge'];
|
|
12988
12990
|
for (const condition of sideConditions) {
|
|
12989
12991
|
if (pokemon.hp && pokemon.side.removeSideCondition(condition)) {
|
|
12990
|
-
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Mortal Spin',
|
|
12992
|
+
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Mortal Spin', `[of] ${pokemon}`);
|
|
12991
12993
|
}
|
|
12992
12994
|
}
|
|
12993
12995
|
if (pokemon.hp && pokemon.volatiles['partiallytrapped']) {
|
|
@@ -13090,7 +13092,7 @@ export const Moves = {
|
|
|
13090
13092
|
condition: {
|
|
13091
13093
|
duration: 5,
|
|
13092
13094
|
onFieldStart(field, source) {
|
|
13093
|
-
this.add('-fieldstart', 'move: Mud Sport',
|
|
13095
|
+
this.add('-fieldstart', 'move: Mud Sport', `[of] ${source}`);
|
|
13094
13096
|
},
|
|
13095
13097
|
onBasePowerPriority: 1,
|
|
13096
13098
|
onBasePower(basePower, attacker, defender, move) {
|
|
@@ -13234,7 +13236,7 @@ export const Moves = {
|
|
|
13234
13236
|
if (!item.naturalGift)
|
|
13235
13237
|
return false;
|
|
13236
13238
|
move.basePower = item.naturalGift.basePower;
|
|
13237
|
-
this.debug(
|
|
13239
|
+
this.debug(`BP: ${move.basePower}`);
|
|
13238
13240
|
pokemon.setItem('');
|
|
13239
13241
|
pokemon.lastItem = item.id;
|
|
13240
13242
|
pokemon.usedItemThisTurn = true;
|
|
@@ -13631,7 +13633,7 @@ export const Moves = {
|
|
|
13631
13633
|
volatileStatus: 'octolock',
|
|
13632
13634
|
condition: {
|
|
13633
13635
|
onStart(pokemon, source) {
|
|
13634
|
-
this.add('-start', pokemon, 'move: Octolock',
|
|
13636
|
+
this.add('-start', pokemon, 'move: Octolock', `[of] ${source}`);
|
|
13635
13637
|
},
|
|
13636
13638
|
onResidualOrder: 14,
|
|
13637
13639
|
onResidual(pokemon) {
|
|
@@ -13644,7 +13646,7 @@ export const Moves = {
|
|
|
13644
13646
|
this.boost({ def: -1, spd: -1 }, pokemon, source, this.dex.getActiveMove('octolock'));
|
|
13645
13647
|
},
|
|
13646
13648
|
onTrapPokemon(pokemon) {
|
|
13647
|
-
if (this.effectState.source
|
|
13649
|
+
if (this.effectState.source?.isActive)
|
|
13648
13650
|
pokemon.tryTrap();
|
|
13649
13651
|
},
|
|
13650
13652
|
},
|
|
@@ -13950,7 +13952,7 @@ export const Moves = {
|
|
|
13950
13952
|
onResidualOrder: 24,
|
|
13951
13953
|
onResidual(pokemon) {
|
|
13952
13954
|
const duration = pokemon.volatiles['perishsong'].duration;
|
|
13953
|
-
this.add('-start', pokemon,
|
|
13955
|
+
this.add('-start', pokemon, `perish${duration}`);
|
|
13954
13956
|
},
|
|
13955
13957
|
},
|
|
13956
13958
|
secondary: null,
|
|
@@ -14050,7 +14052,7 @@ export const Moves = {
|
|
|
14050
14052
|
basePower: 0,
|
|
14051
14053
|
basePowerCallback(pokemon) {
|
|
14052
14054
|
const bp = Math.floor((pokemon.happiness * 10) / 25) || 1;
|
|
14053
|
-
this.debug(
|
|
14055
|
+
this.debug(`BP: ${bp}`);
|
|
14054
14056
|
return bp;
|
|
14055
14057
|
},
|
|
14056
14058
|
category: "Special",
|
|
@@ -14146,7 +14148,7 @@ export const Moves = {
|
|
|
14146
14148
|
onHit(target, source) {
|
|
14147
14149
|
const item = target.getItem();
|
|
14148
14150
|
if (source.hp && item.isBerry && target.takeItem(source)) {
|
|
14149
|
-
this.add('-enditem', target, item.name, '[from] stealeat', '[move] Pluck',
|
|
14151
|
+
this.add('-enditem', target, item.name, '[from] stealeat', '[move] Pluck', `[of] ${source}`);
|
|
14150
14152
|
if (this.singleEvent('Eat', item, null, source, null, null)) {
|
|
14151
14153
|
this.runEvent('EatItem', source, null, null, item);
|
|
14152
14154
|
if (item.id === 'leppaberry')
|
|
@@ -14490,7 +14492,7 @@ export const Moves = {
|
|
|
14490
14492
|
const newspa = Math.floor((target.storedStats.spa + source.storedStats.spa) / 2);
|
|
14491
14493
|
target.storedStats.spa = newspa;
|
|
14492
14494
|
source.storedStats.spa = newspa;
|
|
14493
|
-
this.add('-activate', source, 'move: Power Split',
|
|
14495
|
+
this.add('-activate', source, 'move: Power Split', `[of] ${target}`);
|
|
14494
14496
|
},
|
|
14495
14497
|
secondary: null,
|
|
14496
14498
|
target: "normal",
|
|
@@ -14572,7 +14574,7 @@ export const Moves = {
|
|
|
14572
14574
|
basePower: 20,
|
|
14573
14575
|
basePowerCallback(pokemon, target, move) {
|
|
14574
14576
|
const bp = move.basePower + 20 * pokemon.positiveBoosts();
|
|
14575
|
-
this.debug(
|
|
14577
|
+
this.debug(`BP: ${bp}`);
|
|
14576
14578
|
return bp;
|
|
14577
14579
|
},
|
|
14578
14580
|
category: "Physical",
|
|
@@ -14907,7 +14909,7 @@ export const Moves = {
|
|
|
14907
14909
|
},
|
|
14908
14910
|
onFieldStart(field, source, effect) {
|
|
14909
14911
|
if (effect?.effectType === 'Ability') {
|
|
14910
|
-
this.add('-fieldstart', 'move: Psychic Terrain', '[from] ability: ' + effect.name,
|
|
14912
|
+
this.add('-fieldstart', 'move: Psychic Terrain', '[from] ability: ' + effect.name, `[of] ${source}`);
|
|
14911
14913
|
}
|
|
14912
14914
|
else {
|
|
14913
14915
|
this.add('-fieldstart', 'move: Psychic Terrain');
|
|
@@ -15077,7 +15079,7 @@ export const Moves = {
|
|
|
15077
15079
|
let power = 60 + 20 * target.positiveBoosts();
|
|
15078
15080
|
if (power > 200)
|
|
15079
15081
|
power = 200;
|
|
15080
|
-
this.debug(
|
|
15082
|
+
this.debug(`BP: ${power}`);
|
|
15081
15083
|
return power;
|
|
15082
15084
|
},
|
|
15083
15085
|
category: "Physical",
|
|
@@ -15488,12 +15490,12 @@ export const Moves = {
|
|
|
15488
15490
|
onAfterHit(target, pokemon, move) {
|
|
15489
15491
|
if (!move.hasSheerForce) {
|
|
15490
15492
|
if (pokemon.hp && pokemon.removeVolatile('leechseed')) {
|
|
15491
|
-
this.add('-end', pokemon, 'Leech Seed', '[from] move: Rapid Spin',
|
|
15493
|
+
this.add('-end', pokemon, 'Leech Seed', '[from] move: Rapid Spin', `[of] ${pokemon}`);
|
|
15492
15494
|
}
|
|
15493
15495
|
const sideConditions = ['spikes', 'toxicspikes', 'stealthrock', 'stickyweb', 'gmaxsteelsurge'];
|
|
15494
15496
|
for (const condition of sideConditions) {
|
|
15495
15497
|
if (pokemon.hp && pokemon.side.removeSideCondition(condition)) {
|
|
15496
|
-
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Rapid Spin',
|
|
15498
|
+
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Rapid Spin', `[of] ${pokemon}`);
|
|
15497
15499
|
}
|
|
15498
15500
|
}
|
|
15499
15501
|
if (pokemon.hp && pokemon.volatiles['partiallytrapped']) {
|
|
@@ -15504,12 +15506,12 @@ export const Moves = {
|
|
|
15504
15506
|
onAfterSubDamage(damage, target, pokemon, move) {
|
|
15505
15507
|
if (!move.hasSheerForce) {
|
|
15506
15508
|
if (pokemon.hp && pokemon.removeVolatile('leechseed')) {
|
|
15507
|
-
this.add('-end', pokemon, 'Leech Seed', '[from] move: Rapid Spin',
|
|
15509
|
+
this.add('-end', pokemon, 'Leech Seed', '[from] move: Rapid Spin', `[of] ${pokemon}`);
|
|
15508
15510
|
}
|
|
15509
15511
|
const sideConditions = ['spikes', 'toxicspikes', 'stealthrock', 'stickyweb', 'gmaxsteelsurge'];
|
|
15510
15512
|
for (const condition of sideConditions) {
|
|
15511
15513
|
if (pokemon.hp && pokemon.side.removeSideCondition(condition)) {
|
|
15512
|
-
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Rapid Spin',
|
|
15514
|
+
this.add('-sideend', pokemon.side, this.dex.conditions.get(condition).name, '[from] move: Rapid Spin', `[of] ${pokemon}`);
|
|
15513
15515
|
}
|
|
15514
15516
|
}
|
|
15515
15517
|
if (pokemon.hp && pokemon.volatiles['partiallytrapped']) {
|
|
@@ -15696,7 +15698,7 @@ export const Moves = {
|
|
|
15696
15698
|
return false;
|
|
15697
15699
|
}
|
|
15698
15700
|
}
|
|
15699
|
-
this.add('-start', source, 'typechange', '[from] move: Reflect Type',
|
|
15701
|
+
this.add('-start', source, 'typechange', '[from] move: Reflect Type', `[of] ${target}`);
|
|
15700
15702
|
source.setType(newBaseTypes);
|
|
15701
15703
|
source.addedType = target.addedType;
|
|
15702
15704
|
source.knownType = target.isAlly(source) && target.knownType;
|
|
@@ -15776,11 +15778,11 @@ export const Moves = {
|
|
|
15776
15778
|
}
|
|
15777
15779
|
// insomnia and vital spirit checks are separate so that the message is accurate in multi-ability mods
|
|
15778
15780
|
if (source.hasAbility('insomnia')) {
|
|
15779
|
-
this.add('-fail', source, '[from] ability: Insomnia',
|
|
15781
|
+
this.add('-fail', source, '[from] ability: Insomnia', `[of] ${source}`);
|
|
15780
15782
|
return null;
|
|
15781
15783
|
}
|
|
15782
15784
|
if (source.hasAbility('vitalspirit')) {
|
|
15783
|
-
this.add('-fail', source, '[from] ability: Vital Spirit',
|
|
15785
|
+
this.add('-fail', source, '[from] ability: Vital Spirit', `[of] ${source}`);
|
|
15784
15786
|
return null;
|
|
15785
15787
|
}
|
|
15786
15788
|
},
|
|
@@ -15868,7 +15870,7 @@ export const Moves = {
|
|
|
15868
15870
|
basePowerCallback(pokemon, target, move) {
|
|
15869
15871
|
const damagedByTarget = pokemon.attackedBy.some(p => p.source === target && p.damage > 0 && p.thisTurn);
|
|
15870
15872
|
if (damagedByTarget) {
|
|
15871
|
-
this.debug(
|
|
15873
|
+
this.debug(`BP doubled for getting hit by ${target}`);
|
|
15872
15874
|
return move.basePower * 2;
|
|
15873
15875
|
}
|
|
15874
15876
|
return move.basePower;
|
|
@@ -15909,7 +15911,7 @@ export const Moves = {
|
|
|
15909
15911
|
else {
|
|
15910
15912
|
bp = 20;
|
|
15911
15913
|
}
|
|
15912
|
-
this.debug(
|
|
15914
|
+
this.debug(`BP: ${bp}`);
|
|
15913
15915
|
return bp;
|
|
15914
15916
|
},
|
|
15915
15917
|
category: "Physical",
|
|
@@ -16163,7 +16165,7 @@ export const Moves = {
|
|
|
16163
16165
|
onHit(target, source) {
|
|
16164
16166
|
const oldAbility = source.setAbility(target.ability);
|
|
16165
16167
|
if (oldAbility) {
|
|
16166
|
-
this.add('-ability', source, source.getAbility().name, '[from] move: Role Play',
|
|
16168
|
+
this.add('-ability', source, source.getAbility().name, '[from] move: Role Play', `[of] ${target}`);
|
|
16167
16169
|
return;
|
|
16168
16170
|
}
|
|
16169
16171
|
return oldAbility;
|
|
@@ -16200,7 +16202,7 @@ export const Moves = {
|
|
|
16200
16202
|
let bp = move.basePower;
|
|
16201
16203
|
const rolloutData = pokemon.volatiles['rollout'];
|
|
16202
16204
|
if (rolloutData?.hitCount) {
|
|
16203
|
-
bp *=
|
|
16205
|
+
bp *= 2 ** rolloutData.contactHitCount;
|
|
16204
16206
|
}
|
|
16205
16207
|
if (rolloutData && pokemon.status !== 'slp') {
|
|
16206
16208
|
rolloutData.hitCount++;
|
|
@@ -16212,7 +16214,7 @@ export const Moves = {
|
|
|
16212
16214
|
if (pokemon.volatiles['defensecurl']) {
|
|
16213
16215
|
bp *= 2;
|
|
16214
16216
|
}
|
|
16215
|
-
this.debug(
|
|
16217
|
+
this.debug(`BP: ${bp}`);
|
|
16216
16218
|
return bp;
|
|
16217
16219
|
},
|
|
16218
16220
|
category: "Physical",
|
|
@@ -17514,17 +17516,17 @@ export const Moves = {
|
|
|
17514
17516
|
const targetAbility = target.getAbility();
|
|
17515
17517
|
const sourceAbility = source.getAbility();
|
|
17516
17518
|
if (target.isAlly(source)) {
|
|
17517
|
-
this.add('-activate', source, 'move: Skill Swap', '', '',
|
|
17519
|
+
this.add('-activate', source, 'move: Skill Swap', '', '', `[of] ${target}`);
|
|
17518
17520
|
}
|
|
17519
17521
|
else {
|
|
17520
|
-
this.add('-activate', source, 'move: Skill Swap', targetAbility, sourceAbility,
|
|
17522
|
+
this.add('-activate', source, 'move: Skill Swap', targetAbility, sourceAbility, `[of] ${target}`);
|
|
17521
17523
|
}
|
|
17522
17524
|
this.singleEvent('End', sourceAbility, source.abilityState, source);
|
|
17523
17525
|
this.singleEvent('End', targetAbility, target.abilityState, target);
|
|
17524
17526
|
source.ability = targetAbility.id;
|
|
17525
17527
|
target.ability = sourceAbility.id;
|
|
17526
17528
|
source.abilityState = this.initEffectState({ id: this.toID(source.ability), target: source });
|
|
17527
|
-
target.abilityState = this.initEffectState({ id: this.toID(target.ability), target
|
|
17529
|
+
target.abilityState = this.initEffectState({ id: this.toID(target.ability), target });
|
|
17528
17530
|
source.volatileStaleness = undefined;
|
|
17529
17531
|
if (!target.isAlly(source))
|
|
17530
17532
|
target.volatileStaleness = 'external';
|
|
@@ -18082,7 +18084,7 @@ export const Moves = {
|
|
|
18082
18084
|
return;
|
|
18083
18085
|
}
|
|
18084
18086
|
snatchUser.removeVolatile('snatch');
|
|
18085
|
-
this.add('-activate', snatchUser, 'move: Snatch',
|
|
18087
|
+
this.add('-activate', snatchUser, 'move: Snatch', `[of] ${source}`);
|
|
18086
18088
|
this.actions.useMove(move.id, snatchUser);
|
|
18087
18089
|
return null;
|
|
18088
18090
|
},
|
|
@@ -18402,7 +18404,7 @@ export const Moves = {
|
|
|
18402
18404
|
const targetSpe = target.storedStats.spe;
|
|
18403
18405
|
target.storedStats.spe = source.storedStats.spe;
|
|
18404
18406
|
source.storedStats.spe = targetSpe;
|
|
18405
|
-
this.add('-activate', source, 'move: Speed Swap',
|
|
18407
|
+
this.add('-activate', source, 'move: Speed Swap', `[of] ${target}`);
|
|
18406
18408
|
},
|
|
18407
18409
|
secondary: null,
|
|
18408
18410
|
target: "normal",
|
|
@@ -18819,7 +18821,7 @@ export const Moves = {
|
|
|
18819
18821
|
if (pokemon.hasItem('heavydutyboots'))
|
|
18820
18822
|
return;
|
|
18821
18823
|
const typeMod = this.clampIntRange(pokemon.runEffectiveness(this.dex.getActiveMove('stealthrock')), -6, 6);
|
|
18822
|
-
this.damage(pokemon.maxhp *
|
|
18824
|
+
this.damage(pokemon.maxhp * (2 ** typeMod) / 8);
|
|
18823
18825
|
},
|
|
18824
18826
|
},
|
|
18825
18827
|
secondary: null,
|
|
@@ -19124,7 +19126,7 @@ export const Moves = {
|
|
|
19124
19126
|
basePower: 20,
|
|
19125
19127
|
basePowerCallback(pokemon, target, move) {
|
|
19126
19128
|
const bp = move.basePower + 20 * pokemon.positiveBoosts();
|
|
19127
|
-
this.debug(
|
|
19129
|
+
this.debug(`BP: ${bp}`);
|
|
19128
19130
|
return bp;
|
|
19129
19131
|
},
|
|
19130
19132
|
category: "Special",
|
|
@@ -19720,7 +19722,7 @@ export const Moves = {
|
|
|
19720
19722
|
source.item = myItem.id;
|
|
19721
19723
|
return false;
|
|
19722
19724
|
}
|
|
19723
|
-
this.add('-activate', source, 'move: Trick',
|
|
19725
|
+
this.add('-activate', source, 'move: Trick', `[of] ${target}`);
|
|
19724
19726
|
if (myItem) {
|
|
19725
19727
|
target.setItem(myItem);
|
|
19726
19728
|
this.add('-item', target, myItem, '[from] move: Switcheroo');
|
|
@@ -20410,8 +20412,8 @@ export const Moves = {
|
|
|
20410
20412
|
target.item = yourItem.id; // bypass setItem so we don't break choicelock or anything
|
|
20411
20413
|
return;
|
|
20412
20414
|
}
|
|
20413
|
-
this.add('-enditem', target, yourItem, '[silent]', '[from] move: Thief',
|
|
20414
|
-
this.add('-item', source, yourItem, '[from] move: Thief',
|
|
20415
|
+
this.add('-enditem', target, yourItem, '[silent]', '[from] move: Thief', `[of] ${source}`);
|
|
20416
|
+
this.add('-item', source, yourItem, '[from] move: Thief', `[of] ${target}`);
|
|
20415
20417
|
},
|
|
20416
20418
|
secondary: null,
|
|
20417
20419
|
target: "normal",
|
|
@@ -20888,11 +20890,11 @@ export const Moves = {
|
|
|
20888
20890
|
if (!pokemon.isGrounded())
|
|
20889
20891
|
return;
|
|
20890
20892
|
if (pokemon.hasType('Poison')) {
|
|
20891
|
-
this.add('-sideend', pokemon.side, 'move: Toxic Spikes',
|
|
20893
|
+
this.add('-sideend', pokemon.side, 'move: Toxic Spikes', `[of] ${pokemon}`);
|
|
20892
20894
|
pokemon.side.removeSideCondition('toxicspikes');
|
|
20893
20895
|
}
|
|
20894
20896
|
else if (pokemon.hasType('Steel') || pokemon.hasItem('heavydutyboots')) {
|
|
20895
|
-
|
|
20897
|
+
// do nothing
|
|
20896
20898
|
}
|
|
20897
20899
|
else if (this.effectState.layers >= 2) {
|
|
20898
20900
|
pokemon.trySetStatus('tox', pokemon.side.foe.active[0]);
|
|
@@ -21026,7 +21028,7 @@ export const Moves = {
|
|
|
21026
21028
|
source.item = myItem.id;
|
|
21027
21029
|
return false;
|
|
21028
21030
|
}
|
|
21029
|
-
this.add('-activate', source, 'move: Trick',
|
|
21031
|
+
this.add('-activate', source, 'move: Trick', `[of] ${target}`);
|
|
21030
21032
|
if (myItem) {
|
|
21031
21033
|
target.setItem(myItem);
|
|
21032
21034
|
this.add('-item', target, myItem, '[from] move: Trick');
|
|
@@ -21099,10 +21101,10 @@ export const Moves = {
|
|
|
21099
21101
|
},
|
|
21100
21102
|
onFieldStart(target, source) {
|
|
21101
21103
|
if (source?.hasAbility('persistent')) {
|
|
21102
|
-
this.add('-fieldstart', 'move: Trick Room',
|
|
21104
|
+
this.add('-fieldstart', 'move: Trick Room', `[of] ${source}`, '[persistent]');
|
|
21103
21105
|
}
|
|
21104
21106
|
else {
|
|
21105
|
-
this.add('-fieldstart', 'move: Trick Room',
|
|
21107
|
+
this.add('-fieldstart', 'move: Trick Room', `[of] ${source}`);
|
|
21106
21108
|
}
|
|
21107
21109
|
},
|
|
21108
21110
|
onFieldRestart(target, source) {
|
|
@@ -21249,7 +21251,7 @@ export const Moves = {
|
|
|
21249
21251
|
break;
|
|
21250
21252
|
}
|
|
21251
21253
|
}
|
|
21252
|
-
this.debug(
|
|
21254
|
+
this.debug(`BP: ${bp}`);
|
|
21253
21255
|
return bp;
|
|
21254
21256
|
},
|
|
21255
21257
|
category: "Special",
|
|
@@ -21477,7 +21479,7 @@ export const Moves = {
|
|
|
21477
21479
|
basePower: 0,
|
|
21478
21480
|
basePowerCallback(pokemon) {
|
|
21479
21481
|
const bp = Math.floor((pokemon.happiness * 10) / 25) || 1;
|
|
21480
|
-
this.debug(
|
|
21482
|
+
this.debug(`BP: ${bp}`);
|
|
21481
21483
|
return bp;
|
|
21482
21484
|
},
|
|
21483
21485
|
category: "Physical",
|
|
@@ -21810,7 +21812,7 @@ export const Moves = {
|
|
|
21810
21812
|
condition: {
|
|
21811
21813
|
duration: 5,
|
|
21812
21814
|
onFieldStart(field, source) {
|
|
21813
|
-
this.add('-fieldstart', 'move: Water Sport',
|
|
21815
|
+
this.add('-fieldstart', 'move: Water Sport', `[of] ${source}`);
|
|
21814
21816
|
},
|
|
21815
21817
|
onBasePowerPriority: 1,
|
|
21816
21818
|
onBasePower(basePower, attacker, defender, move) {
|
|
@@ -21837,7 +21839,7 @@ export const Moves = {
|
|
|
21837
21839
|
basePower: 150,
|
|
21838
21840
|
basePowerCallback(pokemon, target, move) {
|
|
21839
21841
|
const bp = move.basePower * pokemon.hp / pokemon.maxhp;
|
|
21840
|
-
this.debug(
|
|
21842
|
+
this.debug(`BP: ${bp}`);
|
|
21841
21843
|
return bp;
|
|
21842
21844
|
},
|
|
21843
21845
|
category: "Special",
|
|
@@ -21910,7 +21912,7 @@ export const Moves = {
|
|
|
21910
21912
|
move.basePower *= 2;
|
|
21911
21913
|
break;
|
|
21912
21914
|
}
|
|
21913
|
-
this.debug(
|
|
21915
|
+
this.debug(`BP: ${move.basePower}`);
|
|
21914
21916
|
},
|
|
21915
21917
|
secondary: null,
|
|
21916
21918
|
target: "normal",
|
|
@@ -22188,10 +22190,10 @@ export const Moves = {
|
|
|
22188
22190
|
},
|
|
22189
22191
|
onFieldStart(field, source) {
|
|
22190
22192
|
if (source?.hasAbility('persistent')) {
|
|
22191
|
-
this.add('-fieldstart', 'move: Wonder Room',
|
|
22193
|
+
this.add('-fieldstart', 'move: Wonder Room', `[of] ${source}`, '[persistent]');
|
|
22192
22194
|
}
|
|
22193
22195
|
else {
|
|
22194
|
-
this.add('-fieldstart', 'move: Wonder Room',
|
|
22196
|
+
this.add('-fieldstart', 'move: Wonder Room', `[of] ${source}`);
|
|
22195
22197
|
}
|
|
22196
22198
|
},
|
|
22197
22199
|
onFieldRestart(target, source) {
|
|
@@ -22305,7 +22307,7 @@ export const Moves = {
|
|
|
22305
22307
|
const hp = target.hp;
|
|
22306
22308
|
const maxHP = target.maxhp;
|
|
22307
22309
|
const bp = Math.floor(Math.floor((120 * (100 * Math.floor(hp * 4096 / maxHP)) + 2048 - 1) / 4096) / 100) || 1;
|
|
22308
|
-
this.debug(
|
|
22310
|
+
this.debug(`BP for ${hp}/${maxHP} HP: ${bp}`);
|
|
22309
22311
|
return bp;
|
|
22310
22312
|
},
|
|
22311
22313
|
category: "Special",
|
|
@@ -22354,7 +22356,7 @@ export const Moves = {
|
|
|
22354
22356
|
noCopy: true, // doesn't get copied by Baton Pass
|
|
22355
22357
|
duration: 2,
|
|
22356
22358
|
onStart(target, source) {
|
|
22357
|
-
this.add('-start', target, 'move: Yawn',
|
|
22359
|
+
this.add('-start', target, 'move: Yawn', `[of] ${source}`);
|
|
22358
22360
|
},
|
|
22359
22361
|
onResidualOrder: 23,
|
|
22360
22362
|
onEnd(target) {
|