@pkmn/sim 0.5.7 → 0.5.8

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 (49) hide show
  1. package/build/config/formats.js +91 -45
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/formats-data.js +3 -3
  4. package/build/data/formats-data.js.map +1 -1
  5. package/build/data/items.js +2 -2
  6. package/build/data/items.js.map +1 -1
  7. package/build/data/learnsets.js +6 -5
  8. package/build/data/learnsets.js.map +1 -1
  9. package/build/data/mods/gen2/moves.js +13 -1
  10. package/build/data/mods/gen2/moves.js.map +1 -1
  11. package/build/data/mods/gen3/formats-data.js +2 -2
  12. package/build/data/mods/gen3/formats-data.js.map +1 -1
  13. package/build/data/mods/gen4/formats-data.js +4 -4
  14. package/build/data/mods/gen4/formats-data.js.map +1 -1
  15. package/build/data/mods/gen4/moves.js +7 -5
  16. package/build/data/mods/gen4/moves.js.map +1 -1
  17. package/build/data/mods/gen5/moves.js +6 -4
  18. package/build/data/mods/gen5/moves.js.map +1 -1
  19. package/build/data/mods/gen6/items.js +2 -2
  20. package/build/data/mods/gen6/items.js.map +1 -1
  21. package/build/data/mods/gen7/moves.js +3 -3
  22. package/build/data/mods/gen7/moves.js.map +1 -1
  23. package/build/data/mods/gen7/pokedex.js +4 -0
  24. package/build/data/mods/gen7/pokedex.js.map +1 -1
  25. package/build/data/moves.js +6 -5
  26. package/build/data/moves.js.map +1 -1
  27. package/build/data/pokedex.js +1 -1
  28. package/build/data/pokedex.js.map +1 -1
  29. package/build/data/rulesets.js +23 -0
  30. package/build/data/rulesets.js.map +1 -1
  31. package/build/sim/team-validator.js +11 -0
  32. package/build/sim/team-validator.js.map +1 -1
  33. package/config/formats.ts +88 -43
  34. package/data/formats-data.ts +3 -3
  35. package/data/items.ts +2 -2
  36. package/data/learnsets.ts +6 -5
  37. package/data/mods/gen2/moves.ts +13 -1
  38. package/data/mods/gen3/formats-data.ts +2 -2
  39. package/data/mods/gen4/formats-data.ts +4 -4
  40. package/data/mods/gen4/moves.ts +6 -4
  41. package/data/mods/gen5/moves.ts +6 -4
  42. package/data/mods/gen6/items.ts +2 -2
  43. package/data/mods/gen7/moves.ts +3 -3
  44. package/data/mods/gen7/pokedex.ts +4 -0
  45. package/data/moves.ts +6 -5
  46. package/data/pokedex.ts +1 -1
  47. package/data/rulesets.ts +21 -0
  48. package/package.json +2 -2
  49. package/sim/team-validator.ts +13 -0
@@ -2642,7 +2642,7 @@ exports.Items = {
2642
2642
  type: "Dragon",
2643
2643
  },
2644
2644
  onDamagingHit(damage, target, source, move) {
2645
- if (move.category === 'Physical' && source.hp && source.isActive) {
2645
+ if (move.category === 'Physical' && source.hp && source.isActive && !source.hasAbility('magicguard')) {
2646
2646
  if (target.eatItem()) {
2647
2647
  this.damage(source.baseMaxhp / (target.hasAbility('ripen') ? 4 : 8), source, target);
2648
2648
  }
@@ -4735,7 +4735,7 @@ exports.Items = {
4735
4735
  type: "Dark",
4736
4736
  },
4737
4737
  onDamagingHit(damage, target, source, move) {
4738
- if (move.category === 'Special' && source.hp && source.isActive) {
4738
+ if (move.category === 'Special' && source.hp && source.isActive && !source.hasAbility('magicguard')) {
4739
4739
  if (target.eatItem()) {
4740
4740
  this.damage(source.baseMaxhp / (target.hasAbility('ripen') ? 4 : 8), source, target);
4741
4741
  }