@pkmn/randoms 0.5.28 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkmn/randoms",
3
- "version": "0.5.28",
3
+ "version": "0.6.2",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "description": "Random team generation logic for Pokémon Showdown's Random Battle formats",
@@ -16,7 +16,7 @@
16
16
  "!src/test"
17
17
  ],
18
18
  "dependencies": {
19
- "@pkmn/sim": "^0.5.28"
19
+ "@pkmn/sim": "^0.6.2"
20
20
  },
21
21
  "scripts": {
22
22
  "lint": "eslint --cache src --ext ts",
package/src/gen2.ts CHANGED
@@ -68,13 +68,13 @@ export class RandomGen2Teams extends RandomGen3Teams {
68
68
  // Ineffective to have both
69
69
  case 'doubleedge':
70
70
  return {cull: moves.has('bodyslam') || moves.has('return')};
71
- case 'explosion':
72
- return {cull: moves.has('softboiled')};
71
+ case 'explosion': case 'selfdestruct':
72
+ return {cull: moves.has('softboiled') || restTalk};
73
73
  case 'extremespeed':
74
74
  return {cull: moves.has('bodyslam') || restTalk};
75
75
  case 'hyperbeam':
76
76
  return {cull: moves.has('rockslide')};
77
- case 'quickattack': case 'selfdestruct':
77
+ case 'quickattack':
78
78
  return {cull: moves.has('rest')};
79
79
  case 'rapidspin':
80
80
  return {cull: !!teamDetails.rapidSpin || moves.has('sleeptalk')};
package/src/gen7.ts CHANGED
@@ -1312,7 +1312,7 @@ export class RandomGen7Teams extends RandomTeams {
1312
1312
  } else if (abilities.has('Moxie') && (counter.get('Physical') > 3 || moves.has('bounce')) && !isDoubles) {
1313
1313
  ability = 'Moxie';
1314
1314
  } else if (isDoubles) {
1315
- if (abilities.has('Intimidate')) ability = 'Intimidate';
1315
+ if (abilities.has('Intimidate') && !battleOnly) ability = 'Intimidate';
1316
1316
  if (abilities.has('Guts') && ability !== 'Intimidate') ability = 'Guts';
1317
1317
  if (abilities.has('Storm Drain')) ability = 'Storm Drain';
1318
1318
  if (abilities.has('Harvest')) ability = 'Harvest';
package/src/gen8.ts CHANGED
@@ -78,7 +78,7 @@ const ContraryMoves = [
78
78
  ];
79
79
  // Moves that boost Attack:
80
80
  const PhysicalSetup = [
81
- 'bellydrum', 'bulkup', 'coil', 'curse', 'dragondance', 'honeclaws', 'howl', 'poweruppunch', 'swordsdance',
81
+ 'bellydrum', 'bulkup', 'coil', 'curse', 'dragondance', 'honeclaws', 'howl', 'meditate', 'poweruppunch', 'swordsdance',
82
82
  ];
83
83
  // Moves which boost Special Attack:
84
84
  const SpecialSetup = [
@@ -1181,7 +1181,7 @@ export class RandomTeams {
1181
1181
  if (movePool.includes('leechseed') || (movePool.includes('toxic') && !moves.has('wish'))) return {cull: true};
1182
1182
  if (isDoubles && (
1183
1183
  ['bellydrum', 'fakeout', 'shellsmash', 'spore'].some(m => movePool.includes(m)) ||
1184
- moves.has('tailwind') || moves.has('waterspout')
1184
+ moves.has('tailwind') || moves.has('waterspout') || counter.get('recovery')
1185
1185
  )) return {cull: true};
1186
1186
  return {cull: false};
1187
1187
  case 'rapidspin':
@@ -1265,6 +1265,8 @@ export class RandomTeams {
1265
1265
  (counter.get('Special') < 4 && !moves.has('uturn')) ||
1266
1266
  (species.types.length > 1 && counter.get('stab') < 3)
1267
1267
  )};
1268
+ case 'muddywater':
1269
+ return {cull: moves.has('liquidation')};
1268
1270
  case 'scald':
1269
1271
  // Special case for Clawitzer
1270
1272
  return {cull: moves.has('waterpulse')};
@@ -1805,7 +1807,9 @@ export class RandomTeams {
1805
1807
  species.baseStats.spe >= 60 && species.baseStats.spe <= 100 && this.randomChance(1, 2)
1806
1808
  ) ? 'Choice Scarf' : 'Choice Specs';
1807
1809
  }
1808
- if (counter.damagingMoves.size >= 4 && defensiveStatTotal >= 280) return 'Assault Vest';
1810
+ // This one is intentionally below the Choice item checks.
1811
+ if ((defensiveStatTotal < 250 && ability === 'Regenerator') || species.name === 'Pheromosa') return 'Life Orb';
1812
+ if (counter.damagingMoves.size >= 4 && defensiveStatTotal >= 275) return 'Assault Vest';
1809
1813
  if (
1810
1814
  counter.damagingMoves.size >= 3 &&
1811
1815
  species.baseStats.spe >= 60 &&