@pkmn/sim 0.5.11 → 0.5.14

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.
Files changed (68) hide show
  1. package/README.md +5 -0
  2. package/build/config/formats.js +356 -288
  3. package/build/config/formats.js.map +1 -1
  4. package/build/data/abilities.js +9 -9
  5. package/build/data/abilities.js.map +1 -1
  6. package/build/data/aliases.js +2 -0
  7. package/build/data/aliases.js.map +1 -1
  8. package/build/data/conditions.js +8 -12
  9. package/build/data/conditions.js.map +1 -1
  10. package/build/data/formats-data.js +33 -32
  11. package/build/data/formats-data.js.map +1 -1
  12. package/build/data/items.js +1 -1
  13. package/build/data/items.js.map +1 -1
  14. package/build/data/mods/gen1/formats-data.js +38 -36
  15. package/build/data/mods/gen1/formats-data.js.map +1 -1
  16. package/build/data/mods/gen1/moves.js +2 -4
  17. package/build/data/mods/gen1/moves.js.map +1 -1
  18. package/build/data/mods/gen3/formats-data.js +1 -1
  19. package/build/data/mods/gen3/formats-data.js.map +1 -1
  20. package/build/data/mods/gen6/formats-data.js +3 -3
  21. package/build/data/mods/gen6/formats-data.js.map +1 -1
  22. package/build/data/moves.js +34 -19
  23. package/build/data/moves.js.map +1 -1
  24. package/build/data/pokedex.js +2 -2
  25. package/build/data/pokedex.js.map +1 -1
  26. package/build/data/rulesets.js +1 -1
  27. package/build/data/rulesets.js.map +1 -1
  28. package/build/data/text/moves.js +1 -0
  29. package/build/data/text/moves.js.map +1 -1
  30. package/build/sim/battle.js +13 -11
  31. package/build/sim/battle.js.map +1 -1
  32. package/build/sim/dex-conditions.js +11 -3
  33. package/build/sim/dex-conditions.js.map +1 -1
  34. package/build/sim/dex-data.js +1 -0
  35. package/build/sim/dex-data.js.map +1 -1
  36. package/build/sim/dex-formats.js +1 -0
  37. package/build/sim/dex-formats.js.map +1 -1
  38. package/build/sim/dex-items.js +1 -0
  39. package/build/sim/dex-items.js.map +1 -1
  40. package/build/sim/dex-moves.js +1 -0
  41. package/build/sim/dex-moves.js.map +1 -1
  42. package/build/sim/dex-species.js +1 -0
  43. package/build/sim/dex-species.js.map +1 -1
  44. package/build/sim/team-validator.js +1 -1
  45. package/build/sim/team-validator.js.map +1 -1
  46. package/config/formats.ts +343 -272
  47. package/data/abilities.ts +9 -9
  48. package/data/aliases.ts +2 -0
  49. package/data/conditions.ts +8 -10
  50. package/data/formats-data.ts +33 -32
  51. package/data/items.ts +1 -1
  52. package/data/mods/gen1/formats-data.ts +38 -36
  53. package/data/mods/gen1/moves.ts +2 -4
  54. package/data/mods/gen3/formats-data.ts +1 -1
  55. package/data/mods/gen6/formats-data.ts +3 -3
  56. package/data/moves.ts +33 -19
  57. package/data/pokedex.ts +2 -2
  58. package/data/rulesets.ts +1 -1
  59. package/data/text/moves.ts +2 -0
  60. package/package.json +2 -2
  61. package/sim/battle.ts +4 -1
  62. package/sim/dex-conditions.ts +10 -3
  63. package/sim/dex-data.ts +1 -0
  64. package/sim/dex-formats.ts +1 -0
  65. package/sim/dex-items.ts +1 -0
  66. package/sim/dex-moves.ts +1 -0
  67. package/sim/dex-species.ts +1 -0
  68. package/sim/team-validator.ts +1 -1
@@ -633,7 +633,7 @@ exports.Abilities = {
633
633
  }
634
634
  },
635
635
  onAnyDamage(damage, target, source, effect) {
636
- if (effect && effect.id === 'aftermath') {
636
+ if (effect && effect.name === 'Aftermath') {
637
637
  return false;
638
638
  }
639
639
  },
@@ -1776,7 +1776,7 @@ exports.Abilities = {
1776
1776
  return null;
1777
1777
  },
1778
1778
  onBoost(boost, target, source, effect) {
1779
- if (effect.id === 'intimidate') {
1779
+ if (effect.name === 'Intimidate') {
1780
1780
  delete boost.atk;
1781
1781
  this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Inner Focus', '[of] ' + target);
1782
1782
  }
@@ -1921,7 +1921,7 @@ exports.Abilities = {
1921
1921
  },
1922
1922
  libero: {
1923
1923
  onPrepareHit(source, target, move) {
1924
- if (move.hasBounced || move.sourceEffect === 'snatch')
1924
+ if (move.hasBounced || move.isFutureMove || move.sourceEffect === 'snatch')
1925
1925
  return;
1926
1926
  const type = move.type;
1927
1927
  if (type && type !== '???' && source.getTypes().join() !== type) {
@@ -2225,7 +2225,7 @@ exports.Abilities = {
2225
2225
  mirrorarmor: {
2226
2226
  onBoost(boost, target, source, effect) {
2227
2227
  // Don't bounce self stat changes, or boosts that have already bounced
2228
- if (target === source || !boost || effect.id === 'mirrorarmor')
2228
+ if (target === source || !boost || effect.name === 'Mirror Armor')
2229
2229
  return;
2230
2230
  let b;
2231
2231
  for (b in boost) {
@@ -2560,7 +2560,7 @@ exports.Abilities = {
2560
2560
  }
2561
2561
  },
2562
2562
  onBoost(boost, target, source, effect) {
2563
- if (effect.id === 'intimidate') {
2563
+ if (effect.name === 'Intimidate') {
2564
2564
  delete boost.atk;
2565
2565
  this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Oblivious', '[of] ' + target);
2566
2566
  }
@@ -2623,7 +2623,7 @@ exports.Abilities = {
2623
2623
  }
2624
2624
  },
2625
2625
  onBoost(boost, target, source, effect) {
2626
- if (effect.id === 'intimidate') {
2626
+ if (effect.name === 'Intimidate') {
2627
2627
  delete boost.atk;
2628
2628
  this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Own Tempo', '[of] ' + target);
2629
2629
  }
@@ -2955,7 +2955,7 @@ exports.Abilities = {
2955
2955
  },
2956
2956
  protean: {
2957
2957
  onPrepareHit(source, target, move) {
2958
- if (move.hasBounced || move.sourceEffect === 'snatch')
2958
+ if (move.hasBounced || move.isFutureMove || move.sourceEffect === 'snatch')
2959
2959
  return;
2960
2960
  const type = move.type;
2961
2961
  if (type && type !== '???' && source.getTypes().join() !== type) {
@@ -3132,7 +3132,7 @@ exports.Abilities = {
3132
3132
  onTryHeal(damage, target, source, effect) {
3133
3133
  if (!effect)
3134
3134
  return;
3135
- if (effect.id === 'berryjuice' || effect.id === 'leftovers') {
3135
+ if (effect.name === 'Berry Juice' || effect.name === 'Leftovers') {
3136
3136
  this.add('-activate', target, 'ability: Ripen');
3137
3137
  }
3138
3138
  if (effect.isBerry)
@@ -3360,7 +3360,7 @@ exports.Abilities = {
3360
3360
  }
3361
3361
  },
3362
3362
  onBoost(boost, target, source, effect) {
3363
- if (effect.id === 'intimidate') {
3363
+ if (effect.name === 'Intimidate') {
3364
3364
  delete boost.atk;
3365
3365
  this.add('-fail', target, 'unboost', 'Attack', '[from] ability: Scrappy', '[of] ' + target);
3366
3366
  }