From b2aabe59e66334a3e87e8f1fce36145073760217 Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:59:22 -0500 Subject: [PATCH 01/12] Add files via upload --- calc/src/data/eipp10_moves.ts | 4 ++-- calc/src/data/eipp10_species.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/calc/src/data/eipp10_moves.ts b/calc/src/data/eipp10_moves.ts index 4c9dbe616..f773e25b0 100644 --- a/calc/src/data/eipp10_moves.ts +++ b/calc/src/data/eipp10_moves.ts @@ -2611,7 +2611,7 @@ const SM_PATCH: {[name: string]: DeepPartial} = { category: 'Physical', zp: 100, }, - AcceleRock: { + Accelerock: { bp: 40, type: 'Ice', priority: 1, @@ -3639,7 +3639,7 @@ const SS_PATCH: {[name: string]: DeepPartial} = { }, '10,000,000 Volt Thunderbolt': {maxPower: 1}, Absorb: {maxPower: 90}, - AcceleRock: {maxPower: 90}, + Accelerock: {maxPower: 90}, Acid: {maxPower: 70}, 'Acid Downpour': {maxPower: 1}, 'Acid Spray': {maxPower: 70}, diff --git a/calc/src/data/eipp10_species.ts b/calc/src/data/eipp10_species.ts index b97ce9968..346c1a3a6 100644 --- a/calc/src/data/eipp10_species.ts +++ b/calc/src/data/eipp10_species.ts @@ -275,6 +275,7 @@ const XY_PATCH: {[name: string]: DeepPartial} = { Clefable: {types: ['Fire'], bs: {sa: 95}}, Exploud: {bs: {sd: 73}}, Scolipede: {bs: {at: 100}}, + Whimsicott: {types: ['Fighting', 'Fire']}, Aurorus: { types: ['Ice', 'Electric'], bs: {hp: 123, at: 77, df: 72, sa: 99, sd: 92, sp: 58}, @@ -412,14 +413,12 @@ const PLA_PATCH: {[name: string]: DeepPartial} = { bs: {hp: 95, at: 115, df: 80, sa: 95, sd: 80, sp: 90}, weightkg: 168, abilities: {0: 'Intimidate'}, - baseSpecies: 'Arcanine', }, Basculegion: { types: ['Ghost', 'Steel'], bs: {hp: 120, at: 112, df: 65, sa: 80, sd: 75, sp: 78}, weightkg: 110, abilities: {0: 'Swift Swim'}, - otherFormes: ['Basculegion-F'], }, Kleavor: { types: ['Poison', 'Ice'], From abb61bde5c5e3c4af929029a1746203b0808fdbf Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:01:29 -0500 Subject: [PATCH 02/12] builder for eipp-1 --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index 09ceebf46..c1368f785 100755 --- a/build +++ b/build @@ -63,6 +63,6 @@ if (process.argv[2] !== 'view') { cpdir('src', 'dist'); cpdir('calc/dist', 'dist/calc'); makeCachebuster('dist/honkalculate.template.html', 'dist/honkalculate.html'); -makeCachebuster('dist/index.template.html', 'dist/index.html'); makeCachebuster('dist/base.template.html', 'dist/base.html'); +makeCachebuster('dist/eipp-1.template.html', 'dist/index.html'); makeCachebuster('dist/randoms.template.html', 'dist/randoms.html'); From 102c9b7307a33e0f7e9709d897365ef6217991b6 Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:02:17 -0500 Subject: [PATCH 03/12] Delete src/eikpp2.template.html --- src/eikpp2.template.html | 1633 -------------------------------------- 1 file changed, 1633 deletions(-) delete mode 100644 src/eikpp2.template.html diff --git a/src/eikpp2.template.html b/src/eikpp2.template.html deleted file mode 100644 index 86c72ca3e..000000000 --- a/src/eikpp2.template.html +++ /dev/null @@ -1,1633 +0,0 @@ - - - - - - EiKPP 2 Damage Calculator - - - - - - - - - - - - - - -
- - EiPP Pokémon Damage Calculator -
- - Select the calculator's mode of function. - - - - - - - Select the generation. - - - - - Select the output notation. - - - -
-
-
-
-
Pokémon 1's Moves (select one to show detailed results) -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
-
-
Pokémon 2's Moves (select one to show detailed results) -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
-
-
-
- Loading... (If you see this message for more than a few seconds, try enabling JavaScript.) -
Copied
-
-
- -
-
- Pokémon 1 - - -
-
- - - -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BaseIVsEVsDVs
- - - - - - - - - - 341 -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - 236 - - -
- - - - - - - - - - 236 - - - --- -
-
-
-
- - -
-
- - - - - -
-
- - -
-
- - - -
-
-
-
- - - -
-
-
-
- - /341 ( - %) - - -
-
- Health
-
- - -
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
-
- -
-
-
- Field -
- Select the battle format. - - - - -
-
- Select the default level. - - - - - - -
-
- Select the current terrain. - - - - -
-
- Select the active Ruin abilities from other Pokeémon on the field. - - - - - - - - -
-
-
- Select the current weather condition. -
- - - - - - - - - - - - - - -
-
- - - - - - -
-
-
- Select the current weather condition. - - - - - - - - -
-
- - - - - - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Pokémon 1's side
Pokémon 2's side
- - -
- - -
- - -
- - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - - - - -
- - - - - - - - -
- - -
- - -
- - - - - -
- - - - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- -
- -
-
-
-
-
- Import / Export - -
-
-
-
-
- Pokémon 2 - - -
-
- - - -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BaseIVsEVsDVs
- - - - - - - - - - 341 -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - 236 - - -
- - - - - - - - - - 236 - - - --- -
-
-
-
- - -
-
- - - - - -
-
- - -
-
- - - -
-
-
-
- - - -
-
-
-
- - /341 ( - %) - - -
-
- Health
-
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Created by Honko, maintained by Austin and Kris
EIPP Mod by Celestia - - - - -
- - - - From 64ba78ca75a9abd6139dd4bb9336410631ed720b Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:02:41 -0500 Subject: [PATCH 04/12] Delete src/index.template.html --- src/index.template.html | 1633 --------------------------------------- 1 file changed, 1633 deletions(-) delete mode 100644 src/index.template.html diff --git a/src/index.template.html b/src/index.template.html deleted file mode 100644 index 5f56afec4..000000000 --- a/src/index.template.html +++ /dev/null @@ -1,1633 +0,0 @@ - - - - - - EiPP Damage Calculator - - - - - - - - - - - - - - -
- - EiPP Pokémon Damage Calculator -
- - Select the calculator's mode of function. - - - - - - - Select the generation. - - - - - Select the output notation. - - - -
-
-
-
-
Pokémon 1's Moves (select one to show detailed results) -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
-
-
Pokémon 2's Moves (select one to show detailed results) -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
- - - ???% -
-
-
-
-
- Loading... (If you see this message for more than a few seconds, try enabling JavaScript.) -
Copied
-
-
- -
-
- Pokémon 1 - - -
-
- - - -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BaseIVsEVsDVs
- - - - - - - - - - 341 -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - 236 - - -
- - - - - - - - - - 236 - - - --- -
-
-
-
- - -
-
- - - - - -
-
- - -
-
- - - -
-
-
-
- - - -
-
-
-
- - /341 ( - %) - - -
-
- Health
-
- - -
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
-
- -
-
-
- Field -
- Select the battle format. - - - - -
-
- Select the default level. - - - - - - -
-
- Select the current terrain. - - - - -
-
- Select the active Ruin abilities from other Pokeémon on the field. - - - - - - - - -
-
-
- Select the current weather condition. -
- - - - - - - - - - - - - - -
-
- - - - - - -
-
-
- Select the current weather condition. - - - - - - - - -
-
- - - - - - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Pokémon 1's side
Pokémon 2's side
- - -
- - -
- - -
- - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - - - - -
- - - - - - - - -
- - -
- - -
- - - - - -
- - - - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- -
- -
-
-
-
-
- Import / Export - -
-
-
-
-
- Pokémon 2 - - -
-
- - - -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BaseIVsEVsDVs
- - - - - - - - - - 341 -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - - - - - 236 - - -
- - - - - - 236 - - -
- - - - - - - - - - 236 - - - --- -
-
-
-
- - -
-
- - - - - -
-
- - -
-
- - - -
-
-
-
- - - -
-
-
-
- - /341 ( - %) - - -
-
- Health
-
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Created by Honko, maintained by Austin and Kris
EiPP Mod by Celestia - - - - -
- - - - From bd4530889ed79179053313c91e3c76d6ff951a21 Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:04:08 -0500 Subject: [PATCH 05/12] eipp-1 page templates --- src/base.template.html | 3 +- src/eipp-1.template.html | 1632 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1633 insertions(+), 2 deletions(-) create mode 100644 src/eipp-1.template.html diff --git a/src/base.template.html b/src/base.template.html index 6357148e7..41c34c7ae 100644 --- a/src/base.template.html +++ b/src/base.template.html @@ -54,8 +54,7 @@
Select the calculator's mode of function. - - + diff --git a/src/eipp-1.template.html b/src/eipp-1.template.html new file mode 100644 index 000000000..79fc9ff6a --- /dev/null +++ b/src/eipp-1.template.html @@ -0,0 +1,1632 @@ + + + + + + EiPP Damage Calculator + + + + + + + + + + + + + + +
+ + EiPP Pokémon Damage Calculator +
+ + Select the calculator's mode of function. + + + + + + Select the generation. + + + + + Select the output notation. + + + +
+
+
+
+
Pokémon 1's Moves (select one to show detailed results) +
+
+ + + ???% +
+
+ + + ???% +
+
+ + + ???% +
+
+ + + ???% +
+
+
+
Pokémon 2's Moves (select one to show detailed results) +
+
+ + + ???% +
+
+ + + ???% +
+
+ + + ???% +
+
+ + + ???% +
+
+
+
+
+ Loading... (If you see this message for more than a few seconds, try enabling JavaScript.) +
Copied
+
+
+ +
+
+ Pokémon 1 + + +
+
+ + + +
+
+ + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BaseIVsEVsDVs
+ + + + + + + + + + 341 +
+ + + + + + + + + + 236 + + +
+ + + + + + + + + + 236 + + +
+ + + + + + + + + + 236 + + +
+ + + + + + + + + + 236 + + +
+ + + + + + 236 + + +
+ + + + + + + + + + 236 + + + --- +
+
+
+
+ + +
+
+ + + + + +
+
+ + +
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + /341 ( + %) + + +
+
+ Health
+
+ + +
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+
+
+ +
+
+
+ Field +
+ Select the battle format. + + + + +
+
+ Select the default level. + + + + + + +
+
+ Select the current terrain. + + + + +
+
+ Select the active Ruin abilities from other Pokeémon on the field. + + + + + + + + +
+
+
+ Select the current weather condition. +
+ + + + + + + + + + + + + + +
+
+ + + + + + +
+
+
+ Select the current weather condition. + + + + + + + + +
+
+ + + + + + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Pokémon 1's side
Pokémon 2's side
+ + +
+ + +
+ + +
+ + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + +
+ + +
+ + + + + +
+ + + + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ +
+ +
+
+
+
+
+ Import / Export + +
+
+
+
+
+ Pokémon 2 + + +
+
+ + + +
+
+ + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BaseIVsEVsDVs
+ + + + + + + + + + 341 +
+ + + + + + + + + + 236 + + +
+ + + + + + + + + + 236 + + +
+ + + + + + + + + + 236 + + +
+ + + + + + + + + + 236 + + +
+ + + + + + 236 + + +
+ + + + + + + + + + 236 + + + --- +
+
+
+
+ + +
+
+ + + + + +
+
+ + +
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + /341 ( + %) + + +
+
+ Health
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
Created by Honko, maintained by Austin and Kris
EiPP Mod by Celestia + + + + +
+ + + + From a079369b1bfefa2fa9ce15a01162d4d3b82b8393 Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:05:04 -0500 Subject: [PATCH 06/12] eipp-1 item mechanics partial --- calc/src/mechanics/eipp-1_gen789.ts | 1714 +++++++++++++++++++++++++++ 1 file changed, 1714 insertions(+) create mode 100644 calc/src/mechanics/eipp-1_gen789.ts diff --git a/calc/src/mechanics/eipp-1_gen789.ts b/calc/src/mechanics/eipp-1_gen789.ts new file mode 100644 index 000000000..d3e786ea1 --- /dev/null +++ b/calc/src/mechanics/eipp-1_gen789.ts @@ -0,0 +1,1714 @@ +import {Generation, AbilityName, StatID, Terrain} from '../data/interface'; +import {toID} from '../util'; +import { + getBerryResistType, + getFlingPower, + getItemBoostType, + getMultiAttack, + getNaturalGift, + getTechnoBlast, + SEED_BOOSTED_STAT, +} from '../items'; +import {RawDesc} from '../desc'; +import {Field} from '../field'; +import {Move} from '../move'; +import {Pokemon} from '../pokemon'; +import {Result} from '../result'; +import { + chainMods, + checkAirLock, + checkDauntlessShield, + checkDownload, + checkEmbody, + checkForecast, + checkInfiltrator, + checkIntimidate, + checkIntrepidSword, + checkItem, + checkMultihitBoost, + checkSeedBoost, + checkTeraformZero, + checkWonderRoom, + computeFinalStats, + countBoosts, + getBaseDamage, + getEVDescriptionText, + getFinalDamage, + getModifiedStat, + getQPBoostedStat, + getMoveEffectiveness, + getShellSideArmCategory, + getWeightFactor, + handleFixedDamageMoves, + isGrounded, + OF16, OF32, + pokeRound, + isQPActive, +} from './util'; + +export function calculateSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field +) { + // #region Initial + + checkAirLock(attacker, field); + checkAirLock(defender, field); + checkTeraformZero(attacker, field); + checkTeraformZero(defender, field); + checkForecast(attacker, field.weather); + checkForecast(defender, field.weather); + checkItem(attacker, field.isMagicRoom); + checkItem(defender, field.isMagicRoom); + checkWonderRoom(attacker, field.isWonderRoom); + checkWonderRoom(defender, field.isWonderRoom); + checkSeedBoost(attacker, field); + checkSeedBoost(defender, field); + checkDauntlessShield(attacker, gen); + checkDauntlessShield(defender, gen); + checkEmbody(attacker, gen); + checkEmbody(defender, gen); + + computeFinalStats(gen, attacker, defender, field, 'def', 'spd', 'spe'); + + checkIntimidate(gen, attacker, defender); + checkIntimidate(gen, defender, attacker); + checkDownload(attacker, defender, field.isWonderRoom); + checkDownload(defender, attacker, field.isWonderRoom); + checkIntrepidSword(attacker, gen); + checkIntrepidSword(defender, gen); + + computeFinalStats(gen, attacker, defender, field, 'atk', 'spa'); + + checkInfiltrator(attacker, field.defenderSide); + checkInfiltrator(defender, field.attackerSide); + + const desc: RawDesc = { + attackerName: attacker.name, + attackerTera: attacker.teraType, + moveName: move.name, + defenderName: defender.name, + defenderTera: defender.teraType, + isDefenderDynamaxed: defender.isDynamaxed, + isWonderRoom: field.isWonderRoom, + }; + + const result = new Result(gen, attacker, defender, move, field, 0, desc); + + if (move.category === 'Status' && !move.named('Nature Power')) { + return result; + } + + const breaksProtect = move.breaksProtect || move.isZ || attacker.isDynamaxed || + (attacker.hasAbility('Unseen Fist') && move.flags.contact) || attacker.hasItem('Sledgehammer'); + + if (field.defenderSide.isProtected && !breaksProtect) { + desc.isProtected = true; + return result; + } + + const defenderIgnoresAbility = defender.hasAbility( + 'Full Metal Body', + 'Neutralizing Gas', + 'Prism Armor', + 'Shadow Shield' + ); + + const attackerIgnoresAbility = attacker.hasAbility('Mold Breaker', 'Teravolt', 'Turboblaze'); + const moveIgnoresAbility = move.named( + 'G-Max Drum Solo', + 'G-Max Fire Ball', + 'G-Max Hydrosnipe', + 'Light That Burns the Sky', + 'Menacing Moonraze Maelstrom', + 'Moongeist Beam', + 'Photon Geyser', + 'Searing Sunraze Smash', + 'Sunsteel Strike' + ); + if (!defenderIgnoresAbility && !defender.hasAbility('Poison Heal') && + (attackerIgnoresAbility || moveIgnoresAbility)) { + if (attackerIgnoresAbility) desc.attackerAbility = attacker.ability; + if (defender.hasItem('Ability Shield')) { + desc.defenderItem = defender.item; + } else { + defender.ability = '' as AbilityName; + } + } + + // Merciless does not ignore Shell Armor, damage dealt to a poisoned Pokemon with Shell Armor + // will not be a critical hit (UltiMario) + const isCritical = !defender.hasAbility('Battle Armor', 'Shell Armor') && + (move.isCrit || (attacker.hasAbility('Merciless') && defender.hasStatus('psn', 'tox'))) && + move.timesUsed === 1; + + let type = move.type; + if (move.named('Weather Ball')) { + const holdingUmbrella = attacker.hasItem('Utility Umbrella'); + type = + field.hasWeather('Sun', 'Harsh Sunshine') && !holdingUmbrella ? 'Fire' + : field.hasWeather('Rain', 'Heavy Rain') && !holdingUmbrella ? 'Water' + : field.hasWeather('Sand') ? 'Rock' + : field.hasWeather('Hail', 'Snow') ? 'Ice' + : 'Normal'; + desc.weather = field.weather; + desc.moveType = type; + } else if (move.named('Judgment') && attacker.item && attacker.item.includes('Plate')) { + type = getItemBoostType(attacker.item)!; + } else if (move.named('Techno Blast') && attacker.item && attacker.item.includes('Drive')) { + type = getTechnoBlast(attacker.item)!; + } else if (move.named('Multi-Attack') && attacker.item && attacker.item.includes('Memory')) { + type = getMultiAttack(attacker.item)!; + } else if (move.named('Natural Gift') && attacker.item && attacker.item.includes('Berry')) { + const gift = getNaturalGift(gen, attacker.item)!; + type = gift.t; + desc.moveType = type; + desc.attackerItem = attacker.item; + } else if ( + move.named('Nature Power') || + (move.named('Terrain Pulse') && isGrounded(attacker, field)) + ) { + type = + field.hasTerrain('Electric') ? 'Electric' + : field.hasTerrain('Grassy') ? 'Grass' + : field.hasTerrain('Misty') ? 'Fairy' + : field.hasTerrain('Psychic') ? 'Psychic' + : 'Normal'; + desc.terrain = field.terrain; + desc.moveType = type; + } else if (move.named('Revelation Dance')) { + if (attacker.teraType) { + type = attacker.teraType; + } else { + type = attacker.types[0]; + } + } else if (move.named('Aura Wheel')) { + if (attacker.named('Morpeko')) { + type = 'Electric'; + } else if (attacker.named('Morpeko-Hangry')) { + type = 'Dark'; + } + } else if (move.named('Raging Bull')) { + if (attacker.named('Tauros-Paldea-Combat')) { + type = 'Fighting'; + } else if (attacker.named('Tauros-Paldea-Blaze')) { + type = 'Fire'; + } else if (attacker.named('Tauros-Paldea-Aqua')) { + type = 'Water'; + } + } else if (move.named('Ivy Cudgel')) { + if (attacker.name.includes('Ogerpon-Cornerstone')) { + type = 'Rock'; + } else if (attacker.name.includes('Ogerpon-Hearthflame')) { + type = 'Fire'; + } else if (attacker.name.includes('Ogerpon-Wellspring')) { + type = 'Water'; + } + } + + let hasAteAbilityTypeChange = false; + let isAerilate = false; + let isPixilate = false; + let isRefrigerate = false; + let isGalvanize = false; + let isLiquidVoice = false; + let isNormalize = false; + const noTypeChange = move.named( + 'Revelation Dance', + 'Judgment', + 'Nature Power', + 'Techno Blast', + 'Multi Attack', + 'Natural Gift', + 'Weather Ball', + 'Terrain Pulse', + 'Struggle', + ) || (move.named('Tera Blast') && attacker.teraType); + + if (!move.isZ && !noTypeChange) { + const normal = move.hasType('Normal'); + if ((isAerilate = attacker.hasAbility('Aerilate') && normal)) { + type = 'Flying'; + } else if ((isGalvanize = attacker.hasAbility('Galvanize') && normal)) { + type = 'Electric'; + } else if ((isLiquidVoice = attacker.hasAbility('Liquid Voice') && !!move.flags.sound)) { + type = 'Water'; + } else if ((isPixilate = attacker.hasAbility('Pixilate') && normal)) { + type = 'Fairy'; + } else if ((isRefrigerate = attacker.hasAbility('Refrigerate') && normal)) { + type = 'Ice'; + } else if ((isNormalize = attacker.hasAbility('Normalize'))) { // Boosts any type + type = 'Normal'; + } + if (isGalvanize || isPixilate || isRefrigerate || isAerilate || isNormalize) { + desc.attackerAbility = attacker.ability; + hasAteAbilityTypeChange = true; + } else if (isLiquidVoice) { + desc.attackerAbility = attacker.ability; + } + } + + if (move.named('Tera Blast') && attacker.teraType) { + type = attacker.teraType; + } + + move.type = type; + + // FIXME: this is incorrect, should be move.flags.heal, not move.drain + if ((attacker.hasAbility('Triage') && move.drain) || + (attacker.hasAbility('Gale Wings') && + move.hasType('Flying') && + attacker.curHP() === attacker.maxHP())) { + move.priority = 1; + desc.attackerAbility = attacker.ability; + } + + const isGhostRevealed = + attacker.hasAbility('Scrappy') || attacker.hasAbility('Mind\'s Eye') || + field.defenderSide.isForesight; + const isRingTarget = + defender.hasItem('Ring Target') && !defender.hasAbility('Klutz'); + const type1Effectiveness = getMoveEffectiveness( + gen, + move, + defender.types[0], + isGhostRevealed, + field.isGravity, + isRingTarget + ); + const type2Effectiveness = defender.types[1] + ? getMoveEffectiveness( + gen, + move, + defender.types[1], + isGhostRevealed, + field.isGravity, + isRingTarget + ) + : 1; + let typeEffectiveness = type1Effectiveness * type2Effectiveness; + + if (defender.teraType && defender.teraType !== 'Stellar') { + typeEffectiveness = getMoveEffectiveness( + gen, + move, + defender.teraType, + isGhostRevealed, + field.isGravity, + isRingTarget + ); + } + + if (typeEffectiveness === 0 && move.hasType('Ground') && + defender.hasItem('Iron Ball') && !defender.hasAbility('Klutz')) { + typeEffectiveness = 1; + } + + if (typeEffectiveness === 0 && move.named('Thousand Arrows')) { + typeEffectiveness = 1; + } + + if (typeEffectiveness === 0) { + return result; + } + + if ((move.named('Sky Drop') && + (defender.hasType('Flying') || defender.weightkg >= 200 || field.isGravity)) || + (move.named('Synchronoise') && !defender.hasType(attacker.types[0]) && + (!attacker.types[1] || !defender.hasType(attacker.types[1]))) || + (move.named('Dream Eater') && + (!(defender.hasStatus('slp') || defender.hasAbility('Comatose')))) || + (move.named('Steel Roller') && !field.terrain) || + (move.named('Poltergeist') && (!defender.item || isQPActive(defender, field))) + ) { + return result; + } + + if ( + (field.hasWeather('Harsh Sunshine') && move.hasType('Water')) || + (field.hasWeather('Heavy Rain') && move.hasType('Fire')) + ) { + desc.weather = field.weather; + return result; + } + + if (attacker.hasItem('Nurse Hat') && move.bp <= 50 && typeEffectiveness <= 0.5 && typeEffectiveness > 0) { + typeEffectiveness = 0; + desc.attackerItem = attacker.item; + desc.moveName = 'Heal Pulse'; + return result; + } + + if (field.hasWeather('Strong Winds') && defender.hasType('Flying') && + gen.types.get(toID(move.type))!.effectiveness['Flying']! > 1) { + typeEffectiveness /= 2; + desc.weather = field.weather; + } + + if (move.type === 'Stellar') { + typeEffectiveness = !defender.teraType ? 1 : 2; + } + + // Tera Shell works only at full HP, but for all hits of multi-hit moves + if (defender.hasAbility('Tera Shell') && + defender.curHP() === defender.maxHP() && + (!field.defenderSide.isSR && (!field.defenderSide.spikes || defender.hasType('Flying')) || + defender.hasItem('Heavy-Duty Boots')) + ) { + typeEffectiveness = 0.5; + desc.defenderAbility = defender.ability; + } + + if ((defender.hasAbility('Wonder Guard') && typeEffectiveness <= 1) || + (move.hasType('Grass') && defender.hasAbility('Sap Sipper')) || + (move.hasType('Fire') && defender.hasAbility('Flash Fire', 'Well-Baked Body')) || + (move.hasType('Water') && defender.hasAbility('Dry Skin', 'Storm Drain', 'Water Absorb')) || + (move.hasType('Electric') && + defender.hasAbility('Lightning Rod', 'Motor Drive', 'Volt Absorb')) || + (move.hasType('Ground') && + !field.isGravity && !move.named('Thousand Arrows') && + !defender.hasItem('Iron Ball') && defender.hasAbility('Levitate')) || + (move.flags.bullet && defender.hasAbility('Bulletproof')) || + (move.flags.sound && !move.named('Clangorous Soul') && defender.hasAbility('Soundproof')) || + (move.priority > 0 && defender.hasAbility('Queenly Majesty', 'Dazzling', 'Armor Tail')) || + (move.hasType('Ground') && defender.hasAbility('Earth Eater')) || + (move.flags.wind && defender.hasAbility('Wind Rider')) + ) { + desc.defenderAbility = defender.ability; + return result; + } + + if (move.hasType('Ground') && !move.named('Thousand Arrows') && + !field.isGravity && defender.hasItem('Air Balloon')) { + desc.defenderItem = defender.item; + return result; + } + + if (move.priority > 0 && field.hasTerrain('Psychic') && isGrounded(defender, field)) { + desc.terrain = field.terrain; + return result; + } + + const weightBasedMove = move.named('Heat Crash', 'Heavy Slam', 'Low Kick', 'Grass Knot'); + if (defender.isDynamaxed && weightBasedMove) { + return result; + } + + desc.HPEVs = `${defender.evs.hp} HP`; + + const fixedDamage = handleFixedDamageMoves(attacker, move); + if (fixedDamage) { + if (attacker.hasAbility('Parental Bond') || (attacker.hasItem('Queen\'s Gland') && attacker.hasType('Bug') && attacker.gender === 'F')) { + result.damage = [fixedDamage, fixedDamage]; + desc.attackerAbility = attacker.ability; + } else { + result.damage = fixedDamage; + } + return result; + } + + if (move.named('Final Gambit')) { + result.damage = attacker.curHP(); + return result; + } + + if (move.named('Guardian of Alola')) { + let zLostHP = Math.floor((defender.curHP() * 3) / 4); + if (field.defenderSide.isProtected && attacker.item && attacker.item.includes(' Z')) { + zLostHP = Math.ceil(zLostHP / 4 - 0.5); + } + result.damage = zLostHP; + return result; + } + + if (move.named('Nature\'s Madness')) { + const lostHP = field.defenderSide.isProtected ? 0 : Math.floor(defender.curHP() / 2); + result.damage = lostHP; + return result; + } + + if (move.named('Spectral Thief')) { + let stat: StatID; + for (stat in defender.boosts) { + if (defender.boosts[stat] > 0) { + attacker.boosts[stat] += + attacker.hasAbility('Contrary') ? -defender.boosts[stat]! : defender.boosts[stat]!; + if (attacker.boosts[stat] > 6) attacker.boosts[stat] = 6; + if (attacker.boosts[stat] < -6) attacker.boosts[stat] = -6; + attacker.stats[stat] = getModifiedStat(attacker.rawStats[stat]!, attacker.boosts[stat]!); + defender.boosts[stat] = 0; + defender.stats[stat] = defender.rawStats[stat]; + } + } + } + + if (move.hits > 1) { + desc.hits = move.hits; + } + + const turnOrder = attacker.stats.spe > defender.stats.spe ? 'first' : 'last'; + + // #endregion + // #region Base Power + + const basePower = calculateBasePowerSMSSSV( + gen, + attacker, + defender, + move, + field, + hasAteAbilityTypeChange, + desc + ); + if (basePower === 0) { + return result; + } + + // #endregion + // #region (Special) Attack + const attack = calculateAttackSMSSSV(gen, attacker, defender, move, field, desc, isCritical); + const attackSource = move.named('Foul Play') ? defender : attacker; + if (move.named('Photon Geyser', 'Light That Burns The Sky') || + (move.named('Tera Blast') && attackSource.teraType)) { + move.category = attackSource.stats.atk > attackSource.stats.spa ? 'Physical' : 'Special'; + } + const attackStat = + move.named('Shell Side Arm') && + getShellSideArmCategory(attacker, defender) === 'Physical' + ? 'atk' + : move.named('Body Press') + ? 'def' + : move.category === 'Special' + ? 'spa' + : 'atk'; + // #endregion + // #region (Special) Defense + + const defense = calculateDefenseSMSSSV(gen, attacker, defender, move, field, desc, isCritical); + const hitsPhysical = move.overrideDefensiveStat === 'def' || move.category === 'Physical' || + (move.named('Shell Side Arm') && getShellSideArmCategory(attacker, defender) === 'Physical'); + const defenseStat = hitsPhysical ? 'def' : 'spd'; + + // #endregion + // #region Damage + + const baseDamage = calculateBaseDamageSMSSSV( + gen, + attacker, + defender, + basePower, + attack, + defense, + move, + field, + desc, + isCritical + ); + + if (hasTerrainSeed(defender) && + field.hasTerrain(defender.item!.substring(0, defender.item!.indexOf(' ')) as Terrain) && + SEED_BOOSTED_STAT[defender.item!] === defenseStat) { + // Last condition applies so the calc doesn't show a seed where it wouldn't affect the outcome + // (like Grassy Seed when being hit by a special move) + desc.defenderItem = defender.item; + } + + // the random factor is applied between the crit mod and the stab mod, so don't apply anything + // below this until we're inside the loop + let stabMod = 4096; + if (attacker.hasOriginalType(move.type)) { + stabMod += 2048; + } else if (attacker.hasAbility('Protean', 'Libero') && !attacker.teraType) { + stabMod += 2048; + desc.attackerAbility = attacker.ability; + } + const teraType = attacker.teraType; + if (teraType === move.type && teraType !== 'Stellar') { + stabMod += 2048; + desc.attackerTera = teraType; + } + if (attacker.hasAbility('Adaptability') && attacker.hasType(move.type)) { + stabMod += teraType && attacker.hasOriginalType(teraType) ? 1024 : 2048; + desc.attackerAbility = attacker.ability; + } + + // TODO: For now all moves are always boosted + const isStellarBoosted = + attacker.teraType === 'Stellar' && + (move.isStellarFirstUse || attacker.named('Terapagos-Stellar')); + if (isStellarBoosted) { + if (attacker.hasOriginalType(move.type)) { + stabMod += 2048; + } else { + stabMod = 4915; + } + } + + const applyBurn = + attacker.hasStatus('brn') && + move.category === 'Physical' && + !attacker.hasAbility('Guts') && + !move.named('Facade'); + desc.isBurned = applyBurn; + const finalMods = calculateFinalModsSMSSSV( + gen, + attacker, + defender, + move, + field, + desc, + isCritical, + typeEffectiveness + ); + + let protect = false; + if (field.defenderSide.isProtected && + (attacker.isDynamaxed || (move.isZ && attacker.item && attacker.item.includes(' Z')) || (attacker.hasItem('Sledgehammer') && !move.named('Fling')))) { + protect = true; + desc.isProtected = true; + } + + const finalMod = chainMods(finalMods, 41, 131072); + + const isSpread = field.gameType !== 'Singles' && + ['allAdjacent', 'allAdjacentFoes'].includes(move.target); + + let childDamage: number[] | undefined; + if (attacker.hasAbility('Parental Bond') && move.hits === 1 && !isSpread) { + const child = attacker.clone(); + child.ability = 'Parental Bond (Child)' as AbilityName; + checkMultihitBoost(gen, child, defender, move, field, desc); + childDamage = calculateSMSSSV(gen, child, defender, move, field).damage as number[]; + desc.attackerAbility = attacker.ability; + } else if (attacker.hasType('Bug') && attacker.hasItem('Queen\'s Gland') && attacker.gender === 'F' && move.hits === 1 && !isSpread) { + const child = attacker.clone(); + child.ability = 'Parental Bond (Child)' as AbilityName; + child.item = undefined; + checkMultihitBoost(gen, child, defender, move, field, desc); + childDamage = calculateSMSSSV(gen, child, defender, move, field).damage as number[]; + desc.attackerAbility = 'Parental Bond'; + } + + let damage = []; + for (let i = 0; i < 16; i++) { + damage[i] = + getFinalDamage(baseDamage, i, typeEffectiveness, applyBurn, stabMod, finalMod, protect); + } + + if (move.dropsStats && move.timesUsed! > 1) { + const simpleMultiplier = attacker.hasAbility('Simple') ? 2 : 1; + + desc.moveTurns = `over ${move.timesUsed} turns`; + const hasWhiteHerb = attacker.hasItem('White Herb'); + let usedWhiteHerb = false; + let dropCount = 0; + for (let times = 0; times < move.timesUsed!; times++) { + const newAttack = getModifiedStat(attack, dropCount); + let damageMultiplier = 0; + damage = damage.map(affectedAmount => { + if (times) { + const newBaseDamage = getBaseDamage(attacker.level, basePower, newAttack, defense); + const newFinalDamage = getFinalDamage( + newBaseDamage, + damageMultiplier, + typeEffectiveness, + applyBurn, + stabMod, + finalMod, + protect + ); + damageMultiplier++; + return affectedAmount + newFinalDamage; + } + return affectedAmount; + }); + + if (attacker.hasAbility('Contrary')) { + dropCount = Math.min(6, dropCount + move.dropsStats); + desc.attackerAbility = attacker.ability; + } else { + dropCount = Math.max(-6, dropCount - move.dropsStats * simpleMultiplier); + if (attacker.hasAbility('Simple')) { + desc.attackerAbility = attacker.ability; + } + } + + // the Pokémon hits THEN the stat rises / lowers + if (hasWhiteHerb && attacker.boosts[attackStat] < 0 && !usedWhiteHerb) { + dropCount += move.dropsStats * simpleMultiplier; + usedWhiteHerb = true; + desc.attackerItem = attacker.item; + } + } + } + + if (move.hits > 1) { + let defenderDefBoost = 0; + for (let times = 0; times < move.hits; times++) { + const newDefense = getModifiedStat(defense, defenderDefBoost); + let damageMultiplier = 0; + damage = damage.map(affectedAmount => { + if (times) { + const newFinalMods = calculateFinalModsSMSSSV( + gen, + attacker, + defender, + move, + field, + desc, + isCritical, + typeEffectiveness, + times + ); + const newFinalMod = chainMods(newFinalMods, 41, 131072); + const newBaseDamage = calculateBaseDamageSMSSSV( + gen, + attacker, + defender, + basePower, + attack, + newDefense, + move, + field, + desc, + isCritical + ); + const newFinalDamage = getFinalDamage( + newBaseDamage, + damageMultiplier, + typeEffectiveness, + applyBurn, + stabMod, + newFinalMod, + protect + ); + damageMultiplier++; + return affectedAmount + newFinalDamage; + } + return affectedAmount; + }); + if (hitsPhysical && defender.ability === 'Stamina') { + defenderDefBoost = Math.min(6, defenderDefBoost + 1); + desc.defenderAbility = 'Stamina'; + } else if (hitsPhysical && defender.ability === 'Weak Armor') { + defenderDefBoost = Math.max(-6, defenderDefBoost - 1); + desc.defenderAbility = 'Weak Armor'; + } + } + } + + desc.attackBoost = + move.named('Foul Play') ? defender.boosts[attackStat] : attacker.boosts[attackStat]; + + result.damage = childDamage ? [damage, childDamage] : damage; + + // #endregion + + return result; +} + +export function calculateBasePowerSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field, + hasAteAbilityTypeChange: boolean, + desc: RawDesc +) { + const turnOrder = attacker.stats.spe > defender.stats.spe ? 'first' : 'last'; + + let basePower: number; + + switch (move.name) { + case 'Payback': + basePower = move.bp * (turnOrder === 'last' ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Bolt Beak': + case 'Fishious Rend': + basePower = move.bp * (turnOrder !== 'last' ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Pursuit': + const switching = field.defenderSide.isSwitching === 'out'; + basePower = move.bp * (switching ? 2 : 1); + if (switching) desc.isSwitching = 'out'; + desc.moveBP = basePower; + break; + case 'Electro Ball': + const r = Math.floor(attacker.stats.spe / defender.stats.spe); + basePower = r >= 4 ? 150 : r >= 3 ? 120 : r >= 2 ? 80 : r >= 1 ? 60 : 40; + if (defender.stats.spe === 0) basePower = 40; + desc.moveBP = basePower; + break; + case 'Gyro Ball': + basePower = Math.min(150, Math.floor((25 * defender.stats.spe) / attacker.stats.spe) + 1); + if (attacker.stats.spe === 0) basePower = 1; + desc.moveBP = basePower; + break; + case 'Punishment': + basePower = Math.min(200, 60 + 20 * countBoosts(gen, defender.boosts)); + desc.moveBP = basePower; + break; + case 'Low Kick': + case 'Grass Knot': + const w = defender.weightkg * getWeightFactor(defender); + basePower = w >= 200 ? 120 : w >= 100 ? 100 : w >= 50 ? 80 : w >= 25 ? 60 : w >= 10 ? 40 : 20; + desc.moveBP = basePower; + break; + case 'Hex': + case 'Infernal Parade': + // Hex deals double damage to Pokemon with Comatose (ih8ih8sn0w) + basePower = move.bp * (defender.status || defender.hasAbility('Comatose') ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Barb Barrage': + basePower = move.bp * (defender.hasStatus('psn', 'tox') ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Heavy Slam': + case 'Heat Crash': + const wr = + (attacker.weightkg * getWeightFactor(attacker)) / + (defender.weightkg * getWeightFactor(defender)); + basePower = wr >= 5 ? 120 : wr >= 4 ? 100 : wr >= 3 ? 80 : wr >= 2 ? 60 : 40; + desc.moveBP = basePower; + break; + case 'Stored Power': + case 'Power Trip': + basePower = 20 + 20 * countBoosts(gen, attacker.boosts); + desc.moveBP = basePower; + break; + case 'Acrobatics': + basePower = move.bp * (attacker.hasItem('Flying Gem') || + (!attacker.item || isQPActive(attacker, field)) ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Assurance': + basePower = move.bp * (defender.hasAbility('Parental Bond (Child)') ? 2 : 1); + // NOTE: desc.attackerAbility = 'Parental Bond' will already reflect this boost + break; + case 'Wake-Up Slap': + // Wake-Up Slap deals double damage to Pokemon with Comatose (ih8ih8sn0w) + basePower = move.bp * (defender.hasStatus('slp') || defender.hasAbility('Comatose') ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Smelling Salts': + basePower = move.bp * (defender.hasStatus('par') ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Weather Ball': + basePower = move.bp * (field.weather && !field.hasWeather('Strong Winds') ? 2 : 1); + if (field.hasWeather('Sun', 'Harsh Sunshine', 'Rain', 'Heavy Rain') && + attacker.hasItem('Utility Umbrella')) basePower = move.bp; + desc.moveBP = basePower; + break; + case 'Terrain Pulse': + basePower = move.bp * (isGrounded(attacker, field) && field.terrain ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Rising Voltage': + basePower = move.bp * ((isGrounded(defender, field) && field.hasTerrain('Electric')) ? 2 : 1); + desc.moveBP = basePower; + break; + case 'Psyblade': + basePower = move.bp * (field.hasTerrain('Electric') ? 1.5 : 1); + if (field.hasTerrain('Electric')) { + desc.moveBP = basePower; + desc.terrain = field.terrain; + } + break; + case 'Fling': + basePower = getFlingPower(attacker.item); + desc.moveBP = basePower; + desc.attackerItem = attacker.item; + break; + case 'Dragon Energy': + case 'Eruption': + case 'Water Spout': + basePower = Math.max(1, Math.floor((150 * attacker.curHP()) / attacker.maxHP())); + desc.moveBP = basePower; + break; + case 'Flail': + case 'Reversal': + const p = Math.floor((48 * attacker.curHP()) / attacker.maxHP()); + basePower = p <= 1 ? 200 : p <= 4 ? 150 : p <= 9 ? 100 : p <= 16 ? 80 : p <= 32 ? 40 : 20; + desc.moveBP = basePower; + break; + case 'Natural Gift': + if (attacker.item?.includes('Berry')) { + const gift = getNaturalGift(gen, attacker.item)!; + basePower = gift.p; + desc.attackerItem = attacker.item; + desc.moveBP = move.bp; + } else { + basePower = move.bp; + } + break; + case 'Nature Power': + move.category = 'Special'; + move.secondaries = true; + switch (field.terrain) { + case 'Electric': + basePower = 90; + desc.moveName = 'Thunderbolt'; + break; + case 'Grassy': + basePower = 90; + desc.moveName = 'Energy Ball'; + break; + case 'Misty': + basePower = 95; + desc.moveName = 'Moonblast'; + break; + case 'Psychic': + basePower = 90; + desc.moveName = 'Psychic'; + break; + default: + basePower = 80; + desc.moveName = 'Tri Attack'; + } + break; + case 'Water Shuriken': + basePower = attacker.named('Greninja-Ash') && attacker.hasAbility('Battle Bond') ? 20 : 15; + desc.moveBP = basePower; + break; + // Triple Axel's damage doubles after each consecutive hit (20, 40, 60), this is a hack + case 'Triple Axel': + basePower = move.hits === 2 ? 30 : move.hits === 3 ? 40 : 20; + desc.moveBP = basePower; + break; + // Triple Kick's damage doubles after each consecutive hit (10, 20, 30), this is a hack + case 'Triple Kick': + basePower = move.hits === 2 ? 15 : move.hits === 3 ? 30 : 10; + desc.moveBP = basePower; + break; + case 'Crush Grip': + case 'Wring Out': + basePower = 100 * Math.floor((defender.curHP() * 4096) / defender.maxHP()); + basePower = Math.floor(Math.floor((120 * basePower + 2048 - 1) / 4096) / 100) || 1; + desc.moveBP = basePower; + break; + case 'Hard Press': + basePower = 100 * Math.floor((defender.curHP() * 4096) / defender.maxHP()); + basePower = Math.floor(Math.floor((100 * basePower + 2048 - 1) / 4096) / 100) || 1; + desc.moveBP = basePower; + break; + case 'Tera Blast': + basePower = attacker.teraType === 'Stellar' ? 100 : 80; + desc.moveBP = basePower; + break; + default: + basePower = move.bp; + } + if (basePower === 0) { + return 0; + } + if (move.named( + 'Breakneck Blitz', 'Bloom Doom', 'Inferno Overdrive', 'Hydro Vortex', 'Gigavolt Havoc', + 'Subzero Slammer', 'Supersonic Skystrike', 'Savage Spin-Out', 'Acid Downpour', 'Tectonic Rage', + 'Continental Crush', 'All-Out Pummeling', 'Shattered Psyche', 'Never-Ending Nightmare', + 'Devastating Drake', 'Black Hole Eclipse', 'Corkscrew Crash', 'Twinkle Tackle' + )) { + // show z-move power in description + desc.moveBP = move.bp; + } + const bpMods = calculateBPModsSMSSSV( + gen, + attacker, + defender, + move, + field, + desc, + basePower, + hasAteAbilityTypeChange, + turnOrder + ); + basePower = OF16(Math.max(1, pokeRound((basePower * chainMods(bpMods, 41, 2097152)) / 4096))); + if ( + attacker.teraType && move.type === attacker.teraType && + attacker.hasType(attacker.teraType) && move.hits === 1 && + move.priority <= 0 && move.bp > 0 && !move.named('Dragon Energy', 'Eruption', 'Water Spout') && + basePower < 60 && gen.num >= 9 + ) { + basePower = 60; + desc.moveBP = 60; + } + return basePower; +} + +export function calculateBPModsSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field, + desc: RawDesc, + basePower: number, + hasAteAbilityTypeChange: boolean, + turnOrder: string +) { + const bpMods = []; + + // Move effects + + let resistedKnockOffDamage = + (!defender.item || isQPActive(defender, field)) || + (defender.named('Dialga-Origin') && defender.hasItem('Adamant Crystal')) || + (defender.named('Palkia-Origin') && defender.hasItem('Lustrous Globe')) || + // Griseous Core for gen 9, Griseous Orb otherwise + (defender.name.includes('Giratina-Origin') && defender.item.includes('Griseous')) || + (defender.name.includes('Arceus') && defender.item.includes('Plate')) || + (defender.name.includes('Genesect') && defender.item.includes('Drive')) || + (defender.named('Groudon', 'Groudon-Primal') && defender.hasItem('Red Orb')) || + (defender.named('Kyogre', 'Kyogre-Primal') && defender.hasItem('Blue Orb')) || + (defender.name.includes('Silvally') && defender.item.includes('Memory')) || + defender.item.includes(' Z') || + (defender.named('Zacian') && defender.hasItem('Rusted Sword')) || + (defender.named('Zamazenta') && defender.hasItem('Rusted Shield')) || + (defender.name.includes('Ogerpon-Cornerstone') && defender.hasItem('Cornerstone Mask')) || + (defender.name.includes('Ogerpon-Hearthflame') && defender.hasItem('Hearthflame Mask')) || + (defender.name.includes('Ogerpon-Wellspring') && defender.hasItem('Wellspring Mask')) || + (defender.named('Venomicon-Epilogue') && defender.hasItem('Vile Vial')); + + // The last case only applies when the Pokemon has the Mega Stone that matches its species + // (or when it's already a Mega-Evolution) + if (!resistedKnockOffDamage && defender.item) { + const item = gen.items.get(toID(defender.item))!; + resistedKnockOffDamage = !!item.megaEvolves && defender.name.includes(item.megaEvolves); + } + + if ((move.named('Facade') && attacker.hasStatus('brn', 'par', 'psn', 'tox')) || + (move.named('Brine') && defender.curHP() <= defender.maxHP() / 2) || + (move.named('Venoshock') && defender.hasStatus('psn', 'tox')) || + (move.named('Lash Out') && (countBoosts(gen, attacker.boosts) < 0)) + ) { + bpMods.push(8192); + desc.moveBP = basePower * 2; + } else if ( + move.named('Expanding Force') && isGrounded(attacker, field) && field.hasTerrain('Psychic') + ) { + move.target = 'allAdjacentFoes'; + bpMods.push(6144); + desc.moveBP = basePower * 1.5; + } else if ( + move.named('Tera Starstorm') && attacker.name === 'Terapagos-Stellar' + ) { + move.target = 'allAdjacentFoes'; + move.type = 'Stellar'; + } else if ((move.named('Knock Off') && !resistedKnockOffDamage) || + (move.named('Misty Explosion') && isGrounded(attacker, field) && field.hasTerrain('Misty')) || + (move.named('Grav Apple') && field.isGravity) + ) { + bpMods.push(6144); + desc.moveBP = basePower * 1.5; + } else if (move.named('Solar Beam', 'Solar Blade') && + field.hasWeather('Rain', 'Heavy Rain', 'Sand', 'Hail', 'Snow')) { + bpMods.push(2048); + desc.moveBP = basePower / 2; + desc.weather = field.weather; + } else if (move.named('Collision Course', 'Electro Drift')) { + const isGhostRevealed = + attacker.hasAbility('Scrappy') || attacker.hasAbility('Mind\'s Eye') || + field.defenderSide.isForesight; + const isRingTarget = + defender.hasItem('Ring Target') && !defender.hasAbility('Klutz'); + const types = defender.teraType ? [defender.teraType] : defender.types; + const type1Effectiveness = getMoveEffectiveness( + gen, + move, + types[0], + isGhostRevealed, + field.isGravity, + isRingTarget + ); + const type2Effectiveness = types[1] ? getMoveEffectiveness( + gen, + move, + types[1], + isGhostRevealed, + field.isGravity, + isRingTarget + ) : 1; + if (type1Effectiveness * type2Effectiveness >= 2) { + bpMods.push(5461); + desc.moveBP = basePower * (5461 / 4096); + } + } + + if (field.attackerSide.isHelpingHand) { + bpMods.push(6144); + desc.isHelpingHand = true; + } + + // Field effects + + const terrainMultiplier = gen.num > 7 ? 5325 : 6144; + if (isGrounded(attacker, field)) { + if ((field.hasTerrain('Electric') && move.hasType('Electric')) || + (field.hasTerrain('Grassy') && move.hasType('Grass')) || + (field.hasTerrain('Psychic') && move.hasType('Psychic')) + ) { + bpMods.push(terrainMultiplier); + desc.terrain = field.terrain; + } + } + if (isGrounded(defender, field)) { + if ((field.hasTerrain('Misty') && move.hasType('Dragon')) || + (field.hasTerrain('Grassy') && move.named('Bulldoze', 'Earthquake')) + ) { + bpMods.push(2048); + desc.terrain = field.terrain; + } + } + + // Abilities + + // Use BasePower after moves with custom BP to determine if Technician should boost + if ((attacker.hasAbility('Technician') && basePower <= 60) || + (attacker.hasAbility('Flare Boost') && + attacker.hasStatus('brn') && move.category === 'Special') || + (attacker.hasAbility('Toxic Boost') && + attacker.hasStatus('psn', 'tox') && move.category === 'Physical') || + (attacker.hasAbility('Mega Launcher') && move.flags.pulse) || + (attacker.hasAbility('Strong Jaw') && move.flags.bite) || + (attacker.hasAbility('Steely Spirit') && move.hasType('Steel')) || + (attacker.hasAbility('Sharpness') && move.flags.slicing) + ) { + bpMods.push(6144); + desc.attackerAbility = attacker.ability; + } + + const aura = `${move.type} Aura`; + const isAttackerAura = attacker.hasAbility(aura); + const isDefenderAura = defender.hasAbility(aura); + const isUserAuraBreak = attacker.hasAbility('Aura Break') || defender.hasAbility('Aura Break'); + const isFieldAuraBreak = field.isAuraBreak; + const isFieldFairyAura = field.isFairyAura && move.type === 'Fairy'; + const isFieldDarkAura = field.isDarkAura && move.type === 'Dark'; + const auraActive = isAttackerAura || isDefenderAura || isFieldFairyAura || isFieldDarkAura; + const auraBreak = isFieldAuraBreak || isUserAuraBreak; + if (auraActive) { + if (auraBreak) { + bpMods.push(3072); + desc.attackerAbility = attacker.ability; + desc.defenderAbility = defender.ability; + } else { + bpMods.push(5448); + if (isAttackerAura) desc.attackerAbility = attacker.ability; + if (isDefenderAura) desc.defenderAbility = defender.ability; + } + } + + // Sheer Force does not power up max moves or remove the effects (SadisticMystic) + if ( + (attacker.hasAbility('Sheer Force') && + (move.secondaries || move.named('Jet Punch', 'Order Up')) && !move.isMax) || + (attacker.hasAbility('Sand Force') && + field.hasWeather('Sand') && move.hasType('Rock', 'Ground', 'Steel')) || + (attacker.hasAbility('Analytic') && + (turnOrder !== 'first' || field.defenderSide.isSwitching === 'out')) || + (attacker.hasAbility('Tough Claws') && move.flags.contact) || + (attacker.hasAbility('Punk Rock') && move.flags.sound) + ) { + bpMods.push(5325); + desc.attackerAbility = attacker.ability; + } + + if (field.attackerSide.isBattery && move.category === 'Special') { + bpMods.push(5325); + desc.isBattery = true; + } + + if (field.attackerSide.isPowerSpot) { + bpMods.push(5325); + desc.isPowerSpot = true; + } + + if (attacker.hasAbility('Rivalry') && ![attacker.gender, defender.gender].includes('N')) { + if (attacker.gender === defender.gender) { + bpMods.push(5120); + desc.rivalry = 'buffed'; + } else { + bpMods.push(3072); + desc.rivalry = 'nerfed'; + } + desc.attackerAbility = attacker.ability; + } + + // The -ate abilities already changed move typing earlier, so most checks are done and desc is set + // However, Max Moves also don't boost -ate Abilities + if (!move.isMax && hasAteAbilityTypeChange) { + bpMods.push(4915); + } + + if ((attacker.hasAbility('Reckless') && (move.recoil || move.hasCrashDamage)) || + (attacker.hasAbility('Iron Fist') && move.flags.punch) + ) { + bpMods.push(4915); + desc.attackerAbility = attacker.ability; + } + + if (attacker.hasItem('Punching Glove') && move.flags.punch) { + bpMods.push(4506); + desc.attackerItem = attacker.item; + } + + if (gen.num <= 8 && defender.hasAbility('Heatproof') && move.hasType('Fire')) { + bpMods.push(2048); + desc.defenderAbility = defender.ability; + } else if (defender.hasAbility('Dry Skin') && move.hasType('Fire')) { + bpMods.push(5120); + desc.defenderAbility = defender.ability; + } + + if (attacker.hasAbility('Supreme Overlord') && attacker.alliesFainted) { + const powMod = [4096, 4506, 4915, 5325, 5734, 6144]; + bpMods.push(powMod[Math.min(5, attacker.alliesFainted)]); + desc.attackerAbility = attacker.ability; + desc.alliesFainted = attacker.alliesFainted; + } + + // Items + + if (attacker.hasItem(`${move.type} Gem`)) { + bpMods.push(5325); + desc.attackerItem = attacker.item; + } else if ( + (((attacker.hasItem('Adamant Crystal') && attacker.named('Dialga-Origin')) || + (attacker.hasItem('Adamant Orb') && attacker.named('Dialga'))) && + move.hasType('Steel', 'Dragon')) || + (((attacker.hasItem('Lustrous Orb') && + attacker.named('Palkia')) || + (attacker.hasItem('Lustrous Globe') && attacker.named('Palkia-Origin'))) && + move.hasType('Water', 'Dragon')) || + (((attacker.hasItem('Griseous Orb') || attacker.hasItem('Griseous Core')) && + (attacker.named('Giratina-Origin') || attacker.named('Giratina'))) && + move.hasType('Ghost', 'Dragon')) || + (attacker.hasItem('Vile Vial') && + attacker.named('Venomicon-Epilogue') && + move.hasType('Poison', 'Flying')) || + (attacker.hasItem('Soul Dew') && + attacker.named('Latios', 'Latias', 'Latios-Mega', 'Latias-Mega') && + move.hasType('Psychic', 'Dragon')) || + attacker.item && move.hasType(getItemBoostType(attacker.item)) || + (attacker.name.includes('Ogerpon-Cornerstone') && attacker.hasItem('Cornerstone Mask')) || + (attacker.name.includes('Ogerpon-Hearthflame') && attacker.hasItem('Hearthflame Mask')) || + (attacker.name.includes('Ogerpon-Wellspring') && attacker.hasItem('Wellspring Mask')) + ) { + bpMods.push(4915); + desc.attackerItem = attacker.item; + } else if ( + (attacker.hasItem('Muscle Band') && move.category === 'Physical') || + (attacker.hasItem('Wise Glasses') && move.category === 'Special') + ) { + bpMods.push(4505); + desc.attackerItem = attacker.item; + } + return bpMods; +} + +export function calculateAttackSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field, + desc: RawDesc, + isCritical = false +) { + let attack: number; + const attackSource = move.named('Foul Play') ? defender : attacker; + if (move.named('Photon Geyser', 'Light That Burns The Sky') || + (move.named('Tera Blast') && attackSource.teraType)) { + move.category = attackSource.stats.atk > attackSource.stats.spa ? 'Physical' : 'Special'; + } + const attackStat = + move.named('Shell Side Arm') && + getShellSideArmCategory(attacker, defender) === 'Physical' + ? 'atk' + : move.named('Body Press') + ? 'def' + : move.category === 'Special' + ? 'spa' + : 'atk'; + desc.attackEVs = + move.named('Foul Play') + ? getEVDescriptionText(gen, defender, attackStat, defender.nature) + : getEVDescriptionText(gen, attacker, attackStat, attacker.nature); + + if (attackSource.boosts[attackStat] === 0 || + (isCritical && attackSource.boosts[attackStat] < 0)) { + attack = attackSource.rawStats[attackStat]; + } else if (defender.hasAbility('Unaware')) { + attack = attackSource.rawStats[attackStat]; + desc.defenderAbility = defender.ability; + } else { + attack = attackSource.stats[attackStat]; + desc.attackBoost = attackSource.boosts[attackStat]; + } + + // unlike all other attack modifiers, Hustle gets applied directly + if (attacker.hasAbility('Hustle') && move.category === 'Physical') { + attack = pokeRound((attack * 3) / 2); + desc.attackerAbility = attacker.ability; + } + const atMods = calculateAtModsSMSSSV(gen, attacker, defender, move, field, desc); + attack = OF16(Math.max(1, pokeRound((attack * chainMods(atMods, 410, 131072)) / 4096))); + return attack; +} + +export function calculateAtModsSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field, + desc: RawDesc +) { + const atMods = []; + + // Slow Start also halves damage with special Z-moves + if ((attacker.hasAbility('Slow Start') && attacker.abilityOn && + (move.category === 'Physical' || (move.category === 'Special' && move.isZ))) || + (attacker.hasAbility('Defeatist') && attacker.curHP() <= attacker.maxHP() / 2) + ) { + atMods.push(2048); + desc.attackerAbility = attacker.ability; + } else if ( + (attacker.hasAbility('Solar Power') && + field.hasWeather('Sun', 'Harsh Sunshine') && + move.category === 'Special') || + (attacker.named('Cherrim') && + attacker.hasAbility('Flower Gift') && + field.hasWeather('Sun', 'Harsh Sunshine') && + move.category === 'Physical')) { + atMods.push(6144); + desc.attackerAbility = attacker.ability; + desc.weather = field.weather; + } else if ( + // Gorilla Tactics has no effect during Dynamax (Anubis) + (attacker.hasAbility('Gorilla Tactics') && move.category === 'Physical' && + !attacker.isDynamaxed)) { + atMods.push(6144); + desc.attackerAbility = attacker.ability; + } else if ( + field.attackerSide.isFlowerGift && + field.hasWeather('Sun', 'Harsh Sunshine') && + move.category === 'Physical') { + atMods.push(6144); + desc.weather = field.weather; + desc.isFlowerGiftAttacker = true; + } else if ( + (attacker.hasAbility('Guts') && attacker.status && move.category === 'Physical') || + (attacker.curHP() <= attacker.maxHP() / 3 && + ((attacker.hasAbility('Overgrow') && move.hasType('Grass')) || + (attacker.hasAbility('Blaze') && move.hasType('Fire')) || + (attacker.hasAbility('Torrent') && move.hasType('Water')) || + (attacker.hasAbility('Swarm') && move.hasType('Bug')))) || + (move.category === 'Special' && attacker.abilityOn && attacker.hasAbility('Plus', 'Minus')) + ) { + atMods.push(6144); + desc.attackerAbility = attacker.ability; + } else if (attacker.hasAbility('Flash Fire') && attacker.abilityOn && move.hasType('Fire')) { + atMods.push(6144); + desc.attackerAbility = 'Flash Fire'; + } else if ( + (attacker.hasAbility('Steelworker') && move.hasType('Steel')) || + (attacker.hasAbility('Dragon\'s Maw') && move.hasType('Dragon')) || + (attacker.hasAbility('Rocky Payload') && move.hasType('Rock')) + ) { + atMods.push(6144); + desc.attackerAbility = attacker.ability; + } else if (attacker.hasAbility('Transistor') && move.hasType('Electric')) { + atMods.push(gen.num >= 9 ? 5325 : 6144); + desc.attackerAbility = attacker.ability; + } else if (attacker.hasAbility('Stakeout') && attacker.abilityOn) { + atMods.push(8192); + desc.attackerAbility = attacker.ability; + } else if ( + (attacker.hasAbility('Water Bubble') && move.hasType('Water')) || + (attacker.hasAbility('Huge Power', 'Pure Power') && move.category === 'Physical') + ) { + atMods.push(8192); + desc.attackerAbility = attacker.ability; + } + + if ((defender.hasAbility('Thick Fat') && move.hasType('Fire', 'Ice')) || + (defender.hasAbility('Water Bubble') && move.hasType('Fire')) || + (defender.hasAbility('Purifying Salt') && move.hasType('Ghost'))) { + atMods.push(2048); + desc.defenderAbility = defender.ability; + } + + if (gen.num >= 9 && defender.hasAbility('Heatproof') && move.hasType('Fire')) { + atMods.push(2048); + desc.defenderAbility = defender.ability; + } + // Pokemon with "-of Ruin" Ability are immune to the opposing "-of Ruin" ability + const isTabletsOfRuinActive = (defender.hasAbility('Tablets of Ruin') || field.isTabletsOfRuin) && + !attacker.hasAbility('Tablets of Ruin'); + const isVesselOfRuinActive = (defender.hasAbility('Vessel of Ruin') || field.isVesselOfRuin) && + !attacker.hasAbility('Vessel of Ruin'); + if ( + (isTabletsOfRuinActive && move.category === 'Physical') || + (isVesselOfRuinActive && move.category === 'Special') + ) { + if (defender.hasAbility('Tablets of Ruin') || defender.hasAbility('Vessel of Ruin')) { + desc.defenderAbility = defender.ability; + } else { + desc[move.category === 'Special' ? 'isVesselOfRuin' : 'isTabletsOfRuin'] = true; + } + atMods.push(3072); + } + + if (isQPActive(attacker, field)) { + if ( + (move.category === 'Physical' && getQPBoostedStat(attacker) === 'atk') || + (move.category === 'Special' && getQPBoostedStat(attacker) === 'spa') + ) { + atMods.push(5325); + desc.attackerAbility = attacker.ability; + } + } + + if ( + (attacker.hasAbility('Hadron Engine') && move.category === 'Special' && + field.hasTerrain('Electric') && isGrounded(attacker, field)) || + (attacker.hasAbility('Orichalcum Pulse') && move.category === 'Physical' && + field.hasWeather('Sun', 'Harsh Sunshine') && !attacker.hasItem('Utility Umbrella')) + ) { + atMods.push(5461); + desc.attackerAbility = attacker.ability; + } + + if ((attacker.hasItem('Thick Club') && + attacker.named('Cubone', 'Marowak', 'Marowak-Alola', 'Marowak-Alola-Totem') && + move.category === 'Physical') || + (attacker.hasItem('Deep Sea Tooth') && + attacker.named('Clamperl') && + move.category === 'Special') || + (attacker.hasItem('Light Ball') && attacker.name.includes('Pikachu') && !move.isZ) + ) { + atMods.push(8192); + desc.attackerItem = attacker.item; + // Choice Band/Scarf/Specs move lock and stat boosts are ignored during Dynamax (Anubis) + } else if (!move.isZ && !move.isMax && + ((attacker.hasItem('Choice Band') && move.category === 'Physical') || + (attacker.hasItem('Choice Specs') && move.category === 'Special')) + ) { + atMods.push(6144); + desc.attackerItem = attacker.item; + } + return atMods; +} + +export function calculateDefenseSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field, + desc: RawDesc, + isCritical = false +) { + let defense: number; + const hitsPhysical = move.overrideDefensiveStat === 'def' || move.category === 'Physical' || + (move.named('Shell Side Arm') && getShellSideArmCategory(attacker, defender) === 'Physical'); + const defenseStat = hitsPhysical ? 'def' : 'spd'; + desc.defenseEVs = getEVDescriptionText(gen, defender, defenseStat, defender.nature); + if (defender.boosts[defenseStat] === 0 || + (isCritical && defender.boosts[defenseStat] > 0) || + move.ignoreDefensive) { + defense = defender.rawStats[defenseStat]; + } else if (attacker.hasAbility('Unaware')) { + defense = defender.rawStats[defenseStat]; + desc.attackerAbility = attacker.ability; + } else { + defense = defender.stats[defenseStat]; + desc.defenseBoost = defender.boosts[defenseStat]; + } + + // unlike all other defense modifiers, Sandstorm SpD boost gets applied directly + if (field.hasWeather('Sand') && defender.hasType('Rock') && !hitsPhysical) { + defense = pokeRound((defense * 3) / 2); + desc.weather = field.weather; + } + if (field.hasWeather('Snow') && defender.hasType('Ice') && hitsPhysical) { + defense = pokeRound((defense * 3) / 2); + desc.weather = field.weather; + } + + const dfMods = calculateDfModsSMSSSV( + gen, + attacker, + defender, + move, + field, + desc, + isCritical, + hitsPhysical + ); + + return OF16(Math.max(1, pokeRound((defense * chainMods(dfMods, 410, 131072)) / 4096))); +} + +export function calculateDfModsSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field, + desc: RawDesc, + isCritical = false, + hitsPhysical = false +) { + const dfMods = []; + if (defender.hasAbility('Marvel Scale') && defender.status && hitsPhysical) { + dfMods.push(6144); + desc.defenderAbility = defender.ability; + } else if ( + defender.named('Cherrim') && + defender.hasAbility('Flower Gift') && + field.hasWeather('Sun', 'Harsh Sunshine') && + !hitsPhysical + ) { + dfMods.push(6144); + desc.defenderAbility = defender.ability; + desc.weather = field.weather; + } else if ( + field.defenderSide.isFlowerGift && + field.hasWeather('Sun', 'Harsh Sunshine') && + !hitsPhysical) { + dfMods.push(6144); + desc.weather = field.weather; + desc.isFlowerGiftDefender = true; + } else if ( + defender.hasAbility('Grass Pelt') && + field.hasTerrain('Grassy') && + hitsPhysical + ) { + dfMods.push(6144); + desc.defenderAbility = defender.ability; + } else if (defender.hasAbility('Fur Coat') && hitsPhysical) { + dfMods.push(8192); + desc.defenderAbility = defender.ability; + } + // Pokemon with "-of Ruin" Ability are immune to the opposing "-of Ruin" ability + const isSwordOfRuinActive = (attacker.hasAbility('Sword of Ruin') || field.isSwordOfRuin) && + !defender.hasAbility('Sword of Ruin'); + const isBeadsOfRuinActive = (attacker.hasAbility('Beads of Ruin') || field.isBeadsOfRuin) && + !defender.hasAbility('Beads of Ruin'); + if ( + (isSwordOfRuinActive && hitsPhysical) || + (isBeadsOfRuinActive && !hitsPhysical) + ) { + if (attacker.hasAbility('Sword of Ruin') || attacker.hasAbility('Beads of Ruin')) { + desc.attackerAbility = attacker.ability; + } else { + desc[hitsPhysical ? 'isSwordOfRuin' : 'isBeadsOfRuin'] = true; + } + dfMods.push(3072); + } + + if (isQPActive(defender, field)) { + if ( + (hitsPhysical && getQPBoostedStat(defender) === 'def') || + (!hitsPhysical && getQPBoostedStat(defender) === 'spd') + ) { + desc.defenderAbility = defender.ability; + dfMods.push(5324); + } + } + + if ((defender.hasItem('Eviolite') && + (defender.name === 'Dipplin' || gen.species.get(toID(defender.name))?.nfe)) || + (!hitsPhysical && defender.hasItem('Assault Vest'))) { + dfMods.push(6144); + desc.defenderItem = defender.item; + } else if ( + (defender.hasItem('Metal Powder') && defender.named('Ditto') && hitsPhysical) || + (defender.hasItem('Deep Sea Scale') && defender.named('Clamperl') && !hitsPhysical) + ) { + dfMods.push(8192); + desc.defenderItem = defender.item; + } + return dfMods; +} + +function calculateBaseDamageSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + basePower: number, + attack: number, + defense: number, + move: Move, + field: Field, + desc: RawDesc, + isCritical = false, +) { + let baseDamage = getBaseDamage(attacker.level, basePower, attack, defense); + const isSpread = field.gameType !== 'Singles' && + ['allAdjacent', 'allAdjacentFoes'].includes(move.target); + if (isSpread) { + baseDamage = pokeRound(OF32(baseDamage * 3072) / 4096); + } + + if (attacker.hasAbility('Parental Bond (Child)')) { + baseDamage = pokeRound(OF32(baseDamage * 1024) / 4096); + } + + if ( + field.hasWeather('Sun') && move.named('Hydro Steam') && !attacker.hasItem('Utility Umbrella') + ) { + baseDamage = pokeRound(OF32(baseDamage * 6144) / 4096); + desc.weather = field.weather; + } else if (!defender.hasItem('Utility Umbrella')) { + if ( + (field.hasWeather('Sun', 'Harsh Sunshine') && move.hasType('Fire')) || + (field.hasWeather('Rain', 'Heavy Rain') && move.hasType('Water')) + ) { + baseDamage = pokeRound(OF32(baseDamage * 6144) / 4096); + desc.weather = field.weather; + } else if ( + (field.hasWeather('Sun') && move.hasType('Water')) || + (field.hasWeather('Rain') && move.hasType('Fire')) + ) { + baseDamage = pokeRound(OF32(baseDamage * 2048) / 4096); + desc.weather = field.weather; + } + } + + if (isCritical) { + baseDamage = Math.floor(OF32(baseDamage * 1.5)); + desc.isCritical = isCritical; + } + + return baseDamage; +} + +export function calculateFinalModsSMSSSV( + gen: Generation, + attacker: Pokemon, + defender: Pokemon, + move: Move, + field: Field, + desc: RawDesc, + isCritical = false, + typeEffectiveness: number, + hitCount = 0 +) { + const finalMods = []; + + if (field.defenderSide.isReflect && move.category === 'Physical' && + !isCritical && !field.defenderSide.isAuroraVeil) { + // doesn't stack with Aurora Veil + finalMods.push(field.gameType !== 'Singles' ? 2732 : 2048); + desc.isReflect = true; + } else if ( + field.defenderSide.isLightScreen && move.category === 'Special' && + !isCritical && !field.defenderSide.isAuroraVeil + ) { + // doesn't stack with Aurora Veil + finalMods.push(field.gameType !== 'Singles' ? 2732 : 2048); + desc.isLightScreen = true; + } + if (field.defenderSide.isAuroraVeil && !isCritical) { + finalMods.push(field.gameType !== 'Singles' ? 2732 : 2048); + desc.isAuroraVeil = true; + } + + if (attacker.hasAbility('Neuroforce') && typeEffectiveness > 1) { + finalMods.push(5120); + desc.attackerAbility = attacker.ability; + } else if (attacker.hasAbility('Sniper') && isCritical) { + finalMods.push(6144); + desc.attackerAbility = attacker.ability; + } else if (attacker.hasAbility('Tinted Lens') && typeEffectiveness < 1) { + finalMods.push(8192); + desc.attackerAbility = attacker.ability; + } + + if (defender.isDynamaxed && move.named('Dynamax Cannon', 'Behemoth Blade', 'Behemoth Bash')) { + finalMods.push(8192); + } + + if (defender.hasAbility('Multiscale', 'Shadow Shield') && + defender.curHP() === defender.maxHP() && + hitCount === 0 && + (!field.defenderSide.isSR && (!field.defenderSide.spikes || defender.hasType('Flying')) || + defender.hasItem('Heavy-Duty Boots')) && !attacker.hasAbility('Parental Bond (Child)') + ) { + finalMods.push(2048); + desc.defenderAbility = defender.ability; + } + + if (defender.hasAbility('Fluffy') && move.flags.contact && !attacker.hasAbility('Long Reach')) { + finalMods.push(2048); + desc.defenderAbility = defender.ability; + } else if ( + (defender.hasAbility('Punk Rock') && move.flags.sound) || + (defender.hasAbility('Ice Scales') && move.category === 'Special') + ) { + finalMods.push(2048); + desc.defenderAbility = defender.ability; + } + + if (defender.hasAbility('Solid Rock', 'Filter', 'Prism Armor') && typeEffectiveness > 1) { + finalMods.push(3072); + desc.defenderAbility = defender.ability; + } + + if (field.defenderSide.isFriendGuard) { + finalMods.push(3072); + desc.isFriendGuard = true; + } + + if (defender.hasAbility('Fluffy') && move.hasType('Fire')) { + finalMods.push(8192); + desc.defenderAbility = defender.ability; + } + + if (attacker.hasItem('Expert Belt') && typeEffectiveness > 1 && !move.isZ) { + finalMods.push(4915); + desc.attackerItem = attacker.item; + } else if (attacker.hasItem('Life Orb')) { + finalMods.push(5324); + desc.attackerItem = attacker.item; + } else if (attacker.hasItem('Sharpshooter\'s Lens') && isCritical) { + finalMods.push(6144); + desc.attackerItem = attacker.item; + } else if (attacker.hasItem('Metronome') && move.timesUsedWithMetronome! >= 1) { + const timesUsedWithMetronome = Math.floor(move.timesUsedWithMetronome!); + if (timesUsedWithMetronome <= 4) { + finalMods.push(4096 + timesUsedWithMetronome * 819); + } else { + finalMods.push(8192); + } + desc.attackerItem = attacker.item; + } + + if (move.hasType(getBerryResistType(defender.item)) && + (typeEffectiveness > 1 || move.hasType('Normal')) && + hitCount === 0 && + !attacker.hasAbility('Unnerve', 'As One (Glastrier)', 'As One (Spectrier)')) { + if (defender.hasAbility('Ripen')) { + finalMods.push(1024); + } else { + finalMods.push(2048); + } + desc.defenderItem = defender.item; + } + + return finalMods; +} + +function hasTerrainSeed(pokemon: Pokemon) { + return pokemon.hasItem('Electric Seed', 'Misty Seed', 'Grassy Seed', 'Psychic Seed'); +} From 045d2ea0bf016a022a1e7826cfd441424c6c47ec Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:05:52 -0500 Subject: [PATCH 07/12] eipp-1 fling bp --- calc/src/eipp-1_items.ts | 438 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 438 insertions(+) create mode 100644 calc/src/eipp-1_items.ts diff --git a/calc/src/eipp-1_items.ts b/calc/src/eipp-1_items.ts new file mode 100644 index 000000000..b41f09a4a --- /dev/null +++ b/calc/src/eipp-1_items.ts @@ -0,0 +1,438 @@ +import {Generation, TypeName, StatID} from './data/interface'; +import {toID} from './util'; + +export const SEED_BOOSTED_STAT: {[item: string]: StatID} = { + 'Electric Seed': 'def', + 'Grassy Seed': 'def', + 'Misty Seed': 'spd', + 'Psychic Seed': 'spd', +}; + +export function getItemBoostType(item: string | undefined) { + switch (item) { + case 'Draco Plate': + case 'Dragon Fang': + return 'Dragon'; + case 'Dread Plate': + case 'Black Glasses': + return 'Dark'; + case 'Earth Plate': + case 'Soft Sand': + return 'Ground'; + case 'Fist Plate': + case 'Black Belt': + return 'Fighting'; + case 'Flame Plate': + case 'Charcoal': + return 'Fire'; + case 'Icicle Plate': + case 'Never-Melt Ice': + return 'Ice'; + case 'Insect Plate': + case 'Silver Powder': + return 'Bug'; + case 'Iron Plate': + case 'Metal Coat': + return 'Steel'; + case 'Meadow Plate': + case 'Rose Incense': + case 'Miracle Seed': + return 'Grass'; + case 'Mind Plate': + case 'Odd Incense': + case 'Twisted Spoon': + return 'Psychic'; + case 'Fairy Feather': + case 'Pixie Plate': + return 'Fairy'; + case 'Sky Plate': + case 'Sharp Beak': + return 'Flying'; + case 'Splash Plate': + case 'Sea Incense': + case 'Wave Incense': + case 'Mystic Water': + return 'Water'; + case 'Spooky Plate': + case 'Spell Tag': + return 'Ghost'; + case 'Stone Plate': + case 'Rock Incense': + case 'Hard Stone': + return 'Rock'; + case 'Toxic Plate': + case 'Poison Barb': + return 'Poison'; + case 'Zap Plate': + case 'Magnet': + return 'Electric'; + case 'Silk Scarf': + case 'Pink Bow': + case 'Polkadot Bow': + return 'Normal'; + default: + return undefined; + } +} + +export function getBerryResistType(berry: string | undefined) { + switch (berry) { + case 'Chilan Berry': + return 'Normal'; + case 'Occa Berry': + return 'Fire'; + case 'Passho Berry': + return 'Water'; + case 'Wacan Berry': + return 'Electric'; + case 'Rindo Berry': + return 'Grass'; + case 'Yache Berry': + return 'Ice'; + case 'Chople Berry': + return 'Fighting'; + case 'Kebia Berry': + return 'Poison'; + case 'Shuca Berry': + return 'Ground'; + case 'Coba Berry': + return 'Flying'; + case 'Payapa Berry': + return 'Psychic'; + case 'Tanga Berry': + return 'Bug'; + case 'Charti Berry': + return 'Rock'; + case 'Kasib Berry': + return 'Ghost'; + case 'Haban Berry': + return 'Dragon'; + case 'Colbur Berry': + return 'Dark'; + case 'Babiri Berry': + return 'Steel'; + case 'Roseli Berry': + return 'Fairy'; + default: + return undefined; + } +} + +const FLING_120 = new Set([ + 'TR24', + 'TR28', + 'TR34', + 'TR39', + 'TR53', + 'TR55', + 'TR64', + 'TR66', + 'TR72', + 'TR73', +]); + +const FLING_100 = new Set([ + 'Hard Stone', + 'Room Service', + 'Claw Fossil', + 'Dome Fossil', + 'Helix Fossil', + 'Old Amber', + 'Root Fossil', + 'Armor Fossil', + 'Old Amber', + 'Fossilized Bird', + 'Fossilized Dino', + 'Fossilized Drake', + 'Fossilized Fish', + 'Plume Fossil', + 'Jaw Fossil', + 'Cover Fossil', + 'Sail Fossil', + 'Rare Bone', + 'Skull Fossil', + 'TR10', + 'TR31', + 'TR75', +]); + +const FLING_90 = new Set([ + 'Deep Sea Tooth', + 'Thick Club', + 'TR02', + 'TR04', + 'TR05', + 'TR08', + 'TR11', + 'TR22', + 'TR35', + 'TR42', + 'TR45', + 'TR50', + 'TR61', + 'TR65', + 'TR67', + 'TR86', + 'TR90', + 'TR96', +]); + +const FLING_85 = new Set(['TR01', 'TR41', 'TR62', 'TR93', 'TR97', 'TR98']); + +const FLING_80 = new Set([ + 'Assault Vest', + 'Blunder Policy', + 'Boomerang', +// test until better setup made ig + 'Chipped Pot', + 'Cracked Pot', + 'Heavy-Duty Boots', + 'Weakness Policy', + 'Quick Claw', + 'Dawn Stone', + 'Dusk Stone', + 'Electirizer', + 'Magmarizer', + 'Oval Stone', + 'Protector', + 'Sachet', + 'Whipped Dream', + 'Razor Claw', + 'Shiny Stone', + 'TR16', + 'TR18', + 'TR19', + 'TR25', + 'TR32', + 'TR33', + 'TR47', + 'TR56', + 'TR57', + 'TR58', + 'TR59', + 'TR60', + 'TR63', + 'TR69', + 'TR70', + 'TR74', + 'TR84', + 'TR87', + 'TR92', + 'TR95', + 'TR99', +]); + +const FLING_70 = new Set([ + 'Poison Barb', + 'Dragon Fang', + 'Power Anklet', + 'Power Band', + 'Power Belt', + 'Power Bracer', + 'Power Lens', + 'Power Weight', +]); + +const FLING_60 = new Set([ + 'Adamant Orb', + 'Damp Rock', + 'Heat Rock', + 'Leek', + 'Lustrous Orb', + 'Macho Brace', + 'Rocky Helmet', + 'Stick', + 'Utility Umbrella', + 'Terrain Extender', +]); +const FLING_30 = new Set([ + 'Absorb Bulb', + 'Assist Shovel', + 'Assurance Policy', + 'Bare Spool', + 'Berry Juice', + 'Black Belt', + 'Black Glasses', + 'Black Sludge', + 'Black Sludge', + 'Bottle Cap', + 'Cell Battery', + 'Charcoal', + 'Deep Sea Scale', + 'Dragon Scale', + 'Drain Shield', + 'EiPP Crown', + 'Eject Button', + 'Energy Powder', + 'Fire Stone', + 'Flame Orb', + 'Gold Bottle Cap', + 'Ice Stone', + 'King\'s Rock', + 'Leaf Stone', + 'Life Orb', + 'Light Ball', + 'Light Clay', + 'Luminous Moss', + 'Magnet', + 'Metal Coat', + 'Miracle Seed', + 'Moon Stone', + 'Mystic Water', + 'Never-Melt Ice', + 'Nurse Hat', + 'Overlord Crown', + 'Prism Scale', + 'Queen\'s Gland', + 'Razor Fang', + 'Room Service 2', + 'Scope Lens', + 'Sharpshooter\'s Lens', + 'Slime', + 'Snowball', + 'Soul Dew', + 'Spell Tag', + 'Spit Card', + 'Sun Stone', + 'Sweet Apple', + 'Tart Apple', + 'Throat Spray', + 'Thunder Stone', + 'Toxic Orb', + 'Twisted Spoon', + 'Up-Grade', + 'Water Stone', + 'Wide Decoy', +]); +const FLING_10 = new Set([ + 'Air Balloon', + 'Berry Sweet', + 'Choice Band', + 'Choice Scarf', + 'Choice Specs', + 'Clover Sweet', + 'Destiny Knot', + 'Electric Seed', + 'Expert Belt', + 'Flower Sweet', + 'Focus Band', + 'Focus Sash', + 'Full Incense', + 'Grassy Seed', + 'Lagging Tail', + 'Lax Incense', + 'Leftovers', + 'Love Sweet', + 'Mental Herb', + 'Metal Powder', + 'Mint Berry', + 'Miracle Berry', + 'Misty Seed', + 'Muscle Band', + 'Power Herb', + 'Psychic Seed', + 'Odd Incense', + 'Quick Powder', + 'Reaper Cloth', + 'Red Card', + 'Ribbon Sweet', + 'Ring Target', + 'Rock Incense', + 'Rose Incense', + 'Sea Incense', + 'Shed Shell', + 'Silk Scarf', + 'Silver Powder', + 'Smooth Rock', + 'Soft Sand', + 'Soothe Bell', + 'Star Sweet', + 'Strawberry Sweet', + 'Wave Incense', + 'White Herb', + 'Wide Lens', + 'Wise Glasses', + 'Zoom Lens', + 'Silver Powder', + 'Power Herb', + 'TR00', + 'TR07', + 'TR12', + 'TR13', + 'TR14', + 'TR17', + 'TR20', + 'TR21', + 'TR23', + 'TR26', + 'TR27', + 'TR29', + 'TR30', + 'TR37', + 'TR38', + 'TR40', + 'TR44', + 'TR46', + 'TR48', + 'TR49', + 'TR51', + 'TR52', + 'TR54', + 'TR68', + 'TR76', + 'TR77', + 'TR79', + 'TR80', + 'TR83', + 'TR85', + 'TR88', + 'TR91', +]); + +// TODO: move this data to the data files instead. +export function getFlingPower(item?: string) { + if (!item) return 0; + if (['Big Nugget', 'Iron Ball', 'Sledgehammer', 'TR43', 'TR71'].includes(item)) return 130; + if (FLING_120.has(item)) return 85; + if (['TR03', 'TR06', 'TR09', 'TR15', 'TR89'].includes(item)) return 110; + if (FLING_100.has(item)) return 100; + if (['TR36', 'TR78', 'TR81', 'TR94'].includes(item)) return 95; + if (item.includes('Plate') || FLING_90.has(item)) return 90; + if (FLING_85.has(item)) return 85; + if (FLING_80.has(item)) return 80; + if (FLING_70.has(item)) return 70; + if (FLING_60.has(item)) return 60; + if (['Eject Pack', 'Sharp Beak', 'Dubious Disc'].includes(item)) return 50; + if (['Icy Rock', 'Eviolite', 'Lucky Punch'].includes(item)) return 40; + if (FLING_30.has(item)) return 30; + if (item === 'TR82') return 20; + if (item.includes('Berry') || FLING_10.has(item)) return 10; + return 0; +} + +export function getNaturalGift(gen: Generation, item: string) { + const gift = gen.items.get(toID(item))?.naturalGift; + return gift ? {t: gift.type, p: gift.basePower} : {t: 'Normal' as TypeName, p: 1}; +} + +export function getTechnoBlast(item: string) { + switch (item) { + case 'Burn Drive': + return 'Fire'; + case 'Chill Drive': + return 'Ice'; + case 'Douse Drive': + return 'Water'; + case 'Shock Drive': + return 'Electric'; + default: + return undefined; + } +} + +export function getMultiAttack(item: string) { + if (item.includes('Memory')) { + return item.substring(0, item.indexOf(' ')) as TypeName; + } + return undefined; +} From 22638f5ed85297706dec4889951ffb028e156a7f Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:06:43 -0500 Subject: [PATCH 08/12] Delete calc/src/data/eikpp_species.ts --- calc/src/data/eikpp_species.ts | 502 --------------------------------- 1 file changed, 502 deletions(-) delete mode 100644 calc/src/data/eikpp_species.ts diff --git a/calc/src/data/eikpp_species.ts b/calc/src/data/eikpp_species.ts deleted file mode 100644 index 8bed96605..000000000 --- a/calc/src/data/eikpp_species.ts +++ /dev/null @@ -1,502 +0,0 @@ -import * as I from './interface'; -import {toID, extend, DeepPartial, assignWithout} from '../util'; - -export interface SpeciesData { - readonly types: [I.TypeName] | [I.TypeName, I.TypeName]; - // TODO: replace with baseStats - readonly bs: { - hp: number; - at: number; - df: number; - sa?: number; - sd?: number; - sp: number; - sl?: number; - }; - readonly weightkg: number; // weight - readonly nfe?: boolean; - readonly gender?: I.GenderName; - readonly otherFormes?: string[]; - readonly baseSpecies?: string; - readonly abilities?: {0: string}; // ability -} - -const RBY: {[name: string]: SpeciesData} = { - Zubat: { - types: ['Poison', 'Flying'], - bs: {hp: 40, at: 45, df: 35, sp: 55, sl: 40}, - weightkg: 7.5, - nfe: true, - }, -}; - -const GSC_PATCH: {[name: string]: DeepPartial} = { - // gen 1 pokemon changes - Zubat: {bs: {sa: 30, sd: 40}}, - // gen 2 pokemon - Ampharos: { - types: ['Electric'], - bs: {hp: 90, at: 75, df: 75, sa: 115, sd: 90, sp: 55}, - weightkg: 61.5, - }, -}; -const GSC: {[name: string]: SpeciesData} = extend(true, {}, RBY, GSC_PATCH); - -const ADV_PATCH: {[name: string]: DeepPartial} = { - // gen 1 pokemon changes - Zubat: {abilities: {0: 'Inner Focus'}}, - // gen 2 pokemon changes - Ampharos: {abilities: {0: 'Static'}}, - // gen 3 pokemon - Absol: { - types: ['Dark'], - bs: {hp: 65, at: 130, df: 60, sa: 75, sd: 60, sp: 75}, - weightkg: 47, - abilities: {0: 'Pressure'}, - }, -}; - -const ADV: {[name: string]: SpeciesData} = extend(true, {}, GSC, ADV_PATCH); - -const DPP_PATCH: {[name: string]: DeepPartial} = { - Giratina: { - types: ['Ghost', 'Dragon'], - bs: {hp: 150, at: 100, df: 120, sa: 100, sd: 120, sp: 90}, - weightkg: 750, - gender: 'N', - otherFormes: ['Giratina-Origin'], - abilities: {0: 'Pressure'}, - }, - 'Giratina-Origin': { - types: ['Ghost', 'Dragon'], - bs: {hp: 150, at: 120, df: 100, sa: 120, sd: 100, sp: 90}, - weightkg: 650, - gender: 'N', - abilities: {0: 'Levitate'}, - baseSpecies: 'Giratina', - }, -}; - -const DPP: {[name: string]: SpeciesData} = extend(true, {}, ADV, DPP_PATCH); - -const BW_PATCH: {[name: string]: DeepPartial} = { - Accelgor: { - types: ['Bug'], - bs: {hp: 80, at: 70, df: 40, sa: 100, sd: 60, sp: 145}, - weightkg: 25.3, - abilities: {0: 'Hydration'}, - }, -}; - -const BW: {[name: string]: SpeciesData} = extend(true, {}, DPP, BW_PATCH); - -// @ts-ignore readonly - -const XY_PATCH: {[name: string]: DeepPartial} = { - Absol: {otherFormes: ['Absol-Mega']}, - 'Absol-Mega': { - types: ['Dark'], - bs: {hp: 65, at: 150, df: 60, sa: 115, sd: 60, sp: 115}, - weightkg: 49, - abilities: {0: 'Magic Bounce'}, - baseSpecies: 'Absol', - }, -}; - -const XY: {[name: string]: SpeciesData} = extend(true, {}, BW, XY_PATCH); - -const SM_PATCH: {[name: string]: DeepPartial} = { - Zeraora: { - types: ['Electric'], - bs: {hp: 88, at: 112, df: 75, sa: 102, sd: 80, sp: 143}, - weightkg: 44.5, - abilities: {0: 'Volt Absorb'}, - gender: 'N', - }, -}; - -const SM: {[name: string]: SpeciesData} = extend(true, {}, XY, SM_PATCH); - -const SS_PATCH: {[name: string]: DeepPartial} = { - Applin: { - types: ['Grass', 'Dragon'], - bs: {hp: 40, at: 40, df: 80, sa: 40, sd: 40, sp: 20}, - weightkg: 0.5, - abilities: {0: 'Ripen'}, - nfe: true, - }, -}; - -const SS: {[name: string]: SpeciesData} = extend(true, {}, SM, SS_PATCH); - -const SV_PATCH: {[name: string]: DeepPartial} = { - 'Test-Mon': { - types: ['Normal', 'Ghost'], - bs: {hp: 60, at: 60, df: 60, sa: 60, sd: 60, sp: 60}, - weightkg: 60, - abilities: {0: 'Normalize'}, - }, - Amphacott: { - types: ['Electric', 'Fairy'], - bs: {hp: 80, at: 69, df: 85, sa: 102, sd: 85, sp: 95}, - weightkg: 34, - abilities: {0: 'Static'}, - }, - Amphawear: { - types: ['Electric', 'Fighting'], - bs: {hp: 100, at: 108, df: 81, sa: 95, sd: 80, sp: 58}, - weightkg: 98.2, - abilities: {0: 'Static'}, - }, - Amphawrath: { - types: ['Electric', 'Fighting'], - bs: {hp: 90, at: 88, df: 91, sa: 100, sd: 90, sp: 65}, - weightkg: 57.7, - abilities: {0: 'Static'}, - }, - Auronite: { - types: ['Rock', 'Flying'], - bs: {hp: 112, at: 115, df: 87, sa: 99, sd: 94, sp: 72}, - weightkg: 217.5, - abilities: {0: 'Refigerate'}, - }, - Azumachomp: { - types: ['Water', 'Ground'], - bs: {hp: 102, at: 103, df: 90, sa: 66, sd: 81, sp: 84}, - weightkg: 61.7, - abilities: {0: 'Thick Fat'}, - }, - Blastzor: { - types: ['Water', 'Steel'], - bs: {hp: 76, at: 114, df: 100, sa: 75, sd: 96, sp: 69}, - weightkg: 101.7, - abilities: {0: 'Torrent'}, - }, - Blazsire: { - types: ['Fire', 'Ground'], - bs: {hp: 85, at: 96, df: 80, sa: 95, sd: 68, sp: 50}, - weightkg: 63.5, - abilities: {0: 'Blaze'}, - }, - 'Chandelgon-Z': { - types: ['Ghost', 'Normal'], - bs: {hp: 68, at: 71, df: 76, sa: 141, sd: 85, sp: 86}, - weightkg: 34.1, - abilities: {0: 'Flash Fire'}, - }, - Chandelzor: { - types: ['Ghost', 'Steel'], - bs: {hp: 63, at: 105, df: 96, sa: 115, sd: 86, sp: 70}, - weightkg: 76.1, - abilities: {0: 'Flash Fire'}, - }, - Clefthorn: { - types: ['Fairy', 'Steel'], - bs: {hp: 88, at: 86, df: 111, sa: 81, sd: 98, sp: 33}, - weightkg: 75, - abilities: {0: 'Cute Charm'}, - }, - Electrmega: { - types: ['Electric', 'Flying'], - bs: {hp: 68, at: 67, df: 80, sa: 92, sd: 72, sp: 60}, - weightkg: 59, - abilities: {0: 'Soundproof'}, - gender: 'N', - }, - Empobat: { - types: ['Water', 'Flying'], - bs: {hp: 84, at: 88, df: 82, sa: 97, sd: 94, sp: 106}, - weightkg: 79.7, - abilities: {0: 'Torrent'}, - }, - Genrorus: { - types: ['Ghost', 'Ice'], - bs: {hp: 81, at: 73, df: 68, sa: 119, sd: 80, sp: 75}, - weightkg: 132.7, - abilities: {0: 'Cursed Body'}, - }, - Honchdrio: { - types: ['Dark', 'Flying'], - bs: {hp: 86, at: 115, df: 64, sa: 90, sd: 54, sp: 97}, - weightkg: 56.2, - abilities: {0: 'Insomnia'}, - }, - Jicune: { - types: ['Steel', 'Water'], - bs: {hp: 100, at: 83, df: 110, sa: 96, sd: 105, sp: 90}, - weightkg: 94, - abilities: {0: 'Serene Grace'}, - gender: 'N', - }, - Jiniclus: { - types: ['Steel', 'Psychic'], - bs: {hp: 103, at: 76, df: 83, sa: 108, sd: 95, sp: 53}, - weightkg: 10.6, - abilities: {0: 'Serene Grace'}, - gender: 'N', - }, - Jisir: { - types: ['Steel', 'Bug'], - bs: {hp: 88, at: 116, df: 100, sa: 85, sd: 90, sp: 90}, - weightkg: 28, - abilities: {0: 'Serene Grace'}, - gender: 'N', - }, - Klinkzor: { - types: ['Steel', 'Bug'], - bs: {hp: 63, at: 120, df: 105, sa: 65, sd: 83, sp: 73}, - weightkg: 99.5, - abilities: {0: 'Plus'}, - gender: 'N', - }, - Kyusharp: { - types: ['Dragon', 'Steel'], - bs: {hp: 105, at: 126, df: 96, sa: 106, sd: 83, sp: 78}, - weightkg: 197.5, - abilities: {0: 'Pressure'}, - gender: 'N', - }, - Latioefki: { - types: ['Dragon', 'Fairy'], - bs: {hp: 72, at: 83, df: 87, sa: 113, sd: 102, sp: 86}, - weightkg: 31.5, - abilities: {0: 'Levitate'}, - }, - Latiolosion: { - types: ['Dragon', 'Fire'], - bs: {hp: 79, at: 86, df: 78, sa: 123, sd: 101, sp: 103}, - weightkg: 69.7, - abilities: {0: 'Levitate'}, - }, - Lickichomp: { - types: ['Normal', 'Ground'], - bs: {hp: 109, at: 115, df: 95, sa: 80, sd: 91, sp: 84}, - weightkg: 117.5, - abilities: {0: 'Own Tempo'}, - }, - Lucatile: { - types: ['Fighting', 'Grass'], - bs: {hp: 70, at: 93, df: 66, sa: 11, sd: 75, sp: 110}, - weightkg: 53.1, - abilities: {0: 'Steadfast'}, - }, - Magross: { - types: ['Fire', 'Psychic'], - bs: {hp: 66, at: 106, df: 126, sa: 91, sd: 83, sp: 56}, - weightkg: 330, - abilities: {0: 'Magma Armor'}, - }, - 'Poryvoir-Monika': { - types: ['Normal', 'Fairy'], - bs: {hp: 79, at: 70, df: 66, sa: 131, sd: 88, sp: 83}, - weightkg: 41.2, - abilities: {0: 'Adaptability'}, - gender: 'N', - }, - Necrogross: { - types: ['Psychic', 'Steel'], - bs: {hp: 91, at: 125, df: 120, sa: 116, sd: 89, sp: 73}, - weightkg: 390, - abilities: {0: 'Prism Armor'}, - gender: 'N', - }, - 'Oridreigon-Sensu': { - types: ['Ghost', 'Dragon'], - bs: {hp: 80, at: 93, df: 83, sa: 107, sd: 76, sp: 96}, - weightkg: 81.7, - abilities: {0: 'Dancer'}, - }, - Pikaking: { - types: ['Electric', 'Ground'], - bs: {hp: 50, at: 86, df: 64, sa: 61, sd: 58, sp: 86}, - weightkg: 34, - abilities: {0: 'Static'}, - }, - Poryllery: { - types: ['Normal', 'Water'], - bs: {hp: 81, at: 96, df: 73, sa: 125, sd: 75, sp: 60}, - weightkg: 31.2, - abilities: {0: 'Adaptability'}, - gender: 'N', - }, - Rampdactyl: { - types: ['Rock', 'Flying'], - bs: {hp: 91, at: 125, df: 63, sa: 63, sd: 58, sp: 106}, - weightkg: 80.7, - abilities: {0: 'Mold Breaker'}, - }, - Regiapex: { - types: ['Steel', 'Water'], - bs: {hp: 70, at: 67, df: 151, sa: 67, sd: 147, sp: 40}, - weightkg: 109.7, - abilities: {0: 'Clear Body'}, - gender: 'N' - }, - Slowcott: { - types: ['Water', 'Fairy'], - bs: {hp: 83, at: 69, df: 83, sa: 92, sd: 98, sp: 87}, - weightkg: 43, - abilities: {0: 'Oblivious'}, - }, - Snorgross: { - types: ['Normal', 'Psychic'], - bs: {hp: 133, at: 126, df: 108, sa: 75, sd: 103, sp: 56}, - weightkg: 505, - abilities: {0: 'Immunity'}, - }, - Snorblade: { - types: ['Normal', 'Ghost'], - bs: {hp: 126, at: 110, df: 121, sa: 58, sd: 89, sp: 33}, - weightkg: 232.2, - abilities: {0: 'Immunity'}, - }, - Snorler: { - types: ['Normal', 'Water'], - bs: {hp: 125, at: 123, df: 98, sa: 60, sd: 90, sp: 60}, - weightkg: 260, - abilities: {0: 'Immunity'}, - }, - Togeking: { - types: ['Fairy', 'Ground'], - bs: {hp: 83, at: 84, df: 83, sa: 108, sd: 101, sp: 83}, - weightkg: 50, - abilities: {0: 'Hustle'}, - }, - Togelurk: { - types: ['Fairy', 'Ghost'], - bs: {hp: 86, at: 99, df: 85, sa: 98, sd: 103, sp: 63}, - weightkg: 184, - abilities: {0: 'Hustle'}, - }, - Togemega: { - types: ['Fairy', 'Flying'], - bs: {hp: 85, at: 67, df: 89, sa: 118, sd: 95, sp: 90}, - weightkg: 44.7, - abilities: {0: 'Hustle'}, - }, - Togezone: { - types: ['Fairy', 'Steel'], - bs: {hp: 80, at: 63, df: 108, sa: 123, sd: 106, sp: 66}, - weightkg: 109, - abilities: {0: 'Hustle'}, - }, - Traplous: { - types: ['Ground', 'Dragon'], - bs: {hp: 54, at: 90, df: 61, sa: 51, sd: 53, sp: 42}, - weightkg: 32.5, - abilities: {0: 'Hyper Cutter'}, - nfe: true, - }, - Umbzing: { - types: ['Dark', 'Poison'], - bs: {hp: 85, at: 81, df: 116, sa: 68, sd: 110, sp: 61}, - weightkg: 18.2, - abilities: {0: 'Synchronize'}, - }, - Unthorn: { - types: ['Psychic', 'Steel'], - bs: {hp: 56, at: 86, df: 103, sa: 66, sd: 70, sp: 29}, - weightkg: 57.5, - abilities: {0: 'Levitate'}, - gender: 'N', - }, - Weedily: { - types: ['Poison', 'Grass'], - bs: {hp: 72, at: 84, df: 104, sa: 83, sd: 82, sp: 48}, - weightkg: 34.9, - abilities: {0: 'Levitate'}, - }, - Wigglycott: { - types: ['Normal', 'Fairy'], - bs: {hp: 113, at: 68, df: 71, sa: 82, sd: 58, sp: 92}, - weightkg: 9.3, - abilities: {0: 'Cute Charm'}, - }, -}; - -const SV: {[name: string]: SpeciesData} = extend(true, {}, SS, SV_PATCH); - -delete SV['Zubat']; -delete SV['Ampharos']; -delete SV['Absol']; -delete SV['Absol-Mega']; -delete SV['Giratina']; -delete SV['Giratina-Origin']; -delete SV['Accelgor']; -delete SV['Zeraora']; -delete SV['Applin']; - -export const SPECIES = [{}, RBY, GSC, ADV, DPP, BW, XY, SM, SS, SV]; - -export class Species implements I.Species { - private readonly gen: I.GenerationNum; - - constructor(gen: I.GenerationNum) { - this.gen = gen; - } - - get(id: I.ID) { - return SPECIES_BY_ID[this.gen][id]; - } - - *[Symbol.iterator]() { - for (const id in SPECIES_BY_ID[this.gen]) { - yield this.get(id as I.ID)!; - } - } -} - -class Specie implements I.Specie { - readonly kind: 'Species'; - readonly id: I.ID; - readonly name: I.SpeciesName; - readonly types!: [I.TypeName] | [I.TypeName, I.TypeName]; - readonly baseStats: Readonly; - readonly weightkg!: number; // weight - readonly nfe?: boolean; - readonly gender?: I.GenderName; - readonly otherFormes?: I.SpeciesName[]; - readonly baseSpecies?: I.SpeciesName; - readonly abilities?: {0: I.AbilityName}; // ability - - private static readonly EXCLUDE = new Set(['bs', 'otherFormes']); - - constructor(name: string, data: SpeciesData) { - this.kind = 'Species'; - this.id = toID(name); - this.name = name as I.SpeciesName; - - const baseStats: Partial = {}; - baseStats.hp = data.bs.hp; - baseStats.atk = data.bs.at; - baseStats.def = data.bs.df; - baseStats.spa = gen >= 2 ? data.bs.sa : data.bs.sl; - baseStats.spd = gen >= 2 ? data.bs.sd : data.bs.sl; - baseStats.spe = data.bs.sp; - this.baseStats = baseStats as I.StatsTable; - // Hack for getting Gmax pokemon out of existence in Gen 9+ - if (data.otherFormes) { - this.otherFormes = data.otherFormes as I.SpeciesName[]; - if (gen >= 9 && !['toxtricity', 'urshifu'].includes(this.id)) { - this.otherFormes = this.otherFormes.filter(f => !f.endsWith('-Gmax')); - if (!this.otherFormes.length) this.otherFormes = undefined; - if (this.otherFormes) this.otherFormes = [...new Set(this.otherFormes)]; - } - } - - assignWithout(this, data, Specie.EXCLUDE); - } -} -const SPECIES_BY_ID: Array<{[id: string]: Specie}> = []; - -let gen = 0; -for (const species of SPECIES) { - const map: {[id: string]: Specie} = {}; - for (const specie in species) { - if (gen >= 2 && species[specie].bs.sl) delete species[specie].bs.sl; - const m = new Specie(specie, species[specie]); - map[m.id] = m; - } - SPECIES_BY_ID.push(map); - gen++; -} From 2123e8061db518bf48db0fde6d865071f569192c Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:06:52 -0500 Subject: [PATCH 09/12] Delete calc/src/data/eipp10_species.ts --- calc/src/data/eipp10_species.ts | 606 -------------------------------- 1 file changed, 606 deletions(-) delete mode 100644 calc/src/data/eipp10_species.ts diff --git a/calc/src/data/eipp10_species.ts b/calc/src/data/eipp10_species.ts deleted file mode 100644 index 346c1a3a6..000000000 --- a/calc/src/data/eipp10_species.ts +++ /dev/null @@ -1,606 +0,0 @@ -import * as I from './interface'; -import {toID, extend, DeepPartial, assignWithout} from '../util'; - -export interface SpeciesData { - readonly types: [I.TypeName] | [I.TypeName, I.TypeName]; - // TODO: replace with baseStats - readonly bs: { - hp: number; - at: number; - df: number; - sa?: number; - sd?: number; - sp: number; - sl?: number; - }; - readonly weightkg: number; // weight - readonly nfe?: boolean; - readonly gender?: I.GenderName; - readonly otherFormes?: string[]; - readonly baseSpecies?: string; - readonly abilities?: {0: string}; // ability -} - -const RBY: {[name: string]: SpeciesData} = { - Clefable: { - types: ['Fairy'], - bs: {hp: 95, at: 70, df: 73, sp: 60, sl: 85}, - weightkg: 40 - }, - Dragonite: { - types: ['Flying', 'Normal'], - bs: {hp: 91, at: 134, df: 95, sp: 80, sl: 100}, - weightkg: 210, - }, - Gyarados: { - types: ['Ghost', 'Normal'], - bs: {hp: 95, at: 125, df: 79, sp: 81, sl: 100}, - weightkg: 235, - }, - Primeape: { - types: ['Water'], - bs: {hp: 65, at: 105, df: 60, sp: 95, sl: 60}, - weightkg: 32, - }, - Scyther: { - types: ['Poison', 'Normal'], - bs: {hp: 70, at: 110, df: 80, sp: 105, sl: 55}, - weightkg: 56, - }, -}; - -const GSC_PATCH: {[name: string]: DeepPartial} = { - // gen 1 pokemon changes - Clefable: {bs: {sa: 85, sd: 90}}, - Dragonite: {bs: {sa: 100, sd: 100}}, - Gyarados: {bs: {sa: 60, sd: 100}}, - Primeape: {bs: {sa: 60, sd: 70}}, - Scyther: {bs: {sa: 55, sd: 80}, nfe: true}, - // gen 2 pokemon - Blissey: { - types: ['Fairy'], - bs: {hp: 255, at: 10, df: 10, sa: 75, sd: 135, sp: 55}, - weightkg: 46.8, - }, - Celebi: { - types: ['Grass', 'Fighting'], - bs: {hp: 100, at: 100, df: 100, sa: 100, sd: 100, sp: 100}, - weightkg: 5, - gender: 'N', - }, - Heracross: { - types: ['Poison', 'Water'], - bs: {hp: 80, at: 125, df: 75, sa: 40, sd: 95, sp: 85}, - weightkg: 54, - }, - Suicune: { - types: ['Ghost'], - bs: {hp: 100, at: 75, df: 115, sa: 90, sd: 115, sp: 85}, - weightkg: 187, - gender: 'N', - }, - Ursaring: { - types: ['Fairy'], - bs: {hp: 90, at: 130, df: 75, sa: 75, sd: 75, sp: 55}, - weightkg: 125.8, - }, -}; -const GSC: {[name: string]: SpeciesData} = extend(true, {}, RBY, GSC_PATCH); - -const ADV_PATCH: {[name: string]: DeepPartial} = { - // gen 1 pokemon changes - Clefable: {abilities: {0: 'Cute Charm'}}, - Dragonite: {abilities: {0: 'Inner Focus'}}, - Gyarados: {abilities: {0: 'Intimidate'}}, - Primeape: {abilities: {0: 'Vital Spirit'}}, - Scyther: {abilities: {0: 'Swarm'}}, - // gen 2 pokemon changes - Blissey: {abilities: {0: 'Natural Cure'}}, - Celebi: {abilities: {0: 'Natural Cure'}}, - Heracross: {abilities: {0: 'Swarm'}}, - Suicune: {abilities: {0: 'Pressure'}}, - Ursaring: {abilities: {0: 'Guts'}}, - // gen 3 pokemon - Blaziken: { - types: ['Ground', 'Water'], - bs: {hp: 80, at: 120, df: 70, sa: 110, sd: 70, sp: 80}, - weightkg: 52, - abilities: {0: 'Blaze'}, - }, - 'Deoxys-Defense': { - types: ['Grass'], - bs: {hp: 50, at: 70, df: 160, sa: 70, sd: 160, sp: 90}, - weightkg: 60.8, - abilities: {0: 'Pressure'}, - gender: 'N', - }, - Exploud: { - types: ['Fairy'], - bs: {hp: 104, at: 91, df: 63, sa: 91, sd: 63, sp: 68}, - weightkg: 84, - abilities: {0: 'Soundproof'}, - }, - Mightyena: { - types: ['Dragon'], - bs: {hp: 70, at: 90, df: 70, sa: 60, sd: 60, sp: 70}, - weightkg: 37, - abilities: {0: 'Intimidate'}, - }, - Pelipper: { - types: ['Ghost', 'Normal'], - bs: {hp: 60, at: 50, df: 100, sa: 85, sd: 70, sp: 65}, - weightkg: 28, - abilities: {0: 'Keen Eye'}, - }, - Regice: { - types: ['Electric'], - bs: {hp: 80, at: 50, df: 100, sa: 100, sd: 200, sp: 50}, - weightkg: 175, - gender: 'N', - abilities: {0: 'Clear Body'}, - }, - Sableye: { - types: ['Dragon', 'Steel'], - bs: {hp: 50, at: 75, df: 75, sa: 65, sd: 65, sp: 50}, - weightkg: 11, - abilities: {0: 'Keen Eye'}, - }, - Swalot: { - types: ['Psychic'], - bs: {hp: 100, at: 73, df: 83, sa: 73, sd: 83, sp: 55}, - weightkg: 80, - abilities: {0: 'Liquid Ooze'}, - }, -}; - -const ADV: {[name: string]: SpeciesData} = extend(true, {}, GSC, ADV_PATCH); - -const DPP_PATCH: {[name: string]: DeepPartial} = { - Ambipom: { - types: ['Fairy'], - bs: {hp: 75, at: 100, df: 66, sa: 60, sd: 66, sp: 115}, - weightkg: 20.3, - abilities: {0: 'Technician'}, - }, - Glaceon: { - types: ['Electric'], - bs: {hp: 65, at: 60, df: 110, sa: 130, sd: 95, sp: 65}, - weightkg: 25.9, - abilities: {0: 'Snow Cloak'}, - }, - 'Porygon-Z': { - types: ['Fairy'], - bs: {hp: 85, at: 80, df: 70, sa: 135, sd: 75, sp: 90}, - weightkg: 34, - gender: 'N', - abilities: {0: 'Adaptability'}, - }, - Regigigas: { - types: ['Fairy'], - bs: {hp: 110, at: 160, df: 110, sa: 80, sd: 110, sp: 100}, - weightkg: 420, - abilities: {0: 'Slow Start'}, - gender: 'N', - }, - Spiritomb: { - types: ['Steel', 'Dragon'], - bs: {hp: 50, at: 92, df: 108, sa: 92, sd: 108, sp: 35}, - weightkg: 108, - abilities: {0: 'Pressure'}, - }, -}; - -const DPP: {[name: string]: SpeciesData} = extend(true, {}, ADV, DPP_PATCH); - -const BW_PATCH: {[name: string]: DeepPartial} = { - Braviary: { - types: ['Fairy', 'Normal'], - bs: {hp: 100, at: 123, df: 75, sa: 57, sd: 75, sp: 80}, - weightkg: 41, - abilities: {0: 'Keen Eye'}, - }, - Cofagrigus: { - types: ['Steel'], - bs: {hp: 58, at: 50, df: 145, sa: 95, sd: 105, sp: 30}, - weightkg: 76.5, - abilities: {0: 'Mummy'}, - }, - Jellicent: { - types: ['Ghost', 'Steel'], - bs: {hp: 100, at: 60, df: 70, sa: 85, sd: 105, sp: 60}, - weightkg: 135, - abilities: {0: 'Water Absorb'}, - }, - Klinklang: { - types: ['Rock'], - bs: {hp: 60, at: 100, df: 115, sa: 70, sd: 85, sp: 90}, - weightkg: 81, - gender: 'N', - abilities: {0: 'Plus'}, - }, - Kyurem: { - types: ['Flying', 'Electric'], - bs: {hp: 125, at: 130, df: 90, sa: 130, sd: 90, sp: 95}, - weightkg: 325, - abilities: {0: 'Pressure'}, - gender: 'N', - }, - Meloetta: { - types: ['Fairy', 'Grass'], - bs: {hp: 100, at: 77, df: 77, sa: 128, sd: 128, sp: 90}, - weightkg: 6.5, - abilities: {0: 'Serene Grace'}, - otherFormes: ['Meloetta-Pirouette'], - gender: 'N', - }, - 'Meloetta-Pirouette': { - types: ['Fairy', 'Water'], - bs: {hp: 100, at: 128, df: 90, sa: 77, sd: 77, sp: 128}, - weightkg: 6.5, - abilities: {0: 'Serene Grace'}, - baseSpecies: 'Meloetta', - gender: 'N', - }, - Mienshao: { - types: ['Water'], - bs: {hp: 65, at: 125, df: 60, sa: 95, sd: 60, sp: 105}, - weightkg: 35.5, - abilities: {0: 'Inner Focus'}, - }, - Musharna: { - types: ['Grass'], - bs: {hp: 116, at: 55, df: 85, sa: 107, sd: 95, sp: 29}, - weightkg: 60.5, - abilities: {0: 'Forewarn'}, - }, - Scolipede: { - types: ['Poison', 'Psychic'], - bs: {hp: 60, at: 90, df: 89, sa: 55, sd: 69, sp: 112}, - weightkg: 200.5, - abilities: {0: 'Poison Point'}, - }, - Whimsicott: { - types: ['Fighting'], - bs: {hp: 60, at: 67, df: 85, sa: 77, sd: 75, sp: 116}, - weightkg: 6.6, - abilities: {0: 'Prankster'}, - }, -}; - -const BW: {[name: string]: SpeciesData} = extend(true, {}, DPP, BW_PATCH); - -// @ts-ignore readonly - -const XY_PATCH: {[name: string]: DeepPartial} = { - Clefable: {types: ['Fire'], bs: {sa: 95}}, - Exploud: {bs: {sd: 73}}, - Scolipede: {bs: {at: 100}}, - Whimsicott: {types: ['Fighting', 'Fire']}, - Aurorus: { - types: ['Ice', 'Electric'], - bs: {hp: 123, at: 77, df: 72, sa: 99, sd: 92, sp: 58}, - weightkg: 225, - abilities: {0: 'Refrigerate'}, - }, - Sylveon: { - types: ['Fire'], - bs: {hp: 95, at: 65, df: 65, sa: 110, sd: 130, sp: 60}, - weightkg: 23.5, - abilities: {0: 'Cute Charm'}, - }, -}; - -const XY: {[name: string]: SpeciesData} = extend(true, {}, BW, XY_PATCH); - -const SM_PATCH: {[name: string]: DeepPartial} = { - Pelipper: {bs: {sa: 95}}, - Bewear: { - types: ['Fairy', 'Water'], - bs: {hp: 120, at: 125, df: 80, sa: 55, sd: 60, sp: 60}, - abilities: {0: 'Fluffy'}, - weightkg: 135, - }, - Marshadow: { - types: ['Water', 'Steel'], - bs: {hp: 90, at: 125, df: 80, sa: 90, sd: 90, sp: 125}, - weightkg: 22.2, - gender: 'N', - abilities: {0: 'Technician'}, - }, - Melmetal: { - types: ['Rock'], - bs: {hp: 135, at: 143, df: 143, sa: 80, sd: 65, sp: 34}, - weightkg: 800, - gender: 'N', - abilities: {0: 'Iron Fist'}, - }, - 'Raticate-Alola': { - types: ['Dragon', 'Fairy'], - bs: {hp: 75, at: 71, df: 70, sa: 40, sd: 80, sp: 77}, - weightkg: 25.5, - abilities: {0: 'Gluttony'}, - }, - Silvally: { - types: ['Fairy'], - bs: {hp: 95, at: 95, df: 95, sa: 95, sd: 95, sp: 95}, - weightkg: 100.5, - abilities: {0: 'RKS System'}, - gender: 'N', - }, - Stakataka: { - types: ['Ice', 'Rock'], - bs: {hp: 61, at: 131, df: 211, sa: 53, sd: 101, sp: 13}, - weightkg: 820, - abilities: {0: 'Beast Boost'}, - gender: 'N', - }, - 'Tapu Koko': { - types: ['Dark', 'Fire'], - bs: {hp: 70, at: 115, df: 85, sa: 95, sd: 75, sp: 130}, - weightkg: 20.5, - abilities: {0: 'Electric Surge'}, - gender: 'N', - }, - 'Tapu Lele': { - types: ['Grass', 'Fire'], - bs: {hp: 70, at: 85, df: 75, sa: 130, sd: 115, sp: 95}, - weightkg: 18.6, - abilities: {0: 'Psychic Surge'}, - gender: 'N', - }, - Toucannon: { - types: ['Fairy', 'Normal'], - bs: {hp: 80, at: 120, df: 75, sa: 75, sd: 75, sp: 60}, - weightkg: 26, - abilities: {0: 'Keen Eye'}, - }, - Turtonator: { - types: ['Ground', 'Flying'], - bs: {hp: 60, at: 78, df: 135, sa: 91, sd: 85, sp: 36}, - weightkg: 212, - abilities: {0: 'Shell Armor'}, - }, - Vikavolt: { - types: ['Poison', 'Dark'], - bs: {hp: 77, at: 70, df: 90, sa: 145, sd: 75, sp: 43}, - weightkg: 45, - abilities: {0: 'Levitate'}, - }, -}; - -const SM: {[name: string]: SpeciesData} = extend(true, {}, XY, SM_PATCH); - -const SS_PATCH: {[name: string]: DeepPartial} = { - Dragapult: { - types: ['Flying', 'Steel'], - bs: {hp: 88, at: 120, df: 75, sa: 100, sd: 75, sp: 142}, - weightkg: 50, - abilities: {0: 'Clear Body'}, - }, - Greedent: { - types: ['Fairy'], - bs: {hp: 120, at: 95, df: 95, sa: 55, sd: 75, sp: 20}, - weightkg: 6, - abilities: {0: 'Cheek Pouch'}, - }, - 'Mr. Rime': { - types: ['Electric', 'Grass'], - bs: {hp: 80, at: 85, df: 75, sa: 110, sd: 100, sp: 70}, - weightkg: 58.2, - abilities: {0: 'Tangled Feet'}, - }, - 'Urshifu-Rapid-Strike': { - types: ['Water', 'Ghost'], - bs: {hp: 100, at: 130, df: 100, sa: 63, sd: 60, sp: 97}, - weightkg: 105, - abilities: {0: 'Unseen Fist'}, - }, - 'Zapdos-Galar': { - types: ['Water', 'Normal'], - bs: {hp: 90, at: 125, df: 90, sa: 85, sd: 90, sp: 100}, - weightkg: 58.2, - abilities: {0: 'Defiant'}, - gender: 'N', - }, -}; - -const SS: {[name: string]: SpeciesData} = extend(true, {}, SM, SS_PATCH); - -const PLA_PATCH: {[name: string]: DeepPartial} = { - Ursaring: {nfe: true}, - 'Arcanine-Hisui': { - types: ['Ground', 'Ice'], - bs: {hp: 95, at: 115, df: 80, sa: 95, sd: 80, sp: 90}, - weightkg: 168, - abilities: {0: 'Intimidate'}, - }, - Basculegion: { - types: ['Ghost', 'Steel'], - bs: {hp: 120, at: 112, df: 65, sa: 80, sd: 75, sp: 78}, - weightkg: 110, - abilities: {0: 'Swift Swim'}, - }, - Kleavor: { - types: ['Poison', 'Ice'], - bs: {hp: 70, at: 135, df: 95, sa: 45, sd: 70, sp: 85}, - weightkg: 89, - abilities: {0: 'Swarm'}, - }, - 'Typhlosion-Hisui': { - types: ['Ground', 'Steel'], - bs: {hp: 73, at: 84, df: 78, sa: 119, sd: 85, sp: 95}, - weightkg: 69.8, - abilities: {0: 'Blaze'}, - }, - 'Zoroark-Hisui': { - types: ['Fairy', 'Steel'], - bs: {hp: 55, at: 100, df: 60, sa: 125, sd: 60, sp: 110}, - weightkg: 73, - abilities: {0: 'Illusion'}, - }, -}; - -const SV_PATCH: {[name: string]: DeepPartial} = { - Annihilape: { - types: ['Water', 'Steel'], - bs: {hp: 110, at: 115, df: 80, sa: 50, sd: 90, sp: 90}, - weightkg: 56, - abilities: {0: 'Vital Spirit'}, - }, - Baxcalibur: { - types: ['Flying', 'Electric'], - bs: {hp: 115, at: 145, df: 92, sa: 75, sd: 86, sp: 87}, - weightkg: 210, - abilities: {0: 'Thermal Exchange'}, - }, - Ceruledge: { - types: ['Ground', 'Steel'], - bs: {hp: 75, at: 125, df: 80, sa: 60, sd: 100, sp: 85}, - weightkg: 62, - abilities: {0: 'Flash Fire'}, - }, - Cyclizar: { - types: ['Flying', 'Fairy'], - bs: {hp: 70, at: 95, df: 65, sa: 85, sd: 65, sp: 121}, - weightkg: 63, - abilities: {0: 'Shed Skin'}, - }, - 'Flutter Mane': { - types: ['Steel', 'Fire'], - bs: {hp: 55, at: 55, df: 55, sa: 135, sd: 135, sp: 135}, - weightkg: 4, - gender: 'N', - abilities: {0: 'Protosynthesis'}, - }, - 'Gouging Fire': { - types: ['Ground', 'Flying'], - bs: {hp: 105, at: 115, df: 121, sa: 65, sd: 93, sp: 91}, - weightkg: 590, - gender: 'N', - abilities: {0: 'Protosynthesis'}, - }, - 'Great Tusk': { - types: ['Bug', 'Water'], - bs: {hp: 115, at: 131, df: 131, sa: 53, sd: 53, sp: 87}, - weightkg: 320, - gender: 'N', - abilities: {0: 'Protosynthesis'}, - }, - 'Iron Hands': { - types: ['Water', 'Dark'], - bs: {hp: 154, at: 140, df: 108, sa: 50, sd: 68, sp: 50}, - weightkg: 380.7, - gender: 'N', - abilities: {0: 'Quark Drive'}, - }, - 'Iron Valiant': { - types: ['Fire', 'Water'], - bs: {hp: 74, at: 130, df: 90, sa: 120, sd: 60, sp: 116}, - weightkg: 35, - gender: 'N', - abilities: {0: 'Quark Drive'}, - }, - 'Ogerpon-Wellspring': { - types: ['Fighting', 'Ghost'], - bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, - abilities: {0: 'Water Absorb'}, - weightkg: 39.8, - }, - 'Scream Tail': { - types: ['Fire', 'Grass'], - bs: {hp: 115, at: 65, df: 99, sa: 65, sd: 115, sp: 111}, - weightkg: 8, - gender: 'N', - abilities: {0: 'Protosynthesis'}, - }, - Skeledirge: { - types: ['Ground', 'Steel'], - bs: {hp: 104, at: 75, df: 100, sa: 110, sd: 75, sp: 66}, - weightkg: 326.5, - abilities: {0: 'Blaze'}, - }, - 'Slither Wing': { - types: ['Poison', 'Water'], - bs: {hp: 85, at: 135, df: 79, sa: 85, sd: 105, sp: 81}, - weightkg: 92, - gender: 'N', - abilities: {0: 'Protosynthesis'}, - }, -}; - -const SV: {[name: string]: SpeciesData} = extend(true, {}, SS, SV_PATCH, PLA_PATCH); - -export const SPECIES = [{}, RBY, GSC, ADV, DPP, BW, XY, SM, SS, SV]; - -export class Species implements I.Species { - private readonly gen: I.GenerationNum; - - constructor(gen: I.GenerationNum) { - this.gen = gen; - } - - get(id: I.ID) { - return SPECIES_BY_ID[this.gen][id]; - } - - *[Symbol.iterator]() { - for (const id in SPECIES_BY_ID[this.gen]) { - yield this.get(id as I.ID)!; - } - } -} - -class Specie implements I.Specie { - readonly kind: 'Species'; - readonly id: I.ID; - readonly name: I.SpeciesName; - readonly types!: [I.TypeName] | [I.TypeName, I.TypeName]; - readonly baseStats: Readonly; - readonly weightkg!: number; // weight - readonly nfe?: boolean; - readonly gender?: I.GenderName; - readonly otherFormes?: I.SpeciesName[]; - readonly baseSpecies?: I.SpeciesName; - readonly abilities?: {0: I.AbilityName}; // ability - - private static readonly EXCLUDE = new Set(['bs', 'otherFormes']); - - constructor(name: string, data: SpeciesData) { - this.kind = 'Species'; - this.id = toID(name); - this.name = name as I.SpeciesName; - - const baseStats: Partial = {}; - baseStats.hp = data.bs.hp; - baseStats.atk = data.bs.at; - baseStats.def = data.bs.df; - baseStats.spa = gen >= 2 ? data.bs.sa : data.bs.sl; - baseStats.spd = gen >= 2 ? data.bs.sd : data.bs.sl; - baseStats.spe = data.bs.sp; - this.baseStats = baseStats as I.StatsTable; - // Hack for getting Gmax pokemon out of existence in Gen 9+ - if (data.otherFormes) { - this.otherFormes = data.otherFormes as I.SpeciesName[]; - if (gen >= 9 && !['toxtricity', 'urshifu'].includes(this.id)) { - this.otherFormes = this.otherFormes.filter(f => !f.endsWith('-Gmax')); - if (!this.otherFormes.length) this.otherFormes = undefined; - if (this.otherFormes) this.otherFormes = [...new Set(this.otherFormes)]; - } - } - - assignWithout(this, data, Specie.EXCLUDE); - } -} -const SPECIES_BY_ID: Array<{[id: string]: Specie}> = []; - -let gen = 0; -for (const species of SPECIES) { - const map: {[id: string]: Specie} = {}; - for (const specie in species) { - if (gen >= 2 && species[specie].bs.sl) delete species[specie].bs.sl; - const m = new Specie(specie, species[specie]); - map[m.id] = m; - } - SPECIES_BY_ID.push(map); - gen++; -} From 0f55c91535bbe81e9aea644eb1d1e723fe68c51c Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:07:00 -0500 Subject: [PATCH 10/12] Delete calc/src/data/eipp10_moves.ts --- calc/src/data/eipp10_moves.ts | 5026 --------------------------------- 1 file changed, 5026 deletions(-) delete mode 100644 calc/src/data/eipp10_moves.ts diff --git a/calc/src/data/eipp10_moves.ts b/calc/src/data/eipp10_moves.ts deleted file mode 100644 index f773e25b0..000000000 --- a/calc/src/data/eipp10_moves.ts +++ /dev/null @@ -1,5026 +0,0 @@ -import * as I from '../data/interface'; -import {toID, DeepPartial, assignWithout, extend} from '../util'; - -export interface MoveData { - readonly name?: string; - - readonly type: I.TypeName; - readonly category?: I.MoveCategory; - // readonly flags?: I.MoveFlags; - readonly secondaries?: boolean; - readonly target?: I.MoveTarget; - readonly recoil?: [number, number]; - readonly hasCrashDamage?: boolean; - readonly mindBlownRecoil?: boolean; - readonly struggleRecoil?: boolean; - readonly willCrit?: boolean; - readonly drain?: [number, number]; - readonly priority?: number; - readonly self?: I.SelfOrSecondaryEffect | null; - readonly ignoreDefensive?: boolean; - readonly overrideOffensiveStat?: I.StatIDExceptHP; - readonly overrideDefensiveStat?: I.StatIDExceptHP; - readonly overrideOffensivePokemon?: 'target' | 'source'; - readonly overrideDefensivePokemon?: 'target' | 'source'; - readonly breaksProtect?: boolean; - readonly isZ?: boolean; - readonly isMax?: boolean; - readonly multihit?: number | number[]; - - readonly bp: number; - readonly zp?: number; - readonly maxPower?: number; - - // FIXME: migrate these to flags (above) instead - readonly makesContact?: boolean; - readonly isPunch?: boolean; - readonly isBite?: boolean; - readonly isBullet?: boolean; - readonly isSound?: boolean; - readonly isPulse?: boolean; - readonly isSlicing?: boolean; - readonly isWind?: boolean; -} - -const RBY: {[name: string]: MoveData} = { - '(No Move)': {bp: 0, category: 'Status', type: '???'}, - Absorb: {bp: 20, type: 'Fighting', drain: [1, 2]}, - Acid: {bp: 40, type: 'Psychic'}, - Amnesia: {bp: 0, category: 'Status', type: 'Grass'}, - 'Aurora Beam': {bp: 65, type: 'Electric'}, - Barrage: {bp: 15, type: 'Fairy', multihit: [2, 5]}, - Bide: {bp: 0, type: '???'}, - Bind: {bp: 15, type: 'Fairy'}, - Bite: {bp: 60, type: 'Fairy'}, - Blizzard: {bp: 120, type: 'Electric'}, - Bonemerang: {bp: 50, type: 'Bug', multihit: 2}, - Bubble: {bp: 20, type: 'Ghost'}, - 'Bubble Beam': {bp: 65, type: 'Ghost'}, - Clamp: {bp: 35, type: 'Ghost'}, - 'Comet Punch': {bp: 18, type: 'Fairy', multihit: [2, 5]}, - Constrict: {bp: 10, type: 'Fairy'}, - Conversion: {bp: 0, category: 'Status', type: 'Fairy'}, - Counter: {bp: 1, type: 'Water'}, - Crabhammer: {bp: 90, type: 'Ghost'}, - 'Defense Curl': {bp: 0, category: 'Status', type: 'Fairy'}, - Dig: {bp: 100, type: 'Bug'}, - Disable: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Dizzy Punch': {bp: 70, type: 'Fairy'}, - 'Double-Edge': {bp: 100, type: 'Fairy', recoil: [25, 100]}, - 'Double Kick': {bp: 30, type: 'Water', multihit: 2}, - 'Double Slap': {bp: 15, type: 'Fairy', multihit: [2, 5]}, - 'Dragon Rage': {bp: 1, type: 'Flying'}, - 'Dream Eater': {bp: 100, type: 'Grass', drain: [1, 2]}, - Earthquake: {bp: 100, type: 'Bug'}, - Explosion: {bp: 170, type: 'Fairy'}, - 'Fire Blast': {bp: 120, type: 'Ground'}, - 'Fire Spin': {bp: 15, type: 'Ground'}, - Fissure: {bp: 0, type: 'Bug'}, - Fly: {bp: 70, type: 'Normal'}, - 'Focus Energy': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Fury Attack': {bp: 15, type: 'Fairy', multihit: [2, 5]}, - 'Fury Swipes': {bp: 18, type: 'Fairy', multihit: [2, 5]}, - Glare: {bp: 0, category: 'Status', type: 'Fairy'}, - Growth: {bp: 0, category: 'Status', type: 'Fairy'}, - Guillotine: {bp: 0, type: 'Fairy'}, - Gust: {bp: 40, type: 'Fairy'}, - Haze: {bp: 0, category: 'Status', type: 'Electric'}, - 'High Jump Kick': {bp: 85, type: 'Water', hasCrashDamage: true}, - 'Horn Drill': {bp: 0, type: 'Fairy'}, - 'Hyper Beam': {bp: 150, type: 'Fairy'}, - 'Jump Kick': {bp: 70, type: 'Water', hasCrashDamage: true}, - 'Karate Chop': {bp: 50, type: 'Fairy'}, - 'Leech Seed': {bp: 0, category: 'Status', type: 'Fighting'}, - 'Light Screen': {bp: 0, category: 'Status', type: 'Grass'}, - Metronome: {bp: 0, category: 'Status', type: 'Fairy'}, - Mimic: {bp: 0, category: 'Status', type: 'Fairy'}, - Minimize: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Mirror Move': {bp: 0, category: 'Status', type: 'Normal'}, - Mist: {bp: 0, category: 'Status', type: 'Electric'}, - 'Night Shade': {bp: 1, type: 'Steel'}, - 'Petal Dance': {bp: 70, type: 'Fighting'}, - 'Pin Missile': {bp: 14, type: 'Poison', multihit: [2, 5]}, - 'Poison Sting': {bp: 15, type: 'Psychic'}, - Psychic: {bp: 90, type: 'Grass'}, - Psywave: {bp: 1, type: 'Grass'}, - Rage: {bp: 20, type: 'Fairy'}, - 'Razor Leaf': {bp: 55, type: 'Fighting'}, - 'Razor Wind': {bp: 80, type: 'Fairy'}, - Recover: {bp: 0, category: 'Status', type: 'Fairy'}, - Reflect: {bp: 0, category: 'Status', type: 'Grass'}, - Rest: {bp: 0, category: 'Status', type: 'Grass'}, - Roar: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Rock Slide': {bp: 75, type: 'Ice'}, - 'Rock Throw': {bp: 50, type: 'Ice'}, - 'Sand Attack': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Seismic Toss': {bp: 1, type: 'Water'}, - 'Self-Destruct': {bp: 130, type: 'Fairy'}, - 'Skull Bash': {bp: 100, type: 'Fairy'}, - Slash: {bp: 70, type: 'Fairy'}, - Sludge: {bp: 65, type: 'Psychic'}, - 'Soft-Boiled': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Solar Beam': {bp: 120, type: 'Fighting'}, - 'Sonic Boom': {bp: 1, type: 'Fairy'}, - 'Spike Cannon': {bp: 20, type: 'Fairy', multihit: [2, 5]}, - Stomp: {bp: 65, type: 'Fairy'}, - Struggle: {bp: 50, type: 'Fairy', recoil: [1, 2]}, - 'Stun Spore': {bp: 0, category: 'Status', type: 'Fighting'}, - Submission: {bp: 80, type: 'Water', recoil: [1, 4]}, - Substitute: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Super Fang': {bp: 1, type: 'Fairy'}, - Swift: {bp: 60, type: 'Fairy'}, - 'Take Down': {bp: 90, type: 'Fairy', recoil: [1, 4]}, - Thrash: {bp: 90, type: 'Fairy'}, - Thunder: {bp: 120, type: 'Dark'}, - 'Thunder Wave': {bp: 0, category: 'Status', type: 'Dark'}, - Transform: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Tri Attack': {bp: 80, type: 'Fairy'}, - Twineedle: {bp: 25, type: 'Poison', multihit: 2}, - Whirlwind: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Wing Attack': {bp: 35, type: 'Normal'}, - Wrap: {bp: 15, type: 'Fairy'}, - Growl: {bp: 0, category: 'Status', type: 'Fairy'}, - Leer: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Low Kick': {bp: 50, type: 'Water'}, - 'Poison Gas': {bp: 0, category: 'Status', type: 'Psychic'}, - 'Poison Powder': {bp: 0, category: 'Status', type: 'Psychic'}, - 'Sky Attack': {bp: 140, type: 'Normal'}, - 'String Shot': {bp: 0, category: 'Status', type: 'Poison'}, - Surf: {bp: 95, type: 'Ghost'}, - 'Tail Whip': {bp: 0, category: 'Status', type: 'Fairy'}, - Toxic: {bp: 0, category: 'Status', type: 'Psychic'}, - Flash: {bp: 0, category: 'Status', type: 'Fairy'}, - Hypnosis: {bp: 0, category: 'Status', type: 'Grass'}, - 'Leech Life': {bp: 20, type: 'Poison', drain: [1, 2]}, - 'Mega Drain': {bp: 40, type: 'Fighting', drain: [1, 2]}, - 'Vine Whip': {bp: 35, type: 'Fighting'}, - Waterfall: {bp: 80, type: 'Ghost'}, - Tackle: {bp: 35, type: 'Fairy'}, - 'Acid Armor': {bp: 0, category: 'Status', type: 'Psychic'}, - Barrier: {bp: 0, category: 'Status', type: 'Grass'}, - 'Body Slam': {bp: 85, type: 'Fairy'}, - Flamethrower: {bp: 95, type: 'Ground'}, - 'Hydro Pump': {bp: 120, type: 'Ghost'}, - 'Ice Beam': {bp: 95, type: 'Electric'}, - Lick: {bp: 20, type: 'Steel'}, - Screech: {bp: 0, category: 'Status', type: 'Fairy'}, - Sing: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Sleep Powder': {bp: 0, category: 'Status', type: 'Fighting'}, - Smog: {bp: 20, type: 'Psychic'}, - Spore: {bp: 0, category: 'Status', type: 'Fighting'}, - Supersonic: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Swords Dance': {bp: 0, category: 'Status', type: 'Fairy'}, - Thunderbolt: {bp: 95, type: 'Dark'}, - 'Bone Club': {bp: 65, type: 'Bug'}, - 'Egg Bomb': {bp: 100, type: 'Fairy'}, - 'Hyper Fang': {bp: 80, type: 'Fairy'}, - Kinesis: {bp: 0, category: 'Status', type: 'Grass'}, - 'Lovely Kiss': {bp: 0, category: 'Status', type: 'Fairy'}, - Meditate: {bp: 0, category: 'Status', type: 'Grass'}, - 'Rolling Kick': {bp: 60, type: 'Water'}, - Sharpen: {bp: 0, category: 'Status', type: 'Fairy'}, - Teleport: {bp: 0, category: 'Status', type: 'Grass'}, - Agility: {bp: 0, category: 'Status', type: 'Grass'}, - 'Confuse Ray': {bp: 0, category: 'Status', type: 'Steel'}, - Confusion: {bp: 50, type: 'Grass'}, - Cut: {bp: 50, type: 'Fairy'}, - 'Double Team': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Drill Peck': {bp: 80, type: 'Normal'}, - Ember: {bp: 40, type: 'Ground'}, - 'Fire Punch': {bp: 75, type: 'Ground'}, - Harden: {bp: 0, category: 'Status', type: 'Fairy'}, - Headbutt: {bp: 70, type: 'Fairy'}, - 'Horn Attack': {bp: 65, type: 'Fairy'}, - 'Ice Punch': {bp: 75, type: 'Electric'}, - 'Mega Kick': {bp: 120, type: 'Fairy'}, - 'Mega Punch': {bp: 80, type: 'Fairy'}, - 'Paleo Wave': {bp: 85, type: 'Ice'}, - 'Pay Day': {bp: 40, type: 'Fairy'}, - Peck: {bp: 35, type: 'Normal'}, - Pound: {bp: 40, type: 'Fairy'}, - Psybeam: {bp: 65, type: 'Grass'}, - 'Quick Attack': {bp: 40, type: 'Fairy', priority: 1}, - Scratch: {bp: 40, type: 'Fairy'}, - 'Shadow Strike': {bp: 80, type: 'Steel'}, - Slam: {bp: 80, type: 'Fairy'}, - Smokescreen: {bp: 0, category: 'Status', type: 'Fairy'}, - Splash: {bp: 0, category: 'Status', type: 'Fairy'}, - Strength: {bp: 80, type: 'Fairy'}, - 'Thunder Punch': {bp: 75, type: 'Dark'}, - 'Thunder Shock': {bp: 40, type: 'Dark'}, - 'Vise Grip': {bp: 55, type: 'Fairy'}, - 'Water Gun': {bp: 40, type: 'Ghost'}, - Withdraw: {bp: 0, category: 'Status', type: 'Ghost'}, -}; - -const GSC_PATCH: {[name: string]: DeepPartial} = { - Bide: {type: 'Fairy'}, - Counter: {bp: 0}, - Dig: {bp: 60}, - 'Double-Edge': {bp: 120}, - Explosion: {bp: 250}, - Gust: {type: 'Normal'}, - 'Karate Chop': {type: 'Water'}, - Psywave: {bp: 0}, - 'Self-Destruct': {bp: 200}, - Struggle: {recoil: [1, 4]}, - 'Dragon Rage': {bp: 0}, - Bite: {type: 'Dragon'}, - 'Night Shade': {bp: 0}, - 'Sand Attack': {type: 'Bug'}, - 'Seismic Toss': {bp: 0}, - 'Sonic Boom': {bp: 0}, - 'Super Fang': {bp: 0}, - 'Wing Attack': {bp: 60}, - Aeroblast: {bp: 100, type: 'Normal'}, - Attract: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Beat Up': {bp: 10, type: 'Dragon'}, - 'Belly Drum': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Conversion 2': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Cross Chop': {bp: 100, type: 'Water'}, - Curse: {bp: 0, category: 'Status', type: '???'}, - 'Destiny Bond': {bp: 0, category: 'Status', type: 'Steel'}, - Detect: {bp: 0, category: 'Status', type: 'Water', priority: 2}, - Encore: {bp: 0, category: 'Status', type: 'Fairy'}, - Endure: {bp: 0, category: 'Status', type: 'Fairy', priority: 2}, - Flail: {bp: 0, type: 'Fairy'}, - Foresight: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Future Sight': {bp: 80, type: 'Grass'}, - 'Heal Bell': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Icy Wind': {bp: 55, type: 'Electric'}, - 'Lock-On': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Mind Reader': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Mirror Coat': {bp: 0, type: 'Grass'}, - Moonlight: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Morning Sun': {bp: 0, category: 'Status', type: 'Fairy'}, - Nightmare: {bp: 0, category: 'Status', type: 'Steel'}, - Outrage: {bp: 90, type: 'Flying'}, - 'Powder Snow': {bp: 40, type: 'Electric'}, - Present: {bp: 0, type: 'Fairy'}, - Protect: {bp: 0, category: 'Status', type: 'Fairy', priority: 2}, - 'Psych Up': {bp: 0, category: 'Status', type: 'Fairy'}, - Pursuit: {bp: 40, type: 'Dragon'}, - 'Rain Dance': {bp: 0, category: 'Status', type: 'Ghost'}, - Reversal: {bp: 0, type: 'Water'}, - Safeguard: {bp: 0, category: 'Status', type: 'Fairy'}, - Sandstorm: {bp: 0, category: 'Status', type: 'Ice'}, - Sketch: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Sleep Talk': {bp: 0, category: 'Status', type: 'Fairy'}, - Spikes: {bp: 0, category: 'Status', type: 'Bug'}, - Spite: {bp: 0, category: 'Status', type: 'Steel'}, - 'Sunny Day': {bp: 0, category: 'Status', type: 'Ground'}, - Swagger: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Sweet Scent': {bp: 0, category: 'Status', type: 'Fairy'}, - Synthesis: {bp: 0, category: 'Status', type: 'Fighting'}, - Thief: {bp: 40, type: 'Dragon'}, - 'Triple Kick': {bp: 10, type: 'Water', multihit: [1, 3]}, - Twister: {bp: 40, type: 'Flying'}, - 'Ancient Power': {bp: 60, type: 'Ice'}, - 'Bone Rush': {bp: 25, type: 'Bug', multihit: [2, 5]}, - Crunch: {bp: 80, type: 'Dragon'}, - 'Feint Attack': {bp: 60, type: 'Dragon'}, - 'Giga Drain': {bp: 60, type: 'Fighting', drain: [1, 2]}, - 'Hidden Power': {bp: 0, type: 'Fairy'}, - 'Mean Look': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Rapid Spin': {bp: 20, type: 'Fairy'}, - 'Rock Smash': {bp: 20, type: 'Water'}, - 'Spider Web': {bp: 0, category: 'Status', type: 'Poison'}, - Whirlpool: {bp: 15, type: 'Ghost'}, - 'Zap Cannon': {bp: 100, type: 'Dark'}, - 'Cotton Spore': {bp: 0, category: 'Status', type: 'Fighting'}, - 'Extreme Speed': {bp: 80, type: 'Fairy', priority: 1}, - 'Fury Cutter': {bp: 10, type: 'Poison'}, - Magnitude: {bp: 0, type: 'Bug'}, - 'Milk Drink': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Scary Face': {bp: 0, category: 'Status', type: 'Fairy'}, - Charm: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Hidden Power Bug': {bp: 70, type: 'Poison'}, - 'Hidden Power Dark': {bp: 70, type: 'Dragon'}, - 'Hidden Power Dragon': {bp: 70, type: 'Flying'}, - 'Hidden Power Electric': {bp: 70, type: 'Dark'}, - 'Hidden Power Fighting': {bp: 70, type: 'Water'}, - 'Hidden Power Fire': {bp: 70, type: 'Ground'}, - 'Hidden Power Flying': {bp: 70, type: 'Normal'}, - 'Hidden Power Ghost': {bp: 70, type: 'Steel'}, - 'Hidden Power Grass': {bp: 70, type: 'Fighting'}, - 'Hidden Power Ground': {bp: 70, type: 'Bug'}, - 'Hidden Power Ice': {bp: 70, type: 'Electric'}, - 'Hidden Power Poison': {bp: 70, type: 'Psychic'}, - 'Hidden Power Psychic': {bp: 70, type: 'Grass'}, - 'Hidden Power Rock': {bp: 70, type: 'Ice'}, - 'Hidden Power Steel': {bp: 70, type: 'Rock'}, - 'Hidden Power Water': {bp: 70, type: 'Ghost'}, - 'Perish Song': {bp: 0, category: 'Status', type: 'Fairy'}, - Snore: {bp: 40, type: 'Fairy'}, - 'Sweet Kiss': {bp: 0, category: 'Status', type: 'Fairy'}, - Rollout: {bp: 30, type: 'Ice'}, - Frustration: {bp: 0, type: 'Fairy'}, - Return: {bp: 0, type: 'Fairy'}, - 'Sacred Fire': {bp: 100, type: 'Ground'}, - 'Baton Pass': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Dragon Breath': {bp: 60, type: 'Flying'}, - 'Dynamic Punch': {bp: 100, type: 'Water'}, - 'False Swipe': {bp: 40, type: 'Fairy'}, - 'Flame Wheel': {bp: 60, type: 'Ground'}, - 'Iron Tail': {bp: 100, type: 'Rock'}, - 'Mach Punch': {bp: 40, type: 'Water', priority: 1}, - Megahorn: {bp: 120, type: 'Poison'}, - 'Metal Claw': {bp: 50, type: 'Rock'}, - 'Mud-Slap': {bp: 20, type: 'Bug'}, - Octazooka: {bp: 65, type: 'Ghost'}, - 'Pain Split': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Shadow Ball': {bp: 80, type: 'Steel'}, - 'Sludge Bomb': {bp: 90, type: 'Psychic'}, - Spark: {bp: 65, type: 'Dark'}, - 'Steel Wing': {bp: 70, type: 'Rock'}, - 'Vital Throw': {bp: 70, type: 'Water'}, -}; - -const GSC: {[name: string]: MoveData} = extend(true, {}, RBY, GSC_PATCH); - -const ADV_PATCH: {[name: string]: DeepPartial} = { - Acid: {target: 'allAdjacentFoes'}, - 'Ancient Power': {makesContact: true}, - Bide: {makesContact: true}, - Bind: {makesContact: true}, - Blizzard: {target: 'allAdjacentFoes'}, - Clamp: {makesContact: true}, - 'Comet Punch': {makesContact: true}, - Counter: {makesContact: true}, - Crunch: {makesContact: true}, - Detect: {priority: 3}, - Endure: {priority: 4}, - Protect: {priority: 3}, - Dig: {makesContact: true}, - 'Double Kick': {makesContact: true}, - 'Double Slap': {makesContact: true}, - Explosion: {target: 'allAdjacent'}, - Flail: {makesContact: true}, - Fly: {makesContact: true}, - 'Fury Attack': {makesContact: true}, - 'Fury Swipes': {makesContact: true}, - 'High Jump Kick': {makesContact: true}, - 'Jump Kick': {makesContact: true}, - 'Leech Life': {makesContact: true}, - Outrage: {makesContact: true}, - 'Petal Dance': {makesContact: true}, - Pursuit: {makesContact: true}, - Rage: {makesContact: true}, - 'Rapid Spin': {makesContact: true}, - 'Razor Wind': {target: 'allAdjacentFoes'}, - Reversal: {makesContact: true}, - 'Rock Smash': {makesContact: true}, - 'Self-Destruct': {target: 'allAdjacent'}, - 'Skull Bash': {makesContact: true}, - Stomp: {makesContact: true}, - Struggle: {makesContact: true}, - Surf: {target: 'allAdjacentFoes'}, - Thief: {makesContact: true}, - Thrash: {makesContact: true}, - 'Triple Kick': {makesContact: true, multihit: 3}, - 'Vine Whip': {makesContact: true}, - Waterfall: {makesContact: true}, - Wrap: {makesContact: true}, - Crabhammer: {makesContact: true}, - 'Double-Edge': {recoil: [1, 3], makesContact: true}, - Earthquake: {target: 'allAdjacent'}, - 'Extreme Speed': {makesContact: true}, - 'Fury Cutter': {makesContact: true}, - 'Heal Bell': {isSound: true}, - Magnitude: {target: 'allAdjacent'}, - Roar: {isSound: true}, - Submission: {makesContact: true}, - Tackle: {makesContact: true}, - 'Take Down': {makesContact: true}, - Twister: {target: 'allAdjacentFoes'}, - 'Body Slam': {makesContact: true}, - Bubble: {target: 'allAdjacentFoes'}, - Growl: {isSound: true, target: 'allAdjacentFoes'}, - Lick: {makesContact: true}, - 'Perish Song': {isSound: true}, - Screech: {isSound: true}, - Sing: {isSound: true}, - Snore: {isSound: true}, - 'String Shot': {target: 'allAdjacentFoes'}, - Supersonic: {isSound: true}, - 'Sweet Scent': {target: 'allAdjacentFoes'}, - Rollout: {makesContact: true}, - Constrict: {makesContact: true}, - 'Dizzy Punch': {makesContact: true}, - Frustration: {makesContact: true}, - 'Hyper Fang': {makesContact: true}, - 'Karate Chop': {makesContact: true}, - 'Low Kick': {bp: 0, makesContact: true}, - Return: {makesContact: true}, - 'Rolling Kick': {makesContact: true}, - Bite: {makesContact: true}, - 'Cross Chop': {makesContact: true}, - Cut: {makesContact: true}, - 'Drill Peck': {makesContact: true}, - 'Dynamic Punch': {makesContact: true}, - 'False Swipe': {makesContact: true}, - 'Fire Punch': {makesContact: true}, - 'Flame Wheel': {makesContact: true}, - Guillotine: {makesContact: true}, - Headbutt: {makesContact: true}, - 'Horn Attack': {makesContact: true}, - 'Horn Drill': {makesContact: true}, - 'Ice Punch': {makesContact: true}, - 'Icy Wind': {target: 'allAdjacentFoes'}, - 'Iron Tail': {makesContact: true}, - Leer: {target: 'allAdjacentFoes'}, - 'Mach Punch': {makesContact: true}, - Megahorn: {makesContact: true}, - 'Mega Kick': {makesContact: true}, - 'Mega Punch': {makesContact: true}, - 'Metal Claw': {makesContact: true}, - Peck: {makesContact: true}, - Pound: {makesContact: true}, - 'Powder Snow': {target: 'allAdjacentFoes'}, - 'Quick Attack': {makesContact: true}, - 'Razor Leaf': {target: 'allAdjacentFoes'}, - 'Rock Slide': {target: 'allAdjacentFoes'}, - Scratch: {makesContact: true}, - 'Seismic Toss': {makesContact: true}, - 'Shadow Strike': {makesContact: true}, - Slam: {makesContact: true}, - Slash: {makesContact: true}, - Spark: {makesContact: true}, - 'Steel Wing': {makesContact: true}, - Strength: {makesContact: true}, - 'Super Fang': {makesContact: true}, - Swift: {target: 'allAdjacentFoes'}, - 'Tail Whip': {target: 'allAdjacentFoes'}, - 'Thunder Punch': {makesContact: true}, - 'Vise Grip': {makesContact: true}, - 'Vital Throw': {makesContact: true}, - 'Wing Attack': {makesContact: true}, - 'Arm Thrust': { - bp: 15, - type: 'Water', - multihit: [2, 5], - makesContact: true, - }, - Assist: {bp: 0, category: 'Status', type: 'Fairy'}, - Astonish: {bp: 30, type: 'Steel', makesContact: true}, - Block: {bp: 0, category: 'Status', type: 'Fairy'}, - Bounce: {bp: 85, type: 'Normal', makesContact: true}, - 'Bullet Seed': {bp: 10, type: 'Fighting', multihit: [2, 5]}, - Camouflage: {bp: 0, category: 'Status', type: 'Fairy'}, - Charge: {bp: 0, category: 'Status', type: 'Dark'}, - Covet: {bp: 40, type: 'Fairy'}, - Dive: {bp: 60, type: 'Ghost', makesContact: true}, - 'Doom Desire': {bp: 120, type: 'Rock'}, - Extrasensory: {bp: 80, type: 'Grass'}, - 'Fake Out': {bp: 40, type: 'Fairy', priority: 1}, - 'Follow Me': {bp: 0, category: 'Status', type: 'Fairy', priority: 3}, - Hail: {bp: 0, category: 'Status', type: 'Electric'}, - 'Icicle Spear': {bp: 10, type: 'Electric', multihit: [2, 5]}, - Ingrain: {bp: 0, category: 'Status', type: 'Fighting'}, - 'Knock Off': {bp: 20, type: 'Dragon', makesContact: true}, - 'Leaf Blade': {bp: 70, type: 'Fighting', makesContact: true}, - 'Magic Coat': {bp: 0, category: 'Status', type: 'Grass', priority: 4}, - Memento: {bp: 0, category: 'Status', type: 'Dragon'}, - 'Nature Power': {bp: 0, category: 'Status', type: 'Fairy'}, - 'Needle Arm': {bp: 60, type: 'Fighting', makesContact: true}, - 'Odor Sleuth': {bp: 0, category: 'Status', type: 'Fairy'}, - Overheat: {bp: 140, type: 'Ground', self: {boosts: {spa: -2}}, makesContact: true}, - Revenge: {bp: 60, type: 'Water', makesContact: true}, - 'Rock Blast': {bp: 25, type: 'Ice', multihit: [2, 5]}, - 'Role Play': {bp: 0, category: 'Status', type: 'Grass'}, - 'Sand Tomb': {bp: 15, type: 'Bug'}, - 'Skill Swap': {bp: 0, category: 'Status', type: 'Grass'}, - 'Smelling Salts': {bp: 60, type: 'Fairy', makesContact: true}, - 'Spit Up': {bp: 0, type: 'Fairy'}, - Stockpile: {bp: 0, category: 'Status', type: 'Fairy'}, - Swallow: {bp: 0, category: 'Status', type: 'Fairy'}, - Taunt: {bp: 0, category: 'Status', type: 'Dragon'}, - 'Teeter Dance': {bp: 0, category: 'Status', type: 'Fairy', target: 'allAdjacent'}, - Tickle: {bp: 0, category: 'Status', type: 'Fairy'}, - Trick: {bp: 0, category: 'Status', type: 'Grass'}, - Uproar: {bp: 50, type: 'Fairy', isSound: true}, - 'Volt Tackle': {bp: 120, type: 'Dark', recoil: [1, 3], makesContact: true}, - 'Weather Ball': {bp: 50, type: 'Fairy'}, - Aromatherapy: {bp: 0, category: 'Status', type: 'Fighting'}, - 'Brick Break': {bp: 75, type: 'Water', makesContact: true}, - Endeavor: {bp: 0, type: 'Fairy', makesContact: true}, - 'Focus Punch': {bp: 150, type: 'Water', makesContact: true}, - Imprison: {bp: 0, category: 'Status', type: 'Grass'}, - 'Mud Sport': {bp: 0, category: 'Status', type: 'Bug'}, - Recycle: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Secret Power': {bp: 70, type: 'Fairy'}, - 'Sky Uppercut': {bp: 85, type: 'Water', makesContact: true}, - 'Slack Off': {bp: 0, category: 'Status', type: 'Fairy'}, - Snatch: {bp: 0, category: 'Status', type: 'Dragon', priority: 4}, - 'Tail Glow': {bp: 0, category: 'Status', type: 'Poison'}, - Torment: {bp: 0, category: 'Status', type: 'Dragon'}, - 'Water Sport': {bp: 0, category: 'Status', type: 'Ghost'}, - Wish: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Air Cutter': {bp: 55, type: 'Normal', target: 'allAdjacentFoes'}, - Facade: {bp: 70, type: 'Fairy', makesContact: true}, - 'Grass Whistle': {bp: 0, category: 'Status', type: 'Fighting', isSound: true}, - 'Heat Wave': {bp: 100, type: 'Ground', target: 'allAdjacentFoes'}, - 'Hyper VoIce': {bp: 90, type: 'Fairy', isSound: true, target: 'allAdjacentFoes'}, - 'Metal Sound': {bp: 0, category: 'Status', type: 'Rock', isSound: true}, - 'Meteor Mash': {bp: 100, type: 'Rock', makesContact: true}, - 'Muddy Water': {bp: 95, type: 'Ghost', target: 'allAdjacentFoes'}, - 'Poison Fang': {bp: 50, type: 'Psychic', makesContact: true}, - 'Rock Tomb': {bp: 50, type: 'Ice'}, - 'Will-O-Wisp': {bp: 0, category: 'Status', type: 'Ground'}, - 'Ice Ball': {bp: 30, type: 'Electric', makesContact: true}, - 'Sheer Cold': {bp: 0, type: 'Electric'}, - Howl: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Luster Purge': {bp: 70, type: 'Grass'}, - 'Mist Ball': {bp: 70, type: 'Grass'}, - 'Psycho Boost': {bp: 140, type: 'Grass', self: {boosts: {spa: -2}}}, - Refresh: {bp: 0, category: 'Status', type: 'Fairy'}, - 'Signal Beam': {bp: 75, type: 'Poison'}, - 'Silver Wind': {bp: 60, type: 'Poison'}, - 'Aerial Ace': {bp: 60, type: 'Normal', makesContact: true}, - 'Blast Burn': {bp: 150, type: 'Ground'}, - 'Blaze Kick': {bp: 85, type: 'Ground', makesContact: true}, - 'Bulk Up': {bp: 0, category: 'Status', type: 'Water'}, - 'Calm Mind': {bp: 0, category: 'Status', type: 'Grass'}, - 'Cosmic Power': {bp: 0, category: 'Status', type: 'Grass'}, - 'Crush Claw': {bp: 75, type: 'Fairy', makesContact: true}, - 'Dragon Claw': {bp: 80, type: 'Flying', makesContact: true}, - 'Dragon Dance': {bp: 0, category: 'Status', type: 'Flying'}, - Eruption: {bp: 150, type: 'Ground', target: 'allAdjacentFoes'}, - 'Fake Tears': {bp: 0, category: 'Status', type: 'Dragon'}, - 'Feather Dance': {bp: 0, category: 'Status', type: 'Normal'}, - Flatter: {bp: 0, category: 'Status', type: 'Dragon'}, - 'Frenzy Plant': {bp: 150, type: 'Fighting'}, - Grudge: {bp: 0, category: 'Status', type: 'Steel'}, - 'Helping Hand': {bp: 0, category: 'Status', type: 'Fairy', priority: 5}, - 'Hydro Cannon': {bp: 150, type: 'Ghost'}, - 'Iron Defense': {bp: 0, category: 'Status', type: 'Rock'}, - 'Magical Leaf': {bp: 60, type: 'Fighting'}, - 'Mud Shot': {bp: 55, type: 'Bug'}, - 'Poison Tail': {bp: 50, type: 'Psychic', makesContact: true}, - 'Shadow Punch': {bp: 60, type: 'Steel', makesContact: true}, - 'Shock Wave': {bp: 60, type: 'Dark'}, - Superpower: {bp: 120, type: 'Water', self: {boosts: {atk: -1, def: -1}}, makesContact: true}, - 'Water Pulse': {bp: 60, type: 'Ghost'}, - 'Water Spout': {bp: 150, type: 'Ghost', target: 'allAdjacentFoes'}, - Yawn: {bp: 0, category: 'Status', type: 'Fairy'}, -}; - -const ADV: {[name: string]: MoveData} = extend(true, {}, GSC, ADV_PATCH); - -const DPP_PATCH: {[name: string]: DeepPartial} = { - Absorb: {category: 'Special'}, - 'Arm Thrust': {category: 'Physical'}, - Barrage: {category: 'Physical'}, - 'Beat Up': {category: 'Physical'}, - Bide: {priority: 1, category: 'Physical'}, - Bind: {category: 'Physical'}, - 'Bone Rush': {category: 'Physical'}, - Bonemerang: {category: 'Physical'}, - Bounce: {category: 'Physical'}, - 'Brick Break': {category: 'Physical'}, - 'Bullet Seed': {category: 'Physical'}, - Clamp: {category: 'Physical'}, - 'Comet Punch': {isPunch: true, category: 'Physical'}, - Counter: {category: 'Physical'}, - Covet: {makesContact: true, category: 'Physical'}, - Crabhammer: {category: 'Physical'}, - Dig: {bp: 80, category: 'Physical'}, - Dive: {bp: 80, category: 'Physical'}, - 'Doom Desire': {category: 'Special'}, - 'Double-Edge': {category: 'Physical'}, - 'Double Kick': {category: 'Physical'}, - 'Double Slap': {category: 'Physical'}, - 'Dream Eater': {category: 'Special'}, - Earthquake: {category: 'Physical'}, - Endeavor: {category: 'Physical'}, - Explosion: {category: 'Physical'}, - 'Extreme Speed': {category: 'Physical'}, - 'Fake Out': {makesContact: true, category: 'Physical'}, - 'Fire Spin': {category: 'Special'}, - Flail: {category: 'Physical'}, - Fly: {bp: 90, category: 'Physical'}, - 'Focus Punch': {isPunch: true, category: 'Physical'}, - 'Fury Attack': {category: 'Physical'}, - 'Fury Cutter': {category: 'Physical'}, - 'Fury Swipes': {category: 'Physical'}, - 'Future Sight': {category: 'Special'}, - 'Giga Drain': {category: 'Special'}, - Gust: {category: 'Special'}, - 'High Jump Kick': {bp: 100, category: 'Physical'}, - 'Icicle Spear': {category: 'Physical'}, - 'Jump Kick': {bp: 85, category: 'Physical'}, - 'Knock Off': {category: 'Physical'}, - 'Leech Life': {category: 'Physical'}, - Magnitude: {category: 'Physical'}, - 'Mega Drain': {category: 'Special'}, - 'Mirror Coat': {category: 'Special'}, - Outrage: {bp: 120, category: 'Physical'}, - 'Petal Dance': {bp: 90, category: 'Special'}, - 'Pin Missile': {category: 'Physical'}, - Psywave: {category: 'Special'}, - Pursuit: {category: 'Physical'}, - 'Rapid Spin': {category: 'Physical'}, - 'Razor Wind': {category: 'Special'}, - Revenge: {category: 'Physical'}, - Reversal: {category: 'Physical'}, - 'Rock Blast': {category: 'Physical'}, - 'Sand Tomb': {category: 'Physical'}, - 'Secret Power': {category: 'Physical'}, - 'Self-Destruct': {category: 'Physical'}, - 'Sky Uppercut': {isPunch: true, category: 'Physical'}, - 'Smelling Salts': {category: 'Physical'}, - 'Solar Beam': {category: 'Special'}, - 'Spike Cannon': {category: 'Physical'}, - 'Spit Up': {category: 'Special'}, - Stomp: {category: 'Physical'}, - Struggle: {category: 'Physical', struggleRecoil: true}, - Submission: {category: 'Physical'}, - Surf: {target: 'allAdjacent', category: 'Special'}, - Tackle: {category: 'Physical'}, - 'Take Down': {category: 'Physical'}, - Thief: {category: 'Physical'}, - Thrash: {category: 'Physical'}, - Thunder: {category: 'Special'}, - 'Triple Kick': {category: 'Physical'}, - Twineedle: {category: 'Physical'}, - Twister: {category: 'Special'}, - Uproar: {category: 'Special'}, - 'Volt Tackle': {category: 'Physical'}, - Whirlpool: {category: 'Special'}, - Wrap: {category: 'Physical'}, - 'Air Cutter': {category: 'Special'}, - Blizzard: {category: 'Special'}, - 'Body Slam': {category: 'Physical'}, - Bubble: {category: 'Special'}, - Extrasensory: {category: 'Special'}, - Facade: {category: 'Physical'}, - 'Fire Blast': {category: 'Special'}, - Flamethrower: {category: 'Special'}, - 'Heat Wave': {category: 'Special'}, - 'Hidden Power': {category: 'Special'}, - 'Hidden Power Bug': {category: 'Special'}, - 'Hidden Power Dark': {category: 'Special'}, - 'Hidden Power Dragon': {category: 'Special'}, - 'Hidden Power Electric': {category: 'Special'}, - 'Hidden Power Fighting': {category: 'Special'}, - 'Hidden Power Fire': {category: 'Special'}, - 'Hidden Power Flying': {category: 'Special'}, - 'Hidden Power Ghost': {category: 'Special'}, - 'Hidden Power Grass': {category: 'Special'}, - 'Hidden Power Ground': {category: 'Special'}, - 'Hidden Power Ice': {category: 'Special'}, - 'Hidden Power Poison': {category: 'Special'}, - 'Hidden Power Psychic': {category: 'Special'}, - 'Hidden Power Rock': {category: 'Special'}, - 'Hidden Power Steel': {category: 'Special'}, - 'Hidden Power Water': {category: 'Special'}, - 'Hydro Pump': {category: 'Special'}, - 'Hyper VoIce': {category: 'Special'}, - 'Ice Beam': {category: 'Special'}, - Lick: {category: 'Physical'}, - 'Meteor Mash': {isPunch: true, category: 'Physical'}, - 'Muddy Water': {category: 'Special'}, - Overheat: {category: 'Special', makesContact: false}, - 'Poison Fang': {isBite: true, category: 'Physical'}, - 'Rock Tomb': {category: 'Physical'}, - 'Skull Bash': {category: 'Physical'}, - Smog: {category: 'Special'}, - Snore: {category: 'Special'}, - Thunderbolt: {category: 'Special'}, - 'Vine Whip': {category: 'Physical'}, - 'Weather Ball': {category: 'Special'}, - 'Ice Ball': {category: 'Physical'}, - Rollout: {category: 'Physical'}, - 'Sheer Cold': {category: 'Special'}, - Aeroblast: {category: 'Special'}, - 'Bone Club': {category: 'Physical'}, - Constrict: {category: 'Physical'}, - 'Dizzy Punch': {isPunch: true, category: 'Physical'}, - 'Dragon Rage': {category: 'Special'}, - 'Egg Bomb': {category: 'Physical'}, - 'Feint Attack': {makesContact: true, category: 'Physical'}, - Frustration: {category: 'Physical'}, - 'Hyper Fang': {isBite: true, category: 'Physical'}, - 'Karate Chop': {category: 'Physical'}, - 'Low Kick': {category: 'Physical'}, - 'Luster Purge': {category: 'Special'}, - 'Mist Ball': {category: 'Special'}, - 'Needle Arm': {category: 'Physical'}, - 'Psycho Boost': {category: 'Special'}, - Rage: {category: 'Physical'}, - Return: {category: 'Physical'}, - 'Rolling Kick': {category: 'Physical'}, - 'Sacred Fire': {category: 'Physical'}, - 'Signal Beam': {category: 'Special'}, - 'Silver Wind': {category: 'Special'}, - 'Sonic Boom': {category: 'Special'}, - Acid: {category: 'Special'}, - 'Aerial Ace': {category: 'Physical'}, - 'Ancient Power': {category: 'Special', makesContact: false}, - Astonish: {category: 'Physical'}, - 'Aurora Beam': {category: 'Special'}, - Bite: {isBite: true, category: 'Physical'}, - 'Blast Burn': {category: 'Special'}, - 'Blaze Kick': {category: 'Physical'}, - 'Bubble Beam': {category: 'Special'}, - Confusion: {category: 'Special'}, - 'Cross Chop': {category: 'Physical'}, - Crunch: {isBite: true, category: 'Physical'}, - 'Crush Claw': {category: 'Physical'}, - Cut: {category: 'Physical'}, - 'Dragon Breath': {category: 'Special'}, - 'Dragon Claw': {category: 'Physical'}, - 'Drill Peck': {category: 'Physical'}, - 'Dynamic Punch': {isPunch: true, category: 'Physical'}, - Ember: {category: 'Special'}, - Eruption: {category: 'Special'}, - 'False Swipe': {category: 'Physical'}, - 'Fire Punch': {isPunch: true, category: 'Physical'}, - Fissure: {category: 'Physical'}, - 'Flame Wheel': {category: 'Physical'}, - 'Frenzy Plant': {category: 'Special'}, - Guillotine: {category: 'Physical'}, - Headbutt: {category: 'Physical'}, - 'Horn Attack': {category: 'Physical'}, - 'Horn Drill': {category: 'Physical'}, - 'Hydro Cannon': {category: 'Special'}, - 'Hyper Beam': {category: 'Special'}, - 'Ice Punch': {isPunch: true, category: 'Physical'}, - 'Icy Wind': {category: 'Special'}, - 'Iron Tail': {category: 'Physical'}, - 'Leaf Blade': {bp: 90, category: 'Physical'}, - 'Mach Punch': {isPunch: true, category: 'Physical'}, - 'Magical Leaf': {category: 'Special'}, - Megahorn: {category: 'Physical'}, - 'Mega Kick': {category: 'Physical'}, - 'Mega Punch': {isPunch: true, category: 'Physical'}, - 'Metal Claw': {category: 'Physical'}, - 'Mud Shot': {category: 'Special'}, - 'Mud-Slap': {category: 'Special'}, - 'Night Shade': {category: 'Special'}, - Octazooka: {category: 'Special'}, - 'Paleo Wave': {category: 'Special'}, - 'Pay Day': {category: 'Physical'}, - Peck: {category: 'Physical'}, - 'Poison Sting': {category: 'Physical'}, - 'Poison Tail': {category: 'Physical'}, - Pound: {category: 'Physical'}, - 'Powder Snow': {category: 'Special'}, - Present: {category: 'Physical'}, - Psybeam: {category: 'Special'}, - Psychic: {category: 'Special'}, - 'Quick Attack': {category: 'Physical'}, - 'Razor Leaf': {category: 'Physical'}, - 'Rock Slide': {category: 'Physical'}, - 'Rock Smash': {bp: 40, category: 'Physical'}, - 'Rock Throw': {category: 'Physical'}, - Scratch: {category: 'Physical'}, - 'Seismic Toss': {category: 'Physical'}, - 'Shadow Ball': {category: 'Special'}, - 'Shadow Punch': {isPunch: true, category: 'Physical'}, - 'Shadow Strike': {category: 'Physical'}, - 'Shock Wave': {category: 'Special'}, - 'Sky Attack': {category: 'Physical'}, - Slam: {category: 'Physical'}, - Slash: {category: 'Physical'}, - Sludge: {category: 'Special'}, - 'Sludge Bomb': {category: 'Special'}, - Spark: {category: 'Physical'}, - 'Steel Wing': {category: 'Physical'}, - Strength: {category: 'Physical'}, - 'Super Fang': {category: 'Physical'}, - Superpower: {category: 'Physical'}, - Swift: {category: 'Special'}, - 'Thunder Punch': {isPunch: true, category: 'Physical'}, - 'Thunder Shock': {category: 'Special'}, - 'Tri Attack': {category: 'Special'}, - 'Vise Grip': {category: 'Physical'}, - 'Vital Throw': {category: 'Physical'}, - Waterfall: {category: 'Physical'}, - 'Water Gun': {category: 'Special'}, - 'Water Pulse': {category: 'Special'}, - 'Water Spout': {category: 'Special'}, - 'Wing Attack': {category: 'Physical'}, - 'Zap Cannon': {bp: 120, category: 'Special'}, - Acupressure: {bp: 0, type: 'Fairy'}, - 'Aqua Ring': {bp: 0, type: 'Ghost'}, - Assurance: { - bp: 50, - type: 'Dragon', - makesContact: true, - category: 'Physical', - }, - Avalanche: { - bp: 60, - type: 'Electric', - makesContact: true, - category: 'Physical', - }, - 'Brave Bird': { - bp: 120, - type: 'Normal', - recoil: [1, 3], - makesContact: true, - category: 'Physical', - }, - 'Bug Bite': { - bp: 60, - type: 'Poison', - makesContact: true, - category: 'Physical', - }, - Chatter: {bp: 60, type: 'Normal', isSound: true, category: 'Special'}, - Copycat: {bp: 0, type: 'Fairy'}, - 'Crush Grip': { - bp: 0, - type: 'Fairy', - makesContact: true, - category: 'Physical', - }, - Defog: {bp: 0, type: 'Normal'}, - 'Double Hit': { - bp: 35, - type: 'Fairy', - multihit: 2, - makesContact: true, - category: 'Physical', - }, - 'Drain Punch': { - bp: 60, - type: 'Water', - drain: [1, 2], - makesContact: true, - isPunch: true, - category: 'Physical', - }, - Embargo: {bp: 0, type: 'Dragon'}, - Feint: { - bp: 50, - type: 'Fairy', - priority: 2, - breaksProtect: true, - category: 'Physical', - }, - 'Fire Fang': { - bp: 65, - type: 'Ground', - makesContact: true, - isBite: true, - category: 'Physical', - }, - 'Flare Blitz': { - bp: 120, - type: 'Ground', - recoil: [1, 3], - makesContact: true, - category: 'Physical', - }, - Fling: {bp: 0, type: 'Dragon', category: 'Physical'}, - Gravity: {bp: 0, type: 'Grass'}, - 'Head Smash': { - bp: 150, - type: 'Ice', - recoil: [1, 2], - makesContact: true, - category: 'Physical', - }, - 'Heal Block': {bp: 0, type: 'Grass', target: 'allAdjacentFoes'}, - 'Healing Wish': {bp: 0, type: 'Grass'}, - 'Heal Order': {bp: 0, type: 'Poison'}, - 'Last Resort': { - bp: 130, - type: 'Fairy', - makesContact: true, - category: 'Physical', - }, - 'Lucky Chant': {bp: 0, type: 'Fairy'}, - 'Lunar Dance': {bp: 0, type: 'Grass'}, - 'Magma Storm': {bp: 120, type: 'Ground', category: 'Special'}, - 'Magnet Rise': {bp: 0, type: 'Dark'}, - 'Me First': {bp: 0, type: 'Fairy'}, - 'Metal Burst': {bp: 0, type: 'Rock', category: 'Physical'}, - 'Miracle Eye': {bp: 0, type: 'Grass'}, - 'Natural Gift': {bp: 0, type: 'Fairy', category: 'Physical'}, - Payback: { - bp: 50, - type: 'Dragon', - makesContact: true, - category: 'Physical', - }, - Pluck: { - bp: 60, - type: 'Normal', - makesContact: true, - category: 'Physical', - }, - 'Power Trick': {bp: 0, type: 'Grass'}, - Roost: {bp: 0, type: 'Normal'}, - 'Stealth Rock': {bp: 0, type: 'Ice'}, - 'Sucker Punch': { - bp: 80, - type: 'Dragon', - priority: 1, - makesContact: true, - category: 'Physical', - }, - Switcheroo: {bp: 0, type: 'Dragon'}, - Tailwind: {bp: 0, type: 'Normal'}, - 'Toxic Spikes': {bp: 0, type: 'Psychic'}, - 'Trick Room': {bp: 0, type: 'Grass'}, - 'U-turn': { - bp: 70, - type: 'Poison', - makesContact: true, - category: 'Physical', - }, - 'Wake-Up Slap': { - bp: 60, - type: 'Water', - makesContact: true, - category: 'Physical', - }, - 'Wood Hammer': { - bp: 120, - type: 'Fighting', - recoil: [1, 3], - makesContact: true, - category: 'Physical', - }, - 'Worry Seed': {bp: 0, type: 'Fighting'}, - 'Wring Out': { - bp: 0, - type: 'Fairy', - makesContact: true, - category: 'Special', - }, - 'Air Slash': {bp: 75, type: 'Normal', category: 'Special'}, - 'Aura Sphere': {bp: 90, type: 'Water', category: 'Special'}, - 'Bug Buzz': {bp: 90, type: 'Poison', isSound: true, category: 'Special'}, - 'Draco Meteor': {bp: 140, type: 'Flying', self: {boosts: {spa: -2}}, category: 'Special'}, - 'Dragon Pulse': {bp: 90, type: 'Flying', category: 'Special'}, - 'Dragon Rush': { - bp: 100, - type: 'Flying', - makesContact: true, - category: 'Physical', - }, - 'Energy Ball': {bp: 80, type: 'Fighting', category: 'Special'}, - 'Gunk Shot': {bp: 120, type: 'Psychic', category: 'Physical'}, - 'Gyro Ball': { - bp: 0, - type: 'Rock', - makesContact: true, - category: 'Physical', - }, - 'Leaf Storm': {bp: 140, type: 'Fighting', self: {boosts: {spa: -2}}, category: 'Special'}, - 'Power Gem': {bp: 70, type: 'Ice', category: 'Special'}, - 'Psycho Shift': {bp: 0, type: 'Grass'}, - 'Shadow Force': { - bp: 120, - type: 'Steel', - breaksProtect: true, - makesContact: true, - category: 'Physical', - }, - 'Dark Void': {bp: 0, type: 'Dragon', target: 'allAdjacentFoes'}, - 'Gastro Acid': {bp: 0, type: 'Psychic'}, - Captivate: {bp: 0, type: 'Fairy', target: 'allAdjacentFoes'}, - 'Grass Knot': { - bp: 0, - type: 'Fighting', - makesContact: true, - category: 'Special', - }, - 'Heart Swap': {bp: 0, type: 'Grass'}, - Judgment: {bp: 100, type: 'Fairy', category: 'Special'}, - 'Magnet Bomb': {bp: 60, type: 'Rock', category: 'Physical'}, - 'Mirror Shot': {bp: 65, type: 'Rock', category: 'Special'}, - 'Mud Bomb': {bp: 65, type: 'Bug', category: 'Special'}, - 'Ominous Wind': {bp: 60, type: 'Steel', category: 'Special'}, - Punishment: { - bp: 0, - type: 'Dragon', - makesContact: true, - category: 'Physical', - }, - 'Roar of Time': {bp: 150, type: 'Flying', category: 'Special'}, - 'Rock Climb': { - bp: 90, - type: 'Fairy', - makesContact: true, - category: 'Physical', - }, - 'Seed Flare': {bp: 120, type: 'Fighting', category: 'Special'}, - 'Spacial Rend': {bp: 100, type: 'Flying', category: 'Special'}, - 'Trump Card': { - bp: 0, - type: 'Fairy', - makesContact: true, - category: 'Special', - }, - 'Aqua Jet': { - bp: 40, - type: 'Ghost', - priority: 1, - makesContact: true, - category: 'Physical', - }, - 'Aqua Tail': { - bp: 90, - type: 'Ghost', - makesContact: true, - category: 'Physical', - }, - 'Attack Order': {bp: 90, type: 'Poison', category: 'Physical'}, - Brine: {bp: 65, type: 'Ghost', category: 'Special'}, - 'Bullet Punch': { - bp: 40, - type: 'Rock', - priority: 1, - makesContact: true, - isPunch: true, - category: 'Physical', - }, - 'Charge Beam': {bp: 50, type: 'Dark', category: 'Special'}, - 'Close Combat': { - bp: 120, - type: 'Water', - makesContact: true, - category: 'Physical', - }, - 'Cross Poison': { - bp: 70, - type: 'Psychic', - makesContact: true, - category: 'Physical', - }, - 'Dark Pulse': {bp: 80, type: 'Dragon', category: 'Special'}, - 'Defend Order': {bp: 0, type: 'Poison'}, - Discharge: { - bp: 80, - type: 'Dark', - target: 'allAdjacent', - category: 'Special', - }, - 'Earth Power': {bp: 90, type: 'Bug', category: 'Special'}, - 'Flash Cannon': {bp: 80, type: 'Rock', category: 'Special'}, - 'Focus Blast': {bp: 120, type: 'Water', category: 'Special'}, - 'Force Palm': { - bp: 60, - type: 'Water', - makesContact: true, - category: 'Physical', - }, - 'Giga Impact': { - bp: 150, - type: 'Fairy', - makesContact: true, - category: 'Physical', - }, - 'Guard Swap': {bp: 0, type: 'Grass'}, - 'Hammer Arm': { - bp: 100, - type: 'Water', - makesContact: true, - isPunch: true, - category: 'Physical', - }, - 'Ice Fang': { - bp: 65, - type: 'Electric', - makesContact: true, - isBite: true, - category: 'Physical', - }, - 'Ice Shard': {bp: 40, type: 'Electric', priority: 1, category: 'Physical'}, - 'Iron Head': { - bp: 80, - type: 'Rock', - makesContact: true, - category: 'Physical', - }, - 'Lava Plume': { - bp: 80, - type: 'Ground', - target: 'allAdjacent', - category: 'Special', - }, - 'Nasty Plot': {bp: 0, type: 'Dragon'}, - 'Night Slash': { - bp: 70, - type: 'Dragon', - makesContact: true, - category: 'Physical', - }, - 'Poison Jab': { - bp: 80, - type: 'Psychic', - makesContact: true, - category: 'Physical', - }, - 'Power Swap': {bp: 0, type: 'Grass'}, - 'Power Whip': { - bp: 120, - type: 'Fighting', - makesContact: true, - category: 'Physical', - }, - 'Psycho Cut': {bp: 70, type: 'Grass', category: 'Physical'}, - 'Rock Polish': {bp: 0, type: 'Ice'}, - 'Rock Wrecker': {bp: 150, type: 'Ice', category: 'Physical'}, - 'Seed Bomb': {bp: 80, type: 'Fighting', category: 'Physical'}, - 'Shadow Claw': { - bp: 70, - type: 'Steel', - makesContact: true, - category: 'Physical', - }, - 'Shadow Sneak': { - bp: 40, - type: 'Steel', - priority: 1, - makesContact: true, - category: 'Physical', - }, - 'Stone Edge': {bp: 100, type: 'Ice', category: 'Physical'}, - 'Thunder Fang': { - bp: 65, - type: 'Dark', - makesContact: true, - isBite: true, - category: 'Physical', - }, - 'Vacuum Wave': { - bp: 40, - type: 'Water', - priority: 1, - category: 'Special', - }, - 'X-Scissor': { - bp: 80, - type: 'Poison', - makesContact: true, - category: 'Physical', - }, - 'Zen Headbutt': { - bp: 80, - type: 'Grass', - makesContact: true, - category: 'Physical', - }, -}; - -const DPP: {[name: string]: MoveData} = extend(true, {}, ADV, DPP_PATCH); - -const BW_PATCH: {[name: string]: DeepPartial} = { - 'Air Slash': {secondaries: true}, - Blizzard: {secondaries: true}, - 'Body Slam': {secondaries: true}, - Bounce: {secondaries: true}, - Bubble: {secondaries: true}, - 'Brave Bird': {recoil: [33, 100]}, - 'Bug Buzz': {secondaries: true}, - Chatter: {secondaries: true}, - Covet: {bp: 60}, - 'Dragon Rush': {secondaries: true}, - 'Drain Punch': {bp: 75}, - 'Energy Ball': {secondaries: true}, - Extrasensory: {secondaries: true}, - Feint: {bp: 30}, - Detect: {priority: 4}, - 'Double-Edge': {recoil: [33, 100]}, - Protect: {priority: 4}, - 'Fire Blast': {secondaries: true}, - 'Fire Spin': {bp: 35}, - Flamethrower: {secondaries: true}, - 'Fury Cutter': {bp: 20}, - 'Future Sight': {bp: 100, type: 'Grass'}, - 'Giga Drain': {bp: 75}, - 'Gunk Shot': {secondaries: true}, - 'Heat Wave': {secondaries: true}, - 'Ice Beam': {secondaries: true}, - Lick: {secondaries: true}, - 'Meteor Mash': {secondaries: true}, - 'Muddy Water': {secondaries: true}, - Overheat: {}, - 'Poison Fang': {secondaries: true}, - 'Poison Gas': {target: 'allAdjacentFoes'}, - 'Rock Tomb': {secondaries: true}, - 'Sand Tomb': {bp: 35}, - 'Secret Power': {secondaries: true}, - Smog: {secondaries: true}, - Snore: {secondaries: true}, - Stomp: {secondaries: true}, - Thunder: {secondaries: true}, - Thunderbolt: {secondaries: true}, - Uproar: {bp: 90}, - Whirlpool: {bp: 35}, - 'Petal Dance': {bp: 120}, - Tackle: {bp: 50}, - Thrash: {bp: 120}, - 'Bone Club': {secondaries: true}, - Constrict: {secondaries: true}, - 'Dizzy Punch': {secondaries: true}, - 'Hyper Fang': {secondaries: true}, - 'Jump Kick': {bp: 100}, - 'Luster Purge': {secondaries: true}, - 'Mirror Shot': {secondaries: true}, - 'Mist Ball': {secondaries: true}, - 'Mud Bomb': {secondaries: true}, - 'Needle Arm': {secondaries: true}, - 'Ominous Wind': {secondaries: true}, - 'Rock Climb': {secondaries: true}, - 'Rolling Kick': {secondaries: true}, - 'Sacred Fire': {secondaries: true}, - 'Seed Flare': {secondaries: true}, - 'Signal Beam': {secondaries: true}, - 'Silver Wind': {secondaries: true}, - Twineedle: {secondaries: true}, - Acid: {secondaries: true}, - 'Ancient Power': {secondaries: true}, - Astonish: {secondaries: true}, - 'Aurora Beam': {secondaries: true}, - 'Beat Up': {bp: 0}, - Bite: {secondaries: true}, - 'Blaze Kick': {secondaries: true}, - 'Bubble Beam': {secondaries: true}, - 'Bullet Seed': {bp: 25}, - 'Charge Beam': {secondaries: true}, - Confusion: {secondaries: true}, - 'Cross Poison': {secondaries: true}, - Crunch: {secondaries: true}, - 'Crush Claw': {secondaries: true}, - Curse: {type: 'Steel'}, - 'Dark Pulse': {secondaries: true}, - Discharge: {secondaries: true}, - 'Doom Desire': {bp: 140}, - 'Dragon Breath': {secondaries: true}, - 'Dynamic Punch': {secondaries: true}, - 'Earth Power': {secondaries: true}, - 'Extreme Speed': {priority: 2}, - Ember: {secondaries: true}, - 'Fake Out': {secondaries: true, priority: 3}, - 'Fire Fang': {secondaries: true}, - 'Fire Punch': {secondaries: true}, - 'Flame Wheel': {secondaries: true}, - 'Flare Blitz': {secondaries: true, recoil: [33, 100]}, - 'Flash Cannon': {secondaries: true}, - 'Focus Blast': {secondaries: true}, - 'Force Palm': {secondaries: true}, - Headbutt: {secondaries: true}, - 'High Jump Kick': {bp: 130}, - 'Ice Fang': {secondaries: true}, - 'Ice Punch': {secondaries: true}, - 'Icicle Spear': {bp: 25}, - 'Icy Wind': {secondaries: true}, - 'Iron Head': {secondaries: true}, - 'Iron Tail': {secondaries: true}, - 'Last Resort': {bp: 140}, - 'Lava Plume': {secondaries: true}, - 'Metal Claw': {secondaries: true}, - 'Mud Shot': {secondaries: true}, - 'Mud-Slap': {secondaries: true}, - Octazooka: {secondaries: true}, - 'Paleo Wave': {secondaries: true}, - 'Poison Jab': {secondaries: true}, - 'Poison Sting': {secondaries: true}, - 'Poison Tail': {secondaries: true}, - 'Powder Snow': {secondaries: true}, - Psybeam: {secondaries: true}, - Psychic: {secondaries: true}, - 'Rock Slide': {secondaries: true}, - 'Rock Smash': {secondaries: true}, - 'Shadow Ball': {secondaries: true}, - 'Shadow Strike': {secondaries: true}, - 'Sky Attack': {secondaries: true}, - Sludge: {secondaries: true}, - 'Sludge Bomb': {secondaries: true}, - Spark: {secondaries: true}, - 'Steel Wing': {secondaries: true}, - 'Thunder Fang': {secondaries: true}, - 'Thunder Punch': {secondaries: true}, - 'Thunder Shock': {secondaries: true}, - 'Tri Attack': {secondaries: true}, - Twister: {secondaries: true}, - 'Volt Tackle': {secondaries: true, recoil: [33, 100]}, - 'Wood Hammer': {recoil: [33, 100]}, - Waterfall: {secondaries: true}, - 'Water Pulse': {secondaries: true}, - 'Zap Cannon': {secondaries: true}, - 'Zen Headbutt': {secondaries: true}, - Autotomize: {bp: 0, type: 'Rock'}, - Bestow: {bp: 0, type: 'Fairy'}, - 'Echoed VoIce': {bp: 40, type: 'Fairy', isSound: true, category: 'Special'}, - 'Electro Ball': {bp: 0, type: 'Dark', category: 'Special'}, - Entrainment: {bp: 0, type: 'Fairy'}, - 'Final Gambit': { - bp: 0, - type: 'Water', - makesContact: true, - category: 'Special', - }, - 'Fire Pledge': {bp: 50, type: 'Ground', category: 'Special'}, - 'Frost Breath': {bp: 40, type: 'Electric', willCrit: true, category: 'Special'}, - 'Grass Pledge': {bp: 50, type: 'Fighting', category: 'Special'}, - 'Heal Pulse': {bp: 0, type: 'Grass'}, - 'Heat Crash': { - bp: 0, - type: 'Ground', - makesContact: true, - category: 'Physical', - }, - Hex: {bp: 50, type: 'Steel', category: 'Special'}, - 'Horn Leech': { - bp: 75, - type: 'Fighting', - drain: [1, 2], - makesContact: true, - category: 'Physical', - }, - Hurricane: { - bp: 120, - type: 'Normal', - category: 'Special', - secondaries: true, - }, - Incinerate: {bp: 30, type: 'Ground', target: 'allAdjacentFoes', category: 'Special'}, - 'Low Sweep': { - bp: 60, - type: 'Water', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - 'Magic Room': {bp: 0, type: 'Grass'}, - 'Quick Guard': {bp: 0, type: 'Water', priority: 3}, - 'Rage Powder': {bp: 0, type: 'Poison', priority: 3}, - 'Relic Song': { - bp: 75, - type: 'Fairy', - isSound: true, - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - }, - Round: {bp: 60, type: 'Fairy', isSound: true, category: 'Special'}, - 'Sacred Sword': { - bp: 90, - type: 'Water', - makesContact: true, - category: 'Physical', - ignoreDefensive: true, - }, - Scald: { - bp: 80, - type: 'Ghost', - category: 'Special', - secondaries: true, - }, - 'Simple Beam': {bp: 0, type: 'Fairy'}, - 'Sky Drop': { - bp: 60, - type: 'Normal', - makesContact: true, - category: 'Physical', - }, - Snarl: { - bp: 55, - type: 'Dragon', - isSound: true, - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - }, - Soak: {bp: 0, type: 'Ghost'}, - Steamroller: { - bp: 65, - type: 'Poison', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - 'Storm Throw': { - bp: 40, - type: 'Water', - willCrit: true, - makesContact: true, - category: 'Physical', - }, - 'Struggle Bug': { - bp: 30, - type: 'Poison', - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - }, - Synchronoise: { - bp: 70, - type: 'Grass', - target: 'allAdjacent', - category: 'Special', - }, - 'Techno Blast': {bp: 85, type: 'Fairy', category: 'Special'}, - Telekinesis: {bp: 0, type: 'Grass'}, - 'Water Pledge': {bp: 50, type: 'Ghost', category: 'Special'}, - 'Wide Guard': {bp: 0, type: 'Ice', priority: 3}, - 'Wonder Room': {bp: 0, type: 'Grass'}, - 'Ally Switch': {bp: 0, type: 'Grass', priority: 1}, - 'Flame Burst': {bp: 70, type: 'Ground', category: 'Special'}, - 'Heavy Slam': { - bp: 0, - type: 'Rock', - makesContact: true, - category: 'Physical', - }, - 'Reflect Type': {bp: 0, type: 'Fairy'}, - 'Volt Switch': {bp: 70, type: 'Dark', category: 'Special'}, - 'Chip Away': { - bp: 70, - type: 'Fairy', - makesContact: true, - category: 'Physical', - ignoreDefensive: true, - }, - 'Fiery Dance': { - bp: 80, - type: 'Ground', - category: 'Special', - secondaries: true, - }, - 'Head Charge': { - bp: 120, - type: 'Fairy', - recoil: [1, 4], - makesContact: true, - category: 'Physical', - }, - 'Heart Stamp': { - bp: 60, - type: 'Grass', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - Quash: {bp: 0, type: 'Dragon'}, - 'Searing Shot': { - bp: 100, - type: 'Ground', - target: 'allAdjacent', - category: 'Special', - secondaries: true, - }, - 'Acid Spray': { - bp: 40, - type: 'Psychic', - category: 'Special', - secondaries: true, - }, - Acrobatics: { - bp: 55, - type: 'Normal', - makesContact: true, - category: 'Physical', - }, - 'After You': {bp: 0, type: 'Fairy'}, - 'Blue Flare': { - bp: 130, - type: 'Ground', - category: 'Special', - secondaries: true, - }, - 'Bolt Strike': { - bp: 130, - type: 'Dark', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - Bulldoze: { - bp: 60, - type: 'Bug', - target: 'allAdjacent', - category: 'Physical', - secondaries: true, - }, - 'Circle Throw': { - bp: 60, - type: 'Water', - makesContact: true, - category: 'Physical', - }, - 'Clear Smog': {bp: 50, type: 'Psychic', category: 'Special'}, - Coil: {bp: 0, type: 'Psychic'}, - 'Cotton Guard': {bp: 0, type: 'Fighting'}, - 'Dragon Tail': { - bp: 60, - type: 'Flying', - makesContact: true, - category: 'Physical', - }, - 'Drill Run': { - bp: 80, - type: 'Bug', - makesContact: true, - category: 'Physical', - }, - 'Dual Chop': { - bp: 40, - type: 'Flying', - multihit: 2, - makesContact: true, - category: 'Physical', - }, - Electroweb: { - bp: 55, - type: 'Dark', - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - }, - 'Flame Charge': { - bp: 50, - type: 'Ground', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - 'Foul Play': { - bp: 95, - type: 'Dragon', - makesContact: true, - category: 'Physical', - overrideOffensivePokemon: 'target', - }, - 'Freeze Shock': { - bp: 140, - type: 'Electric', - category: 'Physical', - secondaries: true, - }, - 'Fusion Bolt': {bp: 100, type: 'Dark', category: 'Physical'}, - 'Fusion Flare': {bp: 100, type: 'Ground', category: 'Special'}, - 'Gear Grind': { - bp: 50, - type: 'Rock', - multihit: 2, - makesContact: true, - category: 'Physical', - }, - Glaciate: { - bp: 65, - type: 'Electric', - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - }, - 'Guard Split': {bp: 0, type: 'Grass'}, - 'Hone Claws': {bp: 0, type: 'Dragon'}, - 'Ice Burn': { - bp: 140, - type: 'Electric', - category: 'Special', - secondaries: true, - }, - 'Icicle Crash': { - bp: 85, - type: 'Electric', - category: 'Physical', - secondaries: true, - }, - Inferno: { - bp: 100, - type: 'Ground', - category: 'Special', - secondaries: true, - }, - 'Leaf Tornado': { - bp: 65, - type: 'Fighting', - category: 'Special', - secondaries: true, - }, - 'Night Daze': { - bp: 85, - type: 'Dragon', - category: 'Special', - secondaries: true, - }, - 'Power Split': {bp: 0, type: 'Grass'}, - Psyshock: { - bp: 80, - type: 'Grass', - category: 'Special', - overrideDefensiveStat: 'def', - }, - Psystrike: { - bp: 100, - type: 'Grass', - category: 'Special', - overrideDefensiveStat: 'def', - }, - 'Quiver Dance': {bp: 0, type: 'Poison'}, - 'Razor Shell': { - bp: 75, - type: 'Ghost', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - Retaliate: { - bp: 70, - type: 'Fairy', - makesContact: true, - category: 'Physical', - }, - 'Secret Sword': { - bp: 85, - type: 'Water', - category: 'Special', - overrideDefensiveStat: 'def', - }, - 'Shell Smash': {bp: 0, type: 'Fairy'}, - 'Shift Gear': {bp: 0, type: 'Rock'}, - 'Sludge Wave': { - bp: 95, - type: 'Psychic', - target: 'allAdjacent', - category: 'Special', - secondaries: true, - }, - 'Smack Down': {bp: 50, type: 'Ice', category: 'Physical'}, - 'Stored Power': {bp: 20, type: 'Grass', category: 'Special'}, - 'Tail Slap': { - bp: 25, - type: 'Fairy', - multihit: [2, 5], - makesContact: true, - category: 'Physical', - }, - 'V-create': { - bp: 180, - type: 'Ground', - makesContact: true, - category: 'Physical', - }, - Venoshock: {bp: 65, type: 'Psychic', category: 'Special'}, - 'Wild Charge': { - bp: 90, - type: 'Dark', - recoil: [1, 4], - makesContact: true, - category: 'Physical', - }, - 'Work Up': {bp: 0, type: 'Fairy'}, -}; - -const BW: {[name: string]: MoveData} = extend(true, {}, DPP, BW_PATCH); - -delete BW['Faint Attack']; - -const XY_PATCH: {[name: string]: DeepPartial} = { - 'Ice Ball': {isBullet: true}, - 'Knock Off': {bp: 65}, - Thief: {bp: 60}, - Barrage: {isBullet: true}, - Bubble: {bp: 40}, - Chatter: {bp: 65}, - 'Egg Bomb': {isBullet: true}, - 'Follow Me': {priority: 2}, - Hurricane: {bp: 110}, - 'Hidden Power': {bp: 60}, - 'Hidden Power Bug': {bp: 60}, - 'Hidden Power Dark': {bp: 60}, - 'Hidden Power Dragon': {bp: 60}, - 'Hidden Power Electric': {bp: 60}, - 'Hidden Power Fighting': {bp: 60}, - 'Hidden Power Fire': {bp: 60}, - 'Hidden Power Flying': {bp: 60}, - 'Hidden Power Ghost': {bp: 60}, - 'Hidden Power Grass': {bp: 60}, - 'Hidden Power Ground': {bp: 60}, - 'Hidden Power Ice': {bp: 60}, - 'Hidden Power Poison': {bp: 60}, - 'Hidden Power Psychic': {bp: 60}, - 'Hidden Power Rock': {bp: 60}, - 'Hidden Power Steel': {bp: 60}, - 'Hidden Power Water': {bp: 60}, - 'Magma Storm': {bp: 100}, - 'Magnet Bomb': {isBullet: true}, - 'Mist Ball': {isBullet: true}, - Moonlight: {type: 'Fire'}, - 'Mud Bomb': {isBullet: true}, - 'Searing Shot': {isBullet: true}, - 'Smelling Salts': {bp: 70}, - Synchronoise: {bp: 120}, - 'Techno Blast': {bp: 120}, - Thunder: {bp: 110}, - 'Wake-Up Slap': {bp: 70}, - 'Acid Spray': {isBullet: true}, - 'Air Cutter': {bp: 60}, - 'Ancient Power': {}, - Assurance: {bp: 60}, - 'Aura Sphere': {bp: 80, isBullet: true, isPulse: true}, - Blizzard: {bp: 110}, - 'Bullet Seed': {isBullet: true}, - Charm: {type: 'Fire'}, - 'Cotton Spore': {target: 'allAdjacentFoes'}, - Crabhammer: {bp: 100}, - 'Dark Pulse': {isPulse: true}, - 'Draco Meteor': {bp: 130}, - 'Dragon Pulse': {bp: 85, isPulse: true}, - 'Electro Ball': {isBullet: true}, - 'Energy Ball': {bp: 90, isBullet: true}, - 'Final Gambit': {makesContact: false}, - 'Fire Blast': {bp: 110}, - 'Fire Pledge': {bp: 80}, - Flamethrower: {bp: 90}, - 'Focus Blast': {isBullet: true}, - 'Frost Breath': {bp: 60}, - 'Fury Cutter': {bp: 40}, - 'Future Sight': {bp: 120}, - 'Grass Pledge': {bp: 80}, - 'Gyro Ball': {isBullet: true}, - 'Heal Pulse': {isPulse: true}, - 'Heat Wave': {bp: 95}, - Hex: {bp: 65}, - 'Hydro Pump': {bp: 110}, - 'Ice Beam': {bp: 90}, - Incinerate: {bp: 60}, - 'Leaf Storm': {bp: 130}, - Lick: {bp: 30}, - 'Low Sweep': {bp: 65}, - 'Meteor Mash': {bp: 90}, - 'Muddy Water': {bp: 90}, - Octazooka: {isBullet: true}, - Overheat: {bp: 130}, - 'Pin Missile': {bp: 25}, - 'Power Gem': {bp: 80}, - 'Rage Powder': {priority: 2}, - 'Rock Tomb': {bp: 60}, - 'Rock Wrecker': {isBullet: true}, - 'Seed Bomb': {isBullet: true}, - 'Shadow Ball': {isBullet: true}, - 'Skull Bash': {bp: 130}, - 'Sludge Bomb': {isBullet: true}, - Smog: {bp: 30}, - Snore: {bp: 50}, - 'Storm Throw': {bp: 60}, - 'Struggle Bug': {bp: 50}, - Surf: {bp: 90}, - 'Sweet Kiss': {type: 'Fire'}, - Thunderbolt: {bp: 90}, - 'Vine Whip': {bp: 45}, - 'Water Pledge': {bp: 80}, - 'Water Pulse': {isPulse: true}, - 'Weather Ball': {isBullet: true}, - 'Zap Cannon': {isBullet: true}, - 'Diamond Storm': { - bp: 100, - type: 'Ice', - target: 'allAdjacentFoes', - category: 'Physical', - secondaries: true, - }, - 'Fell Stinger': { - bp: 30, - type: 'Poison', - makesContact: true, - category: 'Physical', - }, - 'Flying Press': { - bp: 80, - type: 'Water', - makesContact: true, - category: 'Physical', - }, - 'Hyperspace Fury': { - bp: 100, - type: 'Dragon', - breaksProtect: true, - category: 'Physical', - }, - 'Hyperspace Hole': { - bp: 80, - type: 'Grass', - breaksProtect: true, - category: 'Special', - }, - 'King\'s Shield': {bp: 0, type: 'Rock', priority: 4}, - 'Misty Terrain': {bp: 0, type: 'Fire'}, - 'Mystical Fire': { - bp: 65, - type: 'Ground', - category: 'Special', - secondaries: true, - }, - 'Parabolic Charge': { - bp: 50, - type: 'Dark', - drain: [1, 2], - target: 'allAdjacent', - category: 'Special', - }, - 'Parting Shot': {bp: 0, type: 'Dragon', isSound: true}, - 'Phantom Force': { - bp: 90, - type: 'Steel', - breaksProtect: true, - makesContact: true, - category: 'Physical', - }, - Powder: {bp: 0, type: 'Poison', priority: 1}, - 'Spiky Shield': {bp: 0, type: 'Fighting', priority: 4}, - 'Thousand Arrows': {bp: 90, type: 'Bug', target: 'allAdjacentFoes', category: 'Physical'}, - 'Thousand Waves': {bp: 90, type: 'Bug', target: 'allAdjacentFoes', category: 'Physical'}, - 'Water Shuriken': { - bp: 15, - type: 'Ghost', - multihit: [2, 5], - priority: 1, - category: 'Physical', - }, - 'Dragon Ascent': { - bp: 120, - type: 'Normal', - makesContact: true, - category: 'Physical', - }, - 'Electric Terrain': {bp: 0, type: 'Dark'}, - Geomancy: {bp: 0, type: 'Fire'}, - 'Grassy Terrain': {bp: 0, type: 'Fighting'}, - 'Ion Deluge': {bp: 0, type: 'Dark', priority: 1}, - 'Land\'s Wrath': {bp: 90, type: 'Bug', target: 'allAdjacentFoes', category: 'Physical'}, - 'Light of Ruin': {bp: 140, type: 'Fire', recoil: [1, 2], category: 'Special'}, - 'Oblivion Wing': { - bp: 80, - type: 'Normal', - drain: [3, 4], - category: 'Special', - }, - 'Origin Pulse': { - bp: 110, - type: 'Ghost', - target: 'allAdjacentFoes', - category: 'Special', - isPulse: true, - }, - 'PrecipIce Blades': { - bp: 120, - type: 'Bug', - target: 'allAdjacentFoes', - category: 'Physical', - }, - Rototiller: {bp: 0, type: 'Bug'}, - 'Steam Eruption': { - bp: 110, - type: 'Ghost', - category: 'Special', - secondaries: true, - }, - 'Aromatic Mist': {bp: 0, type: 'Fire'}, - 'Baby-Doll Eyes': {bp: 0, type: 'Fire', priority: 1}, - Belch: {bp: 120, type: 'Psychic', category: 'Special'}, - Boomburst: { - bp: 140, - type: 'Fairy', - isSound: true, - target: 'allAdjacent', - category: 'Special', - }, - Celebrate: {bp: 0, type: 'Fairy'}, - Confide: {bp: 0, type: 'Fairy', isSound: true}, - 'Crafty Shield': {bp: 0, type: 'Fire', priority: 3}, - 'Dazzling Gleam': {bp: 80, type: 'Fire', target: 'allAdjacentFoes', category: 'Special'}, - 'Disarming VoIce': { - bp: 40, - type: 'Fire', - isSound: true, - target: 'allAdjacentFoes', - category: 'Special', - }, - 'Draining Kiss': { - bp: 50, - type: 'Fire', - drain: [3, 4], - makesContact: true, - category: 'Special', - }, - 'Eerie Impulse': {bp: 0, type: 'Dark'}, - Electrify: {bp: 0, type: 'Dark'}, - 'Fairy Lock': {bp: 0, type: 'Fire'}, - 'Fairy Wind': {bp: 40, type: 'Fire', category: 'Special'}, - 'Flower Shield': {bp: 0, type: 'Fire'}, - 'Forest\'s Curse': {bp: 0, type: 'Fighting'}, - 'Freeze-Dry': { - bp: 70, - type: 'Electric', - category: 'Special', - secondaries: true, - }, - 'Happy Hour': {bp: 0, type: 'Fairy'}, - 'Hold Back': { - bp: 40, - type: 'Fairy', - makesContact: true, - category: 'Physical', - }, - 'Hold Hands': {bp: 0, type: 'Fairy'}, - Infestation: {bp: 20, type: 'Poison', makesContact: true, category: 'Special'}, - 'Magnetic Flux': {bp: 0, type: 'Dark'}, - 'Mat Block': {bp: 0, type: 'Water'}, - Moonblast: { - bp: 95, - type: 'Fire', - category: 'Special', - secondaries: true, - }, - 'Noble Roar': {bp: 0, type: 'Fairy', isSound: true}, - Nuzzle: { - bp: 20, - type: 'Dark', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - 'Petal Blizzard': { - bp: 90, - type: 'Fighting', - target: 'allAdjacent', - category: 'Physical', - }, - 'Play NIce': {bp: 0, type: 'Fairy'}, - 'Play Rough': { - bp: 90, - type: 'Fire', - makesContact: true, - category: 'Physical', - secondaries: true, - }, - 'Power-Up Punch': { - bp: 40, - type: 'Water', - makesContact: true, - isPunch: true, - category: 'Physical', - secondaries: true, - }, - 'Sticky Web': {bp: 0, type: 'Poison'}, - 'Topsy-Turvy': {bp: 0, type: 'Dragon'}, - 'Trick-or-Treat': {bp: 0, type: 'Steel'}, - 'Venom Drench': {bp: 0, type: 'Psychic', target: 'allAdjacentFoes'}, -}; - -const XY: {[name: string]: MoveData} = extend(true, {}, BW, XY_PATCH); - -const SM_PATCH: {[name: string]: DeepPartial} = { - 'Ally Switch': {priority: 2}, - Aeroblast: {zp: 180}, - Barrage: {zp: 100}, - Bide: {zp: 100}, - 'Bone Club': {zp: 120}, - Bonemerang: {zp: 100}, - Bubble: {zp: 100}, - Chatter: {zp: 120}, - 'Chip Away': {zp: 140}, - Clamp: {zp: 100}, - 'Comet Punch': {zp: 100}, - Constrict: {zp: 100}, - 'Crush Grip': {zp: 190}, - 'Diamond Storm': {zp: 180}, - 'Dizzy Punch': {zp: 140}, - 'Double Slap': {zp: 100}, - 'Dragon Ascent': {zp: 190}, - 'Dragon Rage': {zp: 100}, - 'Egg Bomb': {zp: 180}, - 'Feint Attack': {zp: 120}, - 'Fiery Dance': {zp: 160}, - 'Flame Burst': {zp: 140}, - Frustration: {zp: 160}, - 'Grass Knot': {zp: 160}, - 'Head Charge': {zp: 190}, - 'Heart Stamp': {zp: 120}, - 'Heat Crash': {zp: 160}, - 'Heavy Slam': {zp: 160}, - Hurricane: {zp: 185}, - 'Hidden Power': {zp: 120}, - 'Hidden Power Bug': {zp: 120}, - 'Hidden Power Dark': {zp: 120}, - 'Hidden Power Dragon': {zp: 120}, - 'Hidden Power Electric': {zp: 120}, - 'Hidden Power Fighting': {zp: 120}, - 'Hidden Power Fire': {zp: 120}, - 'Hidden Power Flying': {zp: 120}, - 'Hidden Power Ghost': {zp: 120}, - 'Hidden Power Grass': {zp: 120}, - 'Hidden Power Ground': {zp: 120}, - 'Hidden Power Ice': {zp: 120}, - 'Hidden Power Poison': {zp: 120}, - 'Hidden Power Psychic': {zp: 120}, - 'Hidden Power Rock': {zp: 120}, - 'Hidden Power Steel': {zp: 120}, - 'Hidden Power Water': {zp: 120}, - 'Hyper Fang': {zp: 160}, - 'Hyperspace Fury': {zp: 180}, - 'Hyperspace Hole': {zp: 160}, - 'Ice Ball': {zp: 100}, - Judgment: {zp: 180}, - 'Jump Kick': {zp: 180}, - 'Karate Chop': {zp: 100}, - 'Knock Off': {zp: 120}, - 'Land\'s Wrath': {zp: 185}, - 'Light of Ruin': {zp: 200}, - 'Low Kick': {zp: 160}, - 'Luster Purge': {zp: 140}, - 'Magma Storm': {zp: 180}, - 'Magnet Bomb': {zp: 120}, - Magnitude: {zp: 140}, - 'Mirror Shot': {zp: 120}, - 'Mist Ball': {zp: 140}, - 'Mud Bomb': {zp: 120}, - 'Natural Gift': {zp: 160}, - 'Needle Arm': {zp: 120}, - 'Oblivion Wing': {zp: 160}, - 'Ominous Wind': {zp: 120}, - 'Origin Pulse': {zp: 185}, - 'PrecipIce Blades': {zp: 190}, - 'Psycho Boost': {zp: 200}, - Psywave: {zp: 100}, - Punishment: {zp: 160}, - Pursuit: {zp: 100}, - Rage: {zp: 100}, - 'Rapid Spin': {zp: 100}, - 'Razor Wind': {zp: 160}, - 'Relic Song': {zp: 140}, - Return: {zp: 160}, - 'Roar of Time': {zp: 200}, - 'Rock Climb': {zp: 175}, - 'Rolling Kick': {zp: 120}, - 'Sacred Fire': {zp: 180}, - 'Searing Shot': {zp: 180}, - 'Secret Power': {zp: 140}, - 'Seed Flare': {zp: 190}, - 'Shadow Force': {zp: 190}, - 'Signal Beam': {zp: 140}, - 'Silver Wind': {zp: 120}, - 'Sky Drop': {zp: 120}, - 'Sky Uppercut': {zp: 160}, - 'Smelling Salts': {zp: 140}, - 'Solar Beam': {zp: 190}, - 'Sonic Boom': {zp: 100}, - 'Spacial Rend': {zp: 180}, - 'Spike Cannon': {zp: 120}, - 'Steam Eruption': {zp: 185}, - Steamroller: {zp: 120}, - Synchronoise: {zp: 190}, - 'Techno Blast': {zp: 190}, - 'Thousand Arrows': {zp: 180}, - 'Thousand Waves': {zp: 175}, - 'Trump Card': {zp: 160}, - Thunder: {zp: 185}, - Twineedle: {zp: 100}, - 'Wake-Up Slap': {zp: 140}, - 'Wring Out': {zp: 190}, - Absorb: {zp: 100}, - Acid: {zp: 100}, - 'Acid Spray': {zp: 100}, - Acrobatics: {zp: 100}, - 'Aerial Ace': {zp: 120}, - 'Air Cutter': {zp: 120}, - 'Air Slash': {zp: 140}, - 'Ancient Power': {zp: 120}, - 'Aqua Jet': {zp: 100}, - 'Aqua Tail': {zp: 175}, - 'Arm Thrust': {zp: 100}, - Assurance: {zp: 120}, - Astonish: {zp: 100}, - 'Attack Order': {zp: 175}, - 'Aura Sphere': {zp: 160}, - 'Aurora Beam': {zp: 120}, - Avalanche: {zp: 120}, - 'Beat Up': {zp: 100}, - Belch: {zp: 190}, - Bind: {zp: 100}, - Bite: {zp: 120}, - 'Blast Burn': {zp: 200}, - 'Blaze Kick': {zp: 160}, - Blizzard: {zp: 185}, - 'Blue Flare': {zp: 195}, - 'Body Slam': {zp: 160}, - 'Bolt Strike': {zp: 195}, - 'Bone Rush': {zp: 140}, - Boomburst: {zp: 200}, - Bounce: {zp: 160}, - 'Brave Bird': {zp: 190}, - 'Brick Break': {zp: 140}, - Brine: {zp: 120}, - 'Bubble Beam': {zp: 120}, - 'Bug Bite': {zp: 120}, - 'Bug Buzz': {zp: 175}, - Bulldoze: {zp: 120}, - 'Bullet Punch': {zp: 100}, - 'Bullet Seed': {zp: 140}, - 'Charge Beam': {zp: 100}, - 'Circle Throw': {zp: 120}, - 'Clear Smog': {zp: 100}, - 'Close Combat': {zp: 190}, - Confusion: {zp: 100}, - Counter: {zp: 100}, - Covet: {zp: 120}, - Crabhammer: {zp: 180}, - 'Cross Chop': {zp: 180}, - 'Cross Poison': {zp: 140}, - Crunch: {zp: 160}, - 'Crush Claw': {zp: 140}, - Cut: {zp: 100}, - 'Dark Pulse': {zp: 160}, - 'Dazzling Gleam': {zp: 160}, - Dig: {zp: 160}, - 'Disarming VoIce': {zp: 100}, - Discharge: {zp: 160}, - Dive: {zp: 160}, - 'Doom Desire': {zp: 200}, - 'Double-Edge': {zp: 190}, - 'Double Hit': {zp: 140}, - 'Double Kick': {zp: 100}, - 'Draco Meteor': {zp: 195}, - 'Dragon Breath': {zp: 120}, - 'Dragon Claw': {zp: 160}, - 'Dragon Pulse': {zp: 160}, - 'Dragon Rush': {zp: 180}, - 'Dragon Tail': {zp: 120}, - 'Draining Kiss': {zp: 100}, - 'Drain Punch': {zp: 140}, - 'Dream Eater': {zp: 180}, - 'Drill Peck': {zp: 160}, - 'Drill Run': {zp: 160}, - 'Dual Chop': {zp: 100}, - 'Dynamic Punch': {zp: 180}, - 'Earth Power': {zp: 175}, - Earthquake: {zp: 180}, - 'Echoed VoIce': {zp: 100}, - 'Electro Ball': {zp: 160}, - Electroweb: {zp: 100}, - Ember: {zp: 100}, - Endeavor: {zp: 160}, - 'Energy Ball': {zp: 175}, - Eruption: {zp: 200}, - Explosion: {zp: 200}, - Extrasensory: {zp: 160}, - 'Extreme Speed': {zp: 160}, - Facade: {zp: 140}, - 'Fairy Wind': {zp: 100}, - 'Fake Out': {zp: 100}, - 'False Swipe': {zp: 100}, - Feint: {zp: 100}, - 'Fell Stinger': {bp: 50, zp: 100}, - 'Final Gambit': {zp: 180}, - 'Fire Blast': {zp: 185}, - 'Fire Fang': {zp: 120}, - 'Fire Pledge': {zp: 160}, - 'Fire Punch': {zp: 140}, - 'Fire Spin': {zp: 100}, - Fissure: {zp: 180}, - Flail: {zp: 160}, - 'Flame Charge': {zp: 100}, - 'Flame Wheel': {zp: 120}, - Flamethrower: {zp: 175}, - 'Flare Blitz': {zp: 190}, - 'Flash Cannon': {zp: 160}, - Fling: {zp: 100}, - Fly: {zp: 175}, - 'Flying Press': {bp: 100, zp: 170}, - 'Focus Blast': {zp: 190}, - 'Focus Punch': {zp: 200}, - 'Force Palm': {zp: 120}, - 'Foul Play': {zp: 175}, - 'Freeze-Dry': {zp: 140}, - 'Freeze Shock': {zp: 200}, - 'Frenzy Plant': {zp: 200}, - 'Frost Breath': {zp: 120}, - 'Fury Attack': {zp: 100}, - 'Fury Cutter': {zp: 100}, - 'Fury Swipes': {zp: 100}, - 'Fusion Bolt': {zp: 180}, - 'Fusion Flare': {zp: 180}, - 'Future Sight': {zp: 190}, - 'Gear Grind': {zp: 180}, - 'Giga Drain': {zp: 140}, - 'Giga Impact': {zp: 200}, - Glaciate: {zp: 120}, - 'Grass Pledge': {zp: 160}, - Guillotine: {zp: 180}, - 'Gunk Shot': {zp: 190}, - Gust: {zp: 100}, - 'Gyro Ball': {zp: 160}, - 'Hammer Arm': {zp: 180}, - Headbutt: {zp: 140}, - 'Head Smash': {zp: 200}, - 'Heat Wave': {zp: 175}, - Hex: {zp: 160}, - 'High Jump Kick': {zp: 195}, - 'Hold Back': {zp: 100}, - 'Horn Attack': {zp: 120}, - 'Horn Drill': {zp: 180}, - 'Horn Leech': {zp: 140}, - 'Hydro Cannon': {zp: 200}, - 'Hydro Pump': {zp: 185}, - 'Hyper Beam': {zp: 200}, - 'Hyper VoIce': {zp: 175}, - 'Ice Beam': {zp: 175}, - 'Ice Burn': {zp: 200}, - 'Ice Fang': {zp: 120}, - 'Ice Punch': {zp: 140}, - 'Ice Shard': {zp: 100}, - 'Icicle Crash': {zp: 160}, - 'Icicle Spear': {zp: 140}, - 'Icy Wind': {zp: 100}, - Incinerate: {zp: 120}, - Inferno: {zp: 180}, - Infestation: {zp: 100}, - 'Iron Head': {zp: 160}, - 'Iron Tail': {zp: 180}, - 'Last Resort': {zp: 200}, - 'Lava Plume': {zp: 160}, - 'Leaf Blade': {zp: 175}, - 'Leaf Storm': {zp: 195}, - 'Leaf Tornado': {zp: 120}, - 'Leech Life': {bp: 80, zp: 160}, - Lick: {zp: 100}, - 'Low Sweep': {zp: 120}, - 'Mach Punch': {zp: 100}, - 'Magical Leaf': {zp: 120}, - 'Mega Drain': {zp: 120}, - Megahorn: {zp: 190}, - 'Mega Kick': {zp: 190}, - 'Mega Punch': {zp: 160}, - 'Metal Burst': {zp: 100}, - 'Metal Claw': {zp: 100}, - 'Meteor Mash': {zp: 175}, - 'Mirror Coat': {zp: 100}, - Moonblast: {zp: 175}, - 'Mud Shot': {zp: 100}, - 'Mud-Slap': {zp: 100}, - 'Muddy Water': {zp: 175}, - 'Mystical Fire': {bp: 75, zp: 140}, - 'Night Daze': {zp: 160}, - 'Night Shade': {zp: 100}, - 'Night Slash': {zp: 140}, - Nuzzle: {zp: 100}, - Octazooka: {zp: 120}, - Outrage: {zp: 190}, - Overheat: {zp: 195}, - 'Paleo Wave': {zp: 160}, - 'Parabolic Charge': {bp: 65, zp: 120}, - Payback: {zp: 100}, - 'Pay Day': {zp: 100}, - Peck: {zp: 100}, - 'Petal Blizzard': {zp: 175}, - 'Petal Dance': {zp: 190}, - 'Phantom Force': {zp: 175}, - 'Pin Missile': {zp: 140}, - 'Play Rough': {zp: 175}, - Pluck: {zp: 120}, - 'Poison Fang': {zp: 100}, - 'Poison Jab': {zp: 160}, - 'Poison Sting': {zp: 100}, - 'Poison Tail': {zp: 100}, - Pound: {zp: 100}, - 'Powder Snow': {zp: 100}, - 'Power Gem': {zp: 160}, - 'Power-Up Punch': {zp: 100}, - 'Power Whip': {zp: 190}, - Present: {zp: 100}, - Psybeam: {zp: 120}, - Psychic: {zp: 175}, - 'Psycho Cut': {zp: 140}, - Psyshock: {zp: 160}, - Psystrike: {zp: 180}, - 'Quick Attack': {zp: 100}, - 'Razor Leaf': {zp: 100}, - 'Razor Shell': {zp: 140}, - Retaliate: {zp: 140}, - Revenge: {zp: 120}, - Reversal: {zp: 160}, - 'Rock Blast': {isBullet: true, zp: 140}, - 'Rock Slide': {zp: 140}, - 'Rock Smash': {zp: 100}, - 'Rock Throw': {zp: 100}, - 'Rock Tomb': {zp: 120}, - 'Rock Wrecker': {zp: 200}, - Rollout: {zp: 100}, - Round: {zp: 120}, - 'Sacred Sword': {zp: 175}, - 'Sand Tomb': {zp: 100}, - Scald: {zp: 160}, - Scratch: {zp: 100}, - 'Secret Sword': {zp: 160}, - 'Seed Bomb': {zp: 160}, - 'Seismic Toss': {zp: 100}, - 'Self-Destruct': {zp: 200}, - 'Shadow Ball': {zp: 160}, - 'Shadow Claw': {zp: 140}, - 'Shadow Punch': {zp: 120}, - 'Shadow Sneak': {zp: 100}, - 'Shadow Strike': {zp: 160}, - 'Sheer Cold': {zp: 180}, - 'Shock Wave': {zp: 120}, - 'Skull Bash': {zp: 195}, - 'Sky Attack': {zp: 200}, - Slam: {zp: 160}, - Slash: {zp: 140}, - Sludge: {zp: 120}, - 'Sludge Bomb': {zp: 175}, - 'Sludge Wave': {zp: 175}, - 'Smack Down': {zp: 100}, - Smog: {zp: 100}, - Snarl: {zp: 100}, - Snore: {zp: 100}, - Spark: {zp: 120}, - 'Spit Up': {zp: 100}, - 'Steel Wing': {zp: 140}, - Stomp: {zp: 120}, - 'Stone Edge': {zp: 180}, - 'Stored Power': {zp: 160}, - 'Storm Throw': {zp: 120}, - Strength: {zp: 160}, - 'Struggle Bug': {zp: 100}, - Submission: {zp: 160}, - 'Sucker Punch': {bp: 70, zp: 140}, - 'Super Fang': {zp: 100}, - Superpower: {zp: 190}, - Surf: {zp: 175}, - Swift: {zp: 120}, - Tackle: {bp: 40, zp: 100}, - 'Tail Slap': {zp: 140}, - 'Take Down': {zp: 175}, - Thief: {zp: 120}, - Thrash: {zp: 190}, - Thunderbolt: {zp: 175}, - 'Thunder Fang': {zp: 120}, - 'Thunder Punch': {zp: 140}, - 'Thunder Shock': {zp: 100}, - 'Tri Attack': {zp: 160}, - 'Triple Kick': {zp: 120}, - Twister: {zp: 100}, - 'U-turn': {zp: 140}, - Uproar: {zp: 175}, - 'Vacuum Wave': {zp: 100}, - 'V-create': {zp: 220}, - Venoshock: {zp: 120}, - 'Vine Whip': {zp: 100}, - 'Vise Grip': {zp: 100}, - 'Vital Throw': {zp: 140}, - 'Volt Switch': {zp: 140}, - 'Volt Tackle': {zp: 190}, - Waterfall: {zp: 160}, - 'Water Gun': {zp: 100}, - 'Water Pledge': {zp: 160}, - 'Water Pulse': {zp: 120}, - 'Water Shuriken': {category: 'Special', zp: 100}, - 'Water Spout': {zp: 200}, - 'Weather Ball': {zp: 160}, - Whirlpool: {zp: 100}, - 'Wild Charge': {zp: 175}, - 'Wing Attack': {zp: 120}, - 'Wood Hammer': {zp: 190}, - Wrap: {zp: 100}, - 'X-Scissor': {zp: 160}, - 'Zap Cannon': {zp: 190}, - 'Zen Headbutt': {zp: 160}, - '10,000,000 Volt Thunderbolt': {bp: 195, type: 'Dark', category: 'Special', isZ: true}, - 'Acid Downpour': {bp: 1, type: 'Psychic', category: 'Physical', isZ: true}, - 'All-Out Pummeling': {bp: 1, type: 'Water', category: 'Physical', isZ: true}, - 'Baddy Bad': {bp: 90, type: 'Dragon', category: 'Special', zp: 175}, - 'Baneful Bunker': {bp: 0, type: 'Psychic', priority: 4}, - 'Beak Blast': { - bp: 100, - type: 'Normal', - category: 'Physical', - isBullet: true, - zp: 180, - }, - 'Black Hole Eclipse': {bp: 1, type: 'Dragon', category: 'Physical', isZ: true}, - 'Bloom Doom': {bp: 1, type: 'Fighting', category: 'Physical', isZ: true}, - 'Bouncy Bubble': { - bp: 90, - type: 'Ghost', - drain: [1, 2], - category: 'Special', - zp: 175, - }, - 'Breakneck Blitz': {bp: 1, type: 'Fairy', category: 'Physical', isZ: true}, - 'Buzzy Buzz': { - bp: 90, - type: 'Dark', - category: 'Special', - secondaries: true, - zp: 175, - }, - Catastropika: { - bp: 210, - type: 'Dark', - makesContact: true, - category: 'Physical', - isZ: true, - }, - 'Clangorous Soulblaze': { - bp: 185, - type: 'Flying', - isSound: true, - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - isZ: true, - }, - 'Continental Crush': {bp: 1, type: 'Ice', category: 'Physical', isZ: true}, - 'Core Enforcer': { - bp: 100, - type: 'Flying', - target: 'allAdjacentFoes', - category: 'Special', - zp: 140, - }, - 'Corkscrew Crash': {bp: 1, type: 'Rock', category: 'Physical', isZ: true}, - 'Devastating Drake': {bp: 1, type: 'Flying', category: 'Physical', isZ: true}, - 'Double Iron Bash': { - bp: 60, - type: 'Rock', - multihit: 2, - makesContact: true, - isPunch: true, - category: 'Physical', - secondaries: true, - zp: 180, - }, - 'Dragon Hammer': { - bp: 90, - type: 'Flying', - makesContact: true, - category: 'Physical', - zp: 175, - }, - 'Extreme Evoboost': {bp: 0, type: 'Fairy', isZ: true}, - 'Fleur Cannon': { - bp: 130, - type: 'Fire', - self: {boosts: {spa: -2}}, - category: 'Special', - zp: 195, - }, - 'Floral Healing': {bp: 0, type: 'Fire'}, - 'Freezy Frost': {bp: 90, type: 'Electric', category: 'Special', zp: 175}, - 'Genesis Supernova': { - bp: 185, - type: 'Grass', - category: 'Special', - secondaries: true, - isZ: true, - }, - 'Gigavolt Havoc': {bp: 1, type: 'Dark', category: 'Physical', isZ: true}, - 'Glitzy Glow': {bp: 90, type: 'Grass', category: 'Special', zp: 175}, - 'Guardian of Alola': {bp: 0, type: 'Fire', category: 'Special', isZ: true}, - 'Hydro Vortex': {bp: 1, type: 'Ghost', category: 'Physical', isZ: true}, - 'Ice Hammer': { - bp: 100, - type: 'Electric', - makesContact: true, - isPunch: true, - category: 'Physical', - zp: 180, - }, - 'Inferno Overdrive': {bp: 1, type: 'Ground', category: 'Physical', isZ: true}, - Instruct: {bp: 0, type: 'Grass'}, - 'Let\'s Snuggle Forever': { - bp: 190, - type: 'Fire', - makesContact: true, - category: 'Physical', - isZ: true, - }, - 'Light That Burns the Sky': { - bp: 200, - type: 'Grass', - category: 'Special', - isZ: true, - }, - 'Malicious Moonsault': { - bp: 180, - type: 'Dragon', - makesContact: true, - category: 'Physical', - isZ: true, - }, - 'Menacing Moonraze Maelstrom': {bp: 200, type: 'Steel', category: 'Special', isZ: true}, - 'Mind Blown': { - bp: 150, - type: 'Ground', - mindBlownRecoil: true, - target: 'allAdjacent', - category: 'Special', - zp: 200, - }, - 'Multi-Attack': { - bp: 90, - type: 'Fairy', - makesContact: true, - category: 'Physical', - zp: 185, - }, - 'Nature\'s Madness': {bp: 0, type: 'Fire', category: 'Special', zp: 100}, - 'Never-Ending Nightmare': {bp: 1, type: 'Steel', category: 'Physical', isZ: true}, - 'Oceanic Operetta': {bp: 195, type: 'Ghost', category: 'Special', isZ: true}, - 'Psychic Terrain': {bp: 0, type: 'Grass'}, - 'Pulverizing Pancake': { - bp: 210, - type: 'Fairy', - makesContact: true, - category: 'Physical', - isZ: true, - }, - 'Revelation Dance': {bp: 90, type: 'Fairy', category: 'Special', zp: 175}, - 'Sappy Seed': {bp: 90, type: 'Fighting', category: 'Physical', zp: 175}, - 'Savage Spin-Out': {bp: 1, type: 'Poison', category: 'Physical', isZ: true}, - 'Searing Sunraze Smash': { - bp: 200, - type: 'Rock', - makesContact: true, - category: 'Physical', - isZ: true, - }, - 'Shadow Bone': { - bp: 85, - type: 'Steel', - category: 'Physical', - secondaries: true, - zp: 160, - }, - 'Shattered Psyche': {bp: 1, type: 'Grass', category: 'Physical', isZ: true}, - 'Shore Up': {bp: 0, type: 'Bug'}, - 'Sinister Arrow Raid': {bp: 180, type: 'Steel', category: 'Physical', isZ: true}, - 'Sizzly Slide': { - bp: 90, - type: 'Ground', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 175, - }, - 'Solar Blade': { - bp: 125, - type: 'Fighting', - makesContact: true, - category: 'Physical', - zp: 190, - }, - 'Soul-Stealing 7-Star Strike': { - bp: 195, - type: 'Steel', - makesContact: true, - category: 'Physical', - isZ: true, - }, - 'Sparkly Swirl': {bp: 90, type: 'Fire', category: 'Special', zp: 175}, - 'Splintered Stormshards': {bp: 190, type: 'Ice', category: 'Physical', isZ: true}, - Spotlight: {bp: 0, type: 'Fairy', priority: 3}, - 'Stoked Sparksurfer': { - bp: 175, - type: 'Dark', - category: 'Special', - secondaries: true, - isZ: true, - }, - 'Subzero Slammer': {bp: 1, type: 'Electric', category: 'Physical', isZ: true}, - 'Supersonic Skystrike': {bp: 1, type: 'Normal', category: 'Physical', isZ: true}, - 'Tectonic Rage': {bp: 1, type: 'Bug', category: 'Physical', isZ: true}, - 'Throat Chop': { - bp: 80, - type: 'Dragon', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 160, - }, - 'Toxic Thread': {bp: 0, type: 'Psychic'}, - 'Twinkle Tackle': {bp: 1, type: 'Fire', category: 'Physical', isZ: true}, - 'Zippy Zap': { - bp: 50, - type: 'Dark', - willCrit: true, - priority: 2, - makesContact: true, - category: 'Physical', - zp: 100, - }, - Accelerock: { - bp: 40, - type: 'Ice', - priority: 1, - makesContact: true, - category: 'Physical', - zp: 100, - }, - 'Anchor Shot': { - bp: 80, - type: 'Rock', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 160, - }, - 'Aurora Veil': {bp: 0, type: 'Electric'}, - 'Brutal Swing': { - bp: 60, - type: 'Dragon', - makesContact: true, - target: 'allAdjacent', - category: 'Physical', - zp: 120, - }, - 'Burn Up': {bp: 130, type: 'Ground', category: 'Special', zp: 195}, - 'Clanging Scales': { - bp: 110, - type: 'Flying', - isSound: true, - target: 'allAdjacentFoes', - category: 'Special', - zp: 185, - }, - 'Darkest Lariat': { - bp: 85, - type: 'Dragon', - makesContact: true, - category: 'Physical', - ignoreDefensive: true, - zp: 160, - }, - 'Fire Lash': { - bp: 80, - type: 'Ground', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 160, - }, - 'First Impression': { - bp: 90, - type: 'Poison', - priority: 2, - makesContact: true, - category: 'Physical', - zp: 175, - }, - 'Floaty Fall': { - bp: 90, - type: 'Normal', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 175, - }, - 'Gear Up': {bp: 0, type: 'Rock'}, - 'High Horsepower': { - bp: 95, - type: 'Bug', - makesContact: true, - category: 'Physical', - zp: 175, - }, - 'Laser Focus': {bp: 0, type: 'Fairy'}, - Leafage: {bp: 40, type: 'Fighting', category: 'Physical', zp: 100}, - Liquidation: { - bp: 85, - type: 'Ghost', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 160, - }, - Lunge: { - bp: 80, - type: 'Poison', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 160, - }, - 'Moongeist Beam': {bp: 100, type: 'Steel', category: 'Special', zp: 180}, - 'Photon Geyser': { - bp: 100, - type: 'Grass', - category: 'Special', - zp: 180, - }, - 'Pika Papow': {bp: 0, type: 'Dark', category: 'Special', zp: 100}, - 'Plasma Fists': { - bp: 100, - type: 'Dark', - makesContact: true, - isPunch: true, - category: 'Physical', - zp: 180, - }, - 'Pollen Puff': { - bp: 90, - type: 'Poison', - category: 'Special', - isBullet: true, - zp: 175, - }, - 'Power Trip': { - bp: 20, - type: 'Dragon', - makesContact: true, - category: 'Physical', - zp: 160, - }, - 'Prismatic Laser': {bp: 160, type: 'Grass', category: 'Special', zp: 200}, - 'Psychic Fangs': { - bp: 85, - type: 'Grass', - makesContact: true, - isBite: true, - category: 'Physical', - zp: 160, - }, - Purify: {bp: 0, type: 'Psychic'}, - 'Shell Trap': { - bp: 150, - type: 'Ground', - target: 'allAdjacentFoes', - category: 'Special', - zp: 200, - }, - 'Smart Strike': { - bp: 70, - type: 'Rock', - makesContact: true, - category: 'Physical', - zp: 140, - }, - 'Sparkling Aria': { - bp: 90, - type: 'Ghost', - isSound: true, - target: 'allAdjacent', - category: 'Special', - secondaries: true, - zp: 175, - }, - 'Spectral Thief': { - bp: 90, - type: 'Steel', - makesContact: true, - category: 'Physical', - zp: 175, - }, - 'Speed Swap': {bp: 0, type: 'Grass'}, - 'Spirit Shackle': { - bp: 80, - type: 'Steel', - category: 'Physical', - secondaries: true, - zp: 160, - }, - 'Splishy Splash': { - bp: 90, - type: 'Ghost', - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - zp: 175, - }, - 'Stomping Tantrum': { - bp: 75, - type: 'Bug', - makesContact: true, - category: 'Physical', - zp: 140, - }, - 'Strength Sap': {bp: 0, type: 'Fighting'}, - 'SunSteel Strike': { - bp: 100, - type: 'Rock', - makesContact: true, - category: 'Physical', - zp: 180, - }, - 'Tearful Look': {bp: 0, type: 'Fairy'}, - 'Trop Kick': { - bp: 70, - type: 'Fighting', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 140, - }, - 'Veevee Volley': { - bp: 0, - type: 'Fairy', - makesContact: true, - category: 'Physical', - zp: 100, - }, - 'Zing Zap': { - bp: 80, - type: 'Dark', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 160, - }, -}; - -const SM: {[name: string]: MoveData} = extend(true, {}, XY, SM_PATCH); - -const SS_PATCH: {[name: string]: DeepPartial} = { - 'Apple Acid': { - bp: 80, - type: 'Fighting', - category: 'Special', - secondaries: true, - zp: 160, - maxPower: 130, - }, - 'Astral Barrage': { - bp: 120, - type: 'Steel', - category: 'Special', - target: 'allAdjacentFoes', - zp: 190, - maxPower: 140, - }, - 'Aura Wheel': { - bp: 110, - type: 'Dark', - category: 'Physical', - secondaries: true, - zp: 185, - maxPower: 140, - }, - 'Behemoth Bash': { - bp: 100, - type: 'Rock', - makesContact: true, - category: 'Physical', - zp: 180, - maxPower: 130, - }, - 'Behemoth Blade': { - bp: 100, - type: 'Rock', - makesContact: true, - category: 'Physical', - zp: 180, - maxPower: 130, - }, - 'Body Press': { - bp: 80, - type: 'Water', - makesContact: true, - category: 'Physical', - overrideOffensiveStat: 'def', - zp: 160, - maxPower: 90, - }, - 'Bolt Beak': { - bp: 85, - type: 'Dark', - makesContact: true, - category: 'Physical', - zp: 160, - maxPower: 130, - }, - 'Branch Poke': { - bp: 40, - type: 'Fighting', - makesContact: true, - category: 'Physical', - zp: 100, - maxPower: 90, - }, - 'Breaking Swipe': { - bp: 60, - type: 'Flying', - makesContact: true, - target: 'allAdjacentFoes', - category: 'Physical', - secondaries: true, - zp: 120, - maxPower: 110, - }, - 'Burning Jealousy': { - bp: 70, - type: 'Ground', - target: 'allAdjacentFoes', - category: 'Special', - secondaries: true, - zp: 140, - maxPower: 120, - }, - 'Clangorous Soul': {bp: 0, type: 'Flying', isSound: true}, - 'Coaching': { - bp: 0, - type: 'Water', - category: 'Status', - }, - 'Corrosive Gas': { - bp: 0, - type: 'Psychic', - category: 'Status', - target: 'allAdjacent', - }, - 'Court Change': {bp: 0, type: 'Fairy'}, - Decorate: {bp: 0, type: 'Fire'}, - 'Dragon Darts': { - bp: 50, - type: 'Flying', - multihit: 2, - category: 'Physical', - zp: 100, - maxPower: 130, - }, - 'Dragon Energy': { - bp: 150, - type: 'Flying', - category: 'Special', - target: 'allAdjacentFoes', - zp: 200, - maxPower: 150, - }, - 'Drum Beating': { - bp: 80, - type: 'Fighting', - category: 'Physical', - secondaries: true, - zp: 160, - maxPower: 130, - }, - 'Dual Wingbeat': { - bp: 40, - type: 'Normal', - category: 'Physical', - makesContact: true, - multihit: 2, - zp: 100, - maxPower: 130, - }, - 'Dynamax Cannon': { - bp: 100, - type: 'Flying', - category: 'Special', - zp: 180, - maxPower: 130, - }, - 'Eerie Spell': { - bp: 80, - type: 'Grass', - category: 'Special', - isSound: true, - secondaries: true, - zp: 160, - maxPower: 130, - }, - Eternabeam: { - bp: 160, - type: 'Flying', - category: 'Special', - zp: 200, - maxPower: 150, - }, - 'Expanding Force': { - bp: 80, - type: 'Grass', - category: 'Special', - zp: 160, - maxPower: 130, - }, - 'False Surrender': { - bp: 80, - type: 'Dragon', - makesContact: true, - category: 'Physical', - zp: 160, - maxPower: 130, - }, - 'Fiery Wrath': { - bp: 90, - type: 'Dragon', - category: 'Special', - target: 'allAdjacentFoes', - secondaries: true, - zp: 175, - maxPower: 130, - }, - 'Fishious Rend': { - bp: 85, - type: 'Ghost', - makesContact: true, - isBite: true, - category: 'Physical', - zp: 160, - maxPower: 130, - }, - 'Flip Turn': { - bp: 60, - type: 'Ghost', - category: 'Physical', - makesContact: true, - zp: 120, - maxPower: 110, - }, - 'Freezing Glare': { - bp: 90, - type: 'Grass', - category: 'Special', - secondaries: true, - zp: 175, - maxPower: 130, - }, - 'Glacial Lance': { - bp: 130, - type: 'Electric', - category: 'Physical', - target: 'allAdjacentFoes', - zp: 195, - maxPower: 140, - }, - 'G-Max Befuddle': { - bp: 10, - type: 'Poison', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Centiferno': { - bp: 10, - type: 'Ground', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Cannonade': { - bp: 10, - type: 'Ghost', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Chi Strike': { - bp: 10, - type: 'Water', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Cuddle': { - bp: 10, - type: 'Fairy', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Depletion': { - bp: 10, - type: 'Flying', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Drum Solo': { - bp: 160, - type: 'Fighting', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Fireball': { - bp: 160, - type: 'Ground', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Finale': { - bp: 10, - type: 'Fire', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Foam Burst': { - bp: 10, - type: 'Ghost', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Gold Rush': { - bp: 10, - type: 'Fairy', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Gravitas': { - bp: 10, - type: 'Grass', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Hydrosnipe': { - bp: 160, - type: 'Ghost', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Malodor': { - bp: 10, - type: 'Psychic', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Meltdown': { - bp: 10, - type: 'Rock', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max One Blow': { - bp: 10, - type: 'Dragon', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Rapid Flow': { - bp: 10, - type: 'Ghost', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Replenish': { - bp: 10, - type: 'Fairy', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Resonance': { - bp: 10, - type: 'Electric', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Sandblast': { - bp: 10, - type: 'Bug', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Smite': { - bp: 10, - type: 'Fire', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Snooze': { - bp: 10, - type: 'Dragon', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Steelsurge': { - bp: 10, - type: 'Rock', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Stonesurge': { - bp: 10, - type: 'Ghost', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Stun Shock': { - bp: 10, - type: 'Dark', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Sweetness': { - bp: 10, - type: 'Fighting', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Tartness': { - bp: 10, - type: 'Fighting', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Terror': { - bp: 10, - type: 'Steel', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Vine Lash': { - bp: 10, - type: 'Fighting', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Volcalith': { - bp: 10, - type: 'Ice', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Volt Crash': { - bp: 10, - type: 'Dark', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max WildFire': { - bp: 10, - type: 'Ground', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'G-Max Wind Rage': { - bp: 10, - type: 'Normal', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Grassy Glide': { - bp: 70, - type: 'Fighting', - category: 'Physical', - makesContact: true, - zp: 140, - maxPower: 120, - }, - 'Grav Apple': { - bp: 80, - type: 'Fighting', - category: 'Physical', - secondaries: true, - zp: 160, - maxPower: 130, - }, - 'Jaw Lock': { - bp: 80, - type: 'Dragon', - makesContact: true, - isBite: true, - category: 'Physical', - zp: 160, - maxPower: 130, - }, - 'Jungle Healing': { - bp: 0, - type: 'Fighting', - category: 'Status', - }, - 'Lash Out': { - bp: 75, - type: 'Dragon', - makesContact: true, - category: 'Physical', - zp: 140, - maxPower: 130, - }, - 'Life Dew': {bp: 0, type: 'Ghost'}, - 'Magic Powder': {bp: 0, type: 'Grass'}, - 'Max Airstream': { - bp: 10, - type: 'Normal', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Darkness': { - bp: 10, - type: 'Dragon', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Flare': { - bp: 100, - type: 'Ground', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Flutterby': { - bp: 10, - type: 'Poison', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Geyser': { - bp: 10, - type: 'Ghost', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Guard': {bp: 0, type: 'Fairy', priority: 4, isMax: true}, - 'Max Hailstorm': { - bp: 10, - type: 'Electric', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Knuckle': { - bp: 10, - type: 'Water', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Lightning': { - bp: 10, - type: 'Dark', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Mindstorm': { - bp: 10, - type: 'Grass', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Ooze': { - bp: 10, - type: 'Psychic', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Overgrowth': { - bp: 10, - type: 'Fighting', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Phantasm': { - bp: 10, - type: 'Steel', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Quake': { - bp: 10, - type: 'Bug', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Rockfall': { - bp: 10, - type: 'Ice', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Starfall': { - bp: 10, - type: 'Fire', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Steelspike': { - bp: 10, - type: 'Rock', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Strike': { - bp: 10, - type: 'Fairy', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Max Wyrmwind': { - bp: 10, - type: 'Flying', - category: 'Physical', - isMax: true, - maxPower: 1, - }, - 'Meteor Assault': { - bp: 150, - type: 'Water', - category: 'Physical', - zp: 200, - maxPower: 100, - }, - 'Meteor Beam': { - bp: 120, - type: 'Ice', - category: 'Special', - zp: 190, - maxPower: 140, - }, - 'Misty Explosion': { - bp: 100, - type: 'Fire', - category: 'Special', - target: 'allAdjacent', - zp: 180, - maxPower: 130, - }, - 'No Retreat': {bp: 0, type: 'Water'}, - Obstruct: {bp: 0, type: 'Dragon', priority: 4}, - Octolock: {bp: 0, type: 'Water'}, - Overdrive: { - bp: 80, - type: 'Dark', - isSound: true, - target: 'allAdjacentFoes', - category: 'Special', - zp: 160, - maxPower: 130, - }, - Poltergeist: { - bp: 110, - type: 'Steel', - category: 'Physical', - zp: 185, - maxPower: 140, - }, - 'Pyro Ball': { - bp: 120, - type: 'Ground', - category: 'Physical', - secondaries: true, - isBullet: true, - zp: 190, - maxPower: 140, - }, - 'Rising Voltage': { - bp: 70, - type: 'Dark', - category: 'Special', - zp: 140, - maxPower: 140, - }, - 'Scale Shot': { - bp: 25, - type: 'Flying', - category: 'Physical', - multihit: [2, 5], - zp: 140, - maxPower: 130, - }, - 'Shell Side Arm': { - bp: 90, - type: 'Psychic', - category: 'Special', - secondaries: true, - zp: 175, - maxPower: 90, - }, - 'Snap Trap': { - bp: 35, - type: 'Fighting', - makesContact: true, - category: 'Physical', - zp: 100, - maxPower: 90, - }, - 'Snipe Shot': { - bp: 80, - type: 'Ghost', - category: 'Special', - zp: 160, - maxPower: 130, - }, - 'Scorching Sands': { - bp: 70, - type: 'Bug', - category: 'Special', - secondaries: true, - zp: 140, - maxPower: 120, - }, - 'Skitter Smack': { - bp: 70, - type: 'Poison', - category: 'Physical', - makesContact: true, - secondaries: true, - zp: 140, - maxPower: 120, - }, - 'Spirit Break': { - bp: 75, - type: 'Fire', - makesContact: true, - category: 'Physical', - secondaries: true, - zp: 140, - maxPower: 130, - }, - 'Steel Beam': { - bp: 140, - type: 'Rock', - mindBlownRecoil: true, - category: 'Special', - zp: 200, - maxPower: 140, - }, - 'Steel Roller': { - bp: 130, - type: 'Rock', - category: 'Physical', - makesContact: true, - zp: 195, - maxPower: 140, - }, - 'Strange Steam': { - bp: 90, - type: 'Fire', - category: 'Special', - secondaries: true, - zp: 175, - maxPower: 130, - }, - 'Surging Strikes': { - bp: 25, - type: 'Ghost', - category: 'Physical', - makesContact: true, - willCrit: true, - isPunch: true, - multihit: 3, - zp: 140, - maxPower: 130, - }, - 'Terrain Pulse': { - bp: 50, - type: 'Fairy', - category: 'Special', - isPulse: true, - zp: 160, - maxPower: 130, - }, - 'Triple Axel': { - bp: 20, - type: 'Electric', - category: 'Physical', - makesContact: true, - multihit: 3, - zp: 120, - maxPower: 140, - }, - 'Wicked Blow': { - bp: 80, - type: 'Dragon', - category: 'Physical', - makesContact: true, - willCrit: true, - isPunch: true, - zp: 160, - maxPower: 130, - }, - 'Stuff Cheeks': {bp: 0, type: 'Fairy'}, - 'Tar Shot': {bp: 0, type: 'Ice'}, - Teatime: {bp: 0, type: 'Fairy'}, - 'Thunder Cage': { - bp: 80, - type: 'Dark', - category: 'Special', - zp: 160, - maxPower: 130, - }, - 'Thunderous Kick': { - bp: 90, - type: 'Water', - category: 'Physical', - secondaries: true, - makesContact: true, - zp: 175, - maxPower: 90, - }, - '10,000,000 Volt Thunderbolt': {maxPower: 1}, - Absorb: {maxPower: 90}, - Accelerock: {maxPower: 90}, - Acid: {maxPower: 70}, - 'Acid Downpour': {maxPower: 1}, - 'Acid Spray': {maxPower: 70}, - Acrobatics: {maxPower: 110}, - 'Aerial Ace': {maxPower: 110}, - Aeroblast: {maxPower: 130}, - 'Air Cutter': {maxPower: 110}, - 'Air Slash': {maxPower: 130}, - 'All-Out Pummeling': {maxPower: 1}, - 'Anchor Shot': {maxPower: 130}, - 'Ancient Power': {maxPower: 110}, - 'Aqua Jet': {maxPower: 90}, - 'Aqua Tail': {maxPower: 130}, - 'Arm Thrust': {maxPower: 70}, - Assurance: {maxPower: 110}, - Astonish: {maxPower: 90}, - 'Attack Order': {maxPower: 130}, - 'Aura Sphere': {maxPower: 90}, - 'Aurora Beam': {maxPower: 120}, - Avalanche: {maxPower: 110}, - Barrage: {maxPower: 90}, - 'Beak Blast': {maxPower: 130}, - 'Beat Up': {maxPower: 100}, - Belch: {maxPower: 95}, - Bide: {maxPower: 100}, - Bind: {maxPower: 90}, - Bite: {maxPower: 110}, - 'Black Hole Eclipse': {maxPower: 1}, - 'Blast Burn': {maxPower: 150}, - 'Blaze Kick': {maxPower: 130}, - Blizzard: {maxPower: 140}, - 'Bloom Doom': {maxPower: 1}, - 'Blue Flare': {maxPower: 140}, - 'Body Slam': {maxPower: 130}, - 'Bolt Strike': {maxPower: 140}, - 'Bone Club': {maxPower: 120}, - Bonemerang: {maxPower: 130}, - 'Bone Rush': {maxPower: 130}, - Boomburst: {maxPower: 140}, - Bounce: {maxPower: 130}, - 'Brave Bird': {maxPower: 140}, - 'Breakneck Blitz': {maxPower: 1}, - 'Brick Break': {maxPower: 90}, - Brine: {maxPower: 120}, - 'Brutal Swing': {maxPower: 110}, - Bubble: {maxPower: 90}, - 'Bubble Beam': {maxPower: 120}, - 'Bug Bite': {maxPower: 110}, - 'Bug Buzz': {maxPower: 130}, - Bulldoze: {maxPower: 110}, - 'Bullet Punch': {maxPower: 90}, - 'Bullet Seed': {maxPower: 130}, - 'Burn Up': {maxPower: 140}, - Catastropika: {maxPower: 1}, - 'Charge Beam': {maxPower: 100}, - Chatter: {maxPower: 120}, - 'Chip Away': {maxPower: 120}, - 'Circle Throw': {maxPower: 80}, - Clamp: {maxPower: 90}, - 'Clanging Scales': {maxPower: 140}, - 'Clangorous Soulblaze': {maxPower: 1}, - 'Clear Smog': {maxPower: 75}, - 'Close Combat': {maxPower: 95}, - 'Comet Punch': {maxPower: 100}, - Confusion: {maxPower: 100}, - Constrict: {maxPower: 90}, - 'Continental Crush': {maxPower: 1}, - 'Core Enforcer': {maxPower: 130}, - 'Corkscrew Crash': {maxPower: 1}, - Counter: {maxPower: 75}, - Covet: {maxPower: 110}, - Crabhammer: {maxPower: 130}, - 'Cross Chop': {maxPower: 90}, - 'Cross Poison': {maxPower: 85}, - Crunch: {maxPower: 130}, - 'Crush Claw': {maxPower: 130}, - 'Crush Grip': {maxPower: 140}, - Cut: {maxPower: 100}, - 'Darkest Lariat': {maxPower: 130}, - 'Dark Pulse': {maxPower: 130}, - 'Dazzling Gleam': {maxPower: 130}, - 'Devastating Drake': {maxPower: 1}, - 'Diamond Storm': {maxPower: 130}, - Dig: {maxPower: 130}, - 'Disarming VoIce': {maxPower: 90}, - Discharge: {maxPower: 130}, - Dive: {maxPower: 130}, - 'Dizzy Punch': {maxPower: 120}, - 'Doom Desire': {maxPower: 140}, - 'Double-Edge': {maxPower: 140}, - 'Double Hit': {maxPower: 120}, - 'Double Iron Bash': {maxPower: 140}, - 'Double Kick': {maxPower: 80}, - 'Double Slap': {maxPower: 90}, - 'Draco Meteor': {maxPower: 140}, - 'Dragon Ascent': {maxPower: 140}, - 'Dragon Breath': {maxPower: 110}, - 'Dragon Claw': {maxPower: 130}, - 'Dragon Hammer': {maxPower: 130}, - 'Dragon Pulse': {maxPower: 130}, - 'Dragon Rage': {maxPower: 100}, - 'Dragon Rush': {maxPower: 130}, - 'Dragon Tail': {maxPower: 110}, - 'Draining Kiss': {maxPower: 100}, - 'Drain Punch': {maxPower: 90}, - 'Dream Eater': {maxPower: 130}, - 'Drill Peck': {maxPower: 130}, - 'Drill Run': {maxPower: 130}, - 'Dual Chop': {maxPower: 130}, - 'Dynamic Punch': {maxPower: 90}, - 'Earth Power': {maxPower: 130}, - Earthquake: {maxPower: 130}, - 'Echoed VoIce': {maxPower: 90}, - 'Egg Bomb': {maxPower: 130}, - 'Electro Ball': {maxPower: 130}, - Electroweb: {maxPower: 110}, - Ember: {maxPower: 90}, - Endeavor: {maxPower: 130}, - 'Energy Ball': {maxPower: 130}, - Eruption: {maxPower: 150}, - Explosion: {maxPower: 150}, - Extrasensory: {maxPower: 130}, - 'Extreme Speed': {maxPower: 130}, - Facade: {maxPower: 120}, - 'Fairy Wind': {maxPower: 90}, - 'Fake Out': {maxPower: 90}, - 'False Swipe': {maxPower: 90}, - Feint: {maxPower: 90}, - 'Feint Attack': {maxPower: 110}, - 'Fell Stinger': {maxPower: 100}, - 'Fiery Dance': {maxPower: 130}, - 'Final Gambit': {maxPower: 100}, - 'Fire Blast': {maxPower: 140}, - 'Fire Fang': {maxPower: 120}, - 'Fire Lash': {maxPower: 130}, - 'Fire Pledge': {maxPower: 130}, - 'Fire Punch': {maxPower: 130}, - 'Fire Spin': {maxPower: 90}, - 'First Impression': {maxPower: 130}, - Fissure: {maxPower: 130}, - Flail: {maxPower: 130}, - 'Flame Burst': {maxPower: 120}, - 'Flame Charge': {maxPower: 100}, - 'Flame Wheel': {maxPower: 110}, - Flamethrower: {maxPower: 130}, - 'Flare Blitz': {maxPower: 140}, - 'Flash Cannon': {maxPower: 130}, - 'Fleur Cannon': {maxPower: 140}, - Fling: {maxPower: 100}, - Fly: {maxPower: 130}, - 'Flying Press': {maxPower: 90}, - 'Focus Blast': {maxPower: 95}, - 'Focus Punch': {maxPower: 100}, - 'Force Palm': {maxPower: 80}, - 'Foul Play': {maxPower: 130}, - 'Freeze-Dry': {maxPower: 120}, - 'Freeze Shock': {maxPower: 140}, - 'Frenzy Plant': {maxPower: 150}, - 'Frost Breath': {maxPower: 110}, - Frustration: {maxPower: 130}, - 'Fury Attack': {maxPower: 90}, - 'Fury Cutter': {maxPower: 90}, - 'Fury Swipes': {maxPower: 100}, - 'Fusion Bolt': {maxPower: 130}, - 'Fusion Flare': {maxPower: 130}, - 'Future Sight': {maxPower: 140}, - 'Gear Grind': {maxPower: 130}, - 'Genesis Supernova': {maxPower: 1}, - 'Giga Drain': {maxPower: 130}, - 'Giga Impact': {maxPower: 150}, - 'Gigavolt Havoc': {maxPower: 1}, - Glaciate: {maxPower: 120}, - 'Grass Knot': {maxPower: 130}, - 'Grass Pledge': {maxPower: 130}, - 'Guardian of Alola': {maxPower: 1}, - Guillotine: {maxPower: 130}, - 'Gunk Shot': {maxPower: 95}, - Gust: {maxPower: 90}, - 'Gyro Ball': {maxPower: 130}, - 'Hammer Arm': {maxPower: 90}, - Headbutt: {maxPower: 120}, - 'Head Charge': {maxPower: 140}, - 'Head Smash': {maxPower: 150}, - 'Heart Stamp': {maxPower: 110}, - 'Heat Crash': {maxPower: 130}, - 'Heat Wave': {maxPower: 130}, - 'Heavy Slam': {maxPower: 130}, - Hex: {maxPower: 120}, - 'Hidden Power': {maxPower: 110}, - 'Hidden Power Bug': {maxPower: 110}, - 'Hidden Power Dark': {maxPower: 110}, - 'Hidden Power Dragon': {maxPower: 110}, - 'Hidden Power Electric': {maxPower: 110}, - 'Hidden Power Fighting': {maxPower: 80}, - 'Hidden Power Fire': {maxPower: 110}, - 'Hidden Power Flying': {maxPower: 110}, - 'Hidden Power Ghost': {maxPower: 110}, - 'Hidden Power Grass': {maxPower: 110}, - 'Hidden Power Ground': {maxPower: 110}, - 'Hidden Power Ice': {maxPower: 110}, - 'Hidden Power Poison': {maxPower: 80}, - 'Hidden Power Psychic': {maxPower: 110}, - 'Hidden Power Rock': {maxPower: 110}, - 'Hidden Power Steel': {maxPower: 110}, - 'Hidden Power Water': {maxPower: 110}, - 'High Horsepower': {maxPower: 130}, - 'High Jump Kick': {maxPower: 95}, - 'Hold Back': {maxPower: 90}, - 'Horn Attack': {maxPower: 120}, - 'Horn Drill': {maxPower: 130}, - 'Horn Leech': {maxPower: 130}, - Howl: {isSound: true}, - Hurricane: {maxPower: 140}, - 'Hydro Cannon': {maxPower: 150}, - 'Hydro Pump': {maxPower: 140}, - 'Hydro Vortex': {maxPower: 1}, - 'Hyper Beam': {maxPower: 150}, - 'Hyper Fang': {maxPower: 130}, - 'Hyperspace Fury': {maxPower: 130}, - 'Hyperspace Hole': {maxPower: 130}, - 'Hyper VoIce': {maxPower: 130}, - 'Ice Ball': {maxPower: 90}, - 'Ice Beam': {maxPower: 130}, - 'Ice Burn': {maxPower: 140}, - 'Ice Fang': {maxPower: 120}, - 'Ice Hammer': {maxPower: 130}, - 'Ice Punch': {maxPower: 130}, - 'Ice Shard': {maxPower: 90}, - 'Icicle Crash': {maxPower: 130}, - 'Icicle Spear': {maxPower: 130}, - 'Icy Wind': {maxPower: 110}, - Incinerate: {maxPower: 110}, - Inferno: {maxPower: 130}, - 'Inferno Overdrive': {maxPower: 1}, - Infestation: {maxPower: 90}, - 'Iron Head': {maxPower: 130}, - 'Iron Tail': {maxPower: 130}, - Judgment: {maxPower: 130}, - 'Jump Kick': {maxPower: 90}, - 'Karate Chop': {maxPower: 75}, - 'Knock Off': {maxPower: 120}, - 'Land\'s Wrath': {maxPower: 130}, - 'Last Resort': {maxPower: 140}, - 'Lava Plume': {maxPower: 130}, - Leafage: {maxPower: 90}, - 'Leaf Blade': {maxPower: 130}, - 'Leaf Storm': {maxPower: 140}, - 'Leaf Tornado': {maxPower: 120}, - 'Leech Life': {maxPower: 130}, - 'Let\'s Snuggle Forever': {maxPower: 1}, - Lick: {maxPower: 90}, - 'Light of Ruin': {maxPower: 140}, - 'Light That Burns the Sky': {maxPower: 1}, - Liquidation: {maxPower: 130}, - 'Low Kick': {maxPower: 100}, - 'Low Sweep': {maxPower: 85}, - Lunge: {maxPower: 130}, - 'Luster Purge': {maxPower: 120}, - 'Mach Punch': {maxPower: 70}, - 'Magical Leaf': {maxPower: 110}, - 'Magma Storm': {maxPower: 130}, - 'Magnet Bomb': {maxPower: 110}, - Magnitude: {maxPower: 140}, - 'Malicious Moonsault': {maxPower: 1}, - 'Mega Drain': {maxPower: 90}, - Megahorn: {maxPower: 140}, - 'Mega Kick': {maxPower: 140}, - 'Mega Punch': {maxPower: 130}, - 'Menacing Moonraze Maelstrom': {maxPower: 1}, - 'Metal Burst': {maxPower: 100}, - 'Metal Claw': {maxPower: 100}, - 'Meteor Mash': {maxPower: 130}, - 'Mind Blown': {maxPower: 150}, - 'Mirror Coat': {maxPower: 100}, - 'Mirror Shot': {maxPower: 120}, - 'Mist Ball': {maxPower: 120}, - Moonblast: {maxPower: 130}, - 'Moongeist Beam': {maxPower: 130}, - 'Mud Bomb': {maxPower: 120}, - 'Mud Shot': {maxPower: 110}, - 'Mud-Slap': {maxPower: 90}, - 'Muddy Water': {maxPower: 130}, - 'Multi-Attack': {bp: 120, maxPower: 95}, - 'Mystical Fire': {maxPower: 130}, - 'Natural Gift': {maxPower: 130}, - 'Nature\'s Madness': {maxPower: 100}, - 'Needle Arm': {maxPower: 110}, - 'Never-Ending Nightmare': {maxPower: 1}, - 'Night Daze': {maxPower: 130}, - 'Night Shade': {maxPower: 100}, - 'Night Slash': {maxPower: 120}, - Nuzzle: {maxPower: 90}, - 'Oblivion Wing': {maxPower: 130}, - 'Oceanic Operetta': {maxPower: 1}, - Octazooka: {maxPower: 120}, - 'Ominous Wind': {maxPower: 110}, - 'Origin Pulse': {maxPower: 140}, - Outrage: {maxPower: 140}, - Overheat: {maxPower: 140}, - 'Paleo Wave': {maxPower: 130}, - 'Parabolic Charge': {maxPower: 120}, - Payback: {maxPower: 100}, - 'Pay Day': {maxPower: 90}, - Peck: {maxPower: 90}, - 'Petal Blizzard': {maxPower: 130}, - 'Petal Dance': {maxPower: 140}, - 'Phantom Force': {maxPower: 130}, - 'Photon Geyser': {maxPower: 130}, - 'Pin Missile': {maxPower: 130}, - 'Plasma Fists': {maxPower: 130}, - 'Play Rough': {maxPower: 130}, - Pluck: {maxPower: 110}, - 'Poison Fang': {maxPower: 75}, - 'Poison Jab': {maxPower: 90}, - 'Poison Sting': {maxPower: 70}, - 'Poison Tail': {maxPower: 75}, - 'Pollen Puff': {maxPower: 130}, - Pound: {maxPower: 90}, - 'Powder Snow': {maxPower: 90}, - 'Power Gem': {maxPower: 130}, - 'Power Trip': {maxPower: 130}, - 'Power-Up Punch': {maxPower: 70}, - 'Power Whip': {maxPower: 140}, - 'PrecipIce Blades': {maxPower: 140}, - Present: {maxPower: 100}, - 'Prismatic Laser': {maxPower: 150}, - Psybeam: {maxPower: 120}, - Psychic: {maxPower: 130}, - 'Psychic Fangs': {maxPower: 130}, - 'Psycho Boost': {maxPower: 140}, - 'Psycho Cut': {maxPower: 120}, - Psyshock: {maxPower: 130}, - Psystrike: {maxPower: 130}, - Psywave: {maxPower: 100}, - 'Pulverizing Pancake': {maxPower: 1}, - Punishment: {maxPower: 130}, - Pursuit: {maxPower: 90}, - 'Quick Attack': {maxPower: 90}, - Rage: {maxPower: 90}, - 'Rapid Spin': {bp: 50, secondaries: true, maxPower: 100}, - 'Razor Leaf': {maxPower: 110}, - 'Razor Shell': {maxPower: 130}, - 'Razor Wind': {maxPower: 130}, - 'Relic Song': {maxPower: 130}, - Retaliate: {maxPower: 120}, - Return: {maxPower: 130}, - 'Revelation Dance': {maxPower: 130}, - Revenge: {maxPower: 80}, - Reversal: {maxPower: 100}, - 'Roar of Time': {maxPower: 150}, - 'Rock Blast': {maxPower: 130}, - 'Rock Climb': {maxPower: 130}, - 'Rock Slide': {maxPower: 130}, - 'Rock Smash': {maxPower: 70}, - 'Rock Throw': {maxPower: 100}, - 'Rock Tomb': {maxPower: 110}, - 'Rock Wrecker': {maxPower: 150}, - 'Rolling Kick': {maxPower: 80}, - Rollout: {maxPower: 90}, - Round: {maxPower: 110}, - 'Sacred Fire': {maxPower: 130}, - 'Sacred Sword': {maxPower: 90}, - 'Sand Tomb': {maxPower: 90}, - 'Savage Spin-Out': {maxPower: 1}, - Scald: {maxPower: 130}, - Scratch: {maxPower: 90}, - 'Searing Shot': {maxPower: 130}, - 'Searing Sunraze Smash': {maxPower: 1}, - 'Secret Power': {maxPower: 120}, - 'Secret Sword': {maxPower: 90}, - 'Seed Bomb': {maxPower: 130}, - 'Seed Flare': {maxPower: 140}, - 'Seismic Toss': {maxPower: 75}, - 'Self-Destruct': {maxPower: 150}, - 'Shadow Ball': {maxPower: 130}, - 'Shadow Bone': {maxPower: 130}, - 'Shadow Claw': {maxPower: 120}, - 'Shadow Force': {maxPower: 140}, - 'Shadow Punch': {maxPower: 110}, - 'Shadow Sneak': {maxPower: 90}, - 'Shadow Strike': {maxPower: 130}, - 'Shattered Psyche': {maxPower: 1}, - 'Sheer Cold': {maxPower: 130}, - 'Shell Trap': {maxPower: 150}, - 'Shock Wave': {maxPower: 110}, - 'Signal Beam': {maxPower: 130}, - 'Silver Wind': {maxPower: 110}, - 'Sinister Arrow Raid': {maxPower: 1}, - 'Skull Bash': {maxPower: 140}, - 'Sky Attack': {maxPower: 140}, - 'Sky Drop': {maxPower: 110}, - 'Sky Uppercut': {maxPower: 90}, - Slam: {maxPower: 130}, - Slash: {maxPower: 120}, - Sludge: {maxPower: 85}, - 'Sludge Bomb': {maxPower: 90}, - 'Sludge Wave': {maxPower: 90}, - 'Smack Down': {maxPower: 100}, - 'Smart Strike': {maxPower: 120}, - 'Smelling Salts': {maxPower: 120}, - Smog: {maxPower: 70}, - Snarl: {maxPower: 110}, - Snore: {maxPower: 100}, - 'Solar Beam': {maxPower: 140}, - 'Solar Blade': {maxPower: 140}, - 'Sonic Boom': {maxPower: 100}, - 'Soul-Stealing 7-Star Strike': {maxPower: 1}, - 'Spacial Rend': {maxPower: 130}, - Spark: {maxPower: 120}, - 'Sparkling Aria': {maxPower: 130}, - 'Spectral Thief': {maxPower: 130}, - 'Spike Cannon': {maxPower: 120}, - 'Spirit Shackle': {maxPower: 130}, - 'Spit Up': {maxPower: 100}, - 'Splintered Stormshards': {maxPower: 1}, - 'Steam Eruption': {maxPower: 140}, - Steamroller: {maxPower: 120}, - 'Steel Wing': {maxPower: 120}, - 'Stoked Sparksurfer': {maxPower: 1}, - Stomp: {maxPower: 120}, - 'Stomping Tantrum': {maxPower: 130}, - 'Stone Edge': {maxPower: 130}, - 'Stored Power': {maxPower: 130}, - 'Storm Throw': {maxPower: 80}, - Strength: {maxPower: 130}, - 'Struggle Bug': {maxPower: 100}, - Submission: {maxPower: 90}, - 'Subzero Slammer': {maxPower: 1}, - 'Sucker Punch': {maxPower: 120}, - 'SunSteel Strike': {maxPower: 130}, - 'Super Fang': {maxPower: 100}, - Superpower: {maxPower: 95}, - 'Supersonic Skystrike': {maxPower: 1}, - Surf: {maxPower: 130}, - Swift: {maxPower: 110}, - Synchronoise: {maxPower: 140}, - Tackle: {maxPower: 90}, - 'Tail Slap': {maxPower: 130}, - 'Take Down': {maxPower: 130}, - 'Techno Blast': {maxPower: 140}, - 'Tectonic Rage': {maxPower: 1}, - Thief: {maxPower: 110}, - 'Thousand Arrows': {maxPower: 130}, - 'Thousand Waves': {maxPower: 130}, - Thrash: {maxPower: 140}, - 'Throat Chop': {maxPower: 130}, - Thunder: {maxPower: 140}, - Thunderbolt: {maxPower: 130}, - 'Thunder Fang': {maxPower: 120}, - 'Thunder Punch': {maxPower: 130}, - 'Thunder Shock': {maxPower: 90}, - 'Tri Attack': {maxPower: 130}, - 'Triple Kick': {maxPower: 80}, - 'Trop Kick': {maxPower: 120}, - 'Trump Card': {maxPower: 130}, - Twineedle: {maxPower: 100}, - 'Twinkle Tackle': {maxPower: 1}, - Twister: {maxPower: 90}, - 'U-turn': {maxPower: 120}, - Uproar: {maxPower: 130}, - 'Vacuum Wave': {maxPower: 70}, - 'V-create': {maxPower: 150}, - Venoshock: {maxPower: 85}, - 'Vine Whip': {maxPower: 100}, - 'Vise Grip': {maxPower: 110}, - 'Vital Throw': {maxPower: 85}, - 'Volt Switch': {maxPower: 120}, - 'Volt Tackle': {maxPower: 140}, - 'Wake-Up Slap': {maxPower: 85}, - Waterfall: {maxPower: 130}, - 'Water Gun': {maxPower: 90}, - 'Water Pledge': {maxPower: 130}, - 'Water Pulse': {maxPower: 110}, - 'Water Shuriken': {maxPower: 90}, - 'Water Spout': {maxPower: 150}, - 'Weather Ball': {maxPower: 130}, - Whirlpool: {maxPower: 90}, - 'Wild Charge': {maxPower: 130}, - 'Wing Attack': {maxPower: 110}, - 'Wood Hammer': {maxPower: 140}, - Wrap: {maxPower: 90}, - 'Wring Out': {maxPower: 140}, - 'X-Scissor': {maxPower: 130}, - 'Zap Cannon': {maxPower: 140}, - 'Zen Headbutt': {maxPower: 130}, - 'Zing Zap': {maxPower: 130}, -}; - -const SS: {[name: string]: MoveData} = extend(true, {}, SM, SS_PATCH); - -const LGPE_MOVES = [ - 'Baddy Bad', - 'Bouncy Bubble', - 'Buzzy Buzz', - 'Freezy Frost', - 'Glitzy Glow', - 'Sappy Seed', - 'Sizzly Slide', - 'Sparkly Swirl', - 'Zippy Zap', - 'Floaty Fall', - 'Pika Papow', - 'Splishy Splash', - 'Veevee Volley', -]; -for (const m of LGPE_MOVES) { - delete SS[m]; -} - -const SV_PATCH: {[name: string]: DeepPartial} = { - 'Aerial Ace': {isSlicing: true}, - Aeroblast: {isWind: true}, - 'Air Cutter': {isSlicing: true, isWind: true}, - 'Air Slash': {isSlicing: true}, - 'Behemoth Blade': {isSlicing: true}, - Blizzard: {isWind: true}, - 'Cross Poison': {isSlicing: true}, - Cut: {isSlicing: true}, - 'Fairy Wind': {isWind: true}, - 'Fury Cutter': {isSlicing: true}, - 'Glacial Lance': {bp: 120, zp: 190}, - 'Grassy Glide': {bp: 55, zp: 100, maxPower: 110}, - Gust: {isWind: true}, - 'Heat Wave': {isWind: true}, - Hurricane: {isWind: true}, - 'Icy Wind': {isWind: true}, - 'Leaf Blade': {isSlicing: true}, - 'Luster Purge': {bp: 95, zp: 175, maxPower: 130}, - 'Mist Ball': {bp: 95, zp: 175, maxPower: 130}, - 'Night Slash': {isSlicing: true}, - 'Petal Blizzard': {isWind: true}, - 'Psycho Cut': {isSlicing: true}, - 'Razor Leaf': {isSlicing: true}, - 'Razor Shell': {isSlicing: true}, - 'Sacred Sword': {isSlicing: true}, - 'Secret Sword': {isSlicing: true}, - Sandstorm: {isWind: true}, - Slash: {isSlicing: true}, - 'Solar Blade': {isSlicing: true}, - Tailwind: {isWind: true}, - Twister: {isWind: true}, - Whirlwind: {isWind: true}, - 'Wicked Blow': {bp: 75, zp: 140}, - 'X-Scissor': {isSlicing: true}, - 'Aqua Cutter': { - bp: 70, - type: 'Ghost', - category: 'Physical', - zp: 140, - maxPower: 120, - isSlicing: true, - }, - 'Alluring VoIce': { - bp: 80, - type: 'Fire', - category: 'Special', - zp: 160, - maxPower: 130, - secondaries: true, - isSound: true, - makesContact: true, - }, - 'Aqua Step': { - bp: 80, - type: 'Ghost', - category: 'Physical', - zp: 160, - maxPower: 130, - secondaries: true, - makesContact: true, - }, - 'Armor Cannon': { - bp: 120, - type: 'Ground', - category: 'Special', - zp: 190, - maxPower: 140, - }, - 'Axe Kick': { - bp: 120, - type: 'Water', - category: 'Physical', - zp: 190, - maxPower: 95, - secondaries: true, - hasCrashDamage: true, - makesContact: true, - }, - 'Barb Barrage': { - bp: 60, - type: 'Psychic', - category: 'Physical', - zp: 120, - maxPower: 80, - secondaries: true, - }, - 'Bitter Blade': { - bp: 90, - type: 'Ground', - category: 'Physical', - zp: 175, - maxPower: 130, - makesContact: true, - isSlicing: true, - drain: [1, 2], - }, - 'Bitter MalIce': { - bp: 75, - type: 'Steel', - category: 'Special', - zp: 140, - maxPower: 130, - secondaries: true, - }, - 'Blazing Torque': { - bp: 80, - type: 'Ground', - category: 'Physical', - zp: 160, - maxPower: 130, - secondaries: true, - }, - 'Bleakwind Storm': { - bp: 100, - type: 'Normal', - category: 'Special', - zp: 180, - maxPower: 130, - secondaries: true, - isWind: true, - target: 'allAdjacentFoes', - }, - 'Blood Moon': { - bp: 140, - type: 'Fairy', - category: 'Special', - zp: 200, - maxPower: 140, - }, - 'Burning Bulwark': {bp: 0, type: 'Ground', priority: 4}, - 'Ceaseless Edge': { - bp: 65, - type: 'Dragon', - category: 'Physical', - zp: 120, - maxPower: 120, - makesContact: true, - isSlicing: true, - secondaries: true, - }, - 'Chilling Water': { - bp: 50, - type: 'Ghost', - category: 'Special', - zp: 100, - maxPower: 100, - secondaries: true, - }, - 'Chilly Reception': { - bp: 0, - type: 'Electric', - category: 'Status', - }, - 'Chloroblast': { - bp: 150, - type: 'Fighting', - mindBlownRecoil: true, - category: 'Special', - zp: 200, - maxPower: 150, - }, - 'Collision Course': { - bp: 100, - type: 'Water', - category: 'Physical', - zp: 180, - maxPower: 90, - makesContact: true, // Deals 1.3x on super effective - }, - 'Combat Torque': { - bp: 100, - type: 'Water', - category: 'Physical', - zp: 180, - maxPower: 90, - secondaries: true, - }, - Comeuppance: { - bp: 0, - type: 'Dragon', - category: 'Physical', - zp: 100, - maxPower: 100, - makesContact: true, - }, - Doodle: { - bp: 0, - type: 'Fairy', - category: 'Status', - }, - 'Double Shock': { - bp: 120, - type: 'Dark', - category: 'Physical', - zp: 190, - maxPower: 140, - makesContact: true, - }, - 'Dire Claw': { - bp: 80, - type: 'Psychic', - category: 'Physical', - zp: 160, - maxPower: 90, - makesContact: true, - secondaries: true, - }, - 'Dragon Cheer': {bp: 0, type: 'Flying'}, - 'Electro Drift': { - bp: 100, - type: 'Dark', - category: 'Special', - zp: 180, - maxPower: 130, - makesContact: true, // deals 1.3x on super effective - }, - 'Electro Shot': { - bp: 130, - type: 'Dark', - category: 'Special', - zp: 195, - maxPower: 140, - }, - 'Esper Wing': { - bp: 80, - type: 'Grass', - category: 'Special', - zp: 160, - maxPower: 130, - secondaries: true, - }, - 'Fickle Beam': { - bp: 80, - type: 'Flying', - category: 'Special', - zp: 160, - maxPower: 130, - }, - 'Fillet Away': { - bp: 0, - type: 'Fairy', - category: 'Status', - }, - 'Flower Trick': { - bp: 70, - type: 'Fighting', - category: 'Physical', - willCrit: true, - zp: 140, - maxPower: 120, - }, - 'Gigaton Hammer': { - bp: 160, - type: 'Rock', - category: 'Physical', - zp: 200, - maxPower: 150, - }, - 'Glaive Rush': { - bp: 120, - type: 'Flying', - category: 'Physical', - zp: 190, - maxPower: 140, - makesContact: true, - }, - 'Hard Press': { - bp: 0, - type: 'Rock', - category: 'Physical', - zp: 100, - maxPower: 100, - makesContact: true, - }, - 'Headlong Rush': { - bp: 120, - type: 'Bug', - category: 'Physical', - zp: 190, - maxPower: 140, - makesContact: true, - isPunch: true, - }, - 'Hydro Steam': { - bp: 80, - type: 'Ghost', - category: 'Special', - zp: 160, - maxPower: 130, - }, - 'Hyper Drill': { - bp: 100, - type: 'Fairy', - category: 'Physical', - zp: 180, - maxPower: 130, - makesContact: true, - breaksProtect: true, - }, - 'Ice Spinner': { - bp: 80, - type: 'Electric', - category: 'Physical', - zp: 160, - maxPower: 130, - makesContact: true, - }, - 'Infernal Parade': { - bp: 60, - type: 'Steel', - category: 'Special', - zp: 120, - maxPower: 110, - secondaries: true, - }, - 'Ivy Cudgel': { - bp: 100, - type: 'Fighting', - category: 'Physical', - zp: 180, - maxPower: 130, - }, - 'Jet Punch': { - bp: 60, - type: 'Ghost', - category: 'Physical', - zp: 120, - maxPower: 110, - makesContact: true, - isPunch: true, - priority: 1, - // Sheer Force boost implemented in gen789.ts - }, - 'Kowtow Cleave': { - bp: 85, - type: 'Dragon', - category: 'Physical', - zp: 160, - maxPower: 130, - makesContact: true, - isSlicing: true, - }, - 'Last Respects': { - bp: 50, - type: 'Steel', - category: 'Physical', - zp: 100, - maxPower: 100, - }, - 'Lumina Crash': { - bp: 80, - type: 'Grass', - category: 'Special', - zp: 160, - maxPower: 130, - secondaries: true, - }, - 'Lunar Blessing': { - bp: 0, - type: 'Grass', - category: 'Status', - }, - 'Magical Torque': { - bp: 100, - type: 'Fire', - category: 'Physical', - zp: 180, - maxPower: 130, - secondaries: true, - }, - 'Make It Rain': { - bp: 120, - type: 'Rock', - category: 'Special', - zp: 190, - maxPower: 140, - target: 'allAdjacentFoes', - self: {boosts: {spa: -1}}, - }, - 'Malignant Chain': { - bp: 100, - type: 'Psychic', - category: 'Special', - zp: 180, - maxPower: 90, - secondaries: true, - }, - 'Matcha Gotcha': { - bp: 80, - type: 'Fighting', - category: 'Special', - target: 'allAdjacentFoes', - zp: 160, - maxPower: 130, - secondaries: true, - drain: [1, 2], - }, - 'Mighty Cleave': { - bp: 95, - type: 'Ice', - category: 'Physical', - zp: 175, - maxPower: 130, - makesContact: true, - isSlicing: true, - }, - 'Mortal Spin': { - bp: 30, - type: 'Psychic', - category: 'Physical', - zp: 100, - maxPower: 70, - makesContact: true, - secondaries: true, - target: 'allAdjacentFoes', - }, - 'Mountain Gale': { - bp: 100, - type: 'Electric', - category: 'Physical', - zp: 180, - maxPower: 130, - secondaries: true, - }, - 'Mystical Power': { - bp: 70, - type: 'Grass', - category: 'Special', - zp: 140, - maxPower: 120, - secondaries: true, - }, - 'Noxious Torque': { - bp: 100, - type: 'Psychic', - category: 'Physical', - zp: 180, - maxPower: 90, - secondaries: true, - }, - 'Order Up': { - bp: 80, - type: 'Flying', - category: 'Physical', - zp: 160, - maxPower: 130, - isPulse: true, - // Sheer Force boost implemented in gen789.ts - }, - 'Psychic Noise': { - bp: 75, - type: 'Grass', - category: 'Special', - zp: 140, - maxPower: 130, - secondaries: true, - isSound: true, - }, - 'Population Bomb': { - bp: 20, - type: 'Fairy', - category: 'Physical', - zp: 100, - maxPower: 90, - makesContact: true, - isSlicing: true, - multihit: 10, - }, - Pounce: { - bp: 50, - type: 'Poison', - category: 'Physical', - zp: 100, - maxPower: 100, - makesContact: true, - secondaries: true, - }, - 'Power Shift': { - bp: 0, - type: 'Fairy', - category: 'Status', - }, - Psyblade: { - bp: 80, - type: 'Grass', - category: 'Physical', - zp: 160, - maxPower: 130, - makesContact: true, - isSlicing: true, - }, - 'Psyshield Bash': { - bp: 70, - type: 'Grass', - category: 'Physical', - zp: 140, - maxPower: 120, - makesContact: true, - secondaries: true, - }, - 'Rage Fist': { - bp: 50, - type: 'Steel', - category: 'Physical', - zp: 100, - maxPower: 100, - makesContact: true, - isPunch: true, - }, - 'Raging Bull': { - bp: 90, - type: 'Fairy', - category: 'Physical', - zp: 175, - maxPower: 130, - makesContact: true, - }, - 'Raging Fury': { - bp: 120, - type: 'Ground', - category: 'Physical', - zp: 190, - maxPower: 140, - }, - 'Revival Blessing': { - bp: 0, - type: 'Fairy', - category: 'Status', - }, - Ruination: { - bp: 0, - type: 'Dragon', - category: 'Special', - zp: 100, - maxPower: 100, - }, - 'Salt Cure': { - bp: 40, - type: 'Ice', - category: 'Physical', - zp: 100, - maxPower: 90, - secondaries: true, - }, - 'Sandsear Storm': { - bp: 100, - type: 'Bug', - category: 'Special', - zp: 180, - maxPower: 130, - secondaries: true, - isWind: true, - target: 'allAdjacentFoes', - }, - 'Shed Tail': { - bp: 0, - type: 'Fairy', - category: 'Status', - }, - Shelter: { - bp: 0, - type: 'Rock', - category: 'Status', - }, - 'Silk Trap': { - bp: 0, - type: 'Poison', - category: 'Status', - priority: 4, - }, - Snowscape: { - bp: 0, - type: 'Electric', - category: 'Status', - }, - 'Spicy Extract': { - bp: 0, - type: 'Fighting', - category: 'Status', - }, - 'Spin Out': { - bp: 100, - type: 'Rock', - category: 'Physical', - zp: 180, - maxPower: 130, - makesContact: true, - }, - 'Springtide Storm': { - bp: 100, - type: 'Fire', - category: 'Special', - zp: 180, - maxPower: 130, - secondaries: true, - isWind: true, - target: 'allAdjacentFoes', - }, - 'Stone Axe': { - bp: 65, - type: 'Ice', - category: 'Physical', - zp: 120, - maxPower: 120, - makesContact: true, - isSlicing: true, - secondaries: true, - }, - 'Supercell Slam': { - bp: 100, - type: 'Dark', - category: 'Physical', - zp: 180, - maxPower: 130, - makesContact: true, - hasCrashDamage: true, - }, - 'Syrup Bomb': { - bp: 60, - type: 'Fighting', - category: 'Special', - zp: 120, - maxPower: 110, - isBullet: true, - secondaries: true, - }, - 'Tachyon Cutter': { - bp: 50, - type: 'Rock', - category: 'Special', - zp: 180, - maxPower: 140, - multihit: 2, - isSlicing: true, - }, - 'Take Heart': { - bp: 0, - type: 'Grass', - category: 'Status', - }, - 'Temper Flare': { - bp: 75, - type: 'Ground', - category: 'Physical', - zp: 140, - maxPower: 130, - makesContact: true, - }, - 'Tera Blast': { - bp: 80, - type: 'Fairy', - category: 'Special', - zp: 160, - maxPower: 130, - }, - 'Tera Starstorm': { - bp: 120, - type: 'Fairy', - category: 'Special', - zp: 190, - maxPower: 140, - }, - 'Thunderclap': { - bp: 70, - type: 'Dark', - category: 'Special', - zp: 140, - maxPower: 120, - priority: 1, - }, - 'Tidy Up': { - bp: 0, - type: 'Fairy', - category: 'Status', - }, - 'Torch Song': { - bp: 80, - type: 'Ground', - category: 'Special', - zp: 160, - maxPower: 130, - secondaries: true, - isSound: true, - }, - Trailblaze: { - bp: 50, - type: 'Fighting', - category: 'Physical', - zp: 100, - maxPower: 100, - secondaries: true, - makesContact: true, - }, - 'Triple Arrows': { - bp: 90, - type: 'Water', - category: 'Physical', - zp: 175, - maxPower: 90, - secondaries: true, - }, - 'Triple Dive': { - bp: 30, - type: 'Ghost', - category: 'Physical', - zp: 100, - maxPower: 90, - makesContact: true, - multihit: 3, - }, - 'Twin Beam': { - bp: 40, - type: 'Grass', - category: 'Special', - zp: 100, - maxPower: 90, - multihit: 2, - }, - 'Upper Hand': { - bp: 65, - type: 'Water', - category: 'Physical', - zp: 120, - maxPower: 85, - makesContact: true, - secondaries: true, - priority: 3, - }, - 'Victory Dance': { - bp: 0, - type: 'Water', - category: 'Status', - }, - 'Wave Crash': { - bp: 120, - type: 'Ghost', - category: 'Physical', - zp: 190, - maxPower: 140, - makesContact: true, - recoil: [33, 100], - }, - 'Wicked Torque': { - bp: 80, - type: 'Dragon', - category: 'Physical', - zp: 160, - maxPower: 130, - secondaries: true, - }, - 'Wildbolt Storm': { - bp: 100, - type: 'Dark', - category: 'Special', - zp: 180, - maxPower: 130, - secondaries: true, - isWind: true, - target: 'allAdjacentFoes', - }, -}; - -const SV: {[name: string]: MoveData} = extend(true, {}, SS, SV_PATCH); - -export const MOVES = [{}, RBY, GSC, ADV, DPP, BW, XY, SM, SS, SV]; - -export class Moves implements I.Moves { - private readonly gen: I.GenerationNum; - - constructor(gen: I.GenerationNum) { - this.gen = gen; - } - - get(id: I.ID) { - return MOVES_BY_ID[this.gen][id]; - } - - *[Symbol.iterator]() { - for (const id in MOVES_BY_ID[this.gen]) { - yield this.get(id as I.ID)!; - } - } -} - -class Move implements I.Move { - readonly kind: 'Move'; - readonly id: I.ID; - readonly name: I.MoveName; - readonly basePower!: number; - readonly type!: I.TypeName; - readonly category?: I.MoveCategory; - readonly flags: I.MoveFlags; - readonly secondaries?: boolean; - readonly target?: I.MoveTarget; - readonly recoil?: [number, number]; - readonly hasCrashDamage?: boolean; - readonly mindBlownRecoil?: boolean; - readonly struggleRecoil?: boolean; - readonly willCrit?: boolean; - readonly drain?: [number, number]; - readonly priority?: number; - readonly self?: I.SelfOrSecondaryEffect | null; - readonly ignoreDefensive?: boolean; - readonly overrideOffensiveStat?: I.StatIDExceptHP; - readonly overrideDefensiveStat?: I.StatIDExceptHP; - readonly overrideOffensivePokemon?: 'target' | 'source'; - readonly overrideDefensivePokemon?: 'target' | 'source'; - readonly breaksProtect?: boolean; - readonly isZ?: boolean; - readonly zMove?: { - basePower?: number; - }; - readonly isMax?: boolean; - readonly maxMove?: { - basePower: number; - }; - readonly zp?: number; - readonly maxPower?: number; - readonly multihit?: number | number[]; - - private static readonly FLAGS = new Set([ - 'bp', - 'makesContact', - 'isPunch', - 'isBite', - 'isBullet', - 'isSound', - 'isPulse', - 'zp', - 'maxPower', - 'isSlicing', - 'isWind', - ]); - - constructor(name: string, data: MoveData, gen: number) { - this.kind = 'Move'; - this.id = toID(name); - this.name = name as I.MoveName; - - // TODO: remove this once MoveData is migrated to flags and Object.assign just handles this - this.flags = {}; - if (data.makesContact) this.flags.contact = 1; - if (data.isPunch) this.flags.punch = 1; - if (data.isBite) this.flags.bite = 1; - if (data.isBullet) this.flags.bullet = 1; - if (data.isSound) this.flags.sound = 1; - if (data.isPulse) this.flags.pulse = 1; - if (data.isSlicing) this.flags.slicing = 1; - if (data.isWind) this.flags.wind = 1; - - assignWithout(this, data, Move.FLAGS); - - this.basePower = data.bp; - if (data.zp) this.zMove = {basePower: data.zp}; - if (data.maxPower) this.maxMove = {basePower: data.maxPower}; - - if (!this.category && gen >= 4) this.category = 'Status'; - if (this.struggleRecoil) delete (this as any).recoil; - } -} - -const MOVES_BY_ID: Array<{[id: string]: Move}> = []; - -let gen = 0; -for (const moves of MOVES) { - const map: {[id: string]: Move} = {}; - for (const move in moves) { - const data = moves[move]; - const m = new Move(move, data, gen); - map[m.id] = m; - } - MOVES_BY_ID.push(map); - gen++; -} From 53bf698993af0ad3492973ece7abb02e8feea37d Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:08:36 -0500 Subject: [PATCH 11/12] eipp-1 item and species lists --- calc/src/data/eipp-1_items.ts | 647 ++++++++++++++++++++++++++++++ calc/src/data/eipp-1_species.ts | 687 ++++++++++++++++++++++++++++++++ 2 files changed, 1334 insertions(+) create mode 100644 calc/src/data/eipp-1_items.ts create mode 100644 calc/src/data/eipp-1_species.ts diff --git a/calc/src/data/eipp-1_items.ts b/calc/src/data/eipp-1_items.ts new file mode 100644 index 000000000..41ede2e5e --- /dev/null +++ b/calc/src/data/eipp-1_items.ts @@ -0,0 +1,647 @@ +import * as I from './interface'; +import {toID} from '../util'; + +const RBY: string[] = []; + +const GSC = [ + 'Berry Juice', + 'Berry', + 'Berserk Gene', + 'Bitter Berry', + 'Black Belt', + 'Black Glasses', + 'Bright Powder', + 'Burnt Berry', + 'Charcoal', + 'Dragon Fang', + 'Dragon Scale', + 'Fast Ball', + 'Fire Stone', + 'Focus Band', + 'Friend Ball', + 'Gold Berry', + 'Great Ball', + 'Hard Stone', + 'Heavy Ball', + 'Ice Berry', + 'King\'s Rock', + 'Leaf Stone', + 'Leftovers', + 'Level Ball', + 'Light Ball', + 'Love Ball', + 'Lucky Punch', + 'Lure Ball', + 'Magnet', + 'Mail', + 'Master Ball', + 'Metal Coat', + 'Metal Powder', + 'Mint Berry', + 'Miracle Berry', + 'Miracle Seed', + 'Moon Ball', + 'Moon Stone', + 'Mystery Berry', + 'Mystic Water', + 'Never-Melt Ice', + 'Pink Bow', + 'Poison Barb', + 'Poke Ball', + 'Polkadot Bow', + 'PRZ Cure Berry', + 'PSN Cure Berry', + 'Quick Claw', + 'Safari Ball', + 'Scope Lens', + 'Sharp Beak', + 'Silver Powder', + 'Soft Sand', + 'Spell Tag', + 'Sport Ball', + 'Stick', + 'Sun Stone', + 'Thick Club', + 'Thunder Stone', + 'Twisted Spoon', + 'Ultra Ball', + 'Up-Grade', + 'Water Stone', +]; + +const GSC_ONLY = [ + 'Berry', + 'Berserk Gene', + 'Bitter Berry', + 'Burnt Berry', + 'Ice Berry', + 'Mint Berry', + 'Miracle Berry', + 'Mystery Berry', + 'PRZ Cure Berry', + 'Gold Berry', + 'Pink Bow', + 'Polkadot Bow', + 'PSN Cure Berry', +]; + +const ADV = GSC.filter(i => !GSC_ONLY.includes(i)).concat([ + 'Aguav Berry', + 'Apicot Berry', + 'Aspear Berry', + 'Belue Berry', + 'Bluk Berry', + 'Cheri Berry', + 'Chesto Berry', + 'Choice Band', + 'Claw Fossil', + 'Cornn Berry', + 'Deep Sea Scale', + 'Deep Sea Tooth', + 'Dive Ball', + 'Dome Fossil', + 'Durin Berry', + 'Enigma Berry', + 'Figy Berry', + 'Ganlon Berry', + 'Grepa Berry', + 'Helix Fossil', + 'Hondew Berry', + 'Iapapa Berry', + 'Kelpsy Berry', + 'Lansat Berry', + 'Lax Incense', + 'Leppa Berry', + 'Liechi Berry', + 'Lum Berry', + 'Luxury Ball', + 'Macho Brace', + 'Mago Berry', + 'Magost Berry', + 'Mental Herb', + 'Nanab Berry', + 'Nest Ball', + 'Net Ball', + 'Nomel Berry', + 'Old Amber', + 'Oran Berry', + 'Pamtre Berry', + 'Pecha Berry', + 'Persim Berry', + 'Petaya Berry', + 'Pinap Berry', + 'Pomeg Berry', + 'Premier Ball', + 'Qualot Berry', + 'Rabuta Berry', + 'Rawst Berry', + 'Razz Berry', + 'Repeat Ball', + 'Root Fossil', + 'Salac Berry', + 'Sea Incense', + 'Shell Bell', + 'Silk Scarf', + 'Sitrus Berry', + 'Soul Dew', + 'Spelon Berry', + 'Starf Berry', + 'Tamato Berry', + 'Timer Ball', + 'Watmel Berry', + 'Wepear Berry', + 'White Herb', + 'Wiki Berry', +]); + +const DPP = ADV.concat([ + 'Adamant Orb', + 'Armor Fossil', + 'Babiri Berry', + 'Big Root', + 'Black Sludge', + 'Charti Berry', + 'Cherish Ball', + 'Chilan Berry', + 'Choice Scarf', + 'Choice Specs', + 'Chople Berry', + 'Coba Berry', + 'Colbur Berry', + 'Custap Berry', + 'Damp Rock', + 'Dawn Stone', + 'Destiny Knot', + 'Draco Plate', + 'Dread Plate', + 'Dubious Disc', + 'Dusk Ball', + 'Dusk Stone', + 'Earth Plate', + 'Electirizer', + 'Expert Belt', + 'Fist Plate', + 'Flame Orb', + 'Flame Plate', + 'Focus Sash', + 'Full Incense', + 'Grip Claw', + 'Griseous Orb', + 'Haban Berry', + 'Heal Ball', + 'Heat Rock', + 'Icicle Plate', + 'Icy Rock', + 'Insect Plate', + 'Iron Ball', + 'Iron Plate', + 'Jaboca Berry', + 'Kasib Berry', + 'Kebia Berry', + 'Lagging Tail', + 'Life Orb', + 'Light Clay', + 'Lustrous Orb', + 'Magmarizer', + 'Meadow Plate', + 'Metronome', + 'Micle Berry', + 'Mind Plate', + 'Muscle Band', + 'Occa Berry', + 'Odd Incense', + 'Oval Stone', + 'Park Ball', + 'Passho Berry', + 'Payapa Berry', + 'Power Anklet', + 'Power Band', + 'Power Belt', + 'Power Bracer', + 'Power Herb', + 'Power Lens', + 'Power Weight', + 'Protector', + 'Quick Ball', + 'Quick Powder', + 'Rare Bone', + 'Razor Claw', + 'Razor Fang', + 'Reaper Cloth', + 'Rindo Berry', + 'Rock Incense', + 'Rose Incense', + 'Rowap Berry', + 'Shed Shell', + 'Shiny Stone', + 'Shuca Berry', + 'Skull Fossil', + 'Sky Plate', + 'Smooth Rock', + 'Splash Plate', + 'Spooky Plate', + 'Sticky Barb', + 'Stone Plate', + 'Tanga Berry', + 'Toxic Orb', + 'Toxic Plate', + 'Wacan Berry', + 'Wave Incense', + 'Wide Lens', + 'Wise Glasses', + 'Yache Berry', + 'Zap Plate', + 'Zoom Lens', +]); + +const BW = DPP.concat([ + 'Absorb Bulb', + 'Air Balloon', + 'Big Nugget', + 'Binding Band', + 'Bug Gem', + 'Burn Drive', + 'Cell Battery', + 'Chill Drive', + 'Cover Fossil', + 'Dark Gem', + 'Douse Drive', + 'Dragon Gem', + 'Dream Ball', + 'Eject Button', + 'Electric Gem', + 'Eviolite', + 'Fighting Gem', + 'Fire Gem', + 'Float Stone', + 'Flying Gem', + 'Ghost Gem', + 'Grass Gem', + 'Ground Gem', + 'Ice Gem', + 'Normal Gem', + 'Plume Fossil', + 'Poison Gem', + 'Prism Scale', + 'Psychic Gem', + 'Red Card', + 'Ring Target', + 'Rock Gem', + 'Rocky Helmet', + 'Shock Drive', + 'Steel Gem', + 'Water Gem', +]); + +export const MEGA_STONES: {[species: string]: string} = { + Absolite: 'Absol', + Abomasite: 'Abomasnow', + Aerodactylite: 'Aerodactyl', + Aggronite: 'Aggron', + Alakazite: 'Alakazam', + Altarianite: 'Altaria', + Ampharosite: 'Ampharos', + Audinite: 'Audino', + Banettite: 'Banette', + Beedrillite: 'Beedrill', + Blastoisinite: 'Blastoise', + Blazikenite: 'Blaziken', + Cameruptite: 'Camerupt', + 'Charizardite X': 'Charizard', + 'Charizardite Y': 'Charizard', + Crucibellite: 'Crucibelle', + Diancite: 'Diancie', + Galladite: 'Gallade', + Garchompite: 'Garchomp', + Gardevoirite: 'Gardevoir', + Gengarite: 'Gengar', + Glalitite: 'Glalie', + Gyaradosite: 'Gyarados', + Heracronite: 'Heracross', + Houndoominite: 'Houndoom', + Kangaskhanite: 'Kangaskhan', + Latiasite: 'Latias', + Latiosite: 'Latios', + Lopunnite: 'Lopunny', + Lucarionite: 'Lucario', + Manectite: 'Manectric', + Mawilite: 'Mawile', + Medichamite: 'Medicham', + Metagrossite: 'Metagross', + 'Mewtwonite X': 'Mewtwo', + 'Mewtwonite Y': 'Mewtwo', + Pidgeotite: 'Pidgeot', + Pinsirite: 'Pinsir', + Sablenite: 'Sableye', + Salamencite: 'Salamence', + Sceptilite: 'Sceptile', + Scizorite: 'Scizor', + Sharpedonite: 'Sharpedo', + Slowbronite: 'Slowbro', + Steelixite: 'Steelix', + Swampertite: 'Swampert', + Tyranitarite: 'Tyranitar', + Venusaurite: 'Venusaur', +}; + +const XY = BW.concat( + [ + ...Object.keys(MEGA_STONES), + 'Assault Vest', + 'Blue Orb', + 'Fairy Gem', + 'Jaw Fossil', + 'Kee Berry', + 'Luminous Moss', + 'Maranga Berry', + 'Pixie Plate', + 'Red Orb', + 'Roseli Berry', + 'Sachet', + 'Safety Goggles', + 'Sail Fossil', + 'Snowball', + 'Weakness Policy', + 'Whipped Dream', + ].sort() +); + +const SM = XY.filter(i => i !== 'Old Amber').concat([ + 'Adrenaline Orb', + 'Aloraichium Z', + 'Beast Ball', + 'Bottle Cap', + 'Bug Memory', + 'Buginium Z', + 'Dark Memory', + 'Darkinium Z', + 'Decidium Z', + 'Dragon Memory', + 'Dragonium Z', + 'Eevium Z', + 'Electric Memory', + 'Electric Seed', + 'Electrium Z', + 'Fairium Z', + 'Fairy Memory', + 'Fighting Memory', + 'Fightinium Z', + 'Fire Memory', + 'Firium Z', + 'Flying Memory', + 'Flyinium Z', + 'Ghost Memory', + 'Ghostium Z', + 'Gold Bottle Cap', + 'Grass Memory', + 'Grassium Z', + 'Grassy Seed', + 'Ground Memory', + 'Groundium Z', + 'Ice Memory', + 'Ice Stone', + 'Icium Z', + 'Incinium Z', + 'Kommonium Z', + 'Lunalium Z', + 'Lycanium Z', + 'Marshadium Z', + 'Mewnium Z', + 'Mimikium Z', + 'Misty Seed', + 'Normalium Z', + 'Pikanium Z', + 'Pikashunium Z', + 'Poison Memory', + 'Poisonium Z', + 'Primarium Z', + 'Protective Pads', + 'Psychic Memory', + 'Psychic Seed', + 'Psychium Z', + 'Rock Memory', + 'Rockium Z', + 'Snorlium Z', + 'Solganium Z', + 'Steel Memory', + 'Steelium Z', + 'Tapunium Z', + 'Terrain Extender', + 'Ultranecrozium Z', + 'Water Memory', + 'Waterium Z', +]); + +const SS = SM.concat([ + 'Berry Sweet', + 'Blunder Policy', + 'Chipped Pot', + 'Clover Sweet', + 'Cracked Pot', + 'Eject Pack', + 'Flower Sweet', + 'Fossilized Bird', + 'Fossilized Dino', + 'Fossilized Drake', + 'Fossilized Fish', + 'Galarica Cuff', + 'Galarica Wreath', + 'Heavy-Duty Boots', + 'Leek', + 'Love Sweet', + 'Ribbon Sweet', + 'Room Service', + 'Rusted Shield', + 'Rusted Sword', + 'Star Sweet', + 'Strawberry Sweet', + 'Sweet Apple', + 'Tart Apple', + 'Throat Spray', +]); + +for (let i = 0; i < 100; i++) { + SS.push(`TR${i < 10 ? `0${i}` : i}`); +} + +// Added after the TRs to maintain sort order +SS.push('Utility Umbrella', 'Vile Vial'); + +// Because we support National Dex all Past items are added back in +SS.push(...GSC_ONLY, 'Old Amber'); + +const SV = SS.concat([ + 'Ability Shield', + 'Adamant Crystal', + 'Assist Shovel', + 'Assurance Policy', + 'Auspicious Armor', + 'Bare Spool', + 'Boomerang', + 'Booster Energy', + 'Clear Amulet', + 'Cornerstone Mask', + 'Covert Cloak', + 'Drain Shield', + 'EiPP Crown', + 'Fairy Feather', + 'Griseous Core', + 'Hearthflame Mask', + 'Loaded Dice', + 'Lustrous Globe', + 'Malicious Armor', + 'Masterpiece Teacup', + 'Metal Alloy', + 'Mirror Herb', + 'Nurse Hat', + 'Overlord Crown', + 'Punching Glove', + 'Queen\'s Gland', + 'Room Service 2', + 'Sharpshooter\'s Lens', + 'Sledgehammer', + 'Slime', + 'Spit Card', + 'Strange Ball', + 'Syrupy Apple', + 'Unremarkable Teacup', + 'Wellspring Mask', + 'Wide Decoy', +]); + +const BERRIES: {[berry: string]: {t: I.TypeName; p: number}} = { + 'Aguav Berry': {t: 'Dragon', p: 80}, + 'Apicot Berry': {t: 'Ground', p: 100}, + 'Aspear Berry': {t: 'Ice', p: 80}, + 'Babiri Berry': {t: 'Steel', p: 80}, + 'Belue Berry': {t: 'Electric', p: 100}, + Berry: {t: 'Poison', p: 80}, + 'Bitter Berry': {t: 'Ground', p: 80}, + 'Bluk Berry': {t: 'Fire', p: 90}, + 'Burnt Berry': {t: 'Ice', p: 80}, + 'Charti Berry': {t: 'Rock', p: 80}, + 'Cheri Berry': {t: 'Fire', p: 80}, + 'Chesto Berry': {t: 'Water', p: 80}, + 'Chilan Berry': {t: 'Normal', p: 80}, + 'Chople Berry': {t: 'Fighting', p: 80}, + 'Coba Berry': {t: 'Flying', p: 80}, + 'Colbur Berry': {t: 'Dark', p: 80}, + 'Cornn Berry': {t: 'Bug', p: 90}, + 'Custap Berry': {t: 'Ghost', p: 100}, + 'Durin Berry': {t: 'Water', p: 100}, + 'Enigma Berry': {t: 'Bug', p: 100}, + 'Figy Berry': {t: 'Bug', p: 80}, + 'Ganlon Berry': {t: 'Ice', p: 100}, + 'Gold Berry': {t: 'Psychic', p: 80}, + 'Grepa Berry': {t: 'Flying', p: 90}, + 'Haban Berry': {t: 'Dragon', p: 80}, + 'Hondew Berry': {t: 'Ground', p: 90}, + 'Iapapa Berry': {t: 'Dark', p: 80}, + 'Ice Berry': {t: 'Grass', p: 80}, + 'Jaboca Berry': {t: 'Dragon', p: 100}, + 'Kasib Berry': {t: 'Ghost', p: 80}, + 'Kebia Berry': {t: 'Poison', p: 80}, + 'Kee Berry': {t: 'Fairy', p: 100}, + 'Kelpsy Berry': {t: 'Fighting', p: 90}, + 'Lansat Berry': {t: 'Flying', p: 100}, + 'Leppa Berry': {t: 'Fighting', p: 80}, + 'Liechi Berry': {t: 'Grass', p: 100}, + 'Lum Berry': {t: 'Flying', p: 80}, + 'Mago Berry': {t: 'Ghost', p: 80}, + 'Magost Berry': {t: 'Rock', p: 90}, + 'Maranga Berry': {t: 'Dark', p: 100}, + 'Micle Berry': {t: 'Rock', p: 100}, + 'Mint Berry': {t: 'Water', p: 80}, + 'Miracle Berry': {t: 'Flying', p: 80}, + 'Mystery Berry': {t: 'Fighting', p: 80}, + 'Nanab Berry': {t: 'Water', p: 90}, + 'Nomel Berry': {t: 'Dragon', p: 90}, + 'Occa Berry': {t: 'Fire', p: 80}, + 'Oran Berry': {t: 'Poison', p: 80}, + 'Pamtre Berry': {t: 'Steel', p: 90}, + 'Passho Berry': {t: 'Water', p: 80}, + 'Payapa Berry': {t: 'Psychic', p: 80}, + 'Pecha Berry': {t: 'Electric', p: 80}, + 'Persim Berry': {t: 'Ground', p: 80}, + 'Petaya Berry': {t: 'Poison', p: 100}, + 'Pinap Berry': {t: 'Grass', p: 90}, + 'Pomeg Berry': {t: 'Ice', p: 90}, + 'PRZ Cure Berry': {t: 'Fire', p: 80}, + 'PSN Cure Berry': {t: 'Electric', p: 80}, + 'Qualot Berry': {t: 'Poison', p: 90}, + 'Rabuta Berry': {t: 'Ghost', p: 90}, + 'Rawst Berry': {t: 'Grass', p: 80}, + 'Razz Berry': {t: 'Steel', p: 80}, + 'Rindo Berry': {t: 'Grass', p: 80}, + 'Roseli Berry': {t: 'Fairy', p: 80}, + 'Rowap Berry': {t: 'Dark', p: 100}, + 'Salac Berry': {t: 'Fighting', p: 100}, + 'Shuca Berry': {t: 'Ground', p: 80}, + 'Sitrus Berry': {t: 'Psychic', p: 80}, + 'Spelon Berry': {t: 'Dark', p: 90}, + 'Starf Berry': {t: 'Psychic', p: 100}, + 'Tamato Berry': {t: 'Psychic', p: 90}, + 'Tanga Berry': {t: 'Bug', p: 80}, + 'Wacan Berry': {t: 'Electric', p: 80}, + 'Watmel Berry': {t: 'Fire', p: 100}, + 'Wepear Berry': {t: 'Electric', p: 90}, + 'Wiki Berry': {t: 'Rock', p: 80}, + 'Yache Berry': {t: 'Ice', p: 80}, +}; + +export const ITEMS = [[], RBY, GSC, ADV, DPP, BW, XY, SM, SS, SV]; + +export class Items implements I.Items { + private readonly gen: I.GenerationNum; + + constructor(gen: I.GenerationNum) { + this.gen = gen; + } + + get(id: I.ID) { + return ITEMS_BY_ID[this.gen][id]; + } + + *[Symbol.iterator]() { + for (const id in ITEMS_BY_ID[this.gen]) { + yield this.get(id as I.ID)!; + } + } +} + +class Item implements I.Item { + readonly kind: 'Item'; + readonly id: I.ID; + readonly name: I.ItemName; + readonly megaEvolves?: I.SpeciesName; + readonly isBerry?: boolean; + readonly naturalGift?: Readonly<{basePower: number; type: I.TypeName}>; + + constructor(name: string, gen: number) { + this.kind = 'Item'; + this.id = toID(name); + this.name = name as I.ItemName; + this.megaEvolves = MEGA_STONES[name] as I.SpeciesName; + const berry = BERRIES[name]; + if (berry) { + this.isBerry = true; + this.naturalGift = { + basePower: gen < 6 ? berry.p - 20 : berry.p, + type: berry.t, + }; + } + } +} + +const ITEMS_BY_ID: Array<{[id: string]: Item}> = []; + +let gen = 0; +for (const items of ITEMS) { + const map: {[id: string]: Item} = {}; + for (const item of items) { + const i = new Item(item, gen); + map[i.id] = i; + } + ITEMS_BY_ID.push(map); + gen++; +} diff --git a/calc/src/data/eipp-1_species.ts b/calc/src/data/eipp-1_species.ts new file mode 100644 index 000000000..a891d743b --- /dev/null +++ b/calc/src/data/eipp-1_species.ts @@ -0,0 +1,687 @@ +import * as I from './interface'; +import {toID, extend, DeepPartial, assignWithout} from '../util'; + +export interface SpeciesData { + readonly types: [I.TypeName] | [I.TypeName, I.TypeName]; + // TODO: replace with baseStats + readonly bs: { + hp: number; + at: number; + df: number; + sa?: number; + sd?: number; + sp: number; + sl?: number; + }; + readonly weightkg: number; // weight + readonly nfe?: boolean; + readonly gender?: I.GenderName; + readonly otherFormes?: string[]; + readonly baseSpecies?: string; + readonly abilities?: {0: string}; // ability +} + +const RBY: {[name: string]: SpeciesData} = { + Dragonite: { + types: ['Dragon', 'Flying'], + bs: {hp: 91, at: 134, df: 95, sp: 80, sl: 100}, + weightkg: 210, + }, + Gyarados: { + types: ['Water', 'Flying'], + bs: {hp: 95, at: 125, df: 79, sp: 81, sl: 100}, + weightkg: 235, + }, + Mew: { + types: ['Psychic'], + bs: {hp: 100, at: 100, df: 100, sp: 100, sl: 100}, + weightkg: 4, + }, + Pinsir: {types: ['Bug'], bs: {hp: 65, at: 125, df: 100, sp: 85, sl: 55}, weightkg: 55}, + Slowbro: { + types: ['Water', 'Psychic'], + bs: {hp: 95, at: 75, df: 110, sp: 30, sl: 80}, + weightkg: 78.5, + }, + Snorlax: { + types: ['Normal'], + bs: {hp: 160, at: 110, df: 65, sp: 30, sl: 65}, + weightkg: 460, + }, + Vaporeon: { + types: ['Water'], + bs: {hp: 130, at: 65, df: 60, sp: 65, sl: 110}, + weightkg: 29, + }, + Venusaur: { + types: ['Grass', 'Poison'], + bs: {hp: 80, at: 82, df: 83, sp: 80, sl: 100}, + weightkg: 100, + }, + Zapdos: { + types: ['Electric', 'Flying'], + bs: {hp: 90, at: 90, df: 85, sp: 100, sl: 125}, + weightkg: 52.6, + }, +}; + +const GSC_PATCH: {[name: string]: DeepPartial} = { + // gen 1 pokemon changes + Dragonite: {bs: {sa: 100, sd: 100}}, + Gyarados: {bs: {sa: 60, sd: 100}}, + Mew: {bs: {sa: 100, sd: 100}, gender: 'N'}, + Pinsir: {bs: {sa: 55, sd: 70}}, + Slowbro: {bs: {sa: 100, sd: 80}}, + Snorlax: {bs: {sa: 65, sd: 110}}, + Vaporeon: {bs: {sa: 110, sd: 95}}, + Venusaur: {bs: {sa: 100, sd: 100}}, + Zapdos: {bs: {sa: 125, sd: 90}, gender: 'N'}, + // gen 2 pokemon + Heracross: { + types: ['Bug', 'Fighting'], + bs: {hp: 80, at: 125, df: 75, sa: 40, sd: 95, sp: 85}, + weightkg: 54, + }, + Houndoom: { + types: ['Dark', 'Fire'], + bs: {hp: 75, at: 90, df: 50, sa: 110, sd: 80, sp: 95}, + weightkg: 35, + }, + Octillery: { + types: ['Water'], + bs: {hp: 75, at: 105, df: 75, sa: 105, sd: 75, sp: 45}, + weightkg: 28.5, + }, + Porygon2: { + types: ['Normal'], + bs: {hp: 85, at: 80, df: 90, sa: 105, sd: 95, sp: 60}, + weightkg: 32.5, + gender: 'N', + }, + Scizor: { + types: ['Bug', 'Steel'], + bs: {hp: 70, at: 130, df: 100, sa: 55, sd: 80, sp: 65}, + weightkg: 118, + }, + Shuckle: { + types: ['Bug', 'Rock'], + bs: {hp: 20, at: 10, df: 230, sa: 10, sd: 230, sp: 5}, + weightkg: 20.5, + }, + Togetic: { + types: ['Normal', 'Flying'], + bs: {hp: 55, at: 40, df: 85, sa: 80, sd: 105, sp: 40}, + weightkg: 3.2, + }, +}; +const GSC: {[name: string]: SpeciesData} = extend(true, {}, RBY, GSC_PATCH); + +const ADV_PATCH: {[name: string]: DeepPartial} = { + // gen 1 pokemon changes + Dragonite: {abilities: {0: 'Inner Focus'}}, + Gyarados: {abilities: {0: 'Intimidate'}}, + Mew: {abilities: {0: 'Synchronize'}}, + Pinsir: {abilities: {0: 'Hyper Cutter'}}, + Slowbro: {abilities: {0: 'Oblivious'}}, + Snorlax: {abilities: {0: 'Immunity'}}, + Vaporeon: {abilities: {0: 'Water Absorb'}}, + Venusaur: {abilities: {0: 'Overgrow'}}, + Zapdos: {abilities: {0: 'Pressure'}}, + // gen 2 pokemon changes + Heracross: {abilities: {0: 'Swarm'}}, + Houndoom: {abilities: {0: 'Early Bird'}}, + Octillery: {abilities: {0: 'Suction Cups'}}, + Porygon2: {abilities: {0: 'Trace'}}, + Scizor: {abilities: {0: 'Swarm'}}, + Shuckle: {abilities: {0: 'Sturdy'}}, + Togetic: {abilities: {0: 'Hustle'}}, + // gen 3 pokemon + Altaria: { + types: ['Dragon', 'Flying'], + bs: {hp: 75, at: 70, df: 90, sa: 70, sd: 105, sp: 80}, + weightkg: 20.6, + abilities: {0: 'Natural Cure'}, + }, + Armaldo: { + types: ['Rock', 'Bug'], + bs: {hp: 75, at: 125, df: 100, sa: 70, sd: 80, sp: 45}, + weightkg: 68.2, + abilities: {0: 'Battle Armor'}, + }, + Banette: { + types: ['Ghost'], + bs: {hp: 64, at: 115, df: 65, sa: 83, sd: 63, sp: 65}, + weightkg: 12.5, + abilities: {0: 'Insomnia'}, + }, + Blaziken: { + types: ['Fire', 'Fighting'], + bs: {hp: 80, at: 120, df: 70, sa: 110, sd: 70, sp: 80}, + weightkg: 52, + abilities: {0: 'Blaze'}, + }, + 'Deoxys-Defense': { + types: ['Psychic'], + bs: {hp: 50, at: 70, df: 160, sa: 70, sd: 160, sp: 90}, + weightkg: 60.8, + abilities: {0: 'Pressure'}, + gender: 'N', + }, + Gardevoir: { + types: ['Psychic'], + bs: {hp: 68, at: 65, df: 65, sa: 125, sd: 115, sp: 80}, + weightkg: 48.4, + abilities: {0: 'Synchronize'}, + }, + Glalie: { + types: ['Ice'], + bs: {hp: 80, at: 80, df: 80, sa: 80, sd: 80, sp: 80}, + weightkg: 256.5, + abilities: {0: 'Inner Focus'}, + }, + Jirachi: { + types: ['Steel', 'Psychic'], + bs: {hp: 100, at: 100, df: 100, sa: 100, sd: 100, sp: 100}, + weightkg: 1.1, + abilities: {0: 'Serene Grace'}, + gender: 'N', + }, + Mawile: { + types: ['Steel'], + bs: {hp: 50, at: 85, df: 85, sa: 55, sd: 55, sp: 50}, + weightkg: 11.5, + abilities: {0: 'Hyper Cutter'}, + }, + Metagross: { + types: ['Steel', 'Psychic'], + bs: {hp: 80, at: 135, df: 130, sa: 95, sd: 90, sp: 70}, + weightkg: 550, + gender: 'N', + abilities: {0: 'Clear Body'}, + }, + Sableye: { + types: ['Dark', 'Ghost'], + bs: {hp: 50, at: 75, df: 75, sa: 65, sd: 65, sp: 50}, + weightkg: 11, + abilities: {0: 'Keen Eye'}, + }, + Sceptile: { + types: ['Grass'], + bs: {hp: 70, at: 85, df: 65, sa: 105, sd: 85, sp: 120}, + weightkg: 52.2, + abilities: {0: 'Overgrow'}, + }, +}; + +const ADV: {[name: string]: SpeciesData} = extend(true, {}, GSC, ADV_PATCH); + +const DPP_PATCH: {[name: string]: DeepPartial} = { + + Porygon2: {nfe: true}, + Togetic: {nfe: true}, + Cresselia: { + types: ['Psychic'], + bs: {hp: 120, at: 70, df: 120, sa: 75, sd: 130, sp: 85}, + weightkg: 85.6, + abilities: {0: 'Levitate'}, + }, + Heatran: { + types: ['Fire', 'Steel'], + bs: {hp: 91, at: 90, df: 106, sa: 130, sd: 106, sp: 77}, + weightkg: 430, + abilities: {0: 'Flash Fire'}, + }, + Lucario: { + types: ['Fighting', 'Steel'], + bs: {hp: 70, at: 110, df: 70, sa: 115, sd: 70, sp: 90}, + weightkg: 54, + abilities: {0: 'Steadfast'}, + }, + Manaphy: { + types: ['Water'], + bs: {hp: 100, at: 100, df: 100, sa: 100, sd: 100, sp: 100}, + weightkg: 1.4, + abilities: {0: 'Hydration'}, + gender: 'N', + }, + 'Rotom-Wash': { + types: ['Electric', 'Ghost'], + bs: {hp: 50, at: 65, df: 107, sa: 105, sd: 107, sp: 86}, + weightkg: 0.3, + abilities: {0: 'Levitate'}, + gender: 'N', + }, + Vespiquen: { + types: ['Bug', 'Flying'], + bs: {hp: 70, at: 80, df: 102, sa: 80, sd: 102, sp: 40}, + weightkg: 38.5, + abilities: {0: 'Pressure'}, + }, +}; + +const DPP: {[name: string]: SpeciesData} = extend(true, {}, ADV, DPP_PATCH); + +const BW_PATCH: {[name: string]: DeepPartial} = { + 'Rotom-Wash': {types: ['Electric', 'Water']}, + Chandelure: { + types: ['Ghost', 'Fire'], + bs: {hp: 60, at: 55, df: 90, sa: 145, sd: 90, sp: 80}, + weightkg: 34.3, + abilities: {0: 'Flash Fire'}, + }, + Cofagrigus: { + types: ['Ghost'], + bs: {hp: 58, at: 50, df: 145, sa: 95, sd: 105, sp: 30}, + weightkg: 76.5, + abilities: {0: 'Mummy'}, + }, + Landorus: { + types: ['Ground', 'Flying'], + bs: {hp: 89, at: 125, df: 90, sa: 115, sd: 80, sp: 101}, + weightkg: 68, + abilities: {0: 'Sand Force'}, + }, + Scolipede: { + types: ['Bug', 'Poison'], + bs: {hp: 60, at: 90, df: 89, sa: 55, sd: 69, sp: 112}, + weightkg: 200.5, + abilities: {0: 'Poison Point'}, + }, + Thundurus: { + types: ['Electric', 'Flying'], + bs: {hp: 79, at: 115, df: 70, sa: 125, sd: 80, sp: 111}, + weightkg: 61, + abilities: {0: 'Prankster'}, + }, + 'Tornadus-Therian': { + types: ['Flying'], + bs: {hp: 79, at: 100, df: 80, sa: 110, sd: 90, sp: 121}, + weightkg: 63, + abilities: {0: 'Regenerator'}, + }, + Victini: { + types: ['Psychic', 'Fire'], + bs: {hp: 100, at: 100, df: 100, sa: 100, sd: 100, sp: 100}, + weightkg: 4, + abilities: {0: 'Victory Star'}, + gender: 'N', + }, + Volcarona: { + types: ['Bug', 'Fire'], + bs: {hp: 85, at: 60, df: 65, sa: 135, sd: 105, sp: 100}, + weightkg: 46, + abilities: {0: 'Flame Body'}, + }, +}; + +const BW: {[name: string]: SpeciesData} = extend(true, {}, DPP, BW_PATCH); + +// @ts-ignore readonly + +const XY_PATCH: {[name: string]: DeepPartial} = { + Altaria: {otherFormes: ['Altaria-Mega']}, + Banette: {otherFormes: ['Banette-Mega']}, + Blaziken: {otherFormes: ['Blaziken-Mega']}, + Gardevoir: {types: ['Psychic', 'Fairy'], otherFormes: ['Gardevoir-Mega']}, + Glalie: {otherFormes: ['Glalie-Mega']}, + Houndoom: {otherFormes: ['Houndoom-Mega']}, + Lucario: {otherFormes: ['Lucario-Mega']}, + Mawile: {types: ['Steel', 'Fairy'], otherFormes: ['Mawile-Mega']}, + Pinsir: {otherFormes: ['Pinsir-Mega']}, + Sceptile: {otherFormes: ['Sceptile-Mega']}, + Scolipede: {bs: {at: 100}}, + Slowbro: {otherFormes: ['Slowbro-Mega']}, + Togetic: {types: ['Fairy', 'Flying']}, + Venusaur: {otherFormes: ['Venusaur-Mega']}, + Avalugg: { + types: ['Ice'], + bs: {hp: 95, at: 117, df: 184, sa: 44, sd: 46, sp: 28}, + weightkg: 505, + abilities: {0: 'Own Tempo'}, + }, + Dragalge: { + types: ['Poison', 'Dragon'], + bs: {hp: 65, at: 75, df: 90, sa: 97, sd: 123, sp: 44}, + weightkg: 81.5, + abilities: {0: 'Poison Point'}, + }, + 'Altaria-Mega': { + types: ['Dragon', 'Fairy'], + bs: {hp: 75, at: 110, df: 110, sa: 110, sd: 105, sp: 80}, + weightkg: 20.6, + abilities: {0: 'Pixilate'}, + baseSpecies: 'Altaria', + }, + 'Banette-Mega': { + types: ['Ghost'], + bs: {hp: 64, at: 165, df: 75, sa: 93, sd: 83, sp: 75}, + weightkg: 13, + abilities: {0: 'Prankster'}, + baseSpecies: 'Banette', + }, + 'Blaziken-Mega': { + types: ['Fire', 'Fighting'], + bs: {hp: 80, at: 160, df: 80, sa: 130, sd: 80, sp: 100}, + weightkg: 52, + abilities: {0: 'Speed Boost'}, + baseSpecies: 'Blaziken', + }, + 'Gardevoir-Mega': { + types: ['Psychic', 'Fairy'], + bs: {hp: 68, at: 85, df: 65, sa: 165, sd: 135, sp: 100}, + weightkg: 48.4, + abilities: {0: 'Pixilate'}, + baseSpecies: 'Gardevoir', + }, + 'Glalie-Mega': { + types: ['Ice'], + bs: {hp: 80, at: 120, df: 80, sa: 120, sd: 80, sp: 100}, + weightkg: 350.2, + abilities: {0: 'Refrigerate'}, + baseSpecies: 'Glalie', + }, + 'Houndoom-Mega': { + types: ['Dark', 'Fire'], + bs: {hp: 75, at: 90, df: 90, sa: 140, sd: 90, sp: 115}, + weightkg: 49.5, + abilities: {0: 'Solar Power'}, + baseSpecies: 'Houndoom', + }, + 'Lucario-Mega': { + types: ['Fighting', 'Steel'], + bs: {hp: 70, at: 145, df: 88, sa: 140, sd: 70, sp: 112}, + weightkg: 57.5, + abilities: {0: 'Adaptability'}, + baseSpecies: 'Lucario', + }, + 'Mawile-Mega': { + types: ['Steel', 'Fairy'], + bs: {hp: 50, at: 105, df: 125, sa: 55, sd: 95, sp: 50}, + weightkg: 23.5, + abilities: {0: 'Huge Power'}, + baseSpecies: 'Mawile', + }, + 'Pinsir-Mega': { + types: ['Bug', 'Flying'], + bs: {hp: 65, at: 155, df: 120, sa: 65, sd: 90, sp: 105}, + weightkg: 59, + abilities: {0: 'Aerilate'}, + baseSpecies: 'Pinsir', + }, + 'Sceptile-Mega': { + types: ['Grass', 'Dragon'], + bs: {hp: 70, at: 110, df: 75, sa: 145, sd: 85, sp: 145}, + weightkg: 55.2, + abilities: {0: 'Lightning Rod'}, + baseSpecies: 'Sceptile', + }, + 'Slowbro-Mega': { + types: ['Water', 'Psychic'], + bs: {hp: 95, at: 75, df: 180, sa: 130, sd: 80, sp: 30}, + weightkg: 120, + abilities: {0: 'Shell Armor'}, + baseSpecies: 'Slowbro', + }, + 'Venusaur-Mega': { + types: ['Grass', 'Poison'], + bs: {hp: 80, at: 100, df: 123, sa: 122, sd: 120, sp: 80}, + weightkg: 155.5, + abilities: {0: 'Thick Fat'}, + baseSpecies: 'Venusaur', + }, + Sylveon: { + types: ['Fairy'], + bs: {hp: 95, at: 65, df: 65, sa: 110, sd: 130, sp: 60}, + weightkg: 23.5, + abilities: {0: 'Cute Charm'}, + }, +}; + +const XY: {[name: string]: SpeciesData} = extend(true, {}, BW, XY_PATCH); + +const SM_PATCH: {[name: string]: DeepPartial} = { + Comfey: { + types: ['Fairy'], + bs: {hp: 51, at: 52, df: 90, sa: 82, sd: 110, sp: 100}, + weightkg: 0.3, + abilities: {0: 'Flower Veil'}, + }, + Golisopod: { + types: ['Bug', 'Water'], + bs: {hp: 75, at: 125, df: 140, sa: 60, sd: 90, sp: 40}, + weightkg: 108, + abilities: {0: 'Emergency Exit'}, + }, + Necrozma: { + types: ['Psychic'], + bs: {hp: 97, at: 107, df: 101, sa: 127, sd: 89, sp: 79}, + weightkg: 230, + abilities: {0: 'Prism Armor'}, + gender: 'N', + }, + Nihilego: { + types: ['Rock', 'Poison'], + bs: {hp: 109, at: 53, df: 47, sa: 127, sd: 131, sp: 103}, + weightkg: 55.5, + abilities: {0: 'Beast Boost'}, + gender: 'N', + }, + Oranguru: { + types: ['Normal', 'Psychic'], + bs: {hp: 90, at: 60, df: 80, sa: 90, sd: 110, sp: 60}, + weightkg: 76, + abilities: {0: 'Inner Focus'}, + }, + 'Tapu Fini': { + types: ['Water', 'Fairy'], + bs: {hp: 70, at: 75, df: 115, sa: 95, sd: 130, sp: 85}, + weightkg: 21.2, + abilities: {0: 'Misty Surge'}, + gender: 'N', + }, + Turtonator: { + types: ['Fire', 'Dragon'], + bs: {hp: 60, at: 78, df: 135, sa: 91, sd: 85, sp: 36}, + weightkg: 212, + abilities: {0: 'Shell Armor'}, + }, + 'Type: Null': { + types: ['Normal'], + bs: {hp: 95, at: 95, df: 95, sa: 95, sd: 95, sp: 59}, + weightkg: 120.5, + abilities: {0: 'Battle Armor'}, + nfe: true, + gender: 'N', + }, + 'Zygarde-10%': { + types: ['Dragon', 'Ground'], + bs: {hp: 54, at: 100, df: 71, sa: 61, sd: 85, sp: 115}, + weightkg: 33.5, + abilities: {0: 'Aura Break'}, + baseSpecies: 'Zygarde', + gender: 'N', + }, +}; + +const SM: {[name: string]: SpeciesData} = extend(true, {}, XY, SM_PATCH); + +const SS_PATCH: {[name: string]: DeepPartial} = { + Slowbro: {otherFormes: ['Slowbro-Galar', 'Slowbro-Mega']}, + Alcremie: { + types: ['Fairy'], + bs: {hp: 65, at: 60, df: 75, sa: 110, sd: 121, sp: 64}, + weightkg: 0.5, + abilities: {0: 'Sweet Veil'}, + otherFormes: ['Alcremie-Gmax'], + }, + Corviknight: { + types: ['Flying', 'Steel'], + bs: {hp: 98, at: 87, df: 105, sa: 53, sd: 85, sp: 67}, + weightkg: 75, + abilities: {0: 'Pressure'}, + }, + Dragapult: { + types: ['Dragon', 'Ghost'], + bs: {hp: 88, at: 120, df: 75, sa: 100, sd: 75, sp: 142}, + weightkg: 50, + abilities: {0: 'Clear Body'}, + }, + Inteleon: { + types: ['Water'], + bs: {hp: 70, at: 85, df: 65, sa: 125, sd: 65, sp: 120}, + weightkg: 45.2, + abilities: {0: 'Torrent'}, + }, + Regidrago: { + types: ['Dragon'], + bs: {hp: 200, at: 100, df: 50, sa: 100, sd: 50, sp: 80}, + weightkg: 200, + abilities: {0: 'Dragon\'s Maw'}, + gender: 'N', + }, + 'Slowbro-Galar': { + types: ['Poison', 'Psychic'], + bs: {hp: 95, at: 100, df: 95, sa: 100, sd: 70, sp: 30}, + weightkg: 70.5, + abilities: {0: 'Quick Draw'}, + baseSpecies: 'Slowbro', + }, +}; + +const SS: {[name: string]: SpeciesData} = extend(true, {}, SM, SS_PATCH); + +const PLA_PATCH: {[name: string]: DeepPartial} = { + 'Enamorus-Therian': { + types: ['Fairy', 'Flying'], + bs: {hp: 74, at: 115, df: 110, sa: 135, sd: 100, sp: 46}, + weightkg: 48, + abilities: {0: 'Overcoat'}, + }, + 'Goodra-Hisui': { + types: ['Steel', 'Dragon'], + bs: {hp: 80, at: 100, df: 100, sa: 110, sd: 150, sp: 60}, + weightkg: 334.1, + abilities: {0: 'Sap Sipper'}, + }, +}; + +const SV_PATCH: {[name: string]: DeepPartial} = { + Cresselia: {bs: {df: 110, sd: 120}}, + Archaludon: { + types: ['Steel', 'Dragon'], + bs: {hp: 90, at: 105, df: 130, sa: 125, sd: 65, sp: 85}, + weightkg: 60, + abilities: {0: 'Stamina'}, + }, + 'Chi-Yu': { + types: ['Dark', 'Fire'], + bs: {hp: 55, at: 80, df: 80, sa: 135, sd: 120, sp: 100}, + weightkg: 4.9, + gender: 'N', + abilities: {0: 'Beads of Ruin'}, + }, + Gholdengo: { + types: ['Steel', 'Ghost'], + bs: {hp: 87, at: 60, df: 95, sa: 133, sd: 91, sp: 84}, + weightkg: 30, + gender: 'N', + abilities: {0: 'Good as Gold'}, + }, + 'Gouging Fire': { + types: ['Fire', 'Dragon'], + bs: {hp: 105, at: 115, df: 121, sa: 65, sd: 93, sp: 91}, + weightkg: 590, + gender: 'N', + abilities: {0: 'Protosynthesis'}, + }, + 'Sinistcha': { + types: ['Grass', 'Ghost'], + bs: {hp: 71, at: 60, df: 106, sa: 121, sd: 80, sp: 70}, + weightkg: 2.2, + abilities: {0: 'Hospitality'}, + gender: 'N', + }, + 'Ursaluna-Bloodmoon': { + types: ['Ground', 'Normal'], + bs: {hp: 113, at: 70, df: 120, sa: 135, sd: 65, sp: 52}, + weightkg: 333, + abilities: {0: 'Mind\'s Eye'}, + }, +}; + +const SV: {[name: string]: SpeciesData} = extend(true, {}, SS, SV_PATCH, PLA_PATCH); + +export const SPECIES = [{}, RBY, GSC, ADV, DPP, BW, XY, SM, SS, SV]; + +export class Species implements I.Species { + private readonly gen: I.GenerationNum; + + constructor(gen: I.GenerationNum) { + this.gen = gen; + } + + get(id: I.ID) { + return SPECIES_BY_ID[this.gen][id]; + } + + *[Symbol.iterator]() { + for (const id in SPECIES_BY_ID[this.gen]) { + yield this.get(id as I.ID)!; + } + } +} + +class Specie implements I.Specie { + readonly kind: 'Species'; + readonly id: I.ID; + readonly name: I.SpeciesName; + readonly types!: [I.TypeName] | [I.TypeName, I.TypeName]; + readonly baseStats: Readonly; + readonly weightkg!: number; // weight + readonly nfe?: boolean; + readonly gender?: I.GenderName; + readonly otherFormes?: I.SpeciesName[]; + readonly baseSpecies?: I.SpeciesName; + readonly abilities?: {0: I.AbilityName}; // ability + + private static readonly EXCLUDE = new Set(['bs', 'otherFormes']); + + constructor(name: string, data: SpeciesData) { + this.kind = 'Species'; + this.id = toID(name); + this.name = name as I.SpeciesName; + + const baseStats: Partial = {}; + baseStats.hp = data.bs.hp; + baseStats.atk = data.bs.at; + baseStats.def = data.bs.df; + baseStats.spa = gen >= 2 ? data.bs.sa : data.bs.sl; + baseStats.spd = gen >= 2 ? data.bs.sd : data.bs.sl; + baseStats.spe = data.bs.sp; + this.baseStats = baseStats as I.StatsTable; + // Hack for getting Gmax pokemon out of existence in Gen 9+ + if (data.otherFormes) { + this.otherFormes = data.otherFormes as I.SpeciesName[]; + if (gen >= 9 && !['toxtricity', 'urshifu'].includes(this.id)) { + this.otherFormes = this.otherFormes.filter(f => !f.endsWith('-Gmax')); + if (!this.otherFormes.length) this.otherFormes = undefined; + if (this.otherFormes) this.otherFormes = [...new Set(this.otherFormes)]; + } + } + + assignWithout(this, data, Specie.EXCLUDE); + } +} +const SPECIES_BY_ID: Array<{[id: string]: Specie}> = []; + +let gen = 0; +for (const species of SPECIES) { + const map: {[id: string]: Specie} = {}; + for (const specie in species) { + if (gen >= 2 && species[specie].bs.sl) delete species[specie].bs.sl; + const m = new Specie(specie, species[specie]); + map[m.id] = m; + } + SPECIES_BY_ID.push(map); + gen++; +} From 68f496443b284a4357c308da1d4140d5cf281a43 Mon Sep 17 00:00:00 2001 From: Celestia74 <77862536+Celestia74@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:09:23 -0500 Subject: [PATCH 12/12] fixing a thing --- src/eipp-1.template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eipp-1.template.html b/src/eipp-1.template.html index 79fc9ff6a..365c49093 100644 --- a/src/eipp-1.template.html +++ b/src/eipp-1.template.html @@ -1596,7 +1596,7 @@ - +