@pkmn/mods 0.5.20 → 0.5.23

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.
@@ -136,6 +136,17 @@ export const Moves: {[k: string]: ModdedMoveData} = {
136
136
  },
137
137
  substitute: {
138
138
  inherit: true,
139
+ onTryHit(target) {
140
+ if (target.volatiles['substitute']) {
141
+ this.add('-fail', target, 'move: Substitute');
142
+ return null;
143
+ }
144
+ // Stadium fixes the 25% = you die gag
145
+ if (target.hp <= target.maxhp / 4) {
146
+ this.add('-fail', target, 'move: Substitute', '[weak]');
147
+ return null;
148
+ }
149
+ },
139
150
  condition: {
140
151
  onStart(target) {
141
152
  this.add('-start', target, 'Substitute');
@@ -9,12 +9,6 @@ export const Scripts: ModdedBattleScriptsData = {
9
9
  // BattlePokemon scripts. Stadium shares gen 1 code but it fixes some problems with it.
10
10
  pokemon: {
11
11
  inherit: true,
12
- // Gen 1 function to apply a stat modification that is only active until the stat is recalculated or mon switched.
13
- // Modified stats are declared in the Pokemon object in sim/pokemon.js in about line 681.
14
- modifyStat(statName, modifier) {
15
- if (!(statName in this.storedStats)) throw new Error("Invalid `statName` passed to `modifyStat`");
16
- this.modifiedStats![statName] = this.battle.clampIntRange(Math.floor(this.modifiedStats![statName] * modifier), 1);
17
- },
18
12
  // This is run on Stadium after boosts and status changes.
19
13
  recalculateStats() {
20
14
  let statName: StatIDExceptHP;
@@ -54,6 +54,10 @@ export const Conditions: {[k: string]: ModdedConditionData} = {
54
54
  }
55
55
  // 1-4 turns, guaranteed 1 turn of sleep.
56
56
  this.effectState.time = this.random(2, 5);
57
+
58
+ if (target.removeVolatile('nightmare')) {
59
+ this.add('-end', target, 'Nightmare', '[silent]');
60
+ }
57
61
  },
58
62
  onBeforeMovePriority: 10,
59
63
  onBeforeMove(pokemon, target, move) {
@@ -104,6 +104,22 @@ export const Scripts: ModdedBattleScriptsData = {
104
104
  return false;
105
105
  }
106
106
 
107
+ if (move.target === 'all' || move.target === 'foeSide' || move.target === 'allySide' || move.target === 'allyTeam') {
108
+ if (move.target === 'all') {
109
+ hitResult = this.battle.runEvent('TryHitField', target, pokemon, move);
110
+ } else {
111
+ hitResult = this.battle.runEvent('TryHitSide', target, pokemon, move);
112
+ }
113
+ if (!hitResult) {
114
+ if (hitResult === false) {
115
+ this.battle.add('-fail', pokemon);
116
+ this.battle.attrLastMove('[still]');
117
+ }
118
+ return false;
119
+ }
120
+ return this.moveHit(target, pokemon, move);
121
+ }
122
+
107
123
  hitResult = this.battle.runEvent('Invulnerability', target, pokemon, move);
108
124
  if (hitResult === false) {
109
125
  this.battle.attrLastMove('[miss]');
@@ -8,7 +8,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
8
8
  tier: "NFE",
9
9
  },
10
10
  venusaur: {
11
- tier: "OU",
11
+ tier: "UU",
12
12
  doublesTier: "DOU",
13
13
  },
14
14
  venusaurmega: {
@@ -28,7 +28,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
28
28
  },
29
29
  charizardmegax: {
30
30
  randomBattleMoves: ["earthquake", "flareblitz", "outrage", "roost", "willowisp"],
31
- tier: "UU",
31
+ tier: "OU",
32
32
  doublesTier: "DOU",
33
33
  },
34
34
  charizardmegay: {
@@ -48,7 +48,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
48
48
  },
49
49
  blastoisemega: {
50
50
  randomBattleMoves: ["darkpulse", "hydropump", "icebeam", "scald", "toxic"],
51
- tier: "UU",
51
+ tier: "OU",
52
52
  doublesTier: "DOU",
53
53
  },
54
54
  caterpie: {
@@ -69,7 +69,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
69
69
  tier: "NFE",
70
70
  },
71
71
  beedrill: {
72
- tier: "OU",
72
+ tier: "UU",
73
73
  doublesTier: "DOU",
74
74
  },
75
75
  beedrillmega: {
@@ -151,12 +151,12 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
151
151
  },
152
152
  sandslash: {
153
153
  randomBattleMoves: ["earthquake", "rockslide", "stealthrock", "swordsdance", "toxic"],
154
- tier: "OU",
154
+ tier: "UU",
155
155
  doublesTier: "DOU",
156
156
  },
157
157
  sandslashalola: {
158
158
  randomBattleMoves: ["earthquake", "icepunch", "iceshard", "irontail", "stealthrock", "swordsdance"],
159
- tier: "OU",
159
+ tier: "UU",
160
160
  doublesTier: "DOU",
161
161
  },
162
162
  nidoranf: {
@@ -245,7 +245,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
245
245
  },
246
246
  venomoth: {
247
247
  randomBattleMoves: ["bugbuzz", "psychic", "quiverdance", "sleeppowder", "sludgebomb"],
248
- tier: "UU",
248
+ tier: "UUBL",
249
249
  doublesTier: "DOU",
250
250
  },
251
251
  diglett: {
@@ -277,7 +277,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
277
277
  },
278
278
  persianalola: {
279
279
  randomBattleMoves: ["darkpulse", "nastyplot", "taunt", "thunderbolt", "uturn"],
280
- tier: "UU",
280
+ tier: "OU",
281
281
  doublesTier: "DOU",
282
282
  },
283
283
  psyduck: {
@@ -301,7 +301,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
301
301
  },
302
302
  arcanine: {
303
303
  randomBattleMoves: ["crunch", "flareblitz", "playrough", "superpower", "willowisp"],
304
- tier: "OU",
304
+ tier: "UU",
305
305
  doublesTier: "DOU",
306
306
  },
307
307
  poliwag: {
@@ -322,7 +322,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
322
322
  tier: "NFE",
323
323
  },
324
324
  alakazam: {
325
- tier: "OU",
325
+ tier: "UUBL",
326
326
  doublesTier: "DOU",
327
327
  },
328
328
  alakazammega: {
@@ -387,7 +387,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
387
387
  },
388
388
  rapidash: {
389
389
  randomBattleMoves: ["drillrun", "flareblitz", "irontail", "megahorn", "willowisp"],
390
- tier: "OU",
390
+ tier: "UU",
391
391
  doublesTier: "DOU",
392
392
  },
393
393
  slowpoke: {
@@ -509,7 +509,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
509
509
  },
510
510
  exeggutoralola: {
511
511
  randomBattleMoves: ["dragonpulse", "earthquake", "flamethrower", "megadrain", "stunspore"],
512
- tier: "UU",
512
+ tier: "OU",
513
513
  doublesTier: "DOU",
514
514
  },
515
515
  cubone: {
@@ -567,12 +567,12 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
567
567
  doublesTier: "DOU",
568
568
  },
569
569
  kangaskhan: {
570
- tier: "OU",
570
+ tier: "UU",
571
571
  doublesTier: "DOU",
572
572
  },
573
573
  kangaskhanmega: {
574
574
  randomBattleMoves: ["brickbreak", "earthquake", "facade", "fakeout", "suckerpunch"],
575
- tier: "OU",
575
+ tier: "UU",
576
576
  doublesTier: "DOU",
577
577
  },
578
578
  horsea: {
@@ -642,7 +642,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
642
642
  tier: "LC",
643
643
  },
644
644
  gyarados: {
645
- tier: "OU",
645
+ tier: "UU",
646
646
  doublesTier: "DOU",
647
647
  },
648
648
  gyaradosmega: {
@@ -666,7 +666,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
666
666
  eeveestarter: {
667
667
  randomBattleMoves: ["bouncybubble", "buzzybuzz", "protect", "sappyseed", "sizzlyslide", "sparklyswirl"],
668
668
  isNonstandard: null,
669
- tier: "OU",
669
+ tier: "UU",
670
670
  doublesTier: "DOU",
671
671
  },
672
672
  vaporeon: {
@@ -195,7 +195,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
195
195
  randomBattleMoves: ["aromatherapy", "gigadrain", "sleeppowder", "sludgebomb", "strengthsap"],
196
196
  },
197
197
  bellossom: {
198
- tier: "NU",
198
+ tier: "PU",
199
199
  doublesTier: "DOU",
200
200
  randomBattleMoves: ["gigadrain", "moonblast", "quiverdance", "sleeppowder", "strengthsap"],
201
201
  },
@@ -262,7 +262,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
262
262
  tier: "NFE",
263
263
  },
264
264
  poliwrath: {
265
- tier: "NU",
265
+ tier: "PU",
266
266
  doublesTier: "DUU",
267
267
  randomBattleMoves: ["bulkup", "drainpunch", "poisonjab", "raindance", "waterfall"],
268
268
  },
@@ -335,7 +335,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
335
335
  tier: "LC",
336
336
  },
337
337
  slowbro: {
338
- tier: "UU",
338
+ tier: "RU",
339
339
  doublesTier: "DUU",
340
340
  randomBattleMoves: ["calmmind", "icebeam", "psychic", "scald", "slackoff", "thunderwave"],
341
341
  },
@@ -348,7 +348,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
348
348
  tier: "LC",
349
349
  },
350
350
  magneton: {
351
- tier: "NU",
351
+ tier: "PU",
352
352
  doublesTier: "NFE",
353
353
  },
354
354
  magnezone: {
@@ -365,7 +365,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
365
365
  tier: "LC",
366
366
  },
367
367
  dodrio: {
368
- tier: "NU",
368
+ tier: "PU",
369
369
  doublesTier: "DUU",
370
370
  randomBattleMoves: ["bravebird", "facade", "quickattack", "roost", "steelwing", "swordsdance"],
371
371
  },
@@ -425,7 +425,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
425
425
  tier: "LC",
426
426
  },
427
427
  kingler: {
428
- tier: "NU",
428
+ tier: "PUBL",
429
429
  doublesTier: "DUU",
430
430
  randomBattleMoves: ["agility", "razorshell", "rockslide", "swordsdance", "xscissor"],
431
431
  },
@@ -483,7 +483,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
483
483
  tier: "LC",
484
484
  },
485
485
  weezing: {
486
- tier: "NU",
486
+ tier: "PU",
487
487
  doublesTier: "DUU",
488
488
  randomBattleMoves: ["explosion", "fireblast", "painsplit", "sludgebomb", "toxicspikes", "willowisp"],
489
489
  },
@@ -519,7 +519,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
519
519
  randomBattleMoves: ["earthquake", "knockoff", "leechseed", "powerwhip", "sleeppowder", "sludgebomb"],
520
520
  },
521
521
  kangaskhan: {
522
- tier: "NU",
522
+ tier: "PUBL",
523
523
  doublesTier: "DUU",
524
524
  randomBattleMoves: ["crunch", "doubleedge", "earthquake", "fakeout", "hammerarm"],
525
525
  },
@@ -599,7 +599,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
599
599
  randomBattleMoves: ["earthquake", "fireblast", "psychic", "taunt", "thunderbolt"],
600
600
  },
601
601
  pinsir: {
602
- tier: "PU",
602
+ tier: "PUBL",
603
603
  doublesTier: "DUU",
604
604
  randomBattleMoves: ["closecombat", "earthquake", "stealthrock", "stoneedge", "xscissor"],
605
605
  },
@@ -612,7 +612,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
612
612
  tier: "LC",
613
613
  },
614
614
  gyarados: {
615
- tier: "UU",
615
+ tier: "RU",
616
616
  doublesTier: "DOU",
617
617
  randomBattleMoves: ["dragondance", "earthquake", "icefang", "stoneedge", "waterfall"],
618
618
  },
@@ -697,7 +697,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
697
697
  randomBattleMoves: ["earthquake", "roost", "stealthrock", "stoneedge", "defog"],
698
698
  },
699
699
  munchlax: {
700
- tier: "LC",
700
+ tier: "NFE",
701
701
  },
702
702
  snorlax: {
703
703
  tier: "UU",
@@ -705,7 +705,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
705
705
  randomBattleMoves: ["bodyslam", "curse", "rest", "sleeptalk"],
706
706
  },
707
707
  articuno: {
708
- tier: "NU",
708
+ tier: "PU",
709
709
  doublesTier: "DUU",
710
710
  randomBattleMoves: ["defog", "icebeam", "roost", "uturn"],
711
711
  },
@@ -901,7 +901,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
901
901
  tier: "LC",
902
902
  },
903
903
  quagsire: {
904
- tier: "UU",
904
+ tier: "RU",
905
905
  doublesTier: "DUU",
906
906
  randomBattleMoves: ["earthquake", "recover", "scald", "toxic"],
907
907
  },
@@ -909,7 +909,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
909
909
  tier: "NFE",
910
910
  },
911
911
  honchkrow: {
912
- tier: "UU",
912
+ tier: "RU",
913
913
  doublesTier: "DUU",
914
914
  randomBattleMoves: ["bravebird", "roost", "suckerpunch", "taunt"],
915
915
  },
@@ -980,7 +980,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
980
980
  randomBattleMoves: ["knockoff", "stealthrock", "stickyweb", "toxic"],
981
981
  },
982
982
  heracross: {
983
- tier: "UU",
983
+ tier: "UUBL",
984
984
  doublesTier: "DUU",
985
985
  randomBattleMoves: ["closecombat", "facade", "megahorn", "stoneedge", "throatchop"],
986
986
  },
@@ -1119,7 +1119,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1119
1119
  randomBattleMoves: ["earthquake", "roost", "sacredfire", "substitute", "thunderwave"],
1120
1120
  },
1121
1121
  celebi: {
1122
- tier: "OU",
1122
+ tier: "UU",
1123
1123
  doublesTier: "DOU",
1124
1124
  randomBattleMoves: ["dazzlinggleam", "gigadrain", "leafstorm", "nastyplot", "psychic", "recover", "uturn"],
1125
1125
  },
@@ -1198,7 +1198,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1198
1198
  tier: "NFE",
1199
1199
  },
1200
1200
  ludicolo: {
1201
- tier: "NU",
1201
+ tier: "PUBL",
1202
1202
  doublesTier: "DOU",
1203
1203
  randomBattleMoves: ["gigadrain", "hydropump", "icebeam", "raindance", "scald"],
1204
1204
  },
@@ -1369,7 +1369,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1369
1369
  randomBattleMoves: ["grassknot", "nastyplot", "nuzzle", "switcheroo", "thunderbolt", "voltswitch"],
1370
1370
  },
1371
1371
  volbeat: {
1372
- tier: "NU",
1372
+ tier: "PU",
1373
1373
  doublesTier: "DUU",
1374
1374
  randomBattleMoves: ["encore", "roost", "thunderwave", "uturn"],
1375
1375
  },
@@ -1482,7 +1482,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1482
1482
  randomBattleMoves: ["icebeam", "moonblast", "nastyplot", "psyshock", "stealthrock"],
1483
1483
  },
1484
1484
  solrock: {
1485
- tier: "NU",
1485
+ tier: "PU",
1486
1486
  doublesTier: "DUU",
1487
1487
  randomBattleMoves: ["earthquake", "explosion", "stealthrock", "stoneedge", "willowisp"],
1488
1488
  },
@@ -1514,7 +1514,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1514
1514
  tier: "LC",
1515
1515
  },
1516
1516
  cradily: {
1517
- tier: "RU",
1517
+ tier: "NU",
1518
1518
  doublesTier: "DOU",
1519
1519
  randomBattleMoves: ["gigadrain", "recover", "stealthrock", "stoneedge"],
1520
1520
  },
@@ -1572,12 +1572,12 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1572
1572
  tier: "LC",
1573
1573
  },
1574
1574
  chimecho: {
1575
- tier: "NU",
1575
+ tier: "PUBL",
1576
1576
  doublesTier: "DUU",
1577
1577
  randomBattleMoves: ["healingwish", "lightscreen", "psychic", "recover", "reflect", "thunderwave"],
1578
1578
  },
1579
1579
  absol: {
1580
- tier: "RU",
1580
+ tier: "NU",
1581
1581
  doublesTier: "DUU",
1582
1582
  randomBattleMoves: ["knockoff", "playrough", "suckerpunch", "swordsdance"],
1583
1583
  },
@@ -1590,7 +1590,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1590
1590
  randomBattleMoves: ["disable", "earthquake", "freezedry", "protect", "substitute"],
1591
1591
  },
1592
1592
  froslass: {
1593
- tier: "UU",
1593
+ tier: "RU",
1594
1594
  doublesTier: "DUU",
1595
1595
  randomBattleMoves: ["destinybond", "icebeam", "shadowball", "spikes", "taunt", "willowisp"],
1596
1596
  },
@@ -1614,7 +1614,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1614
1614
  randomBattleMoves: ["crunch", "icebeam", "shellsmash", "waterfall"],
1615
1615
  },
1616
1616
  gorebyss: {
1617
- tier: "NU",
1617
+ tier: "PUBL",
1618
1618
  doublesTier: "DUU",
1619
1619
  randomBattleMoves: ["hydropump", "icebeam", "psychic", "shellsmash"],
1620
1620
  },
@@ -1898,7 +1898,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1898
1898
  tier: "LC",
1899
1899
  },
1900
1900
  bronzong: {
1901
- tier: "UU",
1901
+ tier: "RU",
1902
1902
  doublesTier: "DOU",
1903
1903
  randomBattleMoves: ["earthquake", "gyroball", "psychic", "stealthrock"],
1904
1904
  },
@@ -1972,7 +1972,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1972
1972
  tier: "LC",
1973
1973
  },
1974
1974
  abomasnow: {
1975
- tier: "NU",
1975
+ tier: "PUBL",
1976
1976
  doublesTier: "DOU",
1977
1977
  randomBattleMoves: ["auroraveil", "blizzard", "earthquake", "iceshard", "woodhammer"],
1978
1978
  },
@@ -1992,7 +1992,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1992
1992
  randomBattleMoves: ["hydropump", "nastyplot", "thunderbolt", "trick", "voltswitch", "willowisp"],
1993
1993
  },
1994
1994
  rotomfrost: {
1995
- tier: "NU",
1995
+ tier: "PU",
1996
1996
  doublesTier: "DUU",
1997
1997
  randomBattleMoves: ["blizzard", "nastyplot", "thunderbolt", "trick", "voltswitch", "willowisp"],
1998
1998
  },
@@ -2012,7 +2012,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
2012
2012
  randomBattleMoves: ["psychic", "stealthrock", "thunderwave", "uturn", "yawn"],
2013
2013
  },
2014
2014
  mesprit: {
2015
- tier: "RU",
2015
+ tier: "NU",
2016
2016
  doublesTier: "DUU",
2017
2017
  randomBattleMoves: ["energyball", "healingwish", "icebeam", "nastyplot", "psychic", "thunderbolt", "uturn"],
2018
2018
  },
@@ -2052,7 +2052,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
2052
2052
  randomBattleMoves: ["aurasphere", "defog", "dracometeor", "shadowball", "willowisp"],
2053
2053
  },
2054
2054
  cresselia: {
2055
- tier: "UU",
2055
+ tier: "RU",
2056
2056
  doublesTier: "DOU",
2057
2057
  randomBattleMoves: ["calmmind", "moonblast", "moonlight", "psychic", "thunderwave"],
2058
2058
  },