@pkmn/sim 0.5.2 → 0.5.3

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.
@@ -8,7 +8,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
8
8
  venusaur: {
9
9
  randomBattleMoves: ["gigadrain", "leechseed", "sleeppowder", "sludgebomb", "substitute"],
10
10
  randomBattleLevel: 82,
11
- tier: "RUBL",
11
+ tier: "UU",
12
12
  doublesTier: "(DUU)",
13
13
  },
14
14
  venusaurmega: {
@@ -353,7 +353,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
353
353
  randomDoubleBattleMoves: ["auroraveil", "blizzard", "encore", "freezedry", "moonblast"],
354
354
  randomDoubleBattleLevel: 81,
355
355
  tier: "OU",
356
- doublesTier: "DUU",
356
+ doublesTier: "DOU",
357
357
  },
358
358
  igglybuff: {
359
359
  tier: "LC",
@@ -490,7 +490,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
490
490
  randomDoubleBattleMoves: ["calmmind", "encore", "icebeam", "muddywater", "protect"],
491
491
  randomDoubleBattleLevel: 88,
492
492
  tier: "(PU)",
493
- doublesTier: "(DUU)",
493
+ doublesTier: "DUU",
494
494
  },
495
495
  mankey: {
496
496
  isNonstandard: "Past",
@@ -530,7 +530,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
530
530
  randomBattleLevel: 86,
531
531
  randomDoubleBattleMoves: ["earthpower", "helpinghand", "icywind", "muddywater", "protect"],
532
532
  randomDoubleBattleLevel: 84,
533
- tier: "RU",
533
+ tier: "(PU)",
534
534
  doublesTier: "DUU",
535
535
  },
536
536
  abra: {
@@ -662,7 +662,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
662
662
  randomBattleLevel: 86,
663
663
  randomDoubleBattleMoves: ["fireblast", "healpulse", "protect", "psychic", "shellsidearm", "trickroom"],
664
664
  randomDoubleBattleLevel: 85,
665
- tier: "UU",
665
+ tier: "RUBL",
666
666
  doublesTier: "(DUU)",
667
667
  },
668
668
  slowking: {
@@ -946,7 +946,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
946
946
  randomBattleLevel: 82,
947
947
  randomDoubleBattleMoves: ["highhorsepower", "icepunch", "megahorn", "protect", "rockslide", "stoneedge"],
948
948
  randomDoubleBattleLevel: 84,
949
- tier: "UU",
949
+ tier: "RU",
950
950
  doublesTier: "(DUU)",
951
951
  },
952
952
  happiny: {
@@ -1002,7 +1002,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
1002
1002
  randomDoubleBattleLevel: 82,
1003
1003
  randomBattleNoDynamaxMoves: ["dracometeor", "flipturn", "hydropump", "icebeam", "raindance"],
1004
1004
  tier: "PUBL",
1005
- doublesTier: "DOU",
1005
+ doublesTier: "DUU",
1006
1006
  },
1007
1007
  goldeen: {
1008
1008
  tier: "LC",
@@ -1209,7 +1209,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
1209
1209
  randomBattleLevel: 82,
1210
1210
  randomDoubleBattleMoves: ["calmmind", "dazzlinggleam", "morningsun", "protect", "psychic", "shadowball"],
1211
1211
  randomDoubleBattleLevel: 84,
1212
- tier: "NU",
1212
+ tier: "PU",
1213
1213
  doublesTier: "(DUU)",
1214
1214
  },
1215
1215
  umbreon: {
@@ -1242,7 +1242,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
1242
1242
  randomDoubleBattleMoves: ["calmmind", "hypervoice", "mysticalfire", "protect", "psyshock"],
1243
1243
  randomDoubleBattleLevel: 80,
1244
1244
  tier: "NU",
1245
- doublesTier: "DUU",
1245
+ doublesTier: "(DUU)",
1246
1246
  },
1247
1247
  porygon: {
1248
1248
  tier: "LC",
@@ -1346,7 +1346,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
1346
1346
  randomBattleLevel: 76,
1347
1347
  randomDoubleBattleMoves: ["bravebird", "bulkup", "closecombat", "throatchop", "thunderouskick", "uturn"],
1348
1348
  randomDoubleBattleLevel: 76,
1349
- tier: "UUBL",
1349
+ tier: "OU",
1350
1350
  doublesTier: "DOU",
1351
1351
  },
1352
1352
  moltres: {
@@ -1543,7 +1543,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
1543
1543
  randomDoubleBattleMoves: ["aquajet", "knockoff", "liquidation", "playrough", "protect"],
1544
1544
  randomDoubleBattleLevel: 87,
1545
1545
  tier: "UU",
1546
- doublesTier: "(DUU)",
1546
+ doublesTier: "DUU",
1547
1547
  },
1548
1548
  bonsly: {
1549
1549
  tier: "LC",
@@ -2080,7 +2080,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2080
2080
  randomBattleLevel: 82,
2081
2081
  randomDoubleBattleMoves: ["closecombat", "feint", "knockoff", "protect", "swordsdance", "tripleaxel", "zenheadbutt"],
2082
2082
  randomDoubleBattleLevel: 86,
2083
- tier: "(PU)",
2083
+ tier: "PU",
2084
2084
  doublesTier: "(DUU)",
2085
2085
  },
2086
2086
  gallademega: {
@@ -2123,7 +2123,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2123
2123
  randomBattleLevel: 86,
2124
2124
  randomDoubleBattleMoves: ["acrobatics", "defog", "leechlife", "protect", "swordsdance"],
2125
2125
  randomDoubleBattleLevel: 88,
2126
- tier: "NU",
2126
+ tier: "PU",
2127
2127
  doublesTier: "(DUU)",
2128
2128
  },
2129
2129
  shedinja: {
@@ -2441,7 +2441,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2441
2441
  randomDoubleBattleMoves: ["powerwhip", "protect", "recover", "stealthrock", "stoneedge", "stringshot", "toxic"],
2442
2442
  randomDoubleBattleLevel: 88,
2443
2443
  tier: "(PU)",
2444
- doublesTier: "DUU",
2444
+ doublesTier: "(DUU)",
2445
2445
  },
2446
2446
  anorith: {
2447
2447
  tier: "LC",
@@ -2502,7 +2502,6 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2502
2502
  randomDoubleBattleMoves: ["allyswitch", "haze", "helpinghand", "nightshade", "painsplit", "trickroom", "willowisp"],
2503
2503
  randomDoubleBattleLevel: 84,
2504
2504
  tier: "NFE",
2505
- doublesTier: "DUU",
2506
2505
  },
2507
2506
  dusknoir: {
2508
2507
  randomBattleMoves: ["earthquake", "icepunch", "painsplit", "poltergeist", "shadowsneak", "trick", "willowisp"],
@@ -2959,7 +2958,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2959
2958
  randomBattleLevel: 82,
2960
2959
  randomDoubleBattleMoves: ["allyswitch", "bodypress", "explosion", "ironhead", "trickroom"],
2961
2960
  randomDoubleBattleLevel: 88,
2962
- tier: "NU",
2961
+ tier: "RU",
2963
2962
  doublesTier: "DUU",
2964
2963
  },
2965
2964
  chatot: {
@@ -3169,7 +3168,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
3169
3168
  randomDoubleBattleMoves: ["bodyslam", "knockoff", "protect", "thunderwave"],
3170
3169
  randomDoubleBattleLevel: 86,
3171
3170
  tier: "(PU)",
3172
- doublesTier: "(DUU)",
3171
+ doublesTier: "DUU",
3173
3172
  },
3174
3173
  giratina: {
3175
3174
  randomBattleMoves: ["hex", "rest", "sleeptalk", "toxic", "willowisp"],
@@ -3480,7 +3479,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
3480
3479
  randomBattleLevel: 84,
3481
3480
  randomDoubleBattleMoves: ["earthpower", "knockoff", "muddywater", "powerwhip", "protect", "raindance"],
3482
3481
  randomDoubleBattleLevel: 86,
3483
- tier: "UU",
3482
+ tier: "RU",
3484
3483
  doublesTier: "(DUU)",
3485
3484
  },
3486
3485
  throh: {
@@ -3653,7 +3652,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
3653
3652
  randomBattleLevel: 86,
3654
3653
  randomDoubleBattleMoves: ["bodypress", "irondefense", "painsplit", "shadowball", "trickroom", "willowisp"],
3655
3654
  randomDoubleBattleLevel: 88,
3656
- tier: "(PU)",
3655
+ tier: "PU",
3657
3656
  doublesTier: "(DUU)",
3658
3657
  },
3659
3658
  runerigus: {
@@ -3770,7 +3769,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
3770
3769
  randomDoubleBattleMoves: ["auroraveil", "blizzard", "freezedry", "iceshard", "protect"],
3771
3770
  randomDoubleBattleLevel: 82,
3772
3771
  tier: "(PU)",
3773
- doublesTier: "DUU",
3772
+ doublesTier: "(DUU)",
3774
3773
  },
3775
3774
  deerling: {
3776
3775
  isNonstandard: "Past",
@@ -4070,7 +4069,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4070
4069
  randomDoubleBattleMoves: ["bugbuzz", "gigadrain", "heatwave", "hurricane", "protect", "quiverdance"],
4071
4070
  randomDoubleBattleLevel: 80,
4072
4071
  tier: "OU",
4073
- doublesTier: "DUU",
4072
+ doublesTier: "(DUU)",
4074
4073
  },
4075
4074
  cobalion: {
4076
4075
  randomBattleMoves: ["closecombat", "ironhead", "stealthrock", "stoneedge", "swordsdance", "voltswitch"],
@@ -4277,7 +4276,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4277
4276
  randomBattleLevel: 80,
4278
4277
  randomDoubleBattleMoves: ["bodyslam", "highhorsepower", "knockoff", "protect", "quickattack", "swordsdance", "uturn"],
4279
4278
  randomDoubleBattleLevel: 86,
4280
- tier: "UU",
4279
+ tier: "RUBL",
4281
4280
  doublesTier: "(DUU)",
4282
4281
  },
4283
4282
  fletchling: {
@@ -4544,7 +4543,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4544
4543
  randomDoubleBattleMoves: ["dazzlinggleam", "foulplay", "spikes", "thunderwave"],
4545
4544
  randomDoubleBattleLevel: 84,
4546
4545
  tier: "RU",
4547
- doublesTier: "(DUU)",
4546
+ doublesTier: "DUU",
4548
4547
  },
4549
4548
  phantump: {
4550
4549
  tier: "LC",
@@ -4955,7 +4954,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4955
4954
  randomBattleLevel: 84,
4956
4955
  randomDoubleBattleMoves: ["highjumpkick", "knockoff", "playrough", "powerwhip", "rapidspin", "tripleaxel", "uturn"],
4957
4956
  randomDoubleBattleLevel: 88,
4958
- tier: "PU",
4957
+ tier: "NU",
4959
4958
  doublesTier: "DOU",
4960
4959
  },
4961
4960
  comfey: {
@@ -4964,7 +4963,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4964
4963
  randomDoubleBattleMoves: ["defog", "drainingkiss", "floralhealing", "gigadrain", "helpinghand", "protect"],
4965
4964
  randomDoubleBattleLevel: 89,
4966
4965
  tier: "NU",
4967
- doublesTier: "DOU",
4966
+ doublesTier: "DUU",
4968
4967
  },
4969
4968
  oranguru: {
4970
4969
  randomBattleMoves: ["focusblast", "nastyplot", "psychic", "thunderbolt", "trickroom"],
@@ -5111,7 +5110,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5111
5110
  randomBattleLevel: 84,
5112
5111
  randomDoubleBattleMoves: ["multiattack", "rockslide", "swordsdance", "tailwind"],
5113
5112
  randomDoubleBattleLevel: 89,
5114
- tier: "(PU)",
5113
+ tier: "NU",
5115
5114
  doublesTier: "(DUU)",
5116
5115
  },
5117
5116
  silvallyice: {
@@ -5307,7 +5306,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5307
5306
  randomDoubleBattleMoves: ["grassknot", "meteorbeam", "protect", "sludgebomb", "thunderbolt"],
5308
5307
  randomDoubleBattleLevel: 81,
5309
5308
  tier: "UU",
5310
- doublesTier: "DOU",
5309
+ doublesTier: "DUU",
5311
5310
  },
5312
5311
  buzzwole: {
5313
5312
  randomBattleMoves: ["closecombat", "darkestlariat", "dualwingbeat", "ironhead", "leechlife", "stoneedge"],
@@ -5332,7 +5331,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5332
5331
  randomDoubleBattleMoves: ["dazzlinggleam", "energyball", "thunderbolt", "voltswitch"],
5333
5332
  randomDoubleBattleLevel: 79,
5334
5333
  tier: "RU",
5335
- doublesTier: "(DUU)",
5334
+ doublesTier: "DUU",
5336
5335
  },
5337
5336
  celesteela: {
5338
5337
  randomBattleMoves: ["airslash", "earthquake", "fireblast", "flashcannon", "leechseed", "protect"],
@@ -5341,7 +5340,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5341
5340
  randomDoubleBattleLevel: 78,
5342
5341
  randomBattleNoDynamaxMoves: ["airslash", "earthquake", "fireblast", "heavyslam", "leechseed", "protect"],
5343
5342
  tier: "UU",
5344
- doublesTier: "DUU",
5343
+ doublesTier: "DOU",
5345
5344
  },
5346
5345
  kartana: {
5347
5346
  randomBattleMoves: ["knockoff", "leafblade", "sacredsword", "smartstrike", "swordsdance"],
@@ -5905,7 +5904,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5905
5904
  randomBattleLevel: 84,
5906
5905
  randomDoubleBattleMoves: ["expandingforce", "followme", "healpulse", "helpinghand", "protect"],
5907
5906
  randomDoubleBattleLevel: 80,
5908
- tier: "PUBL",
5907
+ tier: "NU",
5909
5908
  doublesTier: "DOU",
5910
5909
  },
5911
5910
  morpeko: {
@@ -5949,7 +5948,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5949
5948
  randomDoubleBattleMoves: ["blizzard", "boltbeak", "iciclecrash", "lowkick", "protect"],
5950
5949
  randomDoubleBattleLevel: 88,
5951
5950
  tier: "UUBL",
5952
- doublesTier: "(DUU)",
5951
+ doublesTier: "DUU",
5953
5952
  },
5954
5953
  dracovish: {
5955
5954
  randomBattleMoves: ["crunch", "fishiousrend", "icefang", "lowkick", "psychicfangs"],
@@ -6091,7 +6090,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
6091
6090
  randomDoubleBattleMoves: ["electroweb", "extremespeed", "protect", "thundercage", "voltswitch"],
6092
6091
  randomDoubleBattleLevel: 82,
6093
6092
  randomBattleNoDynamaxMoves: ["explosion", "rapidspin", "thunderbolt", "voltswitch"],
6094
- tier: "UU",
6093
+ tier: "OU",
6095
6094
  doublesTier: "DOU",
6096
6095
  },
6097
6096
  regidrago: {
@@ -6100,14 +6099,14 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
6100
6099
  randomDoubleBattleMoves: ["crunch", "dragonclaw", "dragonenergy", "firefang"],
6101
6100
  randomDoubleBattleLevel: 78,
6102
6101
  tier: "NUBL",
6103
- doublesTier: "DUU",
6102
+ doublesTier: "(DUU)",
6104
6103
  },
6105
6104
  glastrier: {
6106
6105
  randomBattleMoves: ["closecombat", "highhorsepower", "iciclecrash", "swordsdance"],
6107
6106
  randomBattleLevel: 82,
6108
6107
  randomDoubleBattleMoves: ["closecombat", "highhorsepower", "iciclecrash", "protect"],
6109
6108
  randomDoubleBattleLevel: 82,
6110
- tier: "NU",
6109
+ tier: "PU",
6111
6110
  doublesTier: "(DUU)",
6112
6111
  },
6113
6112
  spectrier: {
package/data/learnsets.ts CHANGED
@@ -27149,7 +27149,7 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
27149
27149
  headbutt: ["7V", "4T"],
27150
27150
  hiddenpower: ["7M", "7V", "6M", "5M", "4M", "3M"],
27151
27151
  highhorsepower: ["8M"],
27152
- hornattack: ["7V", "3L1"],
27152
+ hornattack: ["3L1"],
27153
27153
  hyperbeam: ["8M", "7M", "7V", "6M", "5M", "4M", "3M"],
27154
27154
  icebeam: ["8M", "7M", "6M", "5M", "4M", "3M"],
27155
27155
  icefang: ["8M", "8L0", "7L24", "6L24", "5L28", "4L28"],
@@ -57,6 +57,17 @@ export const Scripts: ModdedBattleScriptsData = {
57
57
  }
58
58
  return changed;
59
59
  },
60
+ clearBoosts() {
61
+ let i: BoostID;
62
+ for (i in this.boosts) {
63
+ this.boosts[i] = 0;
64
+ // Recalculate the modified stat
65
+ if (i === 'evasion' || i === 'accuracy') continue;
66
+ let stat = this.species.baseStats[i];
67
+ stat = Math.floor(Math.floor(2 * stat + this.set.ivs[i] + Math.floor(this.set.evs[i] / 4)) * this.level / 100 + 5);
68
+ this.modifiedStats![i] = this.storedStats[i] = Math.floor(stat);
69
+ }
70
+ },
60
71
  },
61
72
  actions: {
62
73
  // This function is the main one when running a move.
package/data/moves.ts CHANGED
@@ -4574,7 +4574,7 @@ export const Moves: {[moveid: string]: MoveData} = {
4574
4574
  pseudoWeather: 'fairylock',
4575
4575
  condition: {
4576
4576
  duration: 2,
4577
- onStart(target) {
4577
+ onFieldStart(target) {
4578
4578
  this.add('-fieldactivate', 'move: Fairy Lock');
4579
4579
  },
4580
4580
  onTrapPokemon(pokemon) {
@@ -9077,7 +9077,7 @@ export const Moves: {[moveid: string]: MoveData} = {
9077
9077
  pseudoWeather: 'iondeluge',
9078
9078
  condition: {
9079
9079
  duration: 1,
9080
- onStart(target, source, sourceEffect) {
9080
+ onFieldStart(target, source, sourceEffect) {
9081
9081
  this.add('-fieldactivate', 'move: Ion Deluge');
9082
9082
  this.hint(`Normal-type moves become Electric-type after using ${sourceEffect}.`);
9083
9083
  },
@@ -10420,16 +10420,10 @@ export const Moves: {[moveid: string]: MoveData} = {
10420
10420
  },
10421
10421
  onTryHitPriority: 3,
10422
10422
  onTryHit(target, source, move) {
10423
- if (['gmaxoneblow', 'gmaxrapidflow'].includes(move.id)) return;
10424
- /** moves blocked by Max Guard but not Protect */
10425
- const overrideBypassProtect = [
10426
- 'block', 'flowershield', 'gearup', 'magneticflux', 'phantomforce', 'psychup', 'shadowforce', 'teatime', 'transform', 'whirlwind',
10423
+ const bypassesMaxGuard = [
10424
+ 'acupressure', 'afteryou', 'allyswitch', 'aromatherapy', 'aromaticmist', 'coaching', 'confide', 'copycat', 'curse', 'decorate', 'doomdesire', 'feint', 'futuresight', 'gmaxoneblow', 'gmaxrapidflow', 'healbell', 'holdhands', 'howl', 'junglehealing', 'lifedew', 'meanlook', 'perishsong', 'playnice', 'powertrick', 'roar', 'roleplay', 'tearfullook',
10427
10425
  ];
10428
- const blockedByMaxGuard = (this.dex.moves.get(move.id).flags['protect'] ||
10429
- move.isZ || move.isMax || overrideBypassProtect.includes(move.id));
10430
- if (!blockedByMaxGuard) {
10431
- return;
10432
- }
10426
+ if (bypassesMaxGuard.includes(move.id)) return;
10433
10427
  if (move.smartTarget) {
10434
10428
  move.smartTarget = false;
10435
10429
  } else {
@@ -15754,7 +15748,7 @@ export const Moves: {[moveid: string]: MoveData} = {
15754
15748
  const moveid = moveSlot.id;
15755
15749
  if (!moveid) continue;
15756
15750
  const move = this.dex.moves.get(moveid);
15757
- if (noSleepTalk.includes(moveid) || move.flags['charge'] || (move.isZ && move.basePower !== 1)) {
15751
+ if (noSleepTalk.includes(moveid) || move.flags['charge'] || (move.isZ && move.basePower !== 1) || move.isMax) {
15758
15752
  continue;
15759
15753
  }
15760
15754
  moves.push(moveid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkmn/sim",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "An automatically generated extraction of just the simulator portion of Pokémon Showdown",
5
5
  "homepage": "https://psim.us",
6
6
  "main": "build/sim/index.js",
@@ -438,7 +438,8 @@ export class BattleActions {
438
438
  target = targets[targets.length - 1]; // in case of redirection
439
439
  }
440
440
 
441
- if (!sourceEffect || sourceEffect.id === 'pursuit') {
441
+ const callerMoveForPressure = sourceEffect && (sourceEffect as ActiveMove).pp ? sourceEffect as ActiveMove : null;
442
+ if (!sourceEffect || callerMoveForPressure || sourceEffect.id === 'pursuit') {
442
443
  let extraPP = 0;
443
444
  for (const source of pressureTargets) {
444
445
  const ppDrop = this.battle.runEvent('DeductPP', source, pokemon, move);
@@ -447,7 +448,7 @@ export class BattleActions {
447
448
  }
448
449
  }
449
450
  if (extraPP > 0) {
450
- pokemon.deductPP(moveOrMoveName, extraPP);
451
+ pokemon.deductPP(callerMoveForPressure || moveOrMoveName, extraPP);
451
452
  }
452
453
  }
453
454
 
@@ -1447,7 +1448,7 @@ export class BattleActions {
1447
1448
  this.battle.heal(pokemon.maxhp, pokemon, pokemon, zPower);
1448
1449
  break;
1449
1450
  case 'healreplacement':
1450
- move.self = {slotCondition: 'healreplacement'};
1451
+ pokemon.side.addSlotCondition(pokemon, 'healreplacement', pokemon, move);
1451
1452
  break;
1452
1453
  case 'clearnegativeboost':
1453
1454
  const boosts: SparseBoostsTable = {};
@@ -1575,6 +1576,10 @@ export class BattleActions {
1575
1576
 
1576
1577
  if (!basePower) return 0;
1577
1578
  basePower = this.battle.clampIntRange(basePower, 1);
1579
+ // Hacked Max Moves have 0 base power, even if you Dynamax
1580
+ if ((!source.volatiles['dynamax'] && move.isMax) || (move.isMax && this.dex.moves.get(move.baseMove).isMax)) {
1581
+ basePower = 0;
1582
+ }
1578
1583
 
1579
1584
  const level = source.level;
1580
1585
 
@@ -309,6 +309,7 @@ export interface ModdedBattlePokemon {
309
309
  inherit?: true;
310
310
  lostItemForDelibird?: Item | null;
311
311
  boostBy?: (this: Pokemon, boost: SparseBoostsTable) => boolean | number;
312
+ clearBoosts?: (this: Pokemon) => void;
312
313
  calculateStat?: (this: Pokemon, statName: StatIDExceptHP, boost: number, modifier?: number) => number;
313
314
  cureStatus?: (this: Pokemon, silent?: boolean) => boolean;
314
315
  getAbility?: (this: Pokemon) => Ability;
@@ -309,6 +309,7 @@ interface ModdedBattlePokemon {
309
309
  inherit?: true;
310
310
  lostItemForDelibird?: Item | null;
311
311
  boostBy?: (this: Pokemon, boost: SparseBoostsTable) => boolean | number;
312
+ clearBoosts?: (this: Pokemon) => void;
312
313
  calculateStat?: (this: Pokemon, statName: StatIDExceptHP, boost: number, modifier?: number) => number;
313
314
  cureStatus?: (this: Pokemon, silent?: boolean) => boolean;
314
315
  getAbility?: (this: Pokemon) => Ability;