@robsonbittencourt/calc 0.11.13 → 0.11.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robsonbittencourt/calc",
3
- "version": "0.11.13",
3
+ "version": "0.11.14",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "unpkg": "dist/production.min.js",
package/src/data/moves.ts CHANGED
@@ -4534,7 +4534,7 @@ const SV_PATCH: {[name: string]: DeepPartial<MoveData>} = {
4534
4534
  zp: 190,
4535
4535
  maxPower: 140,
4536
4536
  target: 'allAdjacentFoes',
4537
- self: {boosts: {spa: -1}},
4537
+ self: {boosts: {spa: -2}},
4538
4538
  },
4539
4539
  'Malignant Chain': {
4540
4540
  bp: 100,
@@ -10419,7 +10419,7 @@ const ZA_PATCH: {[name: string]: DeepPartial<SpeciesData>} = {
10419
10419
  types: ['Poison', 'Dragon'],
10420
10420
  bs: {hp: 65, at: 85, df: 105, sa: 132, sd: 163, sp: 44},
10421
10421
  weightkg: 100.3,
10422
- abilities: {0: 'Poison Point'},
10422
+ abilities: {0: 'Regenerator'},
10423
10423
  baseSpecies: 'Dragalge',
10424
10424
  },
10425
10425
  'Dragonite-Mega': {
@@ -10440,7 +10440,7 @@ const ZA_PATCH: {[name: string]: DeepPartial<SpeciesData>} = {
10440
10440
  types: ['Electric'],
10441
10441
  bs: {hp: 85, at: 145, df: 80, sa: 135, sd: 90, sp: 80},
10442
10442
  weightkg: 180.0,
10443
- abilities: {0: 'Levitate'},
10443
+ abilities: {0: 'Eelevate'},
10444
10444
  baseSpecies: 'Eelektross',
10445
10445
  },
10446
10446
  'Emboar-Mega': {
@@ -10462,7 +10462,7 @@ const ZA_PATCH: {[name: string]: DeepPartial<SpeciesData>} = {
10462
10462
  bs: {hp: 65, at: 135, df: 135, sa: 70, sd: 65, sp: 100},
10463
10463
  weightkg: 99.0,
10464
10464
  gender: 'N',
10465
- abilities: {0: 'Battle Armor'},
10465
+ abilities: {0: 'Defiant'},
10466
10466
  baseSpecies: 'Falinks',
10467
10467
  },
10468
10468
  'Feraligatr-Mega': {
@@ -10595,28 +10595,28 @@ const ZA_PATCH: {[name: string]: DeepPartial<SpeciesData>} = {
10595
10595
  types: ['Fire', 'Normal'],
10596
10596
  bs: {hp: 86, at: 88, df: 92, sa: 129, sd: 86, sp: 126},
10597
10597
  weightkg: 93.3,
10598
- abilities: {0: 'Rivalry'},
10598
+ abilities: {0: 'Fire Mane'},
10599
10599
  baseSpecies: 'Pyroar',
10600
10600
  },
10601
10601
  'Raichu-Mega-X': {
10602
10602
  types: ['Electric'],
10603
10603
  bs: {hp: 60, at: 135, df: 95, sa: 90, sd: 95, sp: 110},
10604
10604
  weightkg: 38.0,
10605
- abilities: {0: 'Surge Surfer'},
10605
+ abilities: {0: 'Electric Surge'},
10606
10606
  baseSpecies: 'Raichu',
10607
10607
  },
10608
10608
  'Raichu-Mega-Y': {
10609
10609
  types: ['Electric'],
10610
10610
  bs: {hp: 60, at: 100, df: 55, sa: 160, sd: 80, sp: 130},
10611
10611
  weightkg: 26.0,
10612
- abilities: {0: 'Surge Surfer'},
10612
+ abilities: {0: 'No Guard'},
10613
10613
  baseSpecies: 'Raichu',
10614
10614
  },
10615
10615
  'Scolipede-Mega': {
10616
10616
  types: ['Bug', 'Poison'],
10617
10617
  bs: {hp: 60, at: 140, df: 149, sa: 75, sd: 99, sp: 62},
10618
10618
  weightkg: 230.5,
10619
- abilities: {0: 'Poison Point'},
10619
+ abilities: {0: 'Shell Armor'},
10620
10620
  baseSpecies: 'Scolipede',
10621
10621
  },
10622
10622
  'Scovillain-Mega': {
@@ -10630,7 +10630,7 @@ const ZA_PATCH: {[name: string]: DeepPartial<SpeciesData>} = {
10630
10630
  types: ['Dark', 'Fighting'],
10631
10631
  bs: {hp: 65, at: 130, df: 135, sa: 55, sd: 135, sp: 68},
10632
10632
  weightkg: 31.0,
10633
- abilities: {0: 'Shed Skin'},
10633
+ abilities: {0: 'Intimidate'},
10634
10634
  baseSpecies: 'Scrafty',
10635
10635
  },
10636
10636
  'Skarmory-Mega': {
@@ -10644,7 +10644,7 @@ const ZA_PATCH: {[name: string]: DeepPartial<SpeciesData>} = {
10644
10644
  types: ['Fighting', 'Flying'],
10645
10645
  bs: {hp: 85, at: 140, df: 100, sa: 60, sd: 90, sp: 110},
10646
10646
  weightkg: 50.0,
10647
- abilities: {0: 'Intimidate'},
10647
+ abilities: {0: 'Contrary'},
10648
10648
  baseSpecies: 'Staraptor',
10649
10649
  },
10650
10650
  'Starmie-Mega': {
@@ -10735,6 +10735,7 @@ const CHAMPIONS_LIST = [
10735
10735
  'Altaria-Mega',
10736
10736
  'Ampharos',
10737
10737
  'Ampharos-Mega',
10738
+ 'Annihilape',
10738
10739
  'Appletun',
10739
10740
  'Araquanid',
10740
10741
  'Arbok',
@@ -10752,6 +10753,8 @@ const CHAMPIONS_LIST = [
10752
10753
  'Azumarill',
10753
10754
  'Banette',
10754
10755
  'Banette-Mega',
10756
+ 'Barbaracle',
10757
+ 'Barbaracle-Mega',
10755
10758
  'Basculegion',
10756
10759
  'Basculegion-F',
10757
10760
  'Bastiodon',
@@ -10761,6 +10764,8 @@ const CHAMPIONS_LIST = [
10761
10764
  'Bellibolt',
10762
10765
  'Blastoise',
10763
10766
  'Blastoise-Mega',
10767
+ 'Blaziken',
10768
+ 'Blaziken-Mega',
10764
10769
  'Camerupt',
10765
10770
  'Camerupt-Mega',
10766
10771
  'Castform',
@@ -10792,11 +10797,15 @@ const CHAMPIONS_LIST = [
10792
10797
  'Delphox-Mega',
10793
10798
  'Diggersby',
10794
10799
  'Ditto',
10800
+ 'Dragalge',
10801
+ 'Dragalge-Mega',
10795
10802
  'Dragapult',
10796
10803
  'Dragonite',
10797
10804
  'Dragonite-Mega',
10798
10805
  'Drampa',
10799
10806
  'Drampa-Mega',
10807
+ 'Eelektross',
10808
+ 'Eelektross-Mega',
10800
10809
  'Emboar',
10801
10810
  'Emboar-Mega',
10802
10811
  'Emolga',
@@ -10805,6 +10814,8 @@ const CHAMPIONS_LIST = [
10805
10814
  'Espeon',
10806
10815
  'Excadrill',
10807
10816
  'Excadrill-Mega',
10817
+ 'Falinks',
10818
+ 'Falinks-Mega',
10808
10819
  'Farigiraf',
10809
10820
  'Feraligatr',
10810
10821
  'Feraligatr-Mega',
@@ -10827,6 +10838,7 @@ const CHAMPIONS_LIST = [
10827
10838
  'Garganacl',
10828
10839
  'Gengar',
10829
10840
  'Gengar-Mega',
10841
+ 'Gholdengo',
10830
10842
  'Glaceon',
10831
10843
  'Glalie',
10832
10844
  'Glalie-Mega',
@@ -10843,6 +10855,7 @@ const CHAMPIONS_LIST = [
10843
10855
  'Gourgeist-Super',
10844
10856
  'Greninja',
10845
10857
  'Greninja-Mega',
10858
+ 'Grimmsnarl',
10846
10859
  'Gyarados',
10847
10860
  'Gyarados-Mega',
10848
10861
  'Hatterene',
@@ -10854,6 +10867,7 @@ const CHAMPIONS_LIST = [
10854
10867
  'Hippowdon',
10855
10868
  'Houndoom',
10856
10869
  'Houndoom-Mega',
10870
+ 'Houndstone',
10857
10871
  'Hydrapple',
10858
10872
  'Hydreigon',
10859
10873
  'Incineroar',
@@ -10877,11 +10891,15 @@ const CHAMPIONS_LIST = [
10877
10891
  'Lycanroc-Dusk',
10878
10892
  'Lycanroc-Midnight',
10879
10893
  'Machamp',
10894
+ 'Malamar',
10895
+ 'Malamar-Mega',
10880
10896
  'Mamoswine',
10881
10897
  'Manectric',
10882
10898
  'Manectric-Mega',
10883
10899
  'Maushold',
10884
10900
  'Maushold-Four',
10901
+ 'Mawile',
10902
+ 'Mawile-Mega',
10885
10903
  'Medicham',
10886
10904
  'Medicham-Mega',
10887
10905
  'Meganium',
@@ -10891,6 +10909,8 @@ const CHAMPIONS_LIST = [
10891
10909
  'Meowstic-F',
10892
10910
  'Meowstic-F-Mega',
10893
10911
  'Meowstic-M-Mega',
10912
+ 'Metagross',
10913
+ 'Metagross-Mega',
10894
10914
  'Milotic',
10895
10915
  'Mimikyu',
10896
10916
  'Mimikyu-Busted',
@@ -10898,11 +10918,13 @@ const CHAMPIONS_LIST = [
10898
10918
  'Morpeko-Hangry',
10899
10919
  'Mr. Rime',
10900
10920
  'Mudsdale',
10921
+ 'Musharna',
10901
10922
  'Ninetales',
10902
10923
  'Ninetales-Alola',
10903
10924
  'Noivern',
10904
10925
  'Oranguru',
10905
10926
  'Orthworm',
10927
+ 'Overqwil',
10906
10928
  'Palafin',
10907
10929
  'Palafin-Hero',
10908
10930
  'Pangoro',
@@ -10917,7 +10939,10 @@ const CHAMPIONS_LIST = [
10917
10939
  'Polteageist',
10918
10940
  'Polteageist-Antique',
10919
10941
  'Primarina',
10942
+ 'Pyroar',
10943
+ 'Pyroar-Mega',
10920
10944
  'Quaquaval',
10945
+ 'Qwilfish',
10921
10946
  'Raichu',
10922
10947
  'Raichu-Alola',
10923
10948
  'Rampardos',
@@ -10937,10 +10962,16 @@ const CHAMPIONS_LIST = [
10937
10962
  'Samurott',
10938
10963
  'Samurott-Hisui',
10939
10964
  'Sandaconda',
10965
+ 'Sceptile',
10966
+ 'Sceptile-Mega',
10940
10967
  'Scizor',
10941
10968
  'Scizor-Mega',
10969
+ 'Scolipede',
10970
+ 'Scolipede-Mega',
10942
10971
  'Scovillain',
10943
10972
  'Scovillain-Mega',
10973
+ 'Scrafty',
10974
+ 'Scrafty-Mega',
10944
10975
  'Serperior',
10945
10976
  'Sharpedo',
10946
10977
  'Sharpedo-Mega',
@@ -10961,12 +10992,16 @@ const CHAMPIONS_LIST = [
10961
10992
  'Sneasler',
10962
10993
  'Snorlax',
10963
10994
  'Spiritomb',
10995
+ 'Staraptor',
10996
+ 'Staraptor-Mega',
10964
10997
  'Starmie',
10965
10998
  'Starmie-Mega',
10966
10999
  'Steelix',
10967
11000
  'Steelix-Mega',
10968
11001
  'Stunfisk',
10969
11002
  'Stunfisk-Galar',
11003
+ 'Swampert',
11004
+ 'Swampert-Mega',
10970
11005
  'Sylveon',
10971
11006
  'Talonflame',
10972
11007
  'Tauros',
@@ -10993,6 +11028,7 @@ const CHAMPIONS_LIST = [
10993
11028
  'Venusaur-Mega',
10994
11029
  'Victreebel',
10995
11030
  'Victreebel-Mega',
11031
+ 'Vileplume',
10996
11032
  'Vivillon',
10997
11033
  'Vivillon-Fancy',
10998
11034
  'Vivillon-Pokeball',
package/src/desc.ts CHANGED
@@ -895,7 +895,7 @@ function getHazards(gen: Generation, defender: Pokemon, defenderSide: Side) {
895
895
  }
896
896
 
897
897
  if (!defender.hasType('Flying') &&
898
- !defender.hasAbility('Magic Guard', 'Levitate') &&
898
+ !defender.hasAbility('Magic Guard', 'Levitate', 'Eelevate') &&
899
899
  !defender.hasItem('Air Balloon')
900
900
  ) {
901
901
  if (defenderSide.spikes === 1) {
@@ -260,7 +260,7 @@ export function calculateChampions(
260
260
  (move.hasType('Electric') &&
261
261
  defender.hasAbility('Lightning Rod', 'Motor Drive', 'Volt Absorb')) ||
262
262
  (move.hasType('Ground') &&
263
- !field.isGravity && defender.hasAbility('Levitate')) ||
263
+ !field.isGravity && !defender.hasItem('Iron Ball') && defender.hasAbility('Levitate', 'Eelevate')) ||
264
264
  (move.flags.bullet && defender.hasAbility('Bulletproof')) ||
265
265
  (move.flags.sound && !move.named('Clangorous Soul') && defender.hasAbility('Soundproof')) ||
266
266
  (move.priority > 0 && defender.hasAbility('Queenly Majesty', 'Armor Tail')) ||
@@ -775,6 +775,11 @@ export function calculateBPModsChampions(
775
775
  desc.attackerAbility = attacker.ability;
776
776
  }
777
777
 
778
+ if (attacker.hasAbility('Fire Mane') && move.hasType('Fire')) {
779
+ bpMods.push(6144);
780
+ desc.attackerAbility = attacker.ability;
781
+ }
782
+
778
783
  if (defender.hasAbility('Dry Skin') && move.hasType('Fire')) {
779
784
  bpMods.push(5120);
780
785
  desc.defenderAbility = defender.ability;
@@ -794,6 +799,12 @@ export function calculateBPModsChampions(
794
799
  ) {
795
800
  bpMods.push(4915);
796
801
  desc.attackerItem = attacker.item;
802
+ } else if (
803
+ (attacker.hasItem('Muscle Band') && move.category === 'Physical') ||
804
+ (attacker.hasItem('Wise Glasses') && move.category === 'Special')
805
+ ) {
806
+ bpMods.push(4505);
807
+ desc.attackerItem = attacker.item;
797
808
  }
798
809
 
799
810
  return bpMods;
@@ -901,6 +912,14 @@ export function calculateAtModsChampions(
901
912
  desc.defenderAbility = defender.ability;
902
913
  }
903
914
 
915
+ if (
916
+ (attacker.hasItem('Choice Band') && move.category === 'Physical') ||
917
+ (attacker.hasItem('Choice Specs') && move.category === 'Special')
918
+ ) {
919
+ atMods.push(6144);
920
+ desc.attackerItem = attacker.item;
921
+ }
922
+
904
923
  return atMods;
905
924
  }
906
925
 
@@ -1086,6 +1105,22 @@ export function calculateFinalModsChampions(
1086
1105
  desc.isFriendGuard = true;
1087
1106
  }
1088
1107
 
1108
+ if (attacker.hasItem('Expert Belt') && typeEffectiveness > 1) {
1109
+ finalMods.push(4915);
1110
+ desc.attackerItem = attacker.item;
1111
+ } else if (attacker.hasItem('Life Orb')) {
1112
+ finalMods.push(5324);
1113
+ desc.attackerItem = attacker.item;
1114
+ } else if (attacker.hasItem('Metronome') && move.timesUsedWithMetronome! >= 1) {
1115
+ const timesUsedWithMetronome = Math.floor(move.timesUsedWithMetronome!);
1116
+ if (timesUsedWithMetronome <= 4) {
1117
+ finalMods.push(4096 + timesUsedWithMetronome * 819);
1118
+ } else {
1119
+ finalMods.push(8192);
1120
+ }
1121
+ desc.attackerItem = attacker.item;
1122
+ }
1123
+
1089
1124
  if (move.hasType(getBerryResistType(defender.item)) &&
1090
1125
  (typeEffectiveness > 1 || move.hasType('Normal')) &&
1091
1126
  hitCount === 0 &&
@@ -30,7 +30,7 @@ const EV_ITEMS = [
30
30
  export function isGrounded(pokemon: Pokemon, field: Field) {
31
31
  return (field.isGravity || pokemon.hasItem('Iron Ball') ||
32
32
  (!pokemon.hasType('Flying') &&
33
- !pokemon.hasAbility('Levitate') &&
33
+ !pokemon.hasAbility('Levitate', 'Eelevate') &&
34
34
  !pokemon.hasItem('Air Balloon')));
35
35
  }
36
36