diff --git a/calc/package-lock.json b/calc/package-lock.json index 48bd04ef8..a361f2811 100644 --- a/calc/package-lock.json +++ b/calc/package-lock.json @@ -12,7 +12,7 @@ "@types/node": "^18.14.2" }, "devDependencies": { - "@pkmn/dex": "^0.7.43", + "@pkmn/dex": "^0.7.51", "@pkmn/eslint-config": "^2.15.0", "@types/jest": "^29.4.0", "@typescript-eslint/eslint-plugin": "^5.54.0", @@ -1170,18 +1170,18 @@ } }, "node_modules/@pkmn/dex": { - "version": "0.7.43", - "resolved": "https://registry.npmjs.org/@pkmn/dex/-/dex-0.7.43.tgz", - "integrity": "sha512-0KmmctmzUZEN5clGXnRHk7RZmlTxrNrdNMNXmxGL2HQl3evbyuqlswhjZ5SPviwan5vKySCGy+xQuLk3MEX2PA==", + "version": "0.7.51", + "resolved": "https://registry.npmjs.org/@pkmn/dex/-/dex-0.7.51.tgz", + "integrity": "sha512-kmxgsUV1jhvpn3Z+4sLbOVVgpbUhQiYKQR6iqEYLIq33yCV7tqz/n0Vi+NpYdLcPLIencNS14PKjiPk5pu/rLg==", "dev": true, "dependencies": { - "@pkmn/dex-types": "^0.7.43" + "@pkmn/dex-types": "^0.7.51" } }, "node_modules/@pkmn/dex-types": { - "version": "0.7.43", - "resolved": "https://registry.npmjs.org/@pkmn/dex-types/-/dex-types-0.7.43.tgz", - "integrity": "sha512-xzjQOw3rilxmFyM5n+0pQphKXRwS105kzBZBS+rvwhQDQdVRXhLxp/UXBRDR3qWw0Pve1jNm5BGBPvXwPwN8lQ==", + "version": "0.7.51", + "resolved": "https://registry.npmjs.org/@pkmn/dex-types/-/dex-types-0.7.51.tgz", + "integrity": "sha512-yzfWUIfj3oJExwQuedUpxFX7X9d19EJC1WL1eDizNRGTnVTeq76s7moKEjqVuIcbge93vT+LgxA9awJDC0kPMg==", "dev": true, "dependencies": { "@pkmn/types": "^3.0.0" @@ -5675,18 +5675,18 @@ } }, "@pkmn/dex": { - "version": "0.7.43", - "resolved": "https://registry.npmjs.org/@pkmn/dex/-/dex-0.7.43.tgz", - "integrity": "sha512-0KmmctmzUZEN5clGXnRHk7RZmlTxrNrdNMNXmxGL2HQl3evbyuqlswhjZ5SPviwan5vKySCGy+xQuLk3MEX2PA==", + "version": "0.7.51", + "resolved": "https://registry.npmjs.org/@pkmn/dex/-/dex-0.7.51.tgz", + "integrity": "sha512-kmxgsUV1jhvpn3Z+4sLbOVVgpbUhQiYKQR6iqEYLIq33yCV7tqz/n0Vi+NpYdLcPLIencNS14PKjiPk5pu/rLg==", "dev": true, "requires": { - "@pkmn/dex-types": "^0.7.43" + "@pkmn/dex-types": "^0.7.51" } }, "@pkmn/dex-types": { - "version": "0.7.43", - "resolved": "https://registry.npmjs.org/@pkmn/dex-types/-/dex-types-0.7.43.tgz", - "integrity": "sha512-xzjQOw3rilxmFyM5n+0pQphKXRwS105kzBZBS+rvwhQDQdVRXhLxp/UXBRDR3qWw0Pve1jNm5BGBPvXwPwN8lQ==", + "version": "0.7.51", + "resolved": "https://registry.npmjs.org/@pkmn/dex-types/-/dex-types-0.7.51.tgz", + "integrity": "sha512-yzfWUIfj3oJExwQuedUpxFX7X9d19EJC1WL1eDizNRGTnVTeq76s7moKEjqVuIcbge93vT+LgxA9awJDC0kPMg==", "dev": true, "requires": { "@pkmn/types": "^3.0.0" diff --git a/calc/package.json b/calc/package.json index a13ae2df1..c517d91ff 100644 --- a/calc/package.json +++ b/calc/package.json @@ -14,7 +14,7 @@ "@types/node": "^18.14.2" }, "devDependencies": { - "@pkmn/dex": "^0.7.43", + "@pkmn/dex": "^0.7.51", "@pkmn/eslint-config": "^2.15.0", "@types/jest": "^29.4.0", "@typescript-eslint/eslint-plugin": "^5.54.0", diff --git a/calc/src/data/abilities.ts b/calc/src/data/abilities.ts index bb477fe50..2dfc15f46 100644 --- a/calc/src/data/abilities.ts +++ b/calc/src/data/abilities.ts @@ -303,7 +303,7 @@ const SV = SS.concat([ 'Earth Eater', 'Electromorphosis', 'Embody Aspect (Cornerstone)', - 'Embody Aspect (Heartflame)', + 'Embody Aspect (Hearthflame)', 'Embody Aspect (Teal)', 'Embody Aspect (Wellspring)', 'Good as Gold', diff --git a/calc/src/data/items.ts b/calc/src/data/items.ts index 7c5c1a9ff..a0b7e8954 100644 --- a/calc/src/data/items.ts +++ b/calc/src/data/items.ts @@ -258,6 +258,7 @@ const DPP = ADV.concat([ const BW = DPP.concat([ 'Absorb Bulb', 'Air Balloon', + 'Big Nugget', 'Binding Band', 'Bug Gem', 'Burn Drive', @@ -482,11 +483,14 @@ const SV = SS.concat([ 'Hearthflame Mask', 'Loaded Dice', 'Malicious Armor', + 'Masterpiece Teacup', 'Mirror Herb', 'Punching Glove', 'Lustrous Globe', 'Griseous Core', 'Strange Ball', + 'Syrupy Apple', + 'Unremarkable Teacup', 'Wellspring Mask', ]); diff --git a/calc/src/data/moves.ts b/calc/src/data/moves.ts index 38743d550..94f794015 100644 --- a/calc/src/data/moves.ts +++ b/calc/src/data/moves.ts @@ -4258,7 +4258,13 @@ const SV_PATCH: {[name: string]: DeepPartial} = { isWind: true, target: 'allAdjacentFoes', }, - 'Blood Moon': {bp: 120, category: 'Special', type: 'Normal'}, + 'Blood Moon': { + bp: 140, + type: 'Normal', + category: 'Special', + zp: 200, + maxPower: 140, + }, 'Ceaseless Edge': { bp: 65, type: 'Dark', @@ -4490,8 +4496,9 @@ const SV_PATCH: {[name: string]: DeepPartial} = { type: 'Grass', category: 'Special', target: 'allAdjacentFoes', - zp: 140, + zp: 160, maxPower: 130, + secondaries: true, drain: [1, 2], }, 'Mortal Spin': { diff --git a/calc/src/data/species.ts b/calc/src/data/species.ts index a10cc4d21..2eca4fcc0 100644 --- a/calc/src/data/species.ts +++ b/calc/src/data/species.ts @@ -6203,7 +6203,7 @@ const SM_PATCH: {[name: string]: DeepPartial} = { Geodude: {otherFormes: ['Geodude-Alola']}, Golem: {otherFormes: ['Golem-Alola']}, Graveler: {otherFormes: ['Graveler-Alola']}, - Greninja: {otherFormes: ['Greninja-Ash']}, + Greninja: {otherFormes: ['Greninja-Ash', 'Greninja-Bond']}, Grimer: {otherFormes: ['Grimer-Alola']}, Illumise: {bs: {df: 75, sd: 85}}, Lunatone: {bs: {hp: 90}}, @@ -6500,6 +6500,13 @@ const SM_PATCH: {[name: string]: DeepPartial} = { abilities: {0: 'Battle Bond'}, baseSpecies: 'Greninja', }, + 'Greninja-Bond': { + types: ['Water', 'Dark'], + bs: {hp: 72, at: 95, df: 67, sa: 103, sd: 71, sp: 122}, + weightkg: 40, + abilities: {0: 'Battle Bond'}, + baseSpecies: 'Greninja', + }, Grubbin: { types: ['Bug'], bs: {hp: 47, at: 62, df: 45, sa: 55, sd: 45, sp: 46}, @@ -7983,7 +7990,7 @@ const SS_PATCH: {[name: string]: DeepPartial} = { 'Farfetch\u2019d-Galar': { types: ['Fighting'], bs: {hp: 52, at: 95, df: 55, sa: 58, sd: 62, sp: 55}, - weightkg: 15, + weightkg: 42, abilities: {0: 'Steadfast'}, nfe: true, baseSpecies: 'Farfetch\u2019d', @@ -8883,7 +8890,7 @@ const PLA_PATCH: {[name: string]: DeepPartial} = { Overqwil: { types: ['Dark', 'Poison'], bs: {hp: 85, at: 115, df: 95, sa: 65, sd: 65, sp: 85}, - weightkg: 3.9, + weightkg: 60.5, abilities: {0: 'Poison Point'}, }, 'Palkia-Origin': { @@ -8988,6 +8995,13 @@ const SV_PATCH: {[name: string]: DeepPartial} = { 'Zacian-Crowned': {bs: {at: 150}}, Zamazenta: {bs: {at: 120}}, 'Zamazenta-Crowned': {bs: {at: 120, df: 140, sd: 140}}, + Ababo: { + types: ['Fairy'], + bs: {hp: 42, at: 35, df: 27, sa: 35, sd: 35, sp: 38}, + weightkg: 3.5, + abilities: {0: 'Pixilate'}, + nfe: true, + }, Annihilape: { types: ['Fighting', 'Ghost'], bs: {hp: 110, at: 115, df: 80, sa: 50, sd: 90, sp: 90}, @@ -9169,10 +9183,10 @@ const SV_PATCH: {[name: string]: DeepPartial} = { abilities: {0: 'Cud Chew'}, }, Fezandipiti: { - types: ['Poison', 'Psychic'], + types: ['Poison', 'Fairy'], bs: {hp: 88, at: 91, df: 82, sa: 70, sd: 125, sp: 99}, - weightkg: 12.2, - gender: 'M', + weightkg: 30.1, + // gender: 'M', abilities: {0: 'Toxic Chain'}, }, Fidough: { @@ -9296,7 +9310,7 @@ const SV_PATCH: {[name: string]: DeepPartial} = { }, Hemogoblin: { types: ['Fairy', 'Fire'], - bs: {hp: 90, at: 99, df: 89, sa: 99, sd: 97, sp: 55}, + bs: {hp: 90, at: 96, df: 87, sa: 96, sd: 89, sp: 55}, weightkg: 85, abilities: {0: 'Pixilate'}, }, @@ -9444,9 +9458,8 @@ const SV_PATCH: {[name: string]: DeepPartial} = { }, Munkidori: { types: ['Poison', 'Psychic'], - bs: {hp: 88, at: 75, sa: 130, sd: 90, sp: 106}, + bs: {hp: 88, at: 75, df: 66, sa: 130, sd: 90, sp: 106}, weightkg: 12.2, - gender: 'M', abilities: {0: 'Toxic Chain'}, }, Nacli: { @@ -9472,78 +9485,64 @@ const SV_PATCH: {[name: string]: DeepPartial} = { }, Ogerpon: { types: ['Grass'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Defiant'}, weightkg: 39.8, otherFormes: [ - 'Ogerpon-Wellspring', 'Ogerpon-Hearthflame', 'Ogerpon-Cornerstone', 'Ogerpon-Teal-Tera', - 'Ogerpon-Wellspring-Tera', 'Ogerpon-Hearthflame-Tera', 'Ogerpon-Cornerstone-Tera', + 'Ogerpon-Cornerstone', 'Ogerpon-Cornerstone-Tera', + 'Ogerpon-Hearthflame', 'Ogerpon-Hearthflame-Tera', + 'Ogerpon-Teal-Tera', + 'Ogerpon-Wellspring', 'Ogerpon-Wellspring-Tera', ], - forceTeraType: 'Grass', }, 'Ogerpon-Wellspring': { types: ['Grass', 'Water'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Water Absorb'}, weightkg: 39.8, baseSpecies: 'Ogerpon', - forceTeraType: 'Water', }, 'Ogerpon-Hearthflame': { types: ['Grass', 'Fire'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Mold Breaker'}, weightkg: 39.8, baseSpecies: 'Ogerpon', - forceTeraType: 'Fire', }, 'Ogerpon-Cornerstone': { types: ['Grass', 'Rock'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Sturdy'}, weightkg: 39.8, baseSpecies: 'Ogerpon', - forceTeraType: 'Rock', }, 'Ogerpon-Teal-Tera': { types: ['Grass'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Embody Aspect (Teal)'}, weightkg: 39.8, baseSpecies: 'Ogerpon', - forceTeraType: 'Grass', }, 'Ogerpon-Wellspring-Tera': { types: ['Grass', 'Water'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Embody Aspect (Wellspring)'}, weightkg: 39.8, baseSpecies: 'Ogerpon', - forceTeraType: 'Water', }, 'Ogerpon-Hearthflame-Tera': { types: ['Grass', 'Fire'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Embody Aspect (Hearthflame)'}, weightkg: 39.8, baseSpecies: 'Ogerpon', - forceTeraType: 'Fire', }, 'Ogerpon-Cornerstone-Tera': { types: ['Grass', 'Rock'], - gender: 'F', bs: {hp: 80, at: 120, df: 84, sa: 60, sd: 96, sp: 110}, abilities: {0: 'Embody Aspect (Cornerstone)'}, weightkg: 39.8, baseSpecies: 'Ogerpon', - forceTeraType: 'Rock', }, Oinkologne: { types: ['Normal'], @@ -9563,7 +9562,6 @@ const SV_PATCH: {[name: string]: DeepPartial} = { types: ['Poison', 'Fighting'], bs: {hp: 88, at: 128, df: 115, sa: 58, sd: 86, sp: 80}, weightkg: 92, - gender: 'M', abilities: {0: 'Toxic Chain'}, }, Orthworm: { @@ -9608,7 +9606,7 @@ const SV_PATCH: {[name: string]: DeepPartial} = { }, Poltchageist: { types: ['Grass', 'Ghost'], - bs: {hp: 40, at: 45, df: 45, sd: 54, sp: 50}, + bs: {hp: 40, at: 45, df: 45, sa: 74, sd: 54, sp: 50}, weightkg: 1.1, abilities: {0: 'Hospitality'}, nfe: true, @@ -9617,7 +9615,7 @@ const SV_PATCH: {[name: string]: DeepPartial} = { }, 'Poltchageist-Artisan': { types: ['Grass', 'Ghost'], - bs: {hp: 40, at: 45, df: 45, sd: 54, sp: 50}, + bs: {hp: 40, at: 45, df: 45, sa: 74, sd: 54, sp: 50}, weightkg: 1.1, abilities: {0: 'Hospitality'}, nfe: true, @@ -9678,6 +9676,13 @@ const SV_PATCH: {[name: string]: DeepPartial} = { gender: 'N', abilities: {0: 'Protosynthesis'}, }, + Scattervein: { + types: ['Fairy'], + bs: {hp: 75, at: 74, df: 87, sa: 62, sd: 89, sp: 63}, + weightkg: 25, + abilities: {0: 'Pixilate'}, + nfe: true, + }, Scovillain: { types: ['Grass', 'Fire'], bs: {hp: 65, at: 108, df: 65, sa: 108, sd: 65, sp: 75}, @@ -9806,21 +9811,21 @@ const SV_PATCH: {[name: string]: DeepPartial} = { 'Tauros-Paldea-Aqua': { types: ['Fighting', 'Water'], bs: {hp: 75, at: 110, df: 105, sa: 30, sd: 70, sp: 100}, - weightkg: 88.4, + weightkg: 110, abilities: {0: 'Intimidate'}, baseSpecies: 'Tauros', }, 'Tauros-Paldea-Blaze': { types: ['Fighting', 'Fire'], bs: {hp: 75, at: 110, df: 105, sa: 30, sd: 70, sp: 100}, - weightkg: 88.4, + weightkg: 85, abilities: {0: 'Intimidate'}, baseSpecies: 'Tauros', }, 'Tauros-Paldea-Combat': { types: ['Fighting'], bs: {hp: 75, at: 110, df: 105, sa: 30, sd: 70, sp: 100}, - weightkg: 88.4, + weightkg: 115, abilities: {0: 'Intimidate'}, baseSpecies: 'Tauros', }, @@ -9918,7 +9923,7 @@ const SV_PATCH: {[name: string]: DeepPartial} = { 'Wooper-Paldea': { types: ['Poison', 'Ground'], bs: {hp: 55, at: 45, df: 45, sa: 25, sd: 25, sp: 15}, - weightkg: 8.5, + weightkg: 11, abilities: {0: 'Poison Point'}, baseSpecies: 'Wooper', nfe: true, diff --git a/src/js/shared_controls.js b/src/js/shared_controls.js index f67292d8a..515a38d9e 100644 --- a/src/js/shared_controls.js +++ b/src/js/shared_controls.js @@ -167,6 +167,19 @@ $(".sl .dvs").keyup(function () { calcHP(poke); }); +function getForcedTeraType(pokemonName) { + if (startsWith(pokemonName, "Ogerpon-Cornerstone")) { + return "Rock"; + } else if (startsWith(pokemonName, "Ogerpon-Hearthflame")) { + return "Fire"; + } else if (pokemonName === "Ogerpon" || startsWith(pokemonName, "Ogerpon-Teal")) { + return "Grass"; + } else if (startsWith(pokemonName, "Ogerpon-Wellspring")) { + return "Water"; + } + return null; +} + function getHPDVs(poke) { return (~~poke.find(".at .dvs").val() % 2) * 8 + (~~poke.find(".df .dvs").val() % 2) * 4 + @@ -525,7 +538,7 @@ $(".set-selector").change(function () { } } } - pokeObj.find(".teraType").val(listTeraTypes[0] || pokemon.forceTeraType || pokemon.types[0]); + pokeObj.find(".teraType").val(listTeraTypes[0] || getForcedTeraType(pokemonName) || pokemon.types[0]); $(this).closest('.poke-info').find(".extraSetTeraTypes").text(listTeraTypes.join(', ')); } else { $(this).closest('.poke-info').find(".ability-pool").hide(); @@ -536,7 +549,7 @@ $(".set-selector").change(function () { if (regSets || randset) { var set = regSets ? correctHiddenPower(setdex[pokemonName][setName]) : randset; if (regSets) { - pokeObj.find(".teraType").val(set.teraType || pokemon.forceTeraType || pokemon.types[0]); + pokeObj.find(".teraType").val(set.teraType || getForcedTeraType(pokemonName) || pokemon.types[0]); } pokeObj.find(".level").val(set.level); pokeObj.find(".hp .evs").val((set.evs && set.evs.hp !== undefined) ? set.evs.hp : 0); @@ -586,7 +599,7 @@ $(".set-selector").change(function () { $(this).closest('.poke-info').find(".extraSetMoves").html(formatMovePool(setMoves)); } } else { - pokeObj.find(".teraType").val(pokemon.forceTeraType || pokemon.types[0]); + pokeObj.find(".teraType").val(getForcedTeraType(pokemonName) || pokemon.types[0]); pokeObj.find(".level").val(100); pokeObj.find(".hp .evs").val(0); pokeObj.find(".hp .ivs").val(31); @@ -696,8 +709,9 @@ function setSelectValueIfValid(select, value, fallback) { // Ogerpon mechs $(".teraToggle").change(function () { - if ($(".forme").is(":hidden")) return; - var curForme = $(".forme").val(); + var forme = $(this).parent().siblings().find(".forme"); + if (forme.is(":hidden")) return; + var curForme = forme.val(); if (!startsWith(curForme, "Ogerpon")) return; var container = $(this).closest(".info-group").siblings(); if ( @@ -706,12 +720,12 @@ $(".teraToggle").change(function () { ) return; if (this.checked) { var newForme = curForme === "Ogerpon" ? "Ogerpon-Teal-Tera" : curForme + "-Tera"; - $(".forme").val(newForme); + forme.val(newForme); container.find(".ability").val("Embody Aspect (" + newForme.split("-")[1] + ")"); return; } var newForme = curForme === "Ogerpon-Teal-Tera" ? "Ogerpon" : curForme.slice(0, -5); - $(".forme").val(newForme); + forme.val(newForme); container.find(".ability").val(pokedex[newForme].abilities[0]); }); @@ -730,7 +744,7 @@ $(".forme").change(function () { baseStat.keyup(); } if (startsWith($(this).val(), "Ogerpon") && endsWith($(this).val(), "Tera")) { - $(".teraToggle").prop("checked", true); + $(this).parent().siblings().find(".teraToggle").prop("checked", true); } var isRandoms = $("#randoms").prop("checked"); var pokemonSets = isRandoms ? randdex[pokemonName] : setdex[pokemonName]; @@ -748,8 +762,9 @@ $(".forme").change(function () { container.find(".ability").val(chosenSet.abilities[0]); } } - if (isAltForme && altForme.forceTeraType) { - $(".teraType").val(altForme.forceTeraType); + var forcedTeraType = getForcedTeraType($(this).val()); + if (forcedTeraType) { + $(this).parent().siblings().find(".teraType").val(forcedTeraType); } container.find(".ability").keyup(); if (startsWith($(this).val(), "Ogerpon-") && !startsWith($(this).val(), "Ogerpon-Teal")) {