@pkmn/sim 0.5.1 → 0.5.2

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/data/items.ts CHANGED
@@ -1274,7 +1274,7 @@ export const Items: {[itemid: string]: ItemData} = {
1274
1274
  fling: {
1275
1275
  basePower: 30,
1276
1276
  },
1277
- num: 250,
1277
+ num: 235,
1278
1278
  gen: 2,
1279
1279
  },
1280
1280
  dragoniumz: {
@@ -3179,7 +3179,7 @@ export const Items: {[itemid: string]: ItemData} = {
3179
3179
  if (!this.activeMove) return false;
3180
3180
  if (this.activeMove.id !== 'knockoff' && this.activeMove.id !== 'thief' && this.activeMove.id !== 'covet') return false;
3181
3181
  },
3182
- num: 0,
3182
+ num: 137,
3183
3183
  gen: 2,
3184
3184
  isNonstandard: "Past",
3185
3185
  },
@@ -7115,19 +7115,19 @@ export const Items: {[itemid: string]: ItemData} = {
7115
7115
  },
7116
7116
  onBasePowerPriority: 15,
7117
7117
  onBasePower(basePower, user, target, move) {
7118
- if (user.baseSpecies.num === -67 && ['Poison', 'Flying'].includes(move.type)) {
7118
+ if (user.baseSpecies.num === -66 && ['Poison', 'Flying'].includes(move.type)) {
7119
7119
  return this.chainModify([4915, 4096]);
7120
7120
  }
7121
7121
  },
7122
7122
  onTakeItem(item, pokemon, source) {
7123
- if (source?.baseSpecies.num === -67 || pokemon.baseSpecies.num === -67) {
7123
+ if (source?.baseSpecies.num === -66 || pokemon.baseSpecies.num === -66) {
7124
7124
  return false;
7125
7125
  }
7126
7126
  return true;
7127
7127
  },
7128
7128
  forcedForme: "Venomicon-Epilogue",
7129
7129
  itemUser: ["Venomicon-Epilogue"],
7130
- num: 112,
7130
+ num: -2,
7131
7131
  gen: 8,
7132
7132
  isNonstandard: "CAP",
7133
7133
  },
@@ -691,7 +691,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
691
691
  tier: "LC",
692
692
  },
693
693
  azumarill: {
694
- randomBattleMoves: ["perishsong", "rest", "toxic", "whirlpool"],
694
+ randomBattleMoves: ["perishsong", "rest", "surf", "whirlpool"],
695
695
  tier: "NU",
696
696
  },
697
697
  sudowoodo: {
package/data/moves.ts CHANGED
@@ -11090,7 +11090,9 @@ export const Moves: {[moveid: string]: MoveData} = {
11090
11090
  priority: 0,
11091
11091
  flags: {protect: 1, bypasssub: 1, allyanim: 1},
11092
11092
  onHit(target, source) {
11093
- const disallowedMoves = ['chatter', 'dynamaxcannon', 'mimic', 'sketch', 'struggle', 'transform'];
11093
+ const disallowedMoves = [
11094
+ 'behemothbash', 'behemothblade', 'chatter', 'dynamaxcannon', 'mimic', 'sketch', 'struggle', 'transform',
11095
+ ];
11094
11096
  const move = target.lastMove;
11095
11097
  if (source.transformed || !move || disallowedMoves.includes(move.id) || source.moves.includes(move.id)) {
11096
11098
  return false;
package/data/pokedex.ts CHANGED
@@ -16911,7 +16911,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
16911
16911
  gen: 4,
16912
16912
  },
16913
16913
  venomicon: {
16914
- num: -67,
16914
+ num: -66,
16915
16915
  name: "Venomicon",
16916
16916
  baseForme: "Prologue",
16917
16917
  types: ["Poison", "Flying"],
@@ -16927,7 +16927,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
16927
16927
  gen: 8,
16928
16928
  },
16929
16929
  venomiconepilogue: {
16930
- num: -67,
16930
+ num: -66,
16931
16931
  name: "Venomicon-Epilogue",
16932
16932
  baseSpecies: "Venomicon",
16933
16933
  forme: "Epilogue",
package/data/rulesets.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Note: These are the rules that formats use
1
+ // Note: These are the rules that formats use
2
2
 
3
3
  import {Utils} from "../lib";
4
4
 
@@ -791,13 +791,42 @@ export const Rulesets: {[k: string]: FormatData} = {
791
791
  ];
792
792
  },
793
793
  },
794
- "3batonpassclause": {
794
+ oneboostpasserclause: {
795
795
  effectType: 'ValidatorRule',
796
- name: '3 Baton Pass Clause',
797
- desc: "Stops teams from having more than three Pokémon with Baton Pass",
798
- banlist: ["Baton Pass > 3"],
796
+ name: 'One Boost Passer Clause',
797
+ desc: "Stops teams from having a Pokémon with Baton Pass that has multiple ways to boost its stats, and no more than one Baton Passer may be able to boost its stats",
799
798
  onBegin() {
800
- this.add('rule', '3 Baton Pass Clause: Limit three Baton Passers');
799
+ this.add('rule', 'One Boost Passer Clause: Limit one Baton Passer that has a way to boost its stats');
800
+ },
801
+ onValidateTeam(team) {
802
+ const boostingEffects = [
803
+ 'acidarmor', 'agility', 'amnesia', 'apicotberry', 'barrier', 'bellydrum', 'bulkup', 'calmmind', 'cosmicpower', 'curse',
804
+ 'defensecurl', 'dragondance', 'ganlonberry', 'growth', 'harden', 'howl', 'irondefense', 'liechiberry', 'meditate',
805
+ 'petayaberry', 'salacberry', 'sharpen', 'speedboost', 'starfberry', 'swordsdance', 'tailglow', 'withdraw',
806
+ ];
807
+ let passers = 0;
808
+ for (const set of team) {
809
+ if (!set.moves.includes('Baton Pass')) continue;
810
+ let passableBoosts = 0;
811
+ const item = this.toID(set.item);
812
+ const ability = this.toID(set.ability);
813
+ for (const move of set.moves) {
814
+ if (boostingEffects.includes(this.toID(move))) passableBoosts++;
815
+ }
816
+ if (boostingEffects.includes(item)) passableBoosts++;
817
+ if (boostingEffects.includes(ability)) passableBoosts++;
818
+ if (passableBoosts === 1) passers++;
819
+ if (passableBoosts > 1) {
820
+ return [
821
+ `${set.name || set.species} has Baton Pass and multiple ways to boost its stats, which is banned by One Boost Passer Clause.`,
822
+ ];
823
+ }
824
+ if (passers > 1) {
825
+ return [
826
+ `Multiple Pokemon have Baton Pass and a way to boost their stats, which is banned by One Boost Passer Clause.`,
827
+ ];
828
+ }
829
+ }
801
830
  },
802
831
  },
803
832
  cfzclause: {
@@ -3729,7 +3729,7 @@ export const MovesText: {[k: string]: MoveText} = {
3729
3729
  },
3730
3730
  mimic: {
3731
3731
  name: "Mimic",
3732
- desc: "While the user remains active, this move is replaced by the last move used by the target. The copied move has the maximum PP for that move. Fails if the target has not made a move, if the user has Transformed, if the user already knows the move, or if the move is Chatter, Dynamax Cannon, Mimic, Sketch, Struggle, Transform, or any Z-Move.",
3732
+ desc: "While the user remains active, this move is replaced by the last move used by the target. The copied move has the maximum PP for that move. Fails if the target has not made a move, if the user has Transformed, if the user already knows the move, or if the move is Behemoth Bash, Behemoth Blade, Chatter, Dynamax Cannon, Mimic, Sketch, Struggle, Transform, or any Z-Move.",
3733
3733
  shortDesc: "The last move the target used replaces this one.",
3734
3734
  gen6: {
3735
3735
  desc: "While the user remains active, this move is replaced by the last move used by the target. The copied move has the maximum PP for that move. Fails if the target has not made a move, if the user has Transformed, if the user already knows the move, or if the move is Chatter, Mimic, Sketch, Struggle, or Transform.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkmn/sim",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "An automatically generated extraction of just the simulator portion of Pokémon Showdown",
5
5
  "homepage": "https://psim.us",
6
6
  "main": "build/sim/index.js",
package/sim/pokemon.ts CHANGED
@@ -794,7 +794,7 @@ export class Pokemon {
794
794
  for (const pokemon of this.battle.getAllActive()) {
795
795
  // can't use hasAbility because it would lead to infinite recursion
796
796
  if (pokemon.ability === ('neutralizinggas' as ID) && !pokemon.volatiles['gastroacid'] &&
797
- !pokemon.abilityState.ending) {
797
+ !pokemon.transformed && !pokemon.abilityState.ending) {
798
798
  neutralizinggas = true;
799
799
  break;
800
800
  }
@@ -540,6 +540,9 @@ export class TeamValidator {
540
540
  problem = this.checkItem(set, item, setHas);
541
541
  if (problem) problems.push(problem);
542
542
  if (ruleTable.has('obtainablemisc')) {
543
+ if (dex.gen === 4 && item.id === 'griseousorb' && species.num !== 487) {
544
+ problems.push(`${set.name} cannot hold the Griseous Orb.`, `(In Gen 4, only Giratina could hold the Griseous Orb).`);
545
+ }
543
546
  if (dex.gen <= 1) {
544
547
  if (item.id) {
545
548
  // no items allowed