diff --git a/index.html b/index.html index 6b06619..69810cb 100644 --- a/index.html +++ b/index.html @@ -50,6 +50,9 @@
+

更新:

+

12/31/2023: 更新朱紫DLC2 [蓝之圆盘] 的新宝可梦+招式! +

使用说明:

搜索宝可梦名称:内置输入法支持,可以输入中文、拼音、英文、拼音缩写或者别名拼音。例如烈咬陆鲨可以输入"烈咬陆鲨","lieyaolusha","garchomp","lyls",或"dilong"。

@@ -387,10 +390,7 @@

宝可梦#1

- + +
@@ -444,10 +445,7 @@

宝可梦#1

- + +
@@ -501,10 +500,7 @@

宝可梦#1

- + +
@@ -558,10 +555,7 @@

宝可梦#1

- + +
@@ -660,28 +655,28 @@

-
- - +
+ +
- - + +
-
+
-                   +                     
-       - +           +

-
+
@@ -769,7 +764,7 @@

-
+
@@ -835,10 +830,10 @@

- +
- +
@@ -1166,10 +1161,7 @@

宝可梦#2

- + +
@@ -1223,10 +1216,7 @@

宝可梦#2

- + +
@@ -1280,10 +1271,7 @@

宝可梦#2

- + +
@@ -1337,10 +1326,7 @@

宝可梦#2

- + +
@@ -1426,7 +1413,7 @@

原作者信息:

- + @@ -1446,7 +1433,7 @@

原作者信息:

- + diff --git a/index_ch.html b/index_ch.html deleted file mode 100644 index 57180af..0000000 --- a/index_ch.html +++ /dev/null @@ -1,1456 +0,0 @@ - - - - - - - - - 宝可梦伤害计算器 - - - - - - - - -
-
-
-
-
-
-
- 宝可梦伤害计算器-VGC2024版 - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-

使用说明:

-

搜索宝可梦名称:内置输入法支持,可以输入中文、拼音、英文、拼音缩写或者别名拼音。例如烈咬陆鲨可以输入"烈咬陆鲨","lieyaolusha","garchomp","lyls",或"dilong"。 -

-

搜索招式名称:可以输入任意招式内汉字,或者(仅支持剑盾为止技能)中文、拼音、英文、招式属性。例如搜索雷电拳可以输入"雷","电","拳","leidian","thunder"。 -

-

剑盾/朱紫默认仅包括游戏里可以使用的精灵。如果需要计算别的请点击"全国图鉴"。 -

- 问题反馈: - Github -
-
-
-
宝可梦#1的招式(选择一个查看详细结果)
-
??? - ???%
-
??? - ???%
-
??? - ???%
-
??? - ???%
-
-
-
宝可梦#2的招式(选择一个查看详细结果)
-
??? - ???%
-
??? - ???%
-
??? - ???%
-
??? - ???%
-
-
-
-
加载中...
-
(如果此条信息长时间显示,请尝试启用JavaScript,或者删除cookies)
-
-
-
-

宝可梦#1

-
-
- -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
种族值个体值努力值动态值
341
236
236
236
236
236
236236
  
-
-
-
- - -
-
- - - - - - -
-
- - -
-
- - - -
-
-
- - /341 (%) - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
- -
- - - -
-
-
-
-
-

- 场地 -
- 等级设定为: -
- - -
-
-

-
-
- -
- - -
-
- - - - - -
-
-
- - - - - - -
-
- - - -
-
- - - - -
-
- - - -
-
- - -
- - -
-
-
-                   -
- -
-       - -
-
-
- -
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- - -
-
- - -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- - - - -
-
- - - - -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
- -

请输入你的自定义配置.

- 命名: -
- -
- -

你可能需要在删除你的配置后刷新页面。 如果遇到BUG,请尝试清除Cookies或者汇报错误!

-
-
-
-
-

宝可梦#2

-
-
- -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
种族值个体值努力值动态值
341
236
236
236
236
236
236236
  
-
-
-
- - -
-
- - - - - + - -
-
- - -
-
- - - -
-
-
- - /341 (%) - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - -
- -
- - - -
-
-
- -
-

中文翻译信息:

-

MEI+hdongZ进行初始版本汉化,ProfessorSidon进行剑盾D L C/朱紫版本汉化及维护。 -

-

原作者信息:

-

VGC 2024 calculator maintainenance by Alex Collins (@nerd_of_now). Basis of the calculator by Jake White (@squirrelboydev). -

- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/index_en.html b/index_en.html deleted file mode 100644 index 4830454..0000000 --- a/index_en.html +++ /dev/null @@ -1,704 +0,0 @@ - - - - - - - - - - - - Pokémon Damage Calculator - - - - - - - - -
-
- VGC 2024: Scarlet & Violet Damage Calculator - - - - - - - - - - - -
-
-



- - - -

VGC 2024 calculator maintainenance by Alex Collins (@nerd_of_now). Basis of the calculator by Jake White (@squirrelboydev).

-

The first wave of Pokémon Scarlet and Violet DLC, the Teal Mask, is out now! We are working on optimizing this calculator for the new games. -
This calculator contains spoilers for the Teal Mask DLC. This includes Pokémon, moves, abilities, and items. Use at your own discretion.

-

Is there an important or relevant set missing? Give us your suggestion!

- -

If you like what we do here, please consider supporting us on Buy Me a Coffee! -
For any issues with or other suggestions for this version of the Damage Calculator, contact Alex on Github or Twitter.

- - - - - -
-
-
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. If you have that enabled, try deleting your cookies. Otherwise, I won't be able to help you unless you send a screenshot of your browser console [Ctrl+Shift+I on Google Chrome].)
-
-
-

Pokémon 1

-
- -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - -
BaseIVsEVsDVs
341
236
236
236
236
236
236236
  
-
-
-
- - -
-
- - - - - - -
-
- - -
-
- - - -
-
-
- - /341 (%) - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
- -
- - - -
-
-
-
-
-

- Field -
- Auto-Level to: -
- - -
-
-

-
-
- -
- - -
-
- - - - - -
-
-
- - - - - - -
-
- - - -
-
- - - - -
-
- - - -
-
- - -
- - -
-
-
-                   -
- -
-       - -
-
- -
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- - -
-
- - -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- - - - -
-
- - - - -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
- -

Please enter your custom set here.

- Spread Name: -
- -
- -

You may need to refresh the page after deleting your custom sets. If you encounter a bug, please try deleting your cookies or reporting it!

-
-
-
-

Pokémon 2

-
- -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - - - - - - - - -
BaseIVsEVsDVs
341
236
236
236
236
236
236236
  
-
-
-
- - -
-
- - - - - - -
-
- - -
-
- - - -
-
-
- - /341 (%) - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
- -
- - - -
-
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/script_res/ability_data.js b/script_res/ability_data.js index 43361f9..502d558 100644 --- a/script_res/ability_data.js +++ b/script_res/ability_data.js @@ -329,9 +329,14 @@ var ABILITIES_SV = ABILITIES_SS.concat([ //Teal Mask DLC new additions "Mind's Eye", //Ignores evasion/accuracy and is Scrappy w/o Intimidate immunity 'Supersweet Syrup', //Intimidate but with evasion and only once - 'Hospitality', //Heals HP, needs more info but probably has no calc functionality + 'Hospitality', //Heals ally's HP, no calc functionality 'Toxic Chain', //Poison Touch but with badly poisoned instead, no calc functionality 'Embody Aspect', //Boosts Ogerpon's stats based on mask, needs for info for what kind of boost and how much + //Indigo Disk new additions + 'Tera Shift', //Transforms Terapagos into Tera form + 'Tera Shell', //Max HP means all attacks are not very effective + 'Teraform Zero', //Removes weather and terrain + 'Poison Puppeteer', //Poisoning also confuses, no calc funcitonality ]); //ABILITIES_XY.splice(ABILITIES_XY.indexOf('Lightning Rod'), 1, 'Lightning Rod'); diff --git a/script_res/ap_calc.css b/script_res/ap_calc.css index 474cacd..5f87e4b 100644 --- a/script_res/ap_calc.css +++ b/script_res/ap_calc.css @@ -79,6 +79,9 @@ th { .btn-xxxwide { width: 10em; } +.btn-xxxxwide { + width: 11em; +} .btn-medium { width: 4.4em; } @@ -201,7 +204,7 @@ select.ability-supreme, select.ability-proto-quark { select.toxic-counter { width: 4.5em; } -.move-selector, .move-bp, .move-type, .move-cat, .move-hits, .move-double, .move-hits2, .move-hits3, .move-pledge, .move-10hits, .move-lastRespRageFist { +.move-selector, .move-bp, .move-type, .move-cat, .move-hits, .move-double, .move-stellar, .move-hits2, .move-hits3, .move-pledge, .move-10hits, .move-linearAddedBP, .move-opponent { font-size: 0.9em; } .move-selector { @@ -214,10 +217,10 @@ select.toxic-counter { .poke-info input.move-bp { width: 2em; } -.move-cat/*, .move-hits*/, .move-lastRespRageFist { +.move-cat, .move-linearAddedBP { width: 4em; } -.move-hits, .move-double, .move-hits2, .move-hits3, .move-pledge, .move-10hits { +.move-hits, .move-double, .move-stellar, .move-hits2, .move-hits3, .move-pledge, .move-10hits, .move-opponent { width: 4.6em; } .abilityToggle, .ability-advanced{ @@ -331,4 +334,4 @@ select.toxic-counter { #mainResult { visibility: visible; cursor: pointer; -} \ No newline at end of file +} diff --git a/script_res/ap_calc.js b/script_res/ap_calc.js index 6ca8b6c..d3feb46 100644 --- a/script_res/ap_calc.js +++ b/script_res/ap_calc.js @@ -45,6 +45,7 @@ $(".tera").bind("keyup change", function () { var poke = $(this).closest(".poke-info"); calcHP(poke); calcStats(poke); + teraStellarBtns(poke, $(this).prop("checked"), poke.find(".tera-type").val() === 'Stellar'); }); $(".nature").bind("keyup change", function() { calcStats($(this).closest(".poke-info")); @@ -157,6 +158,26 @@ $(".percent-hp").keyup(function() { calcCurrentHP($(this).parent(), max, percent); }); +$(".tera-type").bind("keyup change", function () { + var poke = $(this).closest(".poke-info"); + teraStellarBtns(poke, poke.find(".tera").prop("checked"), $(this).val() === 'Stellar') +}); + +function teraStellarBtns(poke, isTera, isStellar) { + if (isTera && isStellar && poke.find("input.set-selector").val().indexOf('Terapagos') === -1) { + for (i = 1; i <= 4; i++) { + poke.find(".move" + i + " .stellar-btn").show(); + poke.find(".move" + i + " .move-stellar").prop("checked", true); + } + } + else { + for (i = 1; i <= 4; i++) { + poke.find(".move" + i + " .stellar-btn").hide(); + poke.find(".move" + i + " .move-stellar").prop("checked", false); + } + } +} + var lastAura = [false, false, false] var manualProtoQuark; $(".ability").bind("keyup change", function () { @@ -280,31 +301,30 @@ function autoSetRuin() { else $("input:checkbox[id='beads-of-ruin']").prop("checked", false) } -function autoSetTerrain() -{ +function autoSetTerrain() { var ability1 = $("#p1 select.ability").val() var ability2 = $("#p2 select.ability").val() var abOn1 = $("#p1").find(".abilityToggle").prop("checked") var abOn2 = $("#p2").find(".abilityToggle").prop("checked") //Grassy Terrain check is first due to the need to check for abilityToggle with Seed Sower - if ((ability1 == "Grassy Surge" || ability2 == "Grassy Surge" || (ability1 == "Seed Sower" && abOn1) || (ability2 == "Seed Sower" && abOn2))) { - $("input:radio[id='grassy']").prop("checked", true) + if ([ability1, ability2].indexOf("Grassy Surge") !== -1 || (ability1 == "Seed Sower" && abOn1) || (ability2 == "Seed Sower" && abOn2)) { + $("input:radio[id='grassy']").prop("checked", true); lastTerrain = 'grassy'; } - else if ((["Electric Surge", "Hadron Engine"].indexOf(ability1) !== -1 || ["Electric Surge", "Hadron Engine"].indexOf(ability2) !== -1)) { - $("input:radio[id='electric']").prop("checked", true) + else if ([ability1, ability2].indexOf("Electric Surge") != -1 || [ability1, ability2].indexOf("Hadron Engine") != -1) { + $("input:radio[id='electric']").prop("checked", true); lastTerrain = 'electric'; } - else if((ability1 == "Misty Surge" || ability2 == "Misty Surge")){ - $("input:radio[id='misty']").prop("checked", true) + else if ([ability1, ability2].indexOf("Misty Surge") !== -1) { + $("input:radio[id='misty']").prop("checked", true); lastTerrain = 'misty'; } - else if((ability1 == "Psychic Surge" || ability2 == "Psychic Surge")){ - $("input:radio[id='psychic']").prop("checked", true) + else if ([ability1, ability2].indexOf("Psychic Surge") !== -1) { + $("input:radio[id='psychic']").prop("checked", true); lastTerrain = 'psychic'; } else - $("input:radio[id='noterrain']").prop("checked", true) + $("input:radio[id='noterrain']").prop("checked", true); } function autosetWeather(ability, i, abOn) { @@ -489,8 +509,8 @@ $(".move-selector").change(function() { moveGroupObj.children(".move-10hits").hide(); } - if (move.canDouble) moveGroupObj.children(".move-double").show(); - else moveGroupObj.children(".move-double").hide(); + if (move.canDouble) moveGroupObj.children(".double-btn").show(); + else moveGroupObj.children(".double-btn").hide(); if (move.oneTwoHit) moveGroupObj.children(".move-hits2").show(); else moveGroupObj.children(".move-hits2").hide(); @@ -498,12 +518,12 @@ $(".move-selector").change(function() { if (move.linearAddBP) moveGroupObj.children(".move-linearAddedBP").show(); else moveGroupObj.children(".move-linearAddedBP").hide(); - //if (move.usesOppMoves) { - // getOppMoves($(this).closest(".poke-info").attr("id"), moveGroupObj); - // moveGroupObj.children(".move-opponent").show(); - //} else { - // moveGroupObj.children(".move-opponent").hide(); - //} + if (move.usesOppMoves) { //for when the attacker's moves change + getOppMoves($(this).closest(".poke-info").attr("id"), moveGroupObj); + moveGroupObj.children(".move-opponent").show(); + } else { + moveGroupObj.children(".move-opponent").hide(); + } if (move.isTripleHit) { moveGroupObj.children(".move-hits3").show(); @@ -521,7 +541,7 @@ $(".move-selector").change(function() { //SLOPPY WAY OF HANDLING glaiveRushCheck(moveGroupObj); - //getOppMoves($(this).closest(".poke-info").attr("id")); + getOppMoves($(this).closest(".poke-info").attr("id")); //for when the defender's moves change }); function getOppMoves(pokID, moveGroupObj) { @@ -602,6 +622,8 @@ $(".set-selector").change(function() { var set = setdex[pokemonName][setName]; if (setdexCustom !== [] && pokemonName in setdexCustom && setName in setdexCustom[pokemonName]) $(this).closest(".poke-info").find(".setCalc").val(setName); + else + $(this).closest(".poke-info").find(".setCalc").val("My Calc Set"); if(DOU) pokeObj.find(".level").val(100); else pokeObj.find(".level").val(set.level); pokeObj.find(".hp .evs").val((set.evs && typeof set.evs.hp !== "undefined") ? set.evs.hp : 0); @@ -654,6 +676,7 @@ $(".set-selector").change(function() { } pokeObj.find(".max").prop("checked", false); pokeObj.find(".tera").prop("checked", false); + pokeObj.find(".tera").change(); calcHP(pokeObj); calcStats(pokeObj); calcEvTotal(pokeObj); @@ -685,7 +708,7 @@ function showFormes(formeObj, setName, pokemonName, pokemon) { } } - if (pokemonName === "Palafin") + if (pokemonName === "Palafin" || pokemonName === "Terapagos") defaultForme = 1; else if (gen == 8 && !defaultForme && gmaxDefaults.indexOf(pokemonName) != -1) defaultForme = pokedex[pokemonName].formes.indexOf(pokemonName + "-Gmax"); @@ -914,6 +937,7 @@ function findDamageResult(resultMoveObj) { } } +var terapagosCheck = {"p1": false, "p2": false}; function Pokemon(pokeInfo) { var setName = pokeInfo.find("input.set-selector").val(); @@ -921,7 +945,7 @@ function Pokemon(pokeInfo) { this.name = setName; } else { var pokemonName = setName.substring(0, setName.indexOf(" (")); - this.name = (pokedex[pokemonName].formes) ? pokeInfo.find(".forme").val() : pokemonName; + this.name = (pokedex[pokemonName] && pokedex[pokemonName].formes) ? pokeInfo.find(".forme").val() : pokemonName; } //Check for form-item coordination @@ -949,7 +973,7 @@ function Pokemon(pokeInfo) { pokeInfo.find(".max").prop("disabled", false); } - //Check for Tera form (ability only for now, should probably be changed to a different form with Terapagos coming in the next DLC) + //Check for Tera form (ability only for now, should probably be changed to a different form with Terapagos coming in the next DLC) edit: nope lol if (this.name && this.name.indexOf('Ogerpon') !== -1) { var mask = pokeInfo.find("select.item").val().substring(0, pokeInfo.find("select.item").val().indexOf(" Mask")); @@ -958,6 +982,8 @@ function Pokemon(pokeInfo) { : mask === 'Hearthflame' ? 'Fire' : mask === 'Cornerstone' ? 'Rock' : 'Grass'; + //pokeInfo.find(".type1").val(pokedex['Ogerpon-' + mask].t1); + //pokeInfo.find(".type2").val(pokedex['Ogerpon-' + mask].t2); pokeInfo.find(".tera-type").val(maskTera); pokeInfo.find(".tera-type").prop("disabled", true); if (pokeInfo.find(".tera").prop("checked")) { @@ -969,9 +995,64 @@ function Pokemon(pokeInfo) { pokeInfo.find("select.ability").trigger('change.select2'); } } + terapagosCheck[pokeInfo.prop('id')] = false; + pokeInfo.find(".tera").prop("disabled", false); + } + else if (this.name && this.name.indexOf('Terapagos') !== -1) { + pokeInfo.find(".tera-type").val('Stellar'); + pokeInfo.find(".tera-type").prop("disabled", true); + if (this.name === 'Terapagos-Terastal') { + pokeInfo.find(".tera").prop("disabled", false); + if (pokeInfo.find(".tera").prop("checked")) { + this.name = 'Terapagos-Stellar'; + if (!terapagosCheck[pokeInfo.prop('id')]) { + pokeInfo.find(".type1").val(pokedex['Terapagos-Stellar'].t1); + pokeInfo.find(".type2").val(pokedex['Terapagos-Stellar'].t2); + pokeInfo.find(".hp .base").val(pokedex['Terapagos-Stellar'].bs.hp); + pokeInfo.find(".at .base").val(pokedex['Terapagos-Stellar'].bs.at); + pokeInfo.find(".df .base").val(pokedex['Terapagos-Stellar'].bs.df); + pokeInfo.find(".sa .base").val(pokedex['Terapagos-Stellar'].bs.sa); + pokeInfo.find(".sd .base").val(pokedex['Terapagos-Stellar'].bs.sd); + pokeInfo.find(".sp .base").val(pokedex['Terapagos-Stellar'].bs.sp); + calcHP(pokeInfo); + calcStats(pokeInfo); + pokeInfo.find(".weight").val(pokedex['Terapagos-Stellar'].w); + pokeInfo.find("select.ability").val(pokedex['Terapagos-Stellar'].ab); + pokeInfo.find("select.ability").trigger('change.select2'); + terapagosCheck[pokeInfo.prop('id')] = true; + } + pokeInfo.find(".forme").prop("disabled", true); + } + else { + this.name = 'Terapagos-Terastal'; + if (terapagosCheck[pokeInfo.prop('id')]) { + pokeInfo.find(".type1").val(pokedex['Terapagos-Terastal'].t1); + pokeInfo.find(".type2").val(pokedex['Terapagos-Terastal'].t2); + pokeInfo.find(".hp .base").val(pokedex['Terapagos-Terastal'].bs.hp); + pokeInfo.find(".at .base").val(pokedex['Terapagos-Terastal'].bs.at); + pokeInfo.find(".df .base").val(pokedex['Terapagos-Terastal'].bs.df); + pokeInfo.find(".sa .base").val(pokedex['Terapagos-Terastal'].bs.sa); + pokeInfo.find(".sd .base").val(pokedex['Terapagos-Terastal'].bs.sd); + pokeInfo.find(".sp .base").val(pokedex['Terapagos-Terastal'].bs.sp); + calcHP(pokeInfo); + calcStats(pokeInfo); + pokeInfo.find(".weight").val(pokedex['Terapagos-Terastal'].w); + pokeInfo.find("select.ability").val(pokedex['Terapagos-Terastal'].ab); + pokeInfo.find("select.ability").trigger('change.select2'); + terapagosCheck[pokeInfo.prop('id')] = false; + } + pokeInfo.find(".forme").prop("disabled", false); + } + } + else { + pokeInfo.find(".tera").prop("disabled", true); + } } else { pokeInfo.find(".tera-type").prop("disabled", false); + pokeInfo.find(".forme").prop("disabled", false); + terapagosCheck[pokeInfo.prop('id')] = false; + pokeInfo.find(".tera").prop("disabled", false); } this.type1 = pokeInfo.find(".type1").val(); @@ -1008,7 +1089,7 @@ function Pokemon(pokeInfo) { ]; this.glaiveRushMod = pokeInfo.find(".glaive-rush").prop("checked"); this.weight = +pokeInfo.find(".weight").val(); - this.canEvolve = pokedex[pokemonName].canEvolve; + this.canEvolve = pokedex[pokemonName] ? pokedex[pokemonName].canEvolve : false; } @@ -1029,11 +1110,12 @@ function getMoveDetails(moveInfo, maxMon) { : (defaultDetails.isThreeHit && !moveInfo.find(".move-z").prop("checked") && !maxMon) ? 3 : (moveName == "Beat Up" && !moveInfo.find(".move-z").prop("checked") && !maxMon) ? 4 : 1, - isDouble: (defaultDetails.canDouble && !moveInfo.find(".move-z").prop("checked") && !maxMon) ? ~~moveInfo.find(".move-double").val() : 0, + isDouble: (defaultDetails.canDouble && !moveInfo.find(".move-z").prop("checked") && !maxMon && moveInfo.find(".move-double").prop("checked")) ? 1 : 0, tripleHits: (defaultDetails.isTripleHit && !moveInfo.find(".move-z").prop("checked") && !maxMon) ? ~~moveInfo.find(".move-hits3").val() : 0, combinePledge: (moveName.includes(" Pledge") && !moveInfo.find(".move-z").prop("checked") && !maxMon) ? moveInfo.find(".move-pledge").val() : 0, timesAffected: (defaultDetails.linearAddBP && !moveInfo.find(".move-z").prop("checked") && !maxMon) ? ~~moveInfo.find(".move-linearAddedBP").val() : 0, - //usedOppMove: ~~moveInfo.find(".move-opponent").val(), + usedOppMove: moveInfo.find(".move-opponent option:selected").text(), + getsStellarBoost: moveInfo.find(".move-stellar").prop("checked"), }); } @@ -1084,6 +1166,9 @@ function Field() { this.clearWeather = function() { weather = ""; }; + this.clearTerrain = function () { + terrain = ""; + }; this.getSide = function (i) { return new Side(format, terrain, weather, isGravity, isSR[i], spikes[i], isReflect[i], isLightScreen[i], isForesight[i], isHelpingHand[i], isFriendGuard[i], isBattery[i], isProtect[i], isPowerSpot[i], isSteelySpirit[i], isNeutralizingGas, isGMaxField[i], isFlowerGiftSpD[i], isFlowerGiftAtk[i], isTailwind[i], isSaltCure[i], isAuroraVeil[i]); }; @@ -1118,6 +1203,7 @@ var gen, pokedex, setdex, setdexCustom, typeChart, moves, abilities, items, STAT $(".gen").change(function () { gen = ~~$(this).val(); + localStorage.setItem("gen", gen); loadSVColors(document.getElementById('switchTheme').value); // @@ -1178,12 +1264,12 @@ $(".gen").change(function () { pokedex = POKEDEX_BW; setdex = SETDEX_BW; setdexCustom = SETDEX_CUSTOM_BW; - typeChart = TYPE_CHART_GSC; + typeChart = TYPE_CHART_BW; moves = MOVES_BW; items = ITEMS_BW; abilities = ABILITIES_BW; STATS = STATS_GSC; - calculateAllMoves = CALCULATE_ALL_MOVES_BW; + calculateAllMoves = CALCULATE_ALL_MOVES_XY; calcHP = CALC_HP_ADV; calcStat = CALC_STAT_ADV; break; @@ -1230,7 +1316,7 @@ $(".gen").change(function () { pokedex = (localStorage.getItem("dex") == "natdex") ? POKEDEX_SV_NATDEX : POKEDEX_SV; setdex = SETDEX_SV; setdexCustom = SETDEX_CUSTOM_SV; - typeChart = TYPE_CHART_XY; + typeChart = TYPE_CHART_SV; moves = (localStorage.getItem("dex") == "natdex") ? MOVES_SV_NATDEX : MOVES_SV; items = (localStorage.getItem("dex") == "natdex") ? ITEMS_SV_NATDEX : ITEMS_SV; abilities = ABILITIES_SV; @@ -1250,25 +1336,53 @@ $(".gen").change(function () { $('label[for="zL' + i + '"]').show(); $('label[for="zR' + i + '"]').show(); } + $('div #primal-weather').show(); } else { for (i = 1; i <= 4; i++) { $('label[for="zL' + i + '"]').hide(); $('label[for="zR' + i + '"]').hide(); } + $('div #primal-weather').hide(); } } $("select.type1, select.move-type, select.tera-type").find("option").remove().end().append(typeOptions); $("select.type2").find("option").remove().end().append("" + typeOptions); var moveOptions = getSelectOptions(Object.keys(moves), true, undefined, translate_move); + + if (gen >= 9) { + if (localStorage.getItem("dex") == "natdex") { + $('div #auras').show(); + $('div #protect-field').show(); + $('div #flower-gift').show(); + } + else { + $('div #auras').hide(); + $('div #protect-field').hide(); + $('div #flower-gift').hide(); + } + } + var types = Object.keys(typeChart); + types.splice(types.indexOf('Typeless'), 1); + var teraTypes = $.extend(true, [], types); + if (gen >= 2) types.push('Typeless'); + types.splice(types.indexOf('Stellar'), 1); + var typeOptions = getSelectOptions(types, undefined, undefined, translate_type); + var teraTypeOptions = getSelectOptions(teraTypes, undefined, undefined, translate_type); + $("select.type1, select.move-type").find("option").remove().end().append(typeOptions); + $("select.type2").find("option").remove().end().append("" + typeOptions); + $("select.tera-type").find("option").remove().end().append(teraTypeOptions); + var moveOptions = getSelectOptions(Object.keys(moves), true, undefined, translate_move); $("select.move-selector").find("option").remove().end().append(moveOptions); var abilityOptions = getSelectOptions(abilities, true, undefined, translate_ability); $("select.ability").find("option").remove().end().append("" + abilityOptions); var itemOptions = getSelectOptions(items, false, undefined, translate_item); $("select.item").find("option").remove().end().append("" + itemOptions); - $(".set-selector").val(getSetOptions()[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); - $(".set-selector").change(); + $("#p1 .set-selector").val(getSetOptions("#p1")[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); + $("#p1 .set-selector").change(); + $("#p2 .set-selector").val(getSetOptions("#p2")[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); + $("#p2 .set-selector").change(); }); function clearField() { @@ -1319,7 +1433,7 @@ function clearField() { $("#auroraVeilR").prop("checked", false); } -function getSetOptions() { +function getSetOptions(p) { var pokeNames, index; pokeNames = Object.keys(pokedex); index = pokeNames.length; @@ -1336,14 +1450,15 @@ function getSetOptions() { pokeNames.sort((a, b) => translate_pokemon(a).localeCompare(translate_pokemon(b))); var setOptions = []; var idNum = 0; + var setdexUsed = $(p + " .set-toggle").prop("checked") && gen >= 5 ? setdexCustom : setdex; for (var i = 0; i < pokeNames.length; i++) { var pokeName = pokeNames[i]; setOptions.push({ pokemon: pokeName, text: translate_pokemon(pokeName) }); - if (pokeName in setdex) { - var setNames = Object.keys(setdex[pokeName]); + if (pokeName in setdexUsed) { + var setNames = Object.keys(setdexUsed[pokeName]); for (var j = 0; j < setNames.length; j++) { var setName = setNames[j]; setOptions.push({ @@ -1384,17 +1499,25 @@ function getSelectOptions(arr, sort, defaultIdx, transFunc) { return r; } -$(document).ready(function() { - $("#gen9").prop("checked", true); - $("#gen9").change(); - $(".terrain-trigger").bind("change keyup", getTerrainEffects); - $(".calc-trigger").bind("change keyup", calculate); - $(".set-selector").select2({ - formatResult: function(object) { +function getGen() { + var genLocalStor = localStorage.getItem("gen"); + if (genLocalStor) { + $("#gen" + genLocalStor).prop("checked", true); + $("#gen" + genLocalStor).change(); + } + else { + $("#gen9").prop("checked", true); + $("#gen9").change(); + } +} + +function setStartup(p) { + $(p + " .set-selector").select2({ + formatResult: function (object) { return object.set ? ("   " + object.set) : ("" + object.text + ""); }, - query: function(query) { - var setOptions = getSetOptions(); + query: function (query) { + var setOptions = getSetOptions(p); var pageSize = 30; var results = []; for (var i = 0; i < setOptions.length; i++) { @@ -1413,11 +1536,20 @@ $(document).ready(function() { more: results.length >= query.page * pageSize }); }, - initSelection: function(element, callback) { - var data = getSetOptions()[gen > 3 ? 1 : gen === 1 ? 5 : 3]; + initSelection: function (element, callback) { + var data = getSetOptions(p)[gen > 3 ? 1 : gen === 1 ? 5 : 3]; callback(data); } }); +} + +$(document).ready(function () { + $(".stellar-btn").hide(); + getGen(); + $(".terrain-trigger").bind("change keyup", getTerrainEffects); + $(".calc-trigger").bind("change keyup", calculate); + setStartup("#p1"); + setStartup("#p2"); $(".move-selector").select2({ dropdownAutoWidth:true, matcher: function(term, text, option) { @@ -1444,6 +1576,8 @@ $(document).ready(function() { return text.toUpperCase().indexOf(term.toUpperCase()) === 0 || text.toUpperCase().indexOf(" " + term.toUpperCase()) >= 0; } }); - $(".set-selector").val(getSetOptions()[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); - $(".set-selector").change(); + $("#p1 .set-selector").val(getSetOptions("#p1")[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); + $("#p1 .set-selector").change(); + $("#p2 .set-selector").val(getSetOptions("#p2")[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); + $("#p2 .set-selector").change(); }); diff --git a/script_res/damage_MASTER.js b/script_res/damage_MASTER.js index 73e0b04..92f53b3 100644 --- a/script_res/damage_MASTER.js +++ b/script_res/damage_MASTER.js @@ -12,7 +12,7 @@ function GET_DAMAGE_HANDLER(attacker, defender, move, field) { case 4: return CALCULATE_DAMAGE_DPP(attacker, defender, move, field); case 5: - return GET_DAMAGE_BW(attacker, defender, move, field); + //return GET_DAMAGE_BW(attacker, defender, move, field); case 6: return GET_DAMAGE_XY(attacker, defender, move, field); case 7: @@ -36,6 +36,9 @@ function buildDescription(description) { } output += description.attackBoost + " "; } + if (description.attackerLevel) { + output = output + 'Lv. ' + description.attackerLevel + ' '; + } output = appendIfSet(output, description.attackEVs); //output = appendIfSet(output, description.attackerItem); //output = appendIfSet(output, description.attackerAbility); @@ -83,7 +86,10 @@ function buildDescription(description) { // translated output += "[" + translate_ability("Flower Gift") + "] "; } - output += description.moveName + " "; + if (description.meFirst) { + output += translate_move("Me First") + " "; + } + output += translate_move(description.moveName) + " "; if (description.moveBP && description.moveType) { //output += "(" + description.moveBP + " BP " + description.moveType + ") "; // translated @@ -111,7 +117,10 @@ function buildDescription(description) { output += "(太晶化补足60威力) " } if (description.maskBoost) { - output += "(1.2x Mask Boost) " + output += "(1.2x 面具加成) " + } + if (description.stellarBoost) { + output += "(首次威力加成) " } output += "vs. "; if (description.defenseBoost) { @@ -120,9 +129,12 @@ function buildDescription(description) { } output += description.defenseBoost + " "; } + if (description.defenderLevel) { + output = output + 'Lv. ' + description.defenderLevel + ' '; + } output = appendIfSet(output, description.HPEVs); if (description.defenseEVs) { - output += " / " + description.defenseEVs + " "; + output += "/ " + description.defenseEVs + " "; } //output = appendIfSet(output, description.defenderItem); // translated @@ -223,8 +235,22 @@ function chainMods(mods) { return M; } -function getMoveEffectiveness(move, type, otherType, isGhostRevealed, isGravity, defItem, isStrongWinds) { - if (isGhostRevealed && type === "Ghost" && (move.type === "Normal" || move.type === "Fighting")) { +function addLevelDesc(attacker, defender, description) { + autoLevel = $('#douswitch').is(':checked') ? 50 : 100; + if (attacker.level !== autoLevel) + description.attackerLevel = attacker.level; + if (defender.level !== autoLevel) + description.defenderLevel = defender.level; +} + +function getMoveEffectiveness(move, type, otherType, isGhostRevealed, isGravity, defItem, isStrongWinds, isTeraShell, defIsTera) { + if (isTeraShell && typeChart[move.type][type] >= 0.5) { + return 0.5; + } + else if (move.type == "Stellar" && defIsTera) { + return 2; + } + else if (isGhostRevealed && type === "Ghost" && (move.type === "Normal" || move.type === "Fighting")) { return 1; } else if ((isGravity || defItem == "Iron Ball" || move.name == "Thousand Arrows") && type === "Flying" && move.type === "Ground") { return 1; @@ -334,7 +360,7 @@ function checkTrace(source, target) { function checkNeutralGas(p1, p2, isNGas) { var cannotSupress = ['As One', 'Battle Bond', 'Comatose', 'Disguise', 'Gulp Missile', 'Ice Face', 'Multitype', - 'Power Construct', 'Protosynthesis', 'Quark Drive', 'RKS System', 'Schooling', 'Shields Down', 'Stance Change', 'Zero to Hero']; + 'Power Construct', 'RKS System', 'Schooling', 'Shields Down', 'Stance Change', 'Zero to Hero']; if (isNGas) { if (cannotSupress.indexOf(p1.ability) == -1 && p1.item !== 'Ability Shield') p1.ability = ''; if (cannotSupress.indexOf(p2.ability) == -1 && p2.item !== 'Ability Shield') p2.ability = ''; @@ -342,9 +368,13 @@ function checkNeutralGas(p1, p2, isNGas) { } function checkAirLock(pokemon, field) { - if (pokemon.ability === "Air Lock" || pokemon.ability === "Cloud Nine") { + if (['Air Lock', 'Cloud Nine'].indexOf(pokemon.ability) !== -1) { field.clearWeather(); } + else if (pokemon.ability === 'Teraform Zero') { + field.clearWeather(); + field.clearTerrain(); + } } function checkForecast(pokemon, weather) { @@ -373,15 +403,17 @@ function checkMimicry(pokemon, terrain) { } function checkTerastal(pokemon) { - if (pokemon.isTerastalize) { + if (pokemon.isTerastalize && pokemon.tera_type !== 'Stellar') { + pokemon.teraSTAB1 = pokemon.type1; + pokemon.teraSTAB2 = pokemon.type2; pokemon.type1 = pokemon.tera_type; pokemon.type2 = ''; } } function checkKlutz(pokemon) { - if (pokemon.ability === "Klutz") { - pokemon.item = ""; + if (pokemon.ability === "Klutz" && ['Macho Brace', 'Power Anklet', 'Power Band', 'Power Belt', 'Power Bracer', 'Power Lens', 'Power Weight'].indexOf(pokemon.item) === -1 ) { + pokemon.item = "Klutz"; } } @@ -394,6 +426,20 @@ function checkSeeds(pokemon, terrain) { } } +//function checkConsumedItem(pokemon, terrain) { +// if (pokemon.item === terrain + ' Seed') { +// if (['Electric', 'Grassy'].indexOf(terrain) !== -1) +// pokemon.boosts[DF] = Math.min(6, pokemon.boosts[DF] + 1); +// else +// pokemon.boosts[SD] = Math.min(6, pokemon.boosts[SD] + 1); +// pokemon.item = ''; +// } +// else if (pokemon.item === 'Booster Energy' +// && (pokemon.ability === 'Protosynthesis' && weather !== 'Sun') || (pokemon.ability === 'Quark Drive' && terrain !== 'Electric')) { +// pokemon.item = ''; +// } +//} + function checkSupersweetSyrup(source, target) { if (source.ability === 'Supersweet Syrup' && source.abilityOn) { if (target.ability === "Defiant") { @@ -581,11 +627,15 @@ function checkMoveTypeChange(move, field, attacker) { 'Typeless'; } else if (move.name.includes(" Pledge") && move.name !== move.combinePledge) { var bothPledgeNames = move.name + " " + move.combinePledge; - move.type = bothPledgeNames.includes("Grass") && bothPledgeNames.includes("Fire") ? 'Fire' : - bothPledgeNames.includes("Grass") && bothPledgeNames.includes("Water") ? 'Grass' : - bothPledgeNames.includes("Water") && bothPledgeNames.includes("Fire") ? 'Water' : - 'Typeless'; //last case should never happen, just there to help with debugging - } else if (move.name === "Tera Blast" && attacker.isTerastalize) { + move.type = bothPledgeNames.includes("Grass") && bothPledgeNames.includes("Fire") ? 'Fire' + : bothPledgeNames.includes("Grass") && bothPledgeNames.includes("Water") ? 'Grass' + : bothPledgeNames.includes("Water") && bothPledgeNames.includes("Fire") ? 'Water' + : 'Typeless'; //last case should never happen, just there to help with debugging + } + else if (move.name === 'Aura Wheel' && attacker.name === 'Morpeko-Hangry') { + move.type = 'Dark'; + } + else if (move.name === "Tera Blast" && attacker.isTerastalize) { move.type = attacker.tera_type; } else if (move.name === "Raging Bull") { switch (attacker.name) { @@ -617,6 +667,12 @@ function checkMoveTypeChange(move, field, attacker) { move.type = "Grass"; } } + else if ((move.name == "Struggle" && gen >= 2) || (['Beat Up', 'Future Sight', 'Doom Desire'].indexOf(move.name) != -1 && gen <= 4)) { + move.type = 'Typeless'; + } + else if (move.name === 'Tera Starstorm' && attacker.name === 'Terapagos-Stellar') { + move.type = 'Stellar'; + } } function checkConditionalPriority(move, terrain) { @@ -624,6 +680,16 @@ function checkConditionalPriority(move, terrain) { move.isPriority = true; } +function checkConditionalSpread(move, terrain, attacker, attIsGrounded) { + if ((move.name == "Expanding Force" && terrain == "Psychic" && attIsGrounded) || (move.name == "Tera Starstorm" && attacker.name == "Terapagos-Stellar")) + move.isSpread = true; +} + +function checkContactOverride(move, attacker) { + if (move.makesContact && (attacker.item === 'Protective Pads' || (attacker.item === 'Punching Glove' && move.isPunch) || attacker.ability === "Long Reach")) + move.makesContact = false; +} + function ZMoves(move, field, attacker, isQuarteredByProtect, moveDescName) { if (move.isSignatureZ) { move.isZ = true; @@ -749,15 +815,16 @@ function NaturePower(move, field, moveDescName) { //Rename Nature Power to its a return [move, moveDescName]; } -//function checkMeFirst(move, moveDescName) { -// var meFirstZ = move.isZ; -// move.name = move.usedOppMove; -// move = moves[move.usedOppMove]; -// move.isMeFirst = true; -// move.isZ = meFirstZ; -// moveDescName = move.name; -// return GET_DAMAGE_HANDLER(attacker, defender, counteredMove, field); -//} +function checkMeFirst(move, moveDescName) { + var meFirstZ = move.isZ; + moveName = move.usedOppMove; + move = moves[move.usedOppMove]; + move.name = moveName; + move.isMeFirst = true; + move.isZ = meFirstZ; + moveDescName = move.name; + return [move, moveDescName]; +} function statusMoves(move, attacker, defender, description) { if (move.name === "Pain Split" && attacker.item !== "Assault Vest") { @@ -769,14 +836,16 @@ function statusMoves(move, attacker, defender, description) { } function abilityIgnore(attacker, move, defAbility, description, defItem = "") { - if (['Shadow Shield', 'Full Metal Body', 'Prism Armor'].indexOf(defAbility) == -1 && defItem !== "Ability Shield" ) { + if (['Shadow Shield', 'Full Metal Body', 'Prism Armor', 'As One', + 'Tablets of Ruin', 'Vessel of Ruin', 'Sword of Ruin', 'Beads of Ruin'].indexOf(defAbility) == -1 && defItem !== "Ability Shield") { if (["Mold Breaker", "Teravolt", "Turboblaze"].indexOf(attacker.ability) !== -1) { - defAbility = ""; + defAbility = "[ignored]"; //'[ignored]' is used as a check for ally abilities as well description.attackerAbility = attacker.ability; - } else if (["Moongeist Beam", "Sunsteel Strike", "Photon Geyser", "Searing Sunraze Smash", "Menacing Moonraze Maelstrom", - "Light That Burns the Sky", 'G-Max Drum Solo', 'G-Max Fireball', 'G-Max Hydrosnipe' - ].indexOf(move.name) !== -1) - defAbility = ""; //works as a mold breaker + } + else if (["Moongeist Beam", "Sunsteel Strike", "Photon Geyser", "Searing Sunraze Smash", "Menacing Moonraze Maelstrom", + "Light That Burns the Sky", 'G-Max Drum Solo', 'G-Max Fireball', 'G-Max Hydrosnipe'].indexOf(move.name) !== -1) { + defAbility = "[ignored]"; //works as a mold breaker + } } return [defAbility, description]; @@ -820,8 +889,9 @@ function ateIzeTypeChange(move, attacker, description) { } if (attacker.isDynamax) description.moveName = MAXMOVES_LOOKUP[move.type] + " (" + move.bp + " BP)"; - isBoosted = true; //indicates whether the move gets the boost or not - } else if (attacker.ability === "Normalize") { //Normalize + isBoosted = true; //indicates whether the move gets the boost or not + } + else if(attacker.ability === "Normalize") { move.type = "Normal"; if (attacker.isDynamax) description.moveName = "Max Strike (" + move.bp + " BP)"; @@ -839,7 +909,7 @@ function immunityChecks(move, attacker, defender, field, description, defAbility "description": buildDescription(description) }; } - if ((defAbility === "Wonder Guard" && typeEffectiveness <= 1) || + if ((defAbility === "Wonder Guard" && typeEffectiveness <= 1 && move.name !== 'Struggle') || (move.type === "Grass" && defAbility === "Sap Sipper") || (move.type === "Fire" && ["Flash Fire", "Well-Baked Body"].indexOf(defAbility) !== -1) || (move.type === "Water" && ["Dry Skin", "Storm Drain", "Water Absorb"].indexOf(defAbility) !== -1) || @@ -888,11 +958,11 @@ function immunityChecks(move, attacker, defender, field, description, defAbility }; } if ((defAbility === "Damp" || attacker.ability === "Damp") && ["Self-Destruct", "Explosion", "Mind Blown", "Misty Explosion"].indexOf(move.name) !== -1) { - description.defenderAbility = defAbility; - return { - "damage": [0], - "description": buildDescription(description) - }; + if (defAbility === "Damp") + description.defenderAbility = defAbility; + if (attacker.ability === "Damp") + description.attackerAbility = attacker.ability; + return { "damage": [0], "description": buildDescription(description) }; } if (move.name === "Fling" && cantFlingItem(attacker.item, attacker.name, defAbility)) { description.attackerItem = attacker.item; @@ -907,36 +977,58 @@ function immunityChecks(move, attacker, defender, field, description, defAbility "description": buildDescription(description) }; } - //Remove if it makes the calc annoying to use if (["Queenly Majesty", "Dazzling", "Armor Tail"].indexOf(defAbility) !== -1 && move.isPriority) { description.defenderAbility = defAbility; return { "damage": [0], "description": buildDescription(description) }; } - //Remove if it makes the calc annoying to use if (field.terrain === "Psychic" && move.isPriority && pIsGrounded(defender, field.terrain)) { description.terrain = field.terrain; return { "damage": [0], "description": buildDescription(description) }; } + if (move.name === 'Dream Eater' && defender.status !== 'Asleep') { + return { "damage": [0], "description": buildDescription(description) }; + } return -1; } //Special Cases -function setDamage(move, attacker, defender, description, isQuarteredByProtect) { +function setDamage(move, attacker, defender, description, isQuarteredByProtect, field) { var isParentBond = attacker.ability === "Parental Bond"; //a. Counterattacks (Counter, Mirror Coat, Metal Burst, Comeuppance, Bide) - //if (['Counter', 'Mirror Coat', 'Metal Burst', 'Comeuppance'].indexOf(move.name) !== -1) { - // var counteredMove = moves[move.usedOppMove]; - // counteredMove.hits = 1; - // //if move can be countered (nested if) - // if (['Counter', 'Mirror Coat'].indexOf(move.name) !== -1 && move.category == counteredMove.category) { - // return GET_DAMAGE_HANDLER(defender, attacker, counteredMove, field); //result needs raw damage multiplied by 2 - // } - // else { - // return GET_DAMAGE_HANDLER(defender, attacker, counteredMove, field); //result needs raw damage multiplied by 1.5 - // } - // //Bide ain't being added it's too niche - //} + if (['Counter', 'Mirror Coat', 'Metal Burst', 'Comeuppance'].indexOf(move.name) !== -1) { + var moveName = move.usedOppMove ? move.usedOppMove : '(No Move)'; + var counteredMove = moves[moveName]; + counteredMove.name = moveName; + counteredMove.hits = 1; + if (counteredMove.isTripleHit) + counteredMove.tripleHit3 = true; + else if (defender.ability === 'Parental Bond' && (field.format === "Singles" || !counteredMove.isSpread)) + defender.isChild = true; + if (counteredMove.category !== 'Status') { + counteredResult = GET_DAMAGE_HANDLER(defender, attacker, counteredMove, field); + if (['Counter', 'Mirror Coat'].indexOf(move.name) !== -1 && move.category == counteredMove.category) { + for (i = 0; i < counteredResult.damage.length; i++) { + counteredResult.damage[i] *= 2; + } + counteredResult.description = '2x ' + move.name + ' (' + counteredResult.description + ') vs. ' + description.HPEVs + ' ' + description.defenderName; + } + else if (['Metal Burst', 'Comeuppance'].indexOf(move.name) !== -1) { + for (i = 0; i < counteredResult.damage.length; i++) { + counteredResult.damage[i] = Math.floor(counteredResult.damage[i] * 1.5); + } + counteredResult.description = '1.5x ' + move.name + ' (' + counteredResult.description + ') vs. ' + description.HPEVs + ' ' + description.defenderName; + } + else { + return { "damage": [0], "description": buildDescription(description) }; + } + return counteredResult; + } + else { + return { "damage": [0], "description": buildDescription(description) }; + } + //Bide ain't being added it's too niche + } //b. Defender HP Dependent (Super Fang/Nature's Madness/Ruination, Guardian of Alola) var def_curHP; @@ -1019,7 +1111,10 @@ function setDamage(move, attacker, defender, description, isQuarteredByProtect) //f. OHKO moves if (move.isMLG) { - return { "damage": [defender.curHP], "description": buildDescription(description) }; + if (move.name == 'Sheer Cold' && [defender.type1, defender.type2].indexOf('Ice') !== -1) + return { "damage": [0], "description": buildDescription(description) }; + else + return { "damage": [defender.curHP], "description": buildDescription(description) }; } //g. Psywave @@ -1094,12 +1189,16 @@ function basePowerFunc(move, description, turnOrder, attacker, defender, field, basePower = p <= 1 ? 200 : p <= 4 ? 150 : p <= 9 ? 100 : p <= 16 ? 80 : p <= 32 ? 40 : 20; description.moveBP = basePower; break; - //c.iii. Crush Grip, Wring Out + //c.iii. Crush Grip, Wring Out, Hard Press case "Crush Grip": case "Wring Out": basePower = Math.floor(pokeRound(120 * 100 * Math.floor(attacker.curHP * 0x1000 / attacker.maxHP) / 0x1000) / 100); description.moveBP = basePower; break; + case "Hard Press": + basePower = Math.floor(pokeRound(100 * 100 * Math.floor(attacker.curHP * 0x1000 / attacker.maxHP) / 0x1000) / 100); + description.moveBP = basePower; + break; //d. Friendship based (not done under the assumption that it will always deal max damage) //d.i. Return @@ -1184,12 +1283,19 @@ function basePowerFunc(move, description, turnOrder, attacker, defender, field, if (move.combinePledge !== move.name) description.moveType = move.type; break; - //g.x. Payback, Fisheous Rend, Bolt Beak CONSIDER ISDOUBLE - case "Payback": - basePower = turnOrder === "LAST" ? 100 : 50; + //g.x. Tera Blast Tera-Stellar + case "Tera Blast": + basePower = move.type == 'Stellar' ? 100 : 80; if (basePower !== move.bp) description.moveBP = basePower; break; - //g.xi. Everything else (Assurance, Avalanche, Revenge, Gust, Twister, Pursuit, Round, Stomping Tantrum) CHECK DEFAULT; CURRENTLY ALSO HAS FISHEOUS REND AND BOLT BEAK + //g.xi. Payback, Fisheous Rend, Bolt Beak CURRENTLY USING ISDOUBLE + //case "Payback": + //case "Fisheous Rend": + //case "Bolt Beak": + // basePower = turnOrder === "LAST" ? 100 : 50; + // if (basePower !== move.bp) description.moveBP = basePower; + // break; + //g.xii. Everything else (Assurance, Avalanche, Revenge, Gust, Twister, Pursuit, Round, Stomping Tantrum, Temper Flare) CHECK DEFAULT //h. Item based //h.i. Fling @@ -1245,10 +1351,9 @@ function calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, var isDefenderAura = defAbility === (move.type + " Aura"); var auraActive = ($("input:checkbox[id='" + move.type.toLowerCase() + "-aura']:checked").val() != undefined); var auraBreak = ($("input:checkbox[id='aura-break']:checked").val() != undefined); - var contactOverride = attacker.item === 'Protective Pads' || (attacker.item === 'Punching Glove' && move.isPunch) || attacker.ability === "Long Reach"; //a. Aura Break - if (auraActive && auraBreak && !field.isNeutralizingGas && ["Mold Breaker", "Teravolt", "Turboblaze"].indexOf(attacker.ability) == -1) { + if (auraActive && auraBreak && !field.isNeutralizingGas && defAbility !== '[ignored]') { bpMods.push(0x0C00); if (isAttackerAura || attacker.ability == "Aura Break") { description.attackerAbility = attacker.ability; @@ -1307,7 +1412,7 @@ function calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, description.attackerAbility = attacker.ability; } //e.iv. Tough Claws - else if (attacker.ability === "Tough Claws" && move.makesContact && !contactOverride) { + else if (attacker.ability === "Tough Claws" && move.makesContact) { bpMods.push(0x14CD); description.attackerAbility = attacker.ability; } @@ -1318,7 +1423,7 @@ function calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, } //f. Fairy Aura, Dark Aura - if (auraActive && !auraBreak && !field.isNeutralizingGas && (gen > 7 || ["Mold Breaker", "Teravolt", "Turboblaze"].indexOf(attacker.ability) == -1)) { + if (auraActive && !auraBreak && !field.isNeutralizingGas && (gen > 7 || defAbility !== '[ignored]')) { bpMods.push(0x1548); if (isAttackerAura) { description.attackerAbility = attacker.ability; @@ -1392,6 +1497,8 @@ function calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, //n. Me First if (move.isMeFirst) { bpMods.push(0x1800); + description.meFirst = true; + move.isMeFirst = false; } //o. Knock Off @@ -1413,7 +1520,6 @@ function calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, } //r. Expanding Force else if (move.name === "Expanding Force" && field.terrain == "Psychic" && attIsGrounded) { - move.isSpread = true; bpMods.push(0x1800); description.moveBP = move.bp * 1.5; } @@ -1471,7 +1577,7 @@ function calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, description.attackerAbility = attacker.supremeOverlord > 1 ? attacker.ability + " (" + attacker.supremeOverlord + " allies down)" : attacker.ability + " (1 ally down)"; } - //z. 1.1x Items + //z. Punching Glove if (attacker.item === "Punching Glove" && move.isPunch) { bpMods.push(0x119A); description.attackerItem = attacker.item; @@ -1481,7 +1587,7 @@ function calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, tempBP = pokeRound(basePower * chainMods(bpMods) / 0x1000); //aa. Tera boost for moves with <60 BP - if (attacker.isTerastalize && attacker.tera_type === move.type && tempBP < 60 && canTeraBoost60BP(move)) { + if (attacker.isTerastalize && (move.type === attacker.tera_type || (attacker.tera_type === 'Stellar' && move.stellarBoost)) && tempBP < 60 && canTeraBoost60BP(move)) { bpMods.push(60 / tempBP * 0x1000); description.teraBPBoost = true; } @@ -1493,8 +1599,7 @@ function canTeraBoost60BP(move) { var priority = move.isPriority; var multiHit = move.isMultiHit || move.isTenMultiHit || move.isTwoHit || move.isThreeHit || move.isTripleHit || move.name === "Dragon Darts"; var otherExceptions = ["Crush Grip", "Dragon Energy", "Electro Ball", "Eruption", "Flail", "Fling", "Grass Knot", "Gyro Ball", - "Heat Crash", "Heavy Slam", "Low Kick", "Reversal", "Water Spout", - ].indexOf(move.name) !== -1; + "Heat Crash", "Heavy Slam", "Low Kick", "Reversal", "Water Spout", "Hard Press"].indexOf(move.name) !== -1; return !priority && !multiHit && !otherExceptions; } @@ -1520,7 +1625,8 @@ function calcAttack(move, attacker, defender, description, isCritical, defAbilit else if (move.name === "Spectral Thief" && defender.boosts[attackStat] > 0) { description.attackBoost = Math.min(6, attacker.boosts[attackStat] + defender.boosts[attackStat]); attack = getModifiedStat(attackSource.rawStats[attackStat], Math.min(6, attacker.boosts[attackStat] + defender.boosts[attackStat])); - } else if (move.name === "Meteor Beam") { + } + else if (["Meteor Beam", "Electro Shot"].indexOf(move.name) !== -1) { description.attackBoost = Math.min(6, attackSource.boosts[attackStat] + 1); attack = getModifiedStat(attackSource.rawStats[attackStat], Math.min(6, attackSource.boosts[attackStat] + 1)); } //c. Crit @@ -1551,8 +1657,8 @@ function calcAttack(move, attacker, defender, description, isCritical, defAbilit function calcAtMods(move, attacker, defAbility, description, field) { atMods = []; var ruinActive = { - "Tablets of Ruin": $("input:checkbox[id='tablets-of-ruin']:checked").val() != undefined, - "Vessel of Ruin": $("input:checkbox[id='vessel-of-ruin']:checked").val() != undefined, + "Tablets of Ruin": $("input:checkbox[id='tablets-of-ruin']:checked").val() != undefined && !field.isNeutralizingGas, + "Vessel of Ruin": $("input:checkbox[id='vessel-of-ruin']:checked").val() != undefined && !field.isNeutralizingGas, }; //a. Tablets of Ruin, Vessel of Ruin @@ -1643,7 +1749,8 @@ function calcAtMods(move, attacker, defAbility, description, field) { description.attackerItem = attacker.item; } //j. 1.5x Items else if ((attacker.item === "Choice Band" && move.category === "Physical" && !attacker.isDynamax) || - (attacker.item === "Choice Specs" && move.category === "Special" && !attacker.isDynamax)) { + (attacker.item === "Choice Specs" && move.category === "Special" && !attacker.isDynamax) || + (attacker.item === "Soul Dew" && ["Latias", "Latios"].indexOf(attacker.name) && move.category === 'Special' && gen <= 6)) { atMods.push(0x1800); description.attackerItem = attacker.item; } @@ -1704,8 +1811,8 @@ function calcDefense(move, attacker, defender, description, hitsPhysical, isCrit function calcDefMods(move, defender, field, description, hitsPhysical, defAbility) { var dfMods = []; var ruinActive = { - "Sword of Ruin": $("input:checkbox[id='sword-of-ruin']:checked").val() != undefined, - "Beads of Ruin": $("input:checkbox[id='beads-of-ruin']:checked").val() != undefined, + "Sword of Ruin": $("input:checkbox[id='sword-of-ruin']:checked").val() != undefined && !field.isNeutralizingGas, + "Beads of Ruin": $("input:checkbox[id='beads-of-ruin']:checked").val() != undefined && !field.isNeutralizingGas, }; //a. Sword of Ruin, Beads of Ruin @@ -1748,7 +1855,8 @@ function calcDefMods(move, defender, field, description, hitsPhysical, defAbilit } //f. 1.5x Items if ((defender.item === "Assault Vest" && !hitsPhysical) || - (defender.item === "Eviolite" && defender.canEvolve)) { + (defender.item === "Eviolite" && defender.canEvolve) || + (defender.item === "Soul Dew" && ["Latias", "Latios"].indexOf(defender.name) && !hitsPhysical && gen <= 6)) { dfMods.push(0x1800); description.defenderItem = defender.item; } //g. 2.0x Items @@ -1772,19 +1880,23 @@ function calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field baseDamage = pokeRound(baseDamage * 0xC00 / 0x1000); } //b. Parental Bond mod - baseDamage = attacker.isChild ? pokeRound(baseDamage * 0x0400 / 0x1000) : baseDamage; //should be accurate based on implementation + var childMod = gen >= 7 ? 0x0400 : 0x0800; + baseDamage = attacker.isChild ? pokeRound(baseDamage * childMod / 0x1000) : baseDamage; //should be accurate based on implementation //c. Weather mod, Hydro Steam - if (((field.weather.indexOf("Sun") > -1 && (move.type === "Fire" || move.name === "Hydro Steam")) || (field.weather.indexOf("Rain") > -1 && move.type === "Water")) && defender.item !== 'Utility Umbrella') { + if ((((field.weather.indexOf("Sun") > -1 && move.type === "Fire") || (field.weather.indexOf("Rain") > -1 && move.type === "Water")) && defender.item !== 'Utility Umbrella') + || (field.weather.indexOf("Sun") > -1 && move.name === "Hydro Steam" && attacker.item !== 'Utility Umbrella')) { baseDamage = pokeRound(baseDamage * 0x1800 / 0x1000); description.weather = field.weather; - } else if ((field.weather === "Strong Winds" && (defender.type1 === "Flying" || defender.type2 === "Flying") && - typeChart[move.type]["Flying"] > 1)) { - description.weather = field.weather; //not actually a mod, just adding the description here - } else if (((field.weather === "Sun" && move.type === "Water" && move.name !== "Hydro Steam") || (field.weather === "Rain" && move.type === "Fire")) && defender.item !== 'Utility Umbrella') { + } + else if (((field.weather === "Sun" && move.type === "Water") || (field.weather === "Rain" && move.type === "Fire")) && defender.item !== 'Utility Umbrella') { baseDamage = pokeRound(baseDamage * 0x800 / 0x1000); description.weather = field.weather; } - //d. Glaive Rush 2x mod (NEEDS OTHER PARTS TO BE FIXED) + else if ((field.weather === "Strong Winds" && (defender.type1 === "Flying" || defender.type2 === "Flying") && + typeChart[move.type]["Flying"] > 1)) { + description.weather = field.weather; //not actually a mod, just adding the description here + } + //d. Glaive Rush 2x mod if (defender.glaiveRushMod) { baseDamage = pokeRound(baseDamage * 0x2000 / 0x1000); description.isGlaiveMod = true; @@ -1798,22 +1910,9 @@ function calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field //see GENERAL MODS CONTINUED for further comments var stabMod = 0x1000; - if (!attacker.isTerastalize) { - if (move.type === attacker.type1 || move.type === attacker.type2 || (move.combinePledge && move.combinePledge !== move.name)) { - if (attacker.ability === "Adaptability") { - stabMod = 0x2000; - description.attackerAbility = attacker.ability; - } else { - stabMod = 0x1800; - } - } else if ((attacker.ability === "Protean" || attacker.ability == "Libero") && (gen !== 9 || attacker.abilityOn)) { - stabMod = 0x1800; - description.attackerAbility = attacker.ability; - } - } - else { - if (pokedex[attacker.name]) { //catches any potential issues when switching between sv dex and national dex with a terastalized mon - if (move.type === attacker.tera_type && (pokedex[attacker.name].t1 === attacker.tera_type || pokedex[attacker.name].t2 === attacker.tera_type)) { + if (move.type !== 'Typeless') { //Typeless moves cannot get stab even if the user is Typeless + if (attacker.isTerastalize && attacker.tera_type !== 'Stellar') { + if (move.type === attacker.tera_type && (attacker.teraSTAB1 === attacker.tera_type || attacker.teraSTAB2 === attacker.tera_type)) { if (attacker.ability === "Adaptability") { stabMod = 0x2400; description.attackerAbility = attacker.ability; @@ -1821,8 +1920,7 @@ function calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field stabMod = 0x2000; } } - else if ((move.type !== attacker.tera_type && (pokedex[attacker.name].t1 === move.type || pokedex[attacker.name].t2 === move.type)) - || move.type === attacker.tera_type) { + else if ((move.type !== attacker.tera_type && (attacker.teraSTAB1 === move.type || attacker.teraSTAB2 === move.type)) || move.type === attacker.tera_type) { if (attacker.ability === "Adaptability" && move.type === attacker.tera_type) { stabMod = 0x2000; description.attackerAbility = attacker.ability; @@ -1831,6 +1929,28 @@ function calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field } } } + else if (attacker.isTerastalize && (move.getsStellarBoost || attacker.name === 'Terapagos-Stellar')) { //Tera Type being Stellar is implicit + if ([attacker.type1, attacker.type2].indexOf(move.type) !== -1) { + stabMod = 0x2000; + } + else { + stabMod = 0x1333; + } + if (attacker.name !== 'Terapagos-Stellar') description.stellarBoost = true; + } + else { //Covers for non-terastalized and Stellar being used up + if (move.type === attacker.type1 || move.type === attacker.type2 || (move.combinePledge && move.combinePledge !== move.name)) { + if (attacker.ability === "Adaptability") { + stabMod = 0x2000; + description.attackerAbility = attacker.ability; + } else { + stabMod = 0x1800; + } + } else if ((attacker.ability === "Protean" || attacker.ability == "Libero") && (gen !== 9 || attacker.abilityOn)) { + stabMod = 0x1800; + description.attackerAbility = attacker.ability; + } + } } var applyBurn = (attacker.status === "Burned" && move.category === "Physical" && attacker.ability !== "Guts" && !move.ignoresBurn); description.isBurned = applyBurn; @@ -1863,7 +1983,7 @@ function calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field child.isChild = true; childMove = move; if (move.name === 'Power-Up Punch') { - child.boosts[AT]++; + child.boosts[AT] = Math.min(6, child.boosts[AT] + 1); child.stats[AT] = getModifiedStat(child.rawStats[AT], child.boosts[AT]); } else if (move.name === 'Assurance') { childMove.isDouble = 1; @@ -1942,7 +2062,6 @@ function calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field //9. Finals Damage Mods function calcFinalMods(move, attacker, defender, field, description, isCritical, typeEffectiveness, defAbility, hitsPhysical) { var finalMods = []; - var contactOverride = attacker.item === 'Protective Pads' || (attacker.item === 'Punching Glove' && move.isPunch) || attacker.ability === "Long Reach"; //a. Screens/Aurora Veil if (field.isAuroraVeil && !isCritical && !move.ignoresScreens) { finalMods.push(field.format !== "Singles" ? 0xAAC : 0x800); @@ -1985,7 +2104,7 @@ function calcFinalMods(move, attacker, defender, field, description, isCritical, description.defenderAbility = defAbility; } //h. Fluffy (contact) - if (defAbility === "Fluffy" && move.makesContact && !contactOverride) { + if (defAbility === "Fluffy" && move.makesContact) { finalMods.push(0x800); description.defenderAbility = defAbility; } @@ -2000,7 +2119,7 @@ function calcFinalMods(move, attacker, defender, field, description, isCritical, description.defenderAbility = defAbility; } //k. Friend Guard - if (field.isFriendGuard && ["Mold Breaker", "Teravolt", "Turboblaze"].indexOf(attacker.ability) === -1) { + if (field.isFriendGuard && defAbility !== '[ignored]') { finalMods.push(0xC00); description.isFriendGuard = true; } @@ -2035,7 +2154,7 @@ function calcFinalMods(move, attacker, defender, field, description, isCritical, } description.defenderItem = defender.item; } - //r. Doubled damage + //r. Doubled damage (These likely won't be added since Minimize/Dig/Dive are hardly ever used) //r.i. Body Slam, Stomp, Dragon Rush, Steamroller, Heat Crash, Heavy Slam, Flying Press, Malicious Moonsault //r.ii. Earthquake //r.iii. Surf, Whirlpool diff --git a/script_res/damage_SV.js b/script_res/damage_SV.js index 47a3590..512d948 100644 --- a/script_res/damage_SV.js +++ b/script_res/damage_SV.js @@ -64,14 +64,21 @@ function GET_DAMAGE_SV(attacker, defender, move, field) { var moveDescName = move.name; var isQuarteredByProtect = false; + var attIsGrounded = pIsGrounded(attacker, field); + var defIsGrounded = pIsGrounded(defender, field); + checkMoveTypeChange(move, field, attacker); checkConditionalPriority(move, field.terrain); + checkConditionalSpread(move, field.terrain, attacker, attIsGrounded); + checkContactOverride(move, attacker); if (attacker.isDynamax) [move, isQuarteredByProtect, moveDescName] = MaxMoves(move, attacker, isQuarteredByProtect, moveDescName, field); - if (move.name == "Nature Power") + if (move.name == "Nature Power" && attacker.item !== 'Assault Vest') [move, moveDescName] = NaturePower(move, field, moveDescName); + else if (move.name == 'Me First' && !move.isMeFirst && attacker.item !== 'Assault Vest') + [move, moveDescName] = checkMeFirst(move, moveDescName); if (move.isZ || move.isSignatureZ) [move, isQuarteredByProtect, moveDescName] = ZMoves(move, field, attacker, isQuarteredByProtect, moveDescName); @@ -91,6 +98,8 @@ function GET_DAMAGE_SV(attacker, defender, move, field) { description["moveName"] = translate_move(moveDescName); description["defenderName"] = translate_pokemon(defender_name); + addLevelDesc(attacker, defender, description); + if (move.bp === 0 || move.category === "Status") { return statusMoves(move, attacker, defender, description); } @@ -98,16 +107,11 @@ function GET_DAMAGE_SV(attacker, defender, move, field) { description.attackerTera = attacker.isTerastalize ? attacker.tera_type : false; description.defenderTera = defender.isTerastalize ? defender.tera_type : false; - var defAbility = defender.ability; [defAbility, description] = abilityIgnore(attacker, move, defAbility, description, defender.item); var isCritical = critMove(move, defAbility); - if (move.name == "Aura Wheel" && attacker.name == "Morpeko-Hangry") { - move.type = "Dark"; - } - var ateIzeAbility = ATE_IZE_ABILITIES.indexOf(attacker.ability); //Confirms abilities like Normalize and Pixilate but not Liquid Voice var ateIzeBoosted; if (!move.isZ && (ateIzeAbility !== -1 || attacker.ability == "Liquid Voice") @@ -115,23 +119,21 @@ function GET_DAMAGE_SV(attacker, defender, move, field) { [move, description, ateIzeBoosted] = ateIzeTypeChange(move, attacker, description); } - var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, ["Scrappy", "Mind's Eye"].indexOf(attacker.ability) != -1 || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds"); - var typeEffect2 = defender.type2 && defender.type2 !== defender.type1 ? getMoveEffectiveness(move, defender.type2, defender.type1, ["Scrappy", "Mind's Eye"].indexOf(attacker.ability) != -1 || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds") : 1; + var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, ["Scrappy", "Mind's Eye"].indexOf(attacker.ability) != -1 || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds", defender.ability === 'Tera Shell' && defender.curHP === defender.maxHP, defender.isTerastalize); + var typeEffect2 = defender.type2 && defender.type2 !== defender.type1 && move.type !== 'Stellar' ? getMoveEffectiveness(move, defender.type2, defender.type1, ["Scrappy", "Mind's Eye"].indexOf(attacker.ability) != -1 || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds", defender.ability === 'Tera Shell' && defender.curHP === defender.maxHP, defender.isTerastalize) : 1; var typeEffectiveness = typeEffect1 * typeEffect2; immuneBuildDesc = immunityChecks(move, attacker, defender, field, description, defAbility, typeEffectiveness); if (immuneBuildDesc !== -1) return immuneBuildDesc; description.HPEVs = defender.HPEVs + " HP"; - setDamageBuildDesc = setDamage(move, attacker, defender, description, isQuarteredByProtect); + setDamageBuildDesc = setDamage(move, attacker, defender, description, isQuarteredByProtect, field); if (setDamageBuildDesc !== -1) return setDamageBuildDesc; if (move.hits > 1) { description.hits = move.hits; } var turnOrder = attacker.stats[SP] > defender.stats[SP] ? "FIRST" : "LAST"; - var attIsGrounded = pIsGrounded(attacker, field); - var defIsGrounded = pIsGrounded(defender, field); //////////////////////////////// ////////// BASE POWER ////////// diff --git a/script_res/damage_xy.js b/script_res/damage_xy.js index 00fd408..ef5f7c7 100644 --- a/script_res/damage_xy.js +++ b/script_res/damage_xy.js @@ -1,6 +1,9 @@ -/* Damage calculation for the Generation VI games, X, Y, Omega Ruby, and Alpha Sapphire*/ +/* Damage calculation for the Generation VI games: X, Y, Omega Ruby, and Alpha Sapphire; + * and for the Generation V games: Black, White, Black 2, and White 2 */ function CALCULATE_ALL_MOVES_XY(p1, p2, field) { + checkTrace(p1, p2); + checkTrace(p2, p1); checkAirLock(p1, field); checkAirLock(p2, field); checkForecast(p1, field.getWeather()); @@ -8,26 +11,29 @@ function CALCULATE_ALL_MOVES_XY(p1, p2, field) { checkKlutz(p1); checkKlutz(p2); checkEvo(p1, p2); - p1.stats[DF] = getModifiedStat(p1.rawStats[DF], p1.boosts[DF]); - p1.stats[SD] = getModifiedStat(p1.rawStats[SD], p1.boosts[SD]); - p1.stats[SP] = getFinalSpeedXY(p1, field.getWeather(), field.getTerrain()); - $(".p1-speed-mods").text(p1.stats[SP]); - p2.stats[DF] = getModifiedStat(p2.rawStats[DF], p2.boosts[DF]); - p2.stats[SD] = getModifiedStat(p2.rawStats[SD], p2.boosts[SD]); - p2.stats[SP] = getFinalSpeedXY(p2, field.getWeather(), field.getTerrain()); - $(".p2-speed-mods").text(p1.stats[SP]); checkIntimidate(p1, p2); checkIntimidate(p2, p1); checkDownload(p1, p2); checkDownload(p2, p1); p1.stats[AT] = getModifiedStat(p1.rawStats[AT], p1.boosts[AT]); + p1.stats[DF] = getModifiedStat(p1.rawStats[DF], p1.boosts[DF]); p1.stats[SA] = getModifiedStat(p1.rawStats[SA], p1.boosts[SA]); + p1.stats[SD] = getModifiedStat(p1.rawStats[SD], p1.boosts[SD]); + p1.stats[SP] = getModifiedStat(p1.rawStats[SP], p1.boosts[SP]); + p1.stats[SP] = getFinalSpeed(p1, field.getWeather(), field.getTerrain(), field.getTailwind(0)); + $(".p1-speed-mods").text(p1.stats[SP]); p2.stats[AT] = getModifiedStat(p2.rawStats[AT], p2.boosts[AT]); + p2.stats[DF] = getModifiedStat(p2.rawStats[DF], p2.boosts[DF]); p2.stats[SA] = getModifiedStat(p2.rawStats[SA], p2.boosts[SA]); + p2.stats[SD] = getModifiedStat(p2.rawStats[SD], p2.boosts[SD]); + p2.stats[SP] = getModifiedStat(p2.rawStats[SP], p2.boosts[SP]); + p2.stats[SP] = getFinalSpeed(p2, field.getWeather(), field.getTerrain(), field.getTailwind(1)); + $(".p2-speed-mods").text(p2.stats[SP]); var side1 = field.getSide(1); var side2 = field.getSide(0); checkInfiltrator(p1, side1); checkInfiltrator(p2, side2); + getWeightMods(p1, p2); var results = [[],[]]; for (var i = 0; i < 4; i++) { results[0][i] = GET_DAMAGE_XY(p1, p2, p1.moves[i], side1); @@ -38,613 +44,98 @@ function CALCULATE_ALL_MOVES_XY(p1, p2, field) { function GET_DAMAGE_XY(attacker, defender, move, field) { var moveDescName = move.name; + + checkMoveTypeChange(move, field, attacker); + + if (move.name == "Nature Power" && attacker.item !== 'Assault Vest') + [move, moveDescName] = NaturePower(move, field, moveDescName); + else if (move.name == 'Me First' && !move.isMeFirst && attacker.item !== 'Assault Vest') + [move, moveDescName] = checkMeFirst(move, moveDescName); + + attacker_name = attacker.name; + defender_name = defender.name; var description = { - "attackerName": attacker.name, + "attackerName": attacker_name, "moveName": moveDescName, - "defenderName": defender.name + "defenderName": defender_name }; - if (move.bp === 0) { - return {"damage":[0], "description":buildDescription(description)}; - } - var defAbility = defender.ability; - if (["Mold Breaker", "Teravolt", "Turboblaze"].indexOf(attacker.ability) !== -1) { - defAbility = ""; - description.attackerAbility = attacker.ability; + addLevelDesc(attacker, defender, description); + + if (move.bp === 0 || move.category === "Status") { + return statusMoves(move, attacker, defender, description); } - var isCritical = move.isCrit && ["Battle Armor", "Shell Armor"].indexOf(defAbility) === -1; + var defAbility = defender.ability; + [defAbility, description] = abilityIgnore(attacker, move, defAbility, description, defender.item); - if (move.name === "Weather Ball") { - move.type = field.weather.indexOf("Sun") > -1 ? "Fire" - : field.weather.indexOf("Rain") > -1 ? "Water" - : field.weather === "Sand" ? "Rock" - : field.weather === "Hail" ? "Ice" - : "Normal"; - description.weather = field.weather; - description.moveType = move.type; - } else if (move.name === "Judgment" && attacker.item.indexOf("Plate") !== -1) { - move.type = getItemBoostType(attacker.item); - } else if (move.name === "Natural Gift" && attacker.item.indexOf("Berry") !== -1) { - var gift = getNaturalGift(attacker.item); - move.type = gift.t; - move.bp = gift.p; - description.attackerItem = attacker.item; - description.moveBP = move.bp; - description.moveType = move.type; - } else if (move.name === "Nature Power") { - move.type = field.terrain === "Electric" ? "Electric" : field.terrain === "Grassy" ? "Grass" : field.terrain === "Misty" ? "Fairy" : move.type = field.terrain === "Psychic" ? "Psychic" : "Normal"; - } + var isCritical = critMove(move, defAbility); - var isAerilate = attacker.ability === "Aerilate" && move.type === "Normal"; - var isPixilate = attacker.ability === "Pixilate" && move.type === "Normal"; - var isRefrigerate = attacker.ability === "Refrigerate" && move.type === "Normal"; - var isNormalize = attacker.ability === "Normalize"; //Boosts on any type - if (isAerilate) { - move.type = "Flying"; - } else if (isPixilate) { - move.type = "Fairy"; - } else if (isRefrigerate) { - move.type = "Ice"; - } else if (isNormalize) { - move.type = "Normal"; - description.attackerAbility = attacker.ability; + var ateIzeAbility = ATE_IZE_ABILITIES.indexOf(attacker.ability); //Confirms abilities like Normalize and Pixilate + var ateIzeBoosted; + if (ateIzeAbility !== -1 && ['Hidden Power', 'Weather Ball', 'Natural Gift', 'Judgement', 'Techno Blast'].indexOf(move.name) === -1) { + [move, description, ateIzeBoosted] = ateIzeTypeChange(move, attacker, description); } var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, attacker.ability === "Scrappy" || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds"); - var typeEffect2 = defender.type2 ? getMoveEffectiveness(move, defender.type2, defender.type1, attacker.ability === "Scrappy" || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds") : 1; + var typeEffect2 = defender.type2 && defender.type2 !== defender.type1 ? getMoveEffectiveness(move, defender.type2, defender.type1, attacker.ability === "Scrappy" || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds") : 1; var typeEffectiveness = typeEffect1 * typeEffect2; - - if (typeEffectiveness === 0) { - return {"damage":[0], "description":buildDescription(description)}; - } - if ((defAbility === "Wonder Guard" && typeEffectiveness <= 1) || - (move.type === "Grass" && defAbility === "Sap Sipper") || - (move.type === "Fire" && defAbility.indexOf("Flash Fire") !== -1) || - (move.type === "Water" && ["Dry Skin", "Storm Drain", "Water Absorb"].indexOf(defAbility) !== -1) || - (move.type === "Electric" && ["Lightning Rod", "Lightning Rod", "Motor Drive", "Volt Absorb"].indexOf(defAbility) !== -1) || - (move.type === "Ground" && !field.isGravity && defAbility === "Levitate") || - (move.isBullet && defAbility === "Bulletproof") || - (move.isSound && defAbility === "Soundproof")) { - description.defenderAbility = defAbility; - return {"damage":[0], "description":buildDescription(description)}; - } - if (move.type === "Ground" && !field.isGravity && defender.item === "Air Balloon" && attacker.move != "Thousand Arrows") { - description.defenderItem = defender.item; - return {"damage":[0], "description":buildDescription(description)}; - } - if ((field.weather === "Harsh Sun" && move.type === "Water") || (field.weather === "Heavy Rain" && move.type === "Fire")) { - return {"damage":[0], "description":buildDescription(description)}; - } - if (move.name === "Sky Drop" && - ([defender.type1, defender.type2].indexOf("Flying") !== -1 || - defender.weight >= 200.0 || field.isGravity)) { - return {"damage":[0], "description":buildDescription(description)}; - } - if (move.name === "Synchronoise" && - [defender.type1, defender.type2].indexOf(attacker.type1) === -1 && [defender.type1, defender.type2].indexOf(attacker.type2) === -1) { - return {"damage": [0], "description": buildDescription(description)}; - } + immuneBuildDesc = immunityChecks(move, attacker, defender, field, description, defAbility, typeEffectiveness); + if (immuneBuildDesc !== -1) return immuneBuildDesc; description.HPEVs = defender.HPEVs + " HP"; - if (move.name === "Seismic Toss" || move.name === "Night Shade") { - var lv = attacker.level; - if (attacker.ability === "Parental Bond") { - lv *= 2; - } - return {"damage":[lv], "description":buildDescription(description)}; - } + setDamageBuildDesc = setDamage(move, attacker, defender, description, false, field); + if (setDamageBuildDesc !== -1) return setDamageBuildDesc; if (move.hits > 1) { description.hits = move.hits; } var turnOrder = attacker.stats[SP] > defender.stats[SP] ? "FIRST" : "LAST"; + var attIsGrounded = pIsGrounded(attacker, field); + var defIsGrounded = pIsGrounded(defender, field); //////////////////////////////// ////////// BASE POWER ////////// //////////////////////////////// var basePower; - switch (move.name) { - case "Payback": - basePower = turnOrder === "LAST" ? 100 : 50; - description.moveBP = basePower; - break; - case "Electro Ball": - var r = Math.floor(attacker.stats[SP] / defender.stats[SP]); - basePower = r >= 4 ? 150 : r >= 3 ? 120 : r >= 2 ? 80 : 60; - description.moveBP = basePower; - break; - case "Gyro Ball": - basePower = Math.min(150, Math.floor(25 * defender.stats[SP] / attacker.stats[SP])); - description.moveBP = basePower; - break; - case "Punishment": - basePower = Math.min(200, 60 + 20 * countBoosts(defender.boosts)); - description.moveBP = basePower; - break; - case "Low Kick": - case "Grass Knot": - var w = defender.weight; - basePower = w >= 200 ? 120 : w >= 100 ? 100 : w >= 50 ? 80 : w >= 25 ? 60 : w >= 10 ? 40 : 20; - description.moveBP = basePower; - break; - case "Hex": - basePower = move.bp * (defender.status !== "Healthy" ? 2 : 1); - description.moveBP = basePower; - break; - case "Brine": - basePower = move.bp * (defender.hp/defender.maxHP <= 0.5 ? 2: 1); - description.moveBP = basePower; - break; - case "Heavy Slam": - case "Heat Crash": - var wr = attacker.weight / defender.weight; - basePower = wr >= 5 ? 120 : wr >= 4 ? 100 : wr >= 3 ? 80 : wr >= 2 ? 60 : 40; - description.moveBP = basePower; - break; - case "Stored Power": - basePower = 20 + 20 * countBoosts(attacker.boosts); - description.moveBP = basePower; - break; - case "Acrobatics": - basePower = attacker.item === "Flying Gem" || attacker.item === "" ? 110 : 55; - description.moveBP = basePower; - break; - case "Wake-Up Slap": - basePower = move.bp * (defender.status === "Asleep" ? 2 : 1); - description.moveBP = basePower; - break; - case "Weather Ball": - basePower = field.weather !== "" ? 100 : 50; - description.moveBP = basePower; - break; - case "Fling": - basePower = getFlingPower(attacker.item); - description.moveBP = basePower; - description.attackerItem = attacker.item; - break; - case "Eruption": - case "Water Spout": - basePower = Math.max(1, Math.floor(150 * attacker.curHP / attacker.maxHP)); - description.moveBP = basePower; - break; - case "Flail": - case "Reversal": - var 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; - description.moveBP = basePower; - break; - case "Nature Power": - basePower = (field.terrain === "Electric" || field.terrain === "Grassy") ? 90 : (field.terrain === "Misty") ? 95 : 80; - break; - default: - basePower = move.bp; - } - - var bpMods = []; - - var isAttackerAura = (attacker.ability === (move.type + " Aura")); - var isDefenderAura = defAbility === (move.type + " Aura"); - var auraActive = ($("input:checkbox[id='" + move.type.toLowerCase() + "-aura']:checked").val() != undefined); - var auraBreak = ($("input:checkbox[id='aura-break']:checked").val() != undefined); - - if (auraActive && auraBreak) { - bpMods.push(0x0C00); - description.attackerAbility = attacker.ability; - description.defenderAbility = defAbility; - } - - if(isAerilate || isPixilate || isRefrigerate) - { - bpMods.push(0x14CD); - description.attackerAbility = attacker.ability; - } else if ((attacker.ability === "Reckless" && move.hasRecoil) || (attacker.ability === "Iron Fist" && move.isPunch)) { - bpMods.push(0x1333); - description.attackerAbility = attacker.ability; - } - - if (attacker.ability === "Sheer Force" && move.hasSecondaryEffect) { - bpMods.push(0x14CD); - description.attackerAbility = attacker.ability; - } else if (attacker.ability === "Sand Force" && field.weather === "Sand" && ["Rock","Ground","Steel"].indexOf(move.type) !== -1) { - bpMods.push(0x14CD); - description.attackerAbility = attacker.ability; - description.weather = field.weather; - } else if (attacker.ability === "Analytic" && turnOrder !== "FIRST") { - bpMods.push(0x14CD); - description.attackerAbility = attacker.ability; - } else if (attacker.ability === "Tough Claws" && move.makesContact) { - bpMods.push(0x14CD); - description.attackerAbility = attacker.ability; - } - - if (auraActive && !auraBreak) { - bpMods.push(0x1548); - if (isAttackerAura) { - description.attackerAbility = attacker.ability; - } - if (isDefenderAura) { - description.defenderAbility = defAbility; - } - } - - //If the BP before this point would trigger Technician, don't apply it - var tempBP = pokeRound(basePower * chainMods(bpMods) / 0x1000); + [basePower, description] = basePowerFunc(move, description, turnOrder, attacker, defender, field, attIsGrounded, defIsGrounded, defAbility); - if ((attacker.ability === "Technician" && tempBP <= 60) || - (attacker.ability === "Flare Boost" && attacker.status === "Burned" && move.category === "Special") || - (attacker.ability === "Toxic Boost" && (attacker.status === "Poisoned" || attacker.status === "Badly Poisoned") && move.category === "Physical") || - (attacker.ability === "Mega Launcher" && move.isPulse) || - (attacker.ability === "Strong Jaw" && move.isBite)) { - bpMods.push(0x1800); - description.attackerAbility = attacker.ability; - } - - if (defAbility === "Heatproof" && move.type === "Fire") { - bpMods.push(0x800); - description.defenderAbility = defAbility; - } else if (defAbility === "Dry Skin" && move.type === "Fire") { - bpMods.push(0x1400); - description.defenderAbility = defAbility; - } - - if (getItemBoostType(attacker.item) === move.type) { - bpMods.push(0x1333); - description.attackerItem = attacker.item; - } else if ((attacker.item === "Muscle Band" && move.category === "Physical") || - (attacker.item === "Wise Glasses" && move.category === "Special")) { - bpMods.push(0x1199); - description.attackerItem = attacker.item; - } else if (((attacker.item === "Adamant Orb" && attacker.name === "Dialga") || - (attacker.item === "Lustrous Orb" && attacker.name === "Palkia") || - (attacker.item === "Griseous Orb" && attacker.name === "Giratina-O")) && - (move.type === attacker.type1 || move.type === attacker.type2)) { - bpMods.push(0x1333); - description.attackerItem = attacker.item; - } else if (attacker.item === move.type + " Gem") { - bpMods.push(0x14CD); - description.attackerItem = attacker.item; - } - - if (move.name === "Solar Beam" && ["None", "Sun", "Harsh Sun"].indexOf(field.weather) === -1) { - bpMods.push(0x800); - description.moveBP = move.bp / 2; - description.weather = field.weather; - } //technicially Me First would sandwich between these - else if (move.name === "Knock Off" && !(defender.item === "" || - (defender.name === "Giratina-O" && defender.item === "Griseous Orb") || - (defender.name.indexOf("Arceus") !== -1 && defender.item.indexOf("Plate") !== -1))) { - bpMods.push(0x1800); - description.moveBP = move.bp * 1.5; - } - - if (field.isHelpingHand) { - bpMods.push(0x1800); - description.isHelpingHand = true; - } - - if ((move.name === "Facade" && ["Burned","Paralyzed","Poisoned","Badly Poisoned"].indexOf(attacker.status) !== -1) || - (move.name === "Brine" && defender.curHP <= defender.maxHP / 2) || - (move.name === "Venoshock" && (defender.status === "Poisoned" || defender.status === "Badly Poisoned"))) { - bpMods.push(0x2000); - description.moveBP = move.bp * 2; - } - - //Technically Retaliate and Fusion Flare/Fusion Bolt conditions - if (field.isGravity || (attacker.type1 !== "Flying" && attacker.type2 !== "Flying" && - attacker.item !== "Air Balloon" && attacker.ability !== "Levitate")) { - if (field.terrain === "Electric" && move.type === "Electric") { - bpMods.push(0x1800); - description.terrain = field.terrain; - } else if (field.terrain === "Grassy" && move.type == "Grass") { - bpMods.push(0x1800); - description.terrain = field.terrain; - } - } - if (field.isGravity || (defender.type1 !== "Flying" && defender.type2 !== "Flying" && - defender.item !== "Air Balloon" && defender.ability !== "Levitate")) { - if ((field.terrain === "Misty" && move.type === "Dragon") || - (field.terrain === "Grassy" && (move.name === "Earthquake" || move.name === "Bulldoze"))) { - bpMods.push(0x800); - description.terrain = field.terrain; - } - } - - //Technically Mud Sport/Water Sport here next + var bpMods; + [bpMods, description, move] = calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, basePower, attIsGrounded, defIsGrounded, turnOrder, defAbility); basePower = Math.max(1, pokeRound(basePower * chainMods(bpMods) / 0x1000)); - basePower = attacker.isChild ? basePower / 2 : basePower; //////////////////////////////// ////////// (SP)ATTACK ////////// //////////////////////////////// var attack; - var attackSource = move.name === "Foul Play" ? defender : attacker; - var attackStat = move.category === "Physical" ? AT : SA; - description.attackEVs = attacker.evs[attackStat] + - (NATURES[attacker.nature][0] === attackStat ? "+" : NATURES[attacker.nature][1] === attackStat ? "-" : "") + " " + - toSmogonStat(attackStat); - if (attackSource.boosts[attackStat] === 0 || (isCritical && attackSource.boosts[attackStat] < 0)) { - attack = attackSource.rawStats[attackStat]; - } else if (defAbility === "Unaware") { - attack = attackSource.rawStats[attackStat]; - description.defenderAbility = defAbility; - } else { - attack = attackSource.stats[attackStat]; - description.attackBoost = attackSource.boosts[attackStat]; - } - - // unlike all other attack modifiers, Hustle gets applied directly - if (attacker.ability === "Hustle" && move.category === "Physical") { - attack = pokeRound(attack * 3/2); - description.attackerAbility = attacker.ability; - } - - var atMods = []; - - //Slow Start also halves damage with special Z-moves - if ((attacker.ability === "Slow Start" && move.category === "Physical") || - (attacker.ability === "Defeatist" && attacker.curHP <= attacker.maxHP / 2)) { - atMods.push(0x800); - description.attackerAbility = attacker.ability; - } - if (attacker.ability === "Flower Gift" && field.weather.indexOf("Sun") > -1 && move.category === "Physical") { - atMods.push(0x1800); - description.attackerAbility = attacker.ability; - description.weather = field.weather; - } - if ((attacker.ability === "Guts" && attacker.status !== "Healthy" && move.category === "Physical") || - (attacker.ability === "Overgrow" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Grass") || - (attacker.ability === "Blaze" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Fire") || - (attacker.ability === "Torrent" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Water") || - (attacker.ability === "Swarm" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Bug")) { - atMods.push(0x1800); - description.attackerAbility = attacker.ability; - } else if (attacker.ability === "Flash Fire (activated)" && move.type === "Fire") { - atMods.push(0x1800); - description.attackerAbility = "Flash Fire"; - } else if (attacker.ability === "Solar Power" && field.weather.indexOf("Sun") > -1 && move.category === "Special") { - atMods.push(0x1800); - description.attackerAbility = attacker.ability; - description.weather = field.weather; - } - //Technically Plus/Minus occur ^ as well - - //Technically Stakeout goes here as well - if ((attacker.ability === "Huge Power" || attacker.ability === "Pure Power") && move.category === "Physical") { - atMods.push(0x2000); - description.attackerAbility = attacker.ability; - } - if (defAbility === "Thick Fat" && (move.type === "Fire" || move.type === "Ice")) { - atMods.push(0x800); - description.defenderAbility = defAbility; - } + [attack, description] = calcAttack(move, attacker, defender, description, isCritical, defAbility); - if ((attacker.item === "Thick Club" && (attacker.name === "Cubone" || attacker.name === "Marowak" || attacker.name === "Marowak-Alola") && move.category === "Physical") || - (attacker.item === "Deep Sea Tooth" && attacker.name === "Clamperl" && move.category === "Special") || - (attacker.item === "Light Ball" && attacker.name === "Pikachu")) { - atMods.push(0x2000); - description.attackerItem = attacker.item; - } else if ((attacker.item === "Soul Dew" && (attacker.name === "Latios" || attacker.name === "Latias") && move.category === "Special") || - (attacker.item === "Choice Band" && move.category === "Physical") || - (attacker.item === "Choice Specs" && move.category === "Special")) { - atMods.push(0x1800); - description.attackerItem = attacker.item; - } + var atMods; + [atMods, description] = calcAtMods(move, attacker, defAbility, description, field); attack = Math.max(1, pokeRound(attack * chainMods(atMods) / 0x1000)); //////////////////////////////// ///////// (SP)DEFENSE ////////// //////////////////////////////// - var defense; var hitsPhysical = move.category === "Physical" || move.dealsPhysicalDamage; - var defenseStat = hitsPhysical ? DF : SD; - description.defenseEVs = defender.evs[defenseStat] + - (NATURES[defender.nature][0] === defenseStat ? "+" : NATURES[defender.nature][1] === defenseStat ? "-" : "") + " " + - toSmogonStat(defenseStat); - if (defender.boosts[defenseStat] === 0 || (isCritical && defender.boosts[defenseStat] > 0) || move.ignoresDefenseBoosts) { - defense = defender.rawStats[defenseStat]; - } else if (attacker.ability === "Unaware") { - defense = defender.rawStats[defenseStat]; - description.attackerAbility = attacker.ability; - } else { - defense = defender.stats[defenseStat]; - description.defenseBoost = defender.boosts[defenseStat]; - } - - // unlike all other defense modifiers, Sandstorm SpD boost gets applied directly - if (field.weather === "Sand" && (defender.type1 === "Rock" || defender.type2 === "Rock") && !hitsPhysical) { - defense = pokeRound(defense * 3/2); - description.weather = field.weather; - } - var dfMods = []; - if (defAbility === "Flower Gift" && field.weather.indexOf("Sun") > -1 && !hitsPhysical) { - dfMods.push(0x1800); - description.defenderAbility = defAbility; - description.weather = field.weather; - } - if ((defAbility === "Marvel Scale" && defender.status !== "Healthy" && hitsPhysical) || - (defAbility === "Grass Pelt" && terrain === "Grassy" && hitsPhysical)) { - dfMods.push(0x1800); - description.defenderAbility = defAbility; - } else if (defAbility === "Fur Coat" && hitsPhysical) { - dfMods.push(0x2000); - description.defenderAbility = defAbility; - } + var defense; + [defense, description] = calcDefense(move, attacker, defender, description, hitsPhysical, isCritical, field); - if ((defender.item === "Soul Dew" && (defender.name === "Latios" || defender.name === "Latias") && !hitsPhysical) || - (defender.item === "Assault Vest" && !hitsPhysical) || - defender.item === "Eviolite") { - dfMods.push(0x1800); - description.defenderItem = defender.item; - } else if ((defender.item === "Deep Sea Scale" && defender.name === "Clamperl" && !hitsPhysical) || - (defender.item === "Metal Powder" && defender.name === "Ditto")) { - dfMods.push(0x2000); - description.defenderItem = defender.item; - } + var dfMods; + [dfMods, description] = calcDefMods(move, defender, field, description, hitsPhysical, defAbility); defense = Math.max(1, pokeRound(defense * chainMods(dfMods) / 0x1000)); //////////////////////////////// //////////// DAMAGE //////////// //////////////////////////////// - var baseDamage = Math.floor(Math.floor((Math.floor((2 * attacker.level) / 5 + 2) * basePower * attack) / defense) / 50 + 2); - if (field.format !== "Singles" && move.isSpread) { - baseDamage = pokeRound(baseDamage * 0xC00 / 0x1000); - } - //Parental Bond modifier should apply here + var baseDamage = calcBaseDamage(attacker, basePower, attack, defense); - if ((field.weather.indexOf("Sun") > -1 && move.type === "Fire") || (field.weather.indexOf("Rain") > -1 && move.type === "Water")) { - baseDamage = pokeRound(baseDamage * 0x1800 / 0x1000); - description.weather = field.weather; - //Need to move Strong Winds check out; I strongly suspect it's a hard modifier to type effectiveness - //May 2022: This has been fixed but there still needs to be a description for it, so it's handled here - } else if ((field.weather === "Strong Winds" && (defender.type1 === "Flying" || defender.type2 === "Flying") && - typeChart[move.type]["Flying"] > 1)) { - description.weather = field.weather; - } else if ((field.weather === "Sun" && move.type === "Water") || (field.weather === "Rain" && move.type === "Fire") /*|| - (field.weather === "Strong Winds" && (defender.type1 === "Flying" || defender.type2 === "Flying") && - typeChart[move.type]["Flying"] > 1)*/) { - baseDamage = pokeRound(baseDamage * 0x800 / 0x1000); - description.weather = field.weather; - } - if (isCritical) { - baseDamage = Math.floor(baseDamage * (gen >= 6 ? 1.5 : 2)); - description.isCritical = isCritical; - } - // 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 - var stabMod = 0x1000; - if (move.type === attacker.type1 || move.type === attacker.type2) { - if (attacker.ability === "Adaptability") { - stabMod = 0x2000; - description.attackerAbility = attacker.ability; - } else { - stabMod = 0x1800; - } - } else if (attacker.ability === "Protean") { - stabMod = 0x1800; - description.attackerAbility = attacker.ability; - } - var applyBurn = (attacker.status === "Burned" && move.category === "Physical" && attacker.ability !== "Guts" && !move.ignoresBurn); - description.isBurned = applyBurn; - var finalMods = []; - if (field.isReflect && move.category === "Physical" && !isCritical) { - finalMods.push(field.format !== "Singles" ? 0xAAC : 0x800); - description.isReflect = true; - } else if (field.isLightScreen && move.category === "Special" && !isCritical) { - finalMods.push(field.format !== "Singles" ? 0xAAC : 0x800); - description.isLightScreen = true; - } - if (attacker.ability === "Sniper" && isCritical) { - finalMods.push(0x1800); - description.attackerAbility = attacker.ability; - } - if (attacker.ability === "Tinted Lens" && typeEffectiveness < 1) { - finalMods.push(0x2000); - description.attackerAbility = attacker.ability; - } - if (defAbility === "Multiscale" && defender.curHP === defender.maxHP) { - finalMods.push(0x800); - description.defenderAbility = defAbility; - } - if (field.isFriendGuard) { - finalMods.push(0xC00); - description.isFriendGuard = true; - } - if ((defAbility === "Solid Rock" || defAbility === "Filter") && typeEffectiveness > 1) { - finalMods.push(0xC00); - description.defenderAbility = defAbility; - } - if (attacker.item === "Expert Belt" && typeEffectiveness > 1) { - finalMods.push(0x1333); - description.attackerItem = attacker.item; - } else if (attacker.item === "Life Orb") { - finalMods.push(0x14CC); - description.attackerItem = attacker.item; - } - if (getBerryResistType(defender.item) === move.type && (typeEffectiveness > 1 || move.type === "Normal") && - attacker.ability !== "Unnerve") { - finalMods.push(0x800); - description.defenderItem = defender.item; - } - var finalMod = chainMods(finalMods); - - var damage = [], pbDamage = []; - var child, childDamage, j; - if (attacker.ability === "Parental Bond" && move.hits === 1 && (field.format === "Singles" || !move.isSpread)) { - child = JSON.parse(JSON.stringify(attacker)); - child.ability = ''; - child.isChild = true; - if (move.name === 'Power-Up Punch') { - child.boosts[AT]++; - child.stats[AT] = getModifiedStat(child.rawStats[AT], child.boosts[AT]); - } - childDamage = GET_DAMAGE_XY(child, defender, move, field).damage; - description.attackerAbility = attacker.ability; - } - for (var i = 0; i < 16; i++) { - damage[i] = Math.floor(baseDamage * (85 + i) / 100); - damage[i] = pokeRound(damage[i] * stabMod / 0x1000); - damage[i] = Math.floor(damage[i] * typeEffectiveness); - if (applyBurn) { - damage[i] = Math.floor(damage[i] / 2); - } - damage[i] = pokeRound(damage[i] * finalMod / 0x1000); - damage[i] = Math.max(1, damage[i]); - if (attacker.ability === "Parental Bond" && move.hits === 1 && (field.format === "Singles" || !move.isSpread)) { - for (j = 0; j < 16; j++) { - pbDamage[(16 * i) + j] = damage[i] + childDamage[j]; - } - } - } - // Return a bit more info if this is a Parental Bond usage. - if (pbDamage.length) { - return { - "damage": pbDamage.sort(numericSort), - "parentDamage": damage, - "childDamage": childDamage, - "description": buildDescription(description) - }; - } - return {"damage": pbDamage.length ? pbDamage.sort(numericSort) : damage, "description": buildDescription(description)}; -} - -function getFinalSpeedXY(pokemon, weather, terrain) { - var speed = getModifiedStat(pokemon.rawStats[SP], pokemon.boosts[SP]); - var otherSpeedMods = 1; - if (pokemon.item === "Choice Scarf") { - otherSpeedMods *= 1.5; - } else if (pokemon.item === "Macho Brace" || pokemon.item === "Iron Ball") { - otherSpeedMods *= 0.5; - } - if (pokemon.ability === "Quick Feet" && pokemon.status !== "Healthy") - { - otherSpeedMods *= 1.5; - } - if (pokemon.ability === "Slow Start") - { - otherSpeedMods *= 0.5; - } - if ((pokemon.ability === "Chlorophyll" && weather.indexOf("Sun") > -1) || - (pokemon.ability === "Sand Rush" && weather === "Sand") || - (pokemon.ability === "Swift Swim" && weather.indexOf("Rain") > -1) || - (pokemon.ability === "Unburden" && pokemon.item === "") || - (pokemon.name === "Ditto" && pokemon.item === "Quick Powder")) { - otherSpeedMods *= 2; - } - speed = pokeRound(speed * otherSpeedMods); - if (pokemon.status === "Paralyzed" && pokemon.ability !== "Quick Feet") { - speed = Math.floor(speed / 2); - } - if (speed > 10000) {speed = 10000;} - return speed; -} -// GameFreak rounds DOWN on .5 -function pokeRound(num) { - return (num % 1 > 0.5) ? Math.ceil(num) : Math.floor(num); + return calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field, description, isCritical, typeEffectiveness, false, hitsPhysical); } diff --git a/script_res/damage_xy_old.js b/script_res/damage_xy_old.js new file mode 100644 index 0000000..00fd408 --- /dev/null +++ b/script_res/damage_xy_old.js @@ -0,0 +1,650 @@ +/* Damage calculation for the Generation VI games, X, Y, Omega Ruby, and Alpha Sapphire*/ + +function CALCULATE_ALL_MOVES_XY(p1, p2, field) { + checkAirLock(p1, field); + checkAirLock(p2, field); + checkForecast(p1, field.getWeather()); + checkForecast(p2, field.getWeather()); + checkKlutz(p1); + checkKlutz(p2); + checkEvo(p1, p2); + p1.stats[DF] = getModifiedStat(p1.rawStats[DF], p1.boosts[DF]); + p1.stats[SD] = getModifiedStat(p1.rawStats[SD], p1.boosts[SD]); + p1.stats[SP] = getFinalSpeedXY(p1, field.getWeather(), field.getTerrain()); + $(".p1-speed-mods").text(p1.stats[SP]); + p2.stats[DF] = getModifiedStat(p2.rawStats[DF], p2.boosts[DF]); + p2.stats[SD] = getModifiedStat(p2.rawStats[SD], p2.boosts[SD]); + p2.stats[SP] = getFinalSpeedXY(p2, field.getWeather(), field.getTerrain()); + $(".p2-speed-mods").text(p1.stats[SP]); + checkIntimidate(p1, p2); + checkIntimidate(p2, p1); + checkDownload(p1, p2); + checkDownload(p2, p1); + p1.stats[AT] = getModifiedStat(p1.rawStats[AT], p1.boosts[AT]); + p1.stats[SA] = getModifiedStat(p1.rawStats[SA], p1.boosts[SA]); + p2.stats[AT] = getModifiedStat(p2.rawStats[AT], p2.boosts[AT]); + p2.stats[SA] = getModifiedStat(p2.rawStats[SA], p2.boosts[SA]); + var side1 = field.getSide(1); + var side2 = field.getSide(0); + checkInfiltrator(p1, side1); + checkInfiltrator(p2, side2); + var results = [[],[]]; + for (var i = 0; i < 4; i++) { + results[0][i] = GET_DAMAGE_XY(p1, p2, p1.moves[i], side1); + results[1][i] = GET_DAMAGE_XY(p2, p1, p2.moves[i], side2); + } + return results; +} + +function GET_DAMAGE_XY(attacker, defender, move, field) { + var moveDescName = move.name; + var description = { + "attackerName": attacker.name, + "moveName": moveDescName, + "defenderName": defender.name + }; + if (move.bp === 0) { + return {"damage":[0], "description":buildDescription(description)}; + } + + var defAbility = defender.ability; + if (["Mold Breaker", "Teravolt", "Turboblaze"].indexOf(attacker.ability) !== -1) { + defAbility = ""; + description.attackerAbility = attacker.ability; + } + + var isCritical = move.isCrit && ["Battle Armor", "Shell Armor"].indexOf(defAbility) === -1; + + if (move.name === "Weather Ball") { + move.type = field.weather.indexOf("Sun") > -1 ? "Fire" + : field.weather.indexOf("Rain") > -1 ? "Water" + : field.weather === "Sand" ? "Rock" + : field.weather === "Hail" ? "Ice" + : "Normal"; + description.weather = field.weather; + description.moveType = move.type; + } else if (move.name === "Judgment" && attacker.item.indexOf("Plate") !== -1) { + move.type = getItemBoostType(attacker.item); + } else if (move.name === "Natural Gift" && attacker.item.indexOf("Berry") !== -1) { + var gift = getNaturalGift(attacker.item); + move.type = gift.t; + move.bp = gift.p; + description.attackerItem = attacker.item; + description.moveBP = move.bp; + description.moveType = move.type; + } else if (move.name === "Nature Power") { + move.type = field.terrain === "Electric" ? "Electric" : field.terrain === "Grassy" ? "Grass" : field.terrain === "Misty" ? "Fairy" : move.type = field.terrain === "Psychic" ? "Psychic" : "Normal"; + } + + var isAerilate = attacker.ability === "Aerilate" && move.type === "Normal"; + var isPixilate = attacker.ability === "Pixilate" && move.type === "Normal"; + var isRefrigerate = attacker.ability === "Refrigerate" && move.type === "Normal"; + var isNormalize = attacker.ability === "Normalize"; //Boosts on any type + if (isAerilate) { + move.type = "Flying"; + } else if (isPixilate) { + move.type = "Fairy"; + } else if (isRefrigerate) { + move.type = "Ice"; + } else if (isNormalize) { + move.type = "Normal"; + description.attackerAbility = attacker.ability; + } + + var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, attacker.ability === "Scrappy" || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds"); + var typeEffect2 = defender.type2 ? getMoveEffectiveness(move, defender.type2, defender.type1, attacker.ability === "Scrappy" || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds") : 1; + var typeEffectiveness = typeEffect1 * typeEffect2; + + if (typeEffectiveness === 0) { + return {"damage":[0], "description":buildDescription(description)}; + } + if ((defAbility === "Wonder Guard" && typeEffectiveness <= 1) || + (move.type === "Grass" && defAbility === "Sap Sipper") || + (move.type === "Fire" && defAbility.indexOf("Flash Fire") !== -1) || + (move.type === "Water" && ["Dry Skin", "Storm Drain", "Water Absorb"].indexOf(defAbility) !== -1) || + (move.type === "Electric" && ["Lightning Rod", "Lightning Rod", "Motor Drive", "Volt Absorb"].indexOf(defAbility) !== -1) || + (move.type === "Ground" && !field.isGravity && defAbility === "Levitate") || + (move.isBullet && defAbility === "Bulletproof") || + (move.isSound && defAbility === "Soundproof")) { + description.defenderAbility = defAbility; + return {"damage":[0], "description":buildDescription(description)}; + } + if (move.type === "Ground" && !field.isGravity && defender.item === "Air Balloon" && attacker.move != "Thousand Arrows") { + description.defenderItem = defender.item; + return {"damage":[0], "description":buildDescription(description)}; + } + if ((field.weather === "Harsh Sun" && move.type === "Water") || (field.weather === "Heavy Rain" && move.type === "Fire")) { + return {"damage":[0], "description":buildDescription(description)}; + } + if (move.name === "Sky Drop" && + ([defender.type1, defender.type2].indexOf("Flying") !== -1 || + defender.weight >= 200.0 || field.isGravity)) { + return {"damage":[0], "description":buildDescription(description)}; + } + if (move.name === "Synchronoise" && + [defender.type1, defender.type2].indexOf(attacker.type1) === -1 && [defender.type1, defender.type2].indexOf(attacker.type2) === -1) { + return {"damage": [0], "description": buildDescription(description)}; + } + + description.HPEVs = defender.HPEVs + " HP"; + + if (move.name === "Seismic Toss" || move.name === "Night Shade") { + var lv = attacker.level; + if (attacker.ability === "Parental Bond") { + lv *= 2; + } + return {"damage":[lv], "description":buildDescription(description)}; + } + + if (move.hits > 1) { + description.hits = move.hits; + } + var turnOrder = attacker.stats[SP] > defender.stats[SP] ? "FIRST" : "LAST"; + + //////////////////////////////// + ////////// BASE POWER ////////// + //////////////////////////////// + var basePower; + switch (move.name) { + case "Payback": + basePower = turnOrder === "LAST" ? 100 : 50; + description.moveBP = basePower; + break; + case "Electro Ball": + var r = Math.floor(attacker.stats[SP] / defender.stats[SP]); + basePower = r >= 4 ? 150 : r >= 3 ? 120 : r >= 2 ? 80 : 60; + description.moveBP = basePower; + break; + case "Gyro Ball": + basePower = Math.min(150, Math.floor(25 * defender.stats[SP] / attacker.stats[SP])); + description.moveBP = basePower; + break; + case "Punishment": + basePower = Math.min(200, 60 + 20 * countBoosts(defender.boosts)); + description.moveBP = basePower; + break; + case "Low Kick": + case "Grass Knot": + var w = defender.weight; + basePower = w >= 200 ? 120 : w >= 100 ? 100 : w >= 50 ? 80 : w >= 25 ? 60 : w >= 10 ? 40 : 20; + description.moveBP = basePower; + break; + case "Hex": + basePower = move.bp * (defender.status !== "Healthy" ? 2 : 1); + description.moveBP = basePower; + break; + case "Brine": + basePower = move.bp * (defender.hp/defender.maxHP <= 0.5 ? 2: 1); + description.moveBP = basePower; + break; + case "Heavy Slam": + case "Heat Crash": + var wr = attacker.weight / defender.weight; + basePower = wr >= 5 ? 120 : wr >= 4 ? 100 : wr >= 3 ? 80 : wr >= 2 ? 60 : 40; + description.moveBP = basePower; + break; + case "Stored Power": + basePower = 20 + 20 * countBoosts(attacker.boosts); + description.moveBP = basePower; + break; + case "Acrobatics": + basePower = attacker.item === "Flying Gem" || attacker.item === "" ? 110 : 55; + description.moveBP = basePower; + break; + case "Wake-Up Slap": + basePower = move.bp * (defender.status === "Asleep" ? 2 : 1); + description.moveBP = basePower; + break; + case "Weather Ball": + basePower = field.weather !== "" ? 100 : 50; + description.moveBP = basePower; + break; + case "Fling": + basePower = getFlingPower(attacker.item); + description.moveBP = basePower; + description.attackerItem = attacker.item; + break; + case "Eruption": + case "Water Spout": + basePower = Math.max(1, Math.floor(150 * attacker.curHP / attacker.maxHP)); + description.moveBP = basePower; + break; + case "Flail": + case "Reversal": + var 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; + description.moveBP = basePower; + break; + case "Nature Power": + basePower = (field.terrain === "Electric" || field.terrain === "Grassy") ? 90 : (field.terrain === "Misty") ? 95 : 80; + break; + default: + basePower = move.bp; + } + + var bpMods = []; + + var isAttackerAura = (attacker.ability === (move.type + " Aura")); + var isDefenderAura = defAbility === (move.type + " Aura"); + var auraActive = ($("input:checkbox[id='" + move.type.toLowerCase() + "-aura']:checked").val() != undefined); + var auraBreak = ($("input:checkbox[id='aura-break']:checked").val() != undefined); + + if (auraActive && auraBreak) { + bpMods.push(0x0C00); + description.attackerAbility = attacker.ability; + description.defenderAbility = defAbility; + } + + if(isAerilate || isPixilate || isRefrigerate) + { + bpMods.push(0x14CD); + description.attackerAbility = attacker.ability; + } else if ((attacker.ability === "Reckless" && move.hasRecoil) || (attacker.ability === "Iron Fist" && move.isPunch)) { + bpMods.push(0x1333); + description.attackerAbility = attacker.ability; + } + + if (attacker.ability === "Sheer Force" && move.hasSecondaryEffect) { + bpMods.push(0x14CD); + description.attackerAbility = attacker.ability; + } else if (attacker.ability === "Sand Force" && field.weather === "Sand" && ["Rock","Ground","Steel"].indexOf(move.type) !== -1) { + bpMods.push(0x14CD); + description.attackerAbility = attacker.ability; + description.weather = field.weather; + } else if (attacker.ability === "Analytic" && turnOrder !== "FIRST") { + bpMods.push(0x14CD); + description.attackerAbility = attacker.ability; + } else if (attacker.ability === "Tough Claws" && move.makesContact) { + bpMods.push(0x14CD); + description.attackerAbility = attacker.ability; + } + + if (auraActive && !auraBreak) { + bpMods.push(0x1548); + if (isAttackerAura) { + description.attackerAbility = attacker.ability; + } + if (isDefenderAura) { + description.defenderAbility = defAbility; + } + } + + //If the BP before this point would trigger Technician, don't apply it + var tempBP = pokeRound(basePower * chainMods(bpMods) / 0x1000); + + if ((attacker.ability === "Technician" && tempBP <= 60) || + (attacker.ability === "Flare Boost" && attacker.status === "Burned" && move.category === "Special") || + (attacker.ability === "Toxic Boost" && (attacker.status === "Poisoned" || attacker.status === "Badly Poisoned") && move.category === "Physical") || + (attacker.ability === "Mega Launcher" && move.isPulse) || + (attacker.ability === "Strong Jaw" && move.isBite)) { + bpMods.push(0x1800); + description.attackerAbility = attacker.ability; + } + + if (defAbility === "Heatproof" && move.type === "Fire") { + bpMods.push(0x800); + description.defenderAbility = defAbility; + } else if (defAbility === "Dry Skin" && move.type === "Fire") { + bpMods.push(0x1400); + description.defenderAbility = defAbility; + } + + if (getItemBoostType(attacker.item) === move.type) { + bpMods.push(0x1333); + description.attackerItem = attacker.item; + } else if ((attacker.item === "Muscle Band" && move.category === "Physical") || + (attacker.item === "Wise Glasses" && move.category === "Special")) { + bpMods.push(0x1199); + description.attackerItem = attacker.item; + } else if (((attacker.item === "Adamant Orb" && attacker.name === "Dialga") || + (attacker.item === "Lustrous Orb" && attacker.name === "Palkia") || + (attacker.item === "Griseous Orb" && attacker.name === "Giratina-O")) && + (move.type === attacker.type1 || move.type === attacker.type2)) { + bpMods.push(0x1333); + description.attackerItem = attacker.item; + } else if (attacker.item === move.type + " Gem") { + bpMods.push(0x14CD); + description.attackerItem = attacker.item; + } + + if (move.name === "Solar Beam" && ["None", "Sun", "Harsh Sun"].indexOf(field.weather) === -1) { + bpMods.push(0x800); + description.moveBP = move.bp / 2; + description.weather = field.weather; + } //technicially Me First would sandwich between these + else if (move.name === "Knock Off" && !(defender.item === "" || + (defender.name === "Giratina-O" && defender.item === "Griseous Orb") || + (defender.name.indexOf("Arceus") !== -1 && defender.item.indexOf("Plate") !== -1))) { + bpMods.push(0x1800); + description.moveBP = move.bp * 1.5; + } + + if (field.isHelpingHand) { + bpMods.push(0x1800); + description.isHelpingHand = true; + } + + if ((move.name === "Facade" && ["Burned","Paralyzed","Poisoned","Badly Poisoned"].indexOf(attacker.status) !== -1) || + (move.name === "Brine" && defender.curHP <= defender.maxHP / 2) || + (move.name === "Venoshock" && (defender.status === "Poisoned" || defender.status === "Badly Poisoned"))) { + bpMods.push(0x2000); + description.moveBP = move.bp * 2; + } + + //Technically Retaliate and Fusion Flare/Fusion Bolt conditions + if (field.isGravity || (attacker.type1 !== "Flying" && attacker.type2 !== "Flying" && + attacker.item !== "Air Balloon" && attacker.ability !== "Levitate")) { + if (field.terrain === "Electric" && move.type === "Electric") { + bpMods.push(0x1800); + description.terrain = field.terrain; + } else if (field.terrain === "Grassy" && move.type == "Grass") { + bpMods.push(0x1800); + description.terrain = field.terrain; + } + } + if (field.isGravity || (defender.type1 !== "Flying" && defender.type2 !== "Flying" && + defender.item !== "Air Balloon" && defender.ability !== "Levitate")) { + if ((field.terrain === "Misty" && move.type === "Dragon") || + (field.terrain === "Grassy" && (move.name === "Earthquake" || move.name === "Bulldoze"))) { + bpMods.push(0x800); + description.terrain = field.terrain; + } + } + + //Technically Mud Sport/Water Sport here next + + basePower = Math.max(1, pokeRound(basePower * chainMods(bpMods) / 0x1000)); + basePower = attacker.isChild ? basePower / 2 : basePower; + + //////////////////////////////// + ////////// (SP)ATTACK ////////// + //////////////////////////////// + + var attack; + var attackSource = move.name === "Foul Play" ? defender : attacker; + var attackStat = move.category === "Physical" ? AT : SA; + description.attackEVs = attacker.evs[attackStat] + + (NATURES[attacker.nature][0] === attackStat ? "+" : NATURES[attacker.nature][1] === attackStat ? "-" : "") + " " + + toSmogonStat(attackStat); + if (attackSource.boosts[attackStat] === 0 || (isCritical && attackSource.boosts[attackStat] < 0)) { + attack = attackSource.rawStats[attackStat]; + } else if (defAbility === "Unaware") { + attack = attackSource.rawStats[attackStat]; + description.defenderAbility = defAbility; + } else { + attack = attackSource.stats[attackStat]; + description.attackBoost = attackSource.boosts[attackStat]; + } + + // unlike all other attack modifiers, Hustle gets applied directly + if (attacker.ability === "Hustle" && move.category === "Physical") { + attack = pokeRound(attack * 3/2); + description.attackerAbility = attacker.ability; + } + + var atMods = []; + + //Slow Start also halves damage with special Z-moves + if ((attacker.ability === "Slow Start" && move.category === "Physical") || + (attacker.ability === "Defeatist" && attacker.curHP <= attacker.maxHP / 2)) { + atMods.push(0x800); + description.attackerAbility = attacker.ability; + } + if (attacker.ability === "Flower Gift" && field.weather.indexOf("Sun") > -1 && move.category === "Physical") { + atMods.push(0x1800); + description.attackerAbility = attacker.ability; + description.weather = field.weather; + } + if ((attacker.ability === "Guts" && attacker.status !== "Healthy" && move.category === "Physical") || + (attacker.ability === "Overgrow" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Grass") || + (attacker.ability === "Blaze" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Fire") || + (attacker.ability === "Torrent" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Water") || + (attacker.ability === "Swarm" && attacker.curHP <= attacker.maxHP / 3 && move.type === "Bug")) { + atMods.push(0x1800); + description.attackerAbility = attacker.ability; + } else if (attacker.ability === "Flash Fire (activated)" && move.type === "Fire") { + atMods.push(0x1800); + description.attackerAbility = "Flash Fire"; + } else if (attacker.ability === "Solar Power" && field.weather.indexOf("Sun") > -1 && move.category === "Special") { + atMods.push(0x1800); + description.attackerAbility = attacker.ability; + description.weather = field.weather; + } + //Technically Plus/Minus occur ^ as well + + //Technically Stakeout goes here as well + if ((attacker.ability === "Huge Power" || attacker.ability === "Pure Power") && move.category === "Physical") { + atMods.push(0x2000); + description.attackerAbility = attacker.ability; + } + if (defAbility === "Thick Fat" && (move.type === "Fire" || move.type === "Ice")) { + atMods.push(0x800); + description.defenderAbility = defAbility; + } + + if ((attacker.item === "Thick Club" && (attacker.name === "Cubone" || attacker.name === "Marowak" || attacker.name === "Marowak-Alola") && move.category === "Physical") || + (attacker.item === "Deep Sea Tooth" && attacker.name === "Clamperl" && move.category === "Special") || + (attacker.item === "Light Ball" && attacker.name === "Pikachu")) { + atMods.push(0x2000); + description.attackerItem = attacker.item; + } else if ((attacker.item === "Soul Dew" && (attacker.name === "Latios" || attacker.name === "Latias") && move.category === "Special") || + (attacker.item === "Choice Band" && move.category === "Physical") || + (attacker.item === "Choice Specs" && move.category === "Special")) { + atMods.push(0x1800); + description.attackerItem = attacker.item; + } + + attack = Math.max(1, pokeRound(attack * chainMods(atMods) / 0x1000)); + + //////////////////////////////// + ///////// (SP)DEFENSE ////////// + //////////////////////////////// + var defense; + var hitsPhysical = move.category === "Physical" || move.dealsPhysicalDamage; + var defenseStat = hitsPhysical ? DF : SD; + description.defenseEVs = defender.evs[defenseStat] + + (NATURES[defender.nature][0] === defenseStat ? "+" : NATURES[defender.nature][1] === defenseStat ? "-" : "") + " " + + toSmogonStat(defenseStat); + if (defender.boosts[defenseStat] === 0 || (isCritical && defender.boosts[defenseStat] > 0) || move.ignoresDefenseBoosts) { + defense = defender.rawStats[defenseStat]; + } else if (attacker.ability === "Unaware") { + defense = defender.rawStats[defenseStat]; + description.attackerAbility = attacker.ability; + } else { + defense = defender.stats[defenseStat]; + description.defenseBoost = defender.boosts[defenseStat]; + } + + // unlike all other defense modifiers, Sandstorm SpD boost gets applied directly + if (field.weather === "Sand" && (defender.type1 === "Rock" || defender.type2 === "Rock") && !hitsPhysical) { + defense = pokeRound(defense * 3/2); + description.weather = field.weather; + } + + var dfMods = []; + if (defAbility === "Flower Gift" && field.weather.indexOf("Sun") > -1 && !hitsPhysical) { + dfMods.push(0x1800); + description.defenderAbility = defAbility; + description.weather = field.weather; + } + if ((defAbility === "Marvel Scale" && defender.status !== "Healthy" && hitsPhysical) || + (defAbility === "Grass Pelt" && terrain === "Grassy" && hitsPhysical)) { + dfMods.push(0x1800); + description.defenderAbility = defAbility; + } else if (defAbility === "Fur Coat" && hitsPhysical) { + dfMods.push(0x2000); + description.defenderAbility = defAbility; + } + + if ((defender.item === "Soul Dew" && (defender.name === "Latios" || defender.name === "Latias") && !hitsPhysical) || + (defender.item === "Assault Vest" && !hitsPhysical) || + defender.item === "Eviolite") { + dfMods.push(0x1800); + description.defenderItem = defender.item; + } else if ((defender.item === "Deep Sea Scale" && defender.name === "Clamperl" && !hitsPhysical) || + (defender.item === "Metal Powder" && defender.name === "Ditto")) { + dfMods.push(0x2000); + description.defenderItem = defender.item; + } + + defense = Math.max(1, pokeRound(defense * chainMods(dfMods) / 0x1000)); + + //////////////////////////////// + //////////// DAMAGE //////////// + //////////////////////////////// + var baseDamage = Math.floor(Math.floor((Math.floor((2 * attacker.level) / 5 + 2) * basePower * attack) / defense) / 50 + 2); + if (field.format !== "Singles" && move.isSpread) { + baseDamage = pokeRound(baseDamage * 0xC00 / 0x1000); + } + //Parental Bond modifier should apply here + + if ((field.weather.indexOf("Sun") > -1 && move.type === "Fire") || (field.weather.indexOf("Rain") > -1 && move.type === "Water")) { + baseDamage = pokeRound(baseDamage * 0x1800 / 0x1000); + description.weather = field.weather; + //Need to move Strong Winds check out; I strongly suspect it's a hard modifier to type effectiveness + //May 2022: This has been fixed but there still needs to be a description for it, so it's handled here + } else if ((field.weather === "Strong Winds" && (defender.type1 === "Flying" || defender.type2 === "Flying") && + typeChart[move.type]["Flying"] > 1)) { + description.weather = field.weather; + } else if ((field.weather === "Sun" && move.type === "Water") || (field.weather === "Rain" && move.type === "Fire") /*|| + (field.weather === "Strong Winds" && (defender.type1 === "Flying" || defender.type2 === "Flying") && + typeChart[move.type]["Flying"] > 1)*/) { + baseDamage = pokeRound(baseDamage * 0x800 / 0x1000); + description.weather = field.weather; + } + if (isCritical) { + baseDamage = Math.floor(baseDamage * (gen >= 6 ? 1.5 : 2)); + description.isCritical = isCritical; + } + // 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 + var stabMod = 0x1000; + if (move.type === attacker.type1 || move.type === attacker.type2) { + if (attacker.ability === "Adaptability") { + stabMod = 0x2000; + description.attackerAbility = attacker.ability; + } else { + stabMod = 0x1800; + } + } else if (attacker.ability === "Protean") { + stabMod = 0x1800; + description.attackerAbility = attacker.ability; + } + var applyBurn = (attacker.status === "Burned" && move.category === "Physical" && attacker.ability !== "Guts" && !move.ignoresBurn); + description.isBurned = applyBurn; + var finalMods = []; + if (field.isReflect && move.category === "Physical" && !isCritical) { + finalMods.push(field.format !== "Singles" ? 0xAAC : 0x800); + description.isReflect = true; + } else if (field.isLightScreen && move.category === "Special" && !isCritical) { + finalMods.push(field.format !== "Singles" ? 0xAAC : 0x800); + description.isLightScreen = true; + } + if (attacker.ability === "Sniper" && isCritical) { + finalMods.push(0x1800); + description.attackerAbility = attacker.ability; + } + if (attacker.ability === "Tinted Lens" && typeEffectiveness < 1) { + finalMods.push(0x2000); + description.attackerAbility = attacker.ability; + } + if (defAbility === "Multiscale" && defender.curHP === defender.maxHP) { + finalMods.push(0x800); + description.defenderAbility = defAbility; + } + if (field.isFriendGuard) { + finalMods.push(0xC00); + description.isFriendGuard = true; + } + if ((defAbility === "Solid Rock" || defAbility === "Filter") && typeEffectiveness > 1) { + finalMods.push(0xC00); + description.defenderAbility = defAbility; + } + if (attacker.item === "Expert Belt" && typeEffectiveness > 1) { + finalMods.push(0x1333); + description.attackerItem = attacker.item; + } else if (attacker.item === "Life Orb") { + finalMods.push(0x14CC); + description.attackerItem = attacker.item; + } + if (getBerryResistType(defender.item) === move.type && (typeEffectiveness > 1 || move.type === "Normal") && + attacker.ability !== "Unnerve") { + finalMods.push(0x800); + description.defenderItem = defender.item; + } + var finalMod = chainMods(finalMods); + + var damage = [], pbDamage = []; + var child, childDamage, j; + if (attacker.ability === "Parental Bond" && move.hits === 1 && (field.format === "Singles" || !move.isSpread)) { + child = JSON.parse(JSON.stringify(attacker)); + child.ability = ''; + child.isChild = true; + if (move.name === 'Power-Up Punch') { + child.boosts[AT]++; + child.stats[AT] = getModifiedStat(child.rawStats[AT], child.boosts[AT]); + } + childDamage = GET_DAMAGE_XY(child, defender, move, field).damage; + description.attackerAbility = attacker.ability; + } + for (var i = 0; i < 16; i++) { + damage[i] = Math.floor(baseDamage * (85 + i) / 100); + damage[i] = pokeRound(damage[i] * stabMod / 0x1000); + damage[i] = Math.floor(damage[i] * typeEffectiveness); + if (applyBurn) { + damage[i] = Math.floor(damage[i] / 2); + } + damage[i] = pokeRound(damage[i] * finalMod / 0x1000); + damage[i] = Math.max(1, damage[i]); + if (attacker.ability === "Parental Bond" && move.hits === 1 && (field.format === "Singles" || !move.isSpread)) { + for (j = 0; j < 16; j++) { + pbDamage[(16 * i) + j] = damage[i] + childDamage[j]; + } + } + } + // Return a bit more info if this is a Parental Bond usage. + if (pbDamage.length) { + return { + "damage": pbDamage.sort(numericSort), + "parentDamage": damage, + "childDamage": childDamage, + "description": buildDescription(description) + }; + } + return {"damage": pbDamage.length ? pbDamage.sort(numericSort) : damage, "description": buildDescription(description)}; +} + +function getFinalSpeedXY(pokemon, weather, terrain) { + var speed = getModifiedStat(pokemon.rawStats[SP], pokemon.boosts[SP]); + var otherSpeedMods = 1; + if (pokemon.item === "Choice Scarf") { + otherSpeedMods *= 1.5; + } else if (pokemon.item === "Macho Brace" || pokemon.item === "Iron Ball") { + otherSpeedMods *= 0.5; + } + if (pokemon.ability === "Quick Feet" && pokemon.status !== "Healthy") + { + otherSpeedMods *= 1.5; + } + if (pokemon.ability === "Slow Start") + { + otherSpeedMods *= 0.5; + } + if ((pokemon.ability === "Chlorophyll" && weather.indexOf("Sun") > -1) || + (pokemon.ability === "Sand Rush" && weather === "Sand") || + (pokemon.ability === "Swift Swim" && weather.indexOf("Rain") > -1) || + (pokemon.ability === "Unburden" && pokemon.item === "") || + (pokemon.name === "Ditto" && pokemon.item === "Quick Powder")) { + otherSpeedMods *= 2; + } + speed = pokeRound(speed * otherSpeedMods); + if (pokemon.status === "Paralyzed" && pokemon.ability !== "Quick Feet") { + speed = Math.floor(speed / 2); + } + if (speed > 10000) {speed = 10000;} + return speed; +} + +// GameFreak rounds DOWN on .5 +function pokeRound(num) { + return (num % 1 > 0.5) ? Math.ceil(num) : Math.floor(num); +} diff --git a/script_res/item_data.js b/script_res/item_data.js index 019095c..01b27f3 100644 --- a/script_res/item_data.js +++ b/script_res/item_data.js @@ -874,7 +874,7 @@ function cantRemoveItem(defItem, defSpecies, terrain) { } function cantFlingItem(atItem, atSpecies, defAbility) { - return atItem === "" || atItem.indexOf(" Gem") !== -1 || atItem.indexOf(" ium Z") !== -1 || ["Red Orb", "Blue Orb", "Rusted Sword", "Rusted Shield"].indexOf(atItem) !== -1 + return atItem === "" || atItem === 'Klutz' || atItem.indexOf(" Gem") !== -1 || atItem.indexOf(" ium Z") !== -1 || ["Red Orb", "Blue Orb", "Rusted Sword", "Rusted Shield"].indexOf(atItem) !== -1 || (atSpecies === 'Giratina-Origin' && atItem === "Griseous Orb") || (atSpecies === 'Arceus' && atItem.indexOf(" Plate") !== -1) || (atSpecies === 'Genesect' && atItem.indexOf(" Drive") !== -1) diff --git a/script_res/ko_chance.js b/script_res/ko_chance.js index 3ea95e0..e5e0454 100644 --- a/script_res/ko_chance.js +++ b/script_res/ko_chance.js @@ -5,8 +5,8 @@ function getKOChanceText(damage, move, defender, field, isBadDreams) { if (move.name == "Pain Split" && !move.painMax) { return 'The battlers shared their pain!'; } - if (move.category == "Status") { - return 'Might as well Thunderbolt a Landorus'; + if (move.category == "Status" && ['Me First', '(No Move)'].indexOf(move.name) == -1) { + return "It's a status move, it won't deal damage."; } if (damage[damage.length-1] === 0) { if (field.weather === "Harsh Sun" && move.type === "Water") { @@ -14,7 +14,7 @@ function getKOChanceText(damage, move, defender, field, isBadDreams) { } else if (field.weather === "Heavy Rain" && move.type === "Fire") { return 'the Fire-Type attack fizzled out in the heavy rain'; } - return '[The Smooth Taste Of] IMMUNE'; + return 'No damage for you'; } var hasSitrus = defender.item === 'Sitrus Berry'; var hasFigy = defender.item === 'Figy Berry' || defender.item === 'Aguav Berry' || defender.item === 'Iapapa Berry' || defender.item === 'Mago Berry' || defender.item === 'Wiki Berry'; diff --git a/script_res/move_data.js b/script_res/move_data.js index 4156478..ff6bd1b 100644 --- a/script_res/move_data.js +++ b/script_res/move_data.js @@ -7,9 +7,8 @@ var MOVES_RBY = { zp: 1 }, '(No Move)': { - bp: 0, type: 'Normal', - category: 'Physical' + category: 'Status' }, 'Acid': { bp: 40, @@ -679,13 +678,13 @@ var MOVES_RBY = { category: 'Physical', makesContact: true, }, - //'Counter': { - // bp: 1, - // type: 'Fighting', - // category: 'Physical', - // makesContact: true, - // usesOppMoves: true, - //}, + 'Counter': { + bp: 1, + type: 'Fighting', + category: 'Physical', + makesContact: true, + usesOppMoves: true, + }, 'Strength': { bp: 80, type: 'Normal', @@ -950,6 +949,9 @@ var MOVES_RBY = { }; var MOVES_GSC = $.extend(true, {}, MOVES_RBY, { + '(No Move)': { + type: 'Typeless', + }, 'Karate Chop': { type: 'Fighting', }, @@ -1244,7 +1246,7 @@ var MOVES_GSC = $.extend(true, {}, MOVES_RBY, { }, 'Curse': { - type: 'Ghost', + type: '???', category: 'Status' }, 'Cotton Spore': { @@ -1446,7 +1448,7 @@ var MOVES_GSC = $.extend(true, {}, MOVES_RBY, { 'Mud-Slap': { bp: 20, type: 'Ground', - category: 'Speical', + category: 'Special', hasSecondaryEffect: true }, 'Octazooka': { @@ -1534,12 +1536,12 @@ var MOVES_GSC = $.extend(true, {}, MOVES_RBY, { isSpread: true, canDouble: true, }, - //'Mirror Coat': { - // bp: 1, - // type: 'Psychic', - // category: 'Special', - // usesOppMoves: true, - //}, + 'Mirror Coat': { + bp: 1, + type: 'Psychic', + category: 'Special', + usesOppMoves: true, + }, 'Future Sight': { bp: 80, type: 'Psychic', @@ -2497,7 +2499,8 @@ var MOVES_DPP = $.extend(true, {}, MOVES_ADV, { bp: 50, type: 'Dark', category: 'Physical', - makesContact: true + makesContact: true, + canDouble: true, }, 'Pluck': { bp: 60, @@ -2593,12 +2596,6 @@ var MOVES_DPP = $.extend(true, {}, MOVES_ADV, { makesContact: true, isPriority: true, }, - 'Swift': { - bp: 60, - type: 'Normal', - category: 'Special', - isSpread: true - }, 'Thunder Fang': { bp: 65, type: 'Electric', @@ -2721,7 +2718,7 @@ var MOVES_DPP = $.extend(true, {}, MOVES_ADV, { type: 'Normal', category: 'Status', - //usesOppMoves: true, + usesOppMoves: true, }, 'Copycat': { @@ -2832,12 +2829,12 @@ var MOVES_DPP = $.extend(true, {}, MOVES_ADV, { category: 'Physical', isPriority: true, }, - //'Metal Burst': { - // bp: 1, - // type: 'Steel', - // category: 'Physical', - // usesOppMoves: true, - //}, + 'Metal Burst': { + bp: 1, + type: 'Steel', + category: 'Physical', + usesOppMoves: true, + }, 'Trump Card': { bp: 40, type: 'Normal', @@ -3495,6 +3492,9 @@ var MOVES_BW = $.extend(true, {}, MOVES_DPP, { 'Covet': { bp: 60, }, + 'Curse': { + type: 'Ghost', + }, }); var MOVES_XY = $.extend(true, {}, MOVES_BW, { @@ -4477,6 +4477,7 @@ var MOVES_SM = $.extend(true, {}, MOVES_XY, { 'Fell Stinger': { bp: 50, }, + 'Tackle': { bp: 40 }, }); var MOVES_SS = $.extend(true, {}, MOVES_SM, { @@ -4601,7 +4602,7 @@ var MOVES_SS = $.extend(true, {}, MOVES_SM, { hasSecondaryEffect: true, makesContact: true, }, - 'Strange Stream': { + 'Strange Steam': { bp: 90, type: 'Fairy', category: 'Special', @@ -5223,6 +5224,12 @@ var MOVES_SV_NATDEX = $.extend(true, {}, MOVES_SS_NATDEX, { 'Glacial Lance': { bp: 120, }, + 'Luster Purge': { + bp: 95, + }, + 'Mist Ball': { + bp: 95, + }, //PLA moves 'Dire Claw': { @@ -5619,13 +5626,13 @@ var MOVES_SV_NATDEX = $.extend(true, {}, MOVES_SS_NATDEX, { type: 'Steel', category: 'Physical', }, - //'Comeuppance': { - // bp: 1, - // type: 'Dark', - // category: 'Physical', - // makesContact: true, - // usesOppMoves: true, - //}, + 'Comeuppance': { + bp: 1, + type: 'Dark', + category: 'Physical', + makesContact: true, + usesOppMoves: true, + }, 'Aqua Cutter': { bp: 70, type: 'Water', @@ -5697,6 +5704,100 @@ var MOVES_SV_NATDEX = $.extend(true, {}, MOVES_SS_NATDEX, { type: 'Grass', category: 'Physical', }, + //Indigo Disk new additions + 'Electro Shot': { + bp: 130, + type: 'Electric', + category: 'Special', + hasSecondaryEffect: true, //like Jet Punch, no downsides with Sheer Force + }, + 'Tera Starstorm': { + bp: 120, + type: 'Normal', + category: 'Special', + }, + 'Fickle Beam': { + bp: 80, + type: 'Dragon', + category: 'Special', + canDouble: true, + }, + 'Burning Bulwark': { + type: 'Fire', + category: 'Status', + isPriority: true, + }, + 'Thunderclap': { + bp: 70, + type: 'Electric', + category: 'Special', + isPriority: true, + }, + 'Mighty Cleave': { + bp: 95, + type: 'Rock', + category: 'Physical', + isSlice: true, + makesContact: true, + }, + 'Tachyon Cutter': { + bp: 50, + type: 'Steel', + category: 'Special', + isTwoHit: true, + isSlice: true, + }, + 'Hard Press': { + bp: 1, + type: 'Steel', + category: 'Physical', + makesContact: true, + }, + 'Dragon Cheer': { + type: 'Dragon', + category: 'Status', + }, + 'Alluring Voice': { + bp: 80, + type: 'Fairy', + category: 'Special', + hasSecondaryEffect: true, + isSound: true, + }, + 'Temper Flare': { + bp: 75, + type: 'Fire', + category: 'Physical', + canDouble: true, + makesContact: true, + }, + 'Supercell Slam': { + bp: 100, + type: 'Electric', + category: 'Physical', + makesContact: true, + }, + 'Psychic Noise': { + bp: 75, + type: 'Psychic', + category: 'Special', + hasSecondaryEffect: true, + isSound: true, + }, + 'Upper Hand': { + bp: 65, + type: 'Fighting', + category: 'Physical', + hasSecondaryEffect: true, + makesContact: true, + isPriority: true, + }, + 'Malignant Chain': { + bp: 100, + type: 'Poison', + category: 'Special', + hasSecondaryEffect: true, + }, }); var MOVES_SV = $.extend(true, {}, MOVES_SV_NATDEX, {}); @@ -5732,20 +5833,16 @@ var MOVES_SV = $.extend(true, {}, MOVES_SV_NATDEX, {}); 'Sharpen', 'Spider Web', 'Nightmare', 'Feint Attack', 'Foresight', 'Return', 'Frustration', 'Magnitude', 'Pursuit', 'Hidden Power', 'Smelling Salts', 'Assist', 'Refresh', 'Snatch', 'Secret Power', 'Camouflage', 'Tail Glow', 'Mud Sport', 'Ice Ball', 'Needle Arm', 'Odor Sleuth', 'Silver Wind', 'Grass Whistle', 'Signal Beam', - 'Sky Uppercut', 'Water Sport', 'Psycho Boost', 'Miracle Eye', 'Wake-Up Slap', 'Natural Gift', 'Embargo', 'Trump Card', + 'Sky Uppercut', 'Water Sport', 'Miracle Eye', 'Wake-Up Slap', 'Natural Gift', 'Embargo', 'Trump Card', 'Heal Block', 'Wring Out', 'Lucky Chant', 'Me First', 'Punishment', 'Mud Bomb', 'Mirror Shot', 'Rock Climb', 'Magnet Bomb', 'Captivate', 'Heal Order', 'Ominous Wind', 'Telekinesis', 'Flame Burst', 'Synchronoise', 'Chip Away', 'Sky Drop', 'Bestow', 'Heart Stamp', 'Steamroller', 'Rototiller', 'Ion Deluge', 'Spotlight', 'Laser Focus', 'Gear Up', //deleted SV moves 'Submission', 'Skull Bash', 'Hyper Fang', 'Mind Reader', 'Vital Throw', 'Hail', 'Nature Power', 'Magic Coat', 'Revenge', 'Grudge', 'Aromatherapy', 'Psycho Shift', 'Autotomize', 'Dual Chop', - 'Leaf Tornado', 'Mat Block', 'Crafty Shield', 'Flower Shield', 'Venom Drench', 'Powder', 'Power-Up Punch', 'Dragon Hammer', - 'Eternabeam', + 'Leaf Tornado', 'Mat Block', 'Crafty Shield', 'Flower Shield', 'Venom Drench', 'Powder', 'Power-Up Punch', + 'Eternabeam', 'Gear Grind', 'Head Charge', 'Lovely Kiss', 'Trick-or-Treat', 'Bonemerang', 'Octazooka', "King's Shield", + 'Kinesis', 'Electrify', 'Light of Ruin', //unusable SV moves 'Blazing Torque', 'Wicked Torque', 'Noxious Torque', 'Combat Torque', 'Magical Torque', - //currently unusable SV moves that might be usable later - 'Freeze Shock', 'Ice Burn', 'Gear Grind', 'Conversion', 'Head Charge', 'Lovely Kiss', 'Trick-or-Treat', - 'Rock Wrecker', 'Bonemerang', 'Fusion Bolt', 'Octazooka', 'Fusion Flare', 'Bolt Strike', 'Sparkling Aria', - 'Triple Kick', 'Blue Flare', 'Glaciate', "King's Shield", 'Sketch', 'Kinesis', 'Electrify', 'Conversion 2', - 'Light of Ruin', 'Floral Healing', 'Topsy-Turvy', ].forEach(e => delete MOVES_SV[e]); diff --git a/script_res/pokedex.js b/script_res/pokedex.js index 541a755..e7a516d 100644 --- a/script_res/pokedex.js +++ b/script_res/pokedex.js @@ -5636,6 +5636,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 31 }, "w": 20.0, + "ab": "Unaware", "canEvolve": true, }, "Bonsly": { @@ -5677,6 +5678,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 23 }, "w": 60.5, + "ab": "Levitate", "canEvolve": true, }, "Budew": { @@ -5691,6 +5693,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 55 }, "w": 1.2, + "ab": "Natural Cure", "canEvolve": true, }, "Buizel": { @@ -5718,6 +5721,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 85 }, "w": 5.5, + "ab": "Klutz", "canEvolve": true, }, "Burmy": { @@ -5731,6 +5735,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 36 }, "w": 3.4, + "ab": "Shed Skin", "canEvolve": true, }, "Carnivine": { @@ -5757,7 +5762,8 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sd": 42, "sp": 91 }, - "w": 1.9 + "w": 1.9, + "ab": "Tangled Feet", }, "Cherrim": { "t1": "Grass", @@ -5826,6 +5832,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 70 }, "w": 5.5, + "ab": "Honey Gather", "canEvolve": true, }, "Cranidos": { @@ -5839,6 +5846,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 58 }, "w": 31.5, + "ab": "Mold Breaker", "canEvolve": true, }, "Cresselia": { @@ -5866,6 +5874,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 50 }, "w": 23.0, + "ab": "Dry Skin", "canEvolve": true, }, "Darkrai": { @@ -5935,6 +5944,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 70 }, "w": 1.2, + "ab": "Unburden", "canEvolve": true, }, "Dusknoir": { @@ -5988,6 +5998,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 66 }, "w": 7.0, + "ab": "Swift Swim", "canEvolve": true, }, "Floatzel": { @@ -6141,6 +6152,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 85 }, "w": 3.9, + "ab": "Own Tempo", "canEvolve": true, }, "Gliscor": { @@ -6182,6 +6194,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 30 }, "w": 24.4, + "ab": "Natural Cure", "canEvolve": true, }, "Heatran": { @@ -6264,6 +6277,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 25 }, "w": 2.2, + "ab": "Shed Skin", "canEvolve": true, }, "Kricketune": { @@ -6289,7 +6303,8 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sd": 65, "sp": 95 }, - "w": 25.5 + "w": 25.5, + "ab": "Leaf Guard", }, "Lickilicky": { "t1": "Normal", @@ -6355,6 +6370,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 60 }, "w": 30.5, + "ab": "Intimidate", "canEvolve": true, }, "Luxray": { @@ -6463,6 +6479,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 60 }, "w": 13.0, + "ab": "Filter", "canEvolve": true, }, "Mismagius": { @@ -6518,6 +6535,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 5 }, "w": 105.0, + "ab": "Thick Fat", "canEvolve": true, }, "Pachirisu": { @@ -6530,7 +6548,8 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sd": 90, "sp": 95 }, - "w": 3.9 + "w": 3.9, + "ab": "Volt Absorb", }, "Palkia": { "t1": "Water", @@ -6678,6 +6697,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 60 }, "w": 20.2, + "ab": "Steadfast", "canEvolve": true, }, "Roserade": { @@ -6816,6 +6836,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 34 }, "w": 6.3, + "ab": "Storm Drain", "canEvolve": true, }, "Shieldon": { @@ -6830,6 +6851,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 30 }, "w": 57.0, + "ab": "Sturdy", "canEvolve": true, }, "Shinx": { @@ -6843,6 +6865,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 45 }, "w": 9.5, + "ab": "Intimidate", "canEvolve": true, }, "Skorupi": { @@ -6857,6 +6880,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 65 }, "w": 12.0, + "ab": "Sniper", "canEvolve": true, }, "Skuntank": { @@ -6943,6 +6967,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 60 }, "w": 2.0, + "ab": "Intimidate", "canEvolve": true, }, "Stunky": { @@ -6957,6 +6982,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sp": 74 }, "w": 19.2, + "ab": "Aftermath", "canEvolve": true, }, "Tangrowth": { @@ -7052,7 +7078,8 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sd": 102, "sp": 40 }, - "w": 38.5 + "w": 38.5, + "ab": "Pressure", }, "Weavile": { "t1": "Dark", @@ -7079,7 +7106,8 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sd": 105, "sp": 36 }, - "w": 6.5 + "w": 6.5, + "ab": "Anticipation", }, "Wormadam-Sandy": { "t1": "Bug", @@ -7092,7 +7120,8 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sd": 85, "sp": 36 }, - "w": 6.5 + "w": 6.5, + "ab": "Anticipation", }, "Wormadam-Trash": { "t1": "Bug", @@ -7105,7 +7134,8 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "sd": 95, "sp": 36 }, - "w": 6.5 + "w": 6.5, + "ab": "Anticipation", }, "Yanmega": { "t1": "Bug", @@ -7129,6 +7159,7 @@ var POKEDEX_DPP = $.extend(true, {}, POKEDEX_ADV, { "Hitmonlee": { "ab": "Reckless" }, "Hitmonchan": { "ab": "Iron Fist" }, "Kangaskhan": { "ab": "Scrappy" }, + "Scyther": { "ab": "Technician" }, "Scizor": { "ab": "Technician" }, "Sunflora": { "ab": "Solar Power" }, "Miltank": { "ab": "Scrappy" }, @@ -15348,80 +15379,14 @@ POKEDEX_SS["Charizard"].formes = ['Charizard', 'Charizard-Gmax']; POKEDEX_SS["Blastoise"].formes = ['Blastoise', 'Blastoise-Gmax']; POKEDEX_SS["Gengar"].formes = ['Gengar', 'Gengar-Gmax']; -delete POKEDEX_SS["Rattata-Alola"]; -delete POKEDEX_SS["Raticate-Alola"]; -delete POKEDEX_SS["Geodude-Alola"]; -delete POKEDEX_SS["Graveler-Alola"]; -delete POKEDEX_SS["Golem-Alola"]; -delete POKEDEX_SS["Grimer-Alola"]; -delete POKEDEX_SS["Muk-Alola"]; -delete POKEDEX_SS["Snivy"]; -delete POKEDEX_SS["Servine"]; -delete POKEDEX_SS["Serperior"]; -delete POKEDEX_SS["Tepig"]; -delete POKEDEX_SS["Pignite"]; -delete POKEDEX_SS["Emboar"]; -delete POKEDEX_SS["Oshawott"]; -delete POKEDEX_SS["Dewott"]; -delete POKEDEX_SS["Samurott"]; -delete POKEDEX_SS["Patrat"]; -delete POKEDEX_SS["Watchog"]; -delete POKEDEX_SS["Pansage"]; -delete POKEDEX_SS["Simisage"]; -delete POKEDEX_SS["Pansear"]; -delete POKEDEX_SS["Simisear"]; -delete POKEDEX_SS["Panpour"]; -delete POKEDEX_SS["Simipour"]; -delete POKEDEX_SS["Blitzle"]; -delete POKEDEX_SS["Zebstrika"]; -delete POKEDEX_SS["Sewaddle"]; -delete POKEDEX_SS["Swadloon"]; -delete POKEDEX_SS["Leavanny"]; -delete POKEDEX_SS["Ducklett"]; -delete POKEDEX_SS["Swanna"]; -delete POKEDEX_SS["Deerling"]; -delete POKEDEX_SS["Sawsbuck"]; -delete POKEDEX_SS["Alomomola"]; -delete POKEDEX_SS["Tynamo"]; -delete POKEDEX_SS["Eelektrik"]; -delete POKEDEX_SS["Eelektross"]; -delete POKEDEX_SS["Meloetta"]; -delete POKEDEX_SS["Chespin"]; -delete POKEDEX_SS["Quilladin"]; -delete POKEDEX_SS["Chesnaught"]; -delete POKEDEX_SS["Fennekin"]; -delete POKEDEX_SS["Braixen"]; -delete POKEDEX_SS["Delphox"]; -delete POKEDEX_SS["Froakie"]; -delete POKEDEX_SS["Frogadier"]; -delete POKEDEX_SS["Greninja"]; -delete POKEDEX_SS["Scatterbug"]; -delete POKEDEX_SS["Spewpa"]; -delete POKEDEX_SS["Vivillon"]; -delete POKEDEX_SS["Litleo"]; -delete POKEDEX_SS["Pyroar"]; -delete POKEDEX_SS["Flabebe"]; -delete POKEDEX_SS["Floette"]; -delete POKEDEX_SS["Florges"]; -delete POKEDEX_SS["Skiddo"]; -delete POKEDEX_SS["Gogoat"]; -delete POKEDEX_SS["Furfrou"]; -delete POKEDEX_SS["Hoopa"]; -delete POKEDEX_SS["Hoopa-Unbound"]; -delete POKEDEX_SS["Pikipek"]; -delete POKEDEX_SS["Trumbeak"]; -delete POKEDEX_SS["Toucannon"]; -delete POKEDEX_SS["Yungoos"]; -delete POKEDEX_SS["Gumshoos"]; -delete POKEDEX_SS["Crabrawler"]; -delete POKEDEX_SS["Crabominable"]; -delete POKEDEX_SS["Oricorio-Pom-Pom"]; -delete POKEDEX_SS["Oricorio-Baile"]; -delete POKEDEX_SS["Oricorio-Sensu"]; -delete POKEDEX_SS["Oricorio-Pa'u"]; -delete POKEDEX_SS["Minior"]; -delete POKEDEX_SS["Komala"]; -delete POKEDEX_SS["Bruxish"]; +["Rattata-Alola", "Raticate-Alola", "Geodude-Alola", "Graveler-Alola", "Golem-Alola", "Grimer-Alola", "Muk-Alola", "Snivy", "Servine", + "Serperior", "Tepig", "Pignite", "Emboar", "Oshawott", "Dewott", "Samurott", "Patrat", "Watchog", "Pansage", "Simisage", "Pansear", + "Simisear", "Panpour", "Simipour", "Blitzle", "Zebstrika", "Sewaddle", "Swadloon", "Leavanny", "Ducklett", "Swanna", "Deerling", + "Sawsbuck", "Alomomola", "Tynamo", "Eelektrik", "Eelektross", "Meloetta", "Chespin", "Quilladin", "Chesnaught", "Fennekin", + "Braixen", "Delphox", "Froakie", "Frogadier", "Greninja", "Scatterbug", "Spewpa", "Vivillon", "Litleo", "Pyroar", "Flabebe", "Floette", + "Florges", "Skiddo", "Gogoat", "Furfrou", "Hoopa", "Hoopa-Unbound", "Pikipek", "Trumbeak", "Toucannon", "Yungoos", "Gumshoos", + "Crabrawler", "Crabominable", "Oricorio-Pom-Pom", "Oricorio-Baile", "Oricorio-Sensu", "Oricorio-Pa'u", "Minior", "Komala", "Bruxish" +].forEach(e => delete POKEDEX_SS[e]); var POKEDEX_LA = $.extend(true, {}, POKEDEX_SS_NATDEX, { @@ -15830,6 +15795,12 @@ var POKEDEX_LA = $.extend(true, {}, POKEDEX_SS_NATDEX, { }); var POKEDEX_SV_NATDEX = $.extend(true, {}, POKEDEX_LA, { + //Minor Nat Dex Housekeeping + "Venusaur": { "formes": null }, + "Charizard": { "formes": null }, + "Blastoise": { "formes": null }, + "Gengar": { "formes": null }, + //Past Pokemon Changes "Primeape": { "canEvolve": true, }, "Dunsparce": { "canEvolve": true, }, @@ -15852,7 +15823,7 @@ var POKEDEX_SV_NATDEX = $.extend(true, {}, POKEDEX_LA, { }, "Zacian-Crowned": { "bs": { - "at":150, + "at": 150, }, }, "Zamazenta": { @@ -16226,7 +16197,7 @@ var POKEDEX_SV_NATDEX = $.extend(true, {}, POKEDEX_LA, { "sd": 97, "sp": 68, }, - "w": 15.0, + "w": 15.0, "ab": "Sand Rush", }, "Flittle": { @@ -17626,8 +17597,164 @@ var POKEDEX_SV_NATDEX = $.extend(true, {}, POKEDEX_LA, { "w": 39.8, "ab": "Sturdy", }, + //Indigo Disk DLC new additions + "Duraludon": { "canEvolve": true, }, + "Hydrapple": { + "t1": "Grass", + "t2": "Dragon", + "bs": { + "hp": 106, + "at": 80, + "df": 110, + "sa": 120, + "sd": 80, + "sp": 44, + }, + "w": 93.0, + "ab": "Regenerator", + }, + "Archaludon": { + "t1": "Steel", + "t2": "Dragon", + "bs": { + "hp": 90, + "at": 105, + "df": 130, + "sa": 125, + "sd": 65, + "sp": 85, + }, + "w": 60.0, + "ab": "Stalwart", + }, + "Gouging Fire": { + "t1": "Fire", + "t2": "Dragon", + "bs": { + "hp": 105, + "at": 115, + "df": 121, + "sa": 65, + "sd": 93, + "sp": 91, + }, + "w": 590.0, + "ab": "Protosynthesis", + }, + "Raging Bolt": { + "t1": "Electric", + "t2": "Dragon", + "bs": { + "hp": 125, + "at": 73, + "df": 91, + "sa": 137, + "sd": 89, + "sp": 75, + }, + "w": 480.0, + "ab": "Protosynthesis", + }, + "Iron Boulder": { + "t1": "Rock", + "t2": "Psychic", + "bs": { + "hp": 90, + "at": 120, + "df": 80, + "sa": 68, + "sd": 108, + "sp": 124, + }, + "w": 162.5, + "ab": "Quark Drive", + }, + "Iron Crown": { + "t1": "Steel", + "t2": "Psychic", + "bs": { + "hp": 90, + "at": 72, + "df": 100, + "sa": 122, + "sd": 108, + "sp": 98, + }, + "w": 156.0, + "ab": "Quark Drive", + }, + "Terapagos": { + "t1": "Normal", + "bs": { + "hp": 90, + "at": 65, + "df": 85, + "sa": 65, + "sd": 85, + "sp": 60, + }, + "w": 6.5, + "ab": "Tera Shift", + 'formes': [ + 'Terapagos', + 'Terapagos-Terastal', + ], + }, + "Terapagos-Terastal": { + "t1": "Normal", + "bs": { + "hp": 95, + "at": 95, + "df": 110, + "sa": 105, + "sd": 110, + "sp": 85, + }, + "w": 16.0, + "ab": "Tera Shell", + isAlternateForme: true, + }, + "Terapagos-Stellar": { + "t1": "Normal", + "bs": { + "hp": 160, + "at": 105, + "df": 110, + "sa": 130, + "sd": 110, + "sp": 85, + }, + "w": 77.0, + "ab": "Teraform Zero", + isAlternateForme: true, + }, + "Pecharunt": { + "t1": "Poison", + "t2": "Ghost", + "bs": { + "hp": 88, + "at": 88, + "df": 160, + "sa": 88, + "sd": 88, + "sp": 88, + }, + "w": 0.3, + "ab": "Poison Puppeteer", + }, }); +['Butterfree', 'Pikachu', 'Meowth', 'Machamp', 'Kingler', 'Lapras', 'Eevee', 'Snorlax', 'Garbodor', 'Melmetal', + 'Corviknight', 'Orbeetle', 'Drednaw', 'Coalossal', 'Flapple', 'Appletun', 'Sandaconda', 'Toxtricity', 'Centiskorch', 'Hatterene', + 'Grimmsnarl', 'Alcremie', 'Copperajah', 'Duraludon', 'Rillaboom', 'Cinderace', 'Inteleon', 'Urshifu-Single Strike', 'Urshifu-Rapid Strike' +].forEach(e => POKEDEX_SV_NATDEX[e].formes = null); + + +POKEDEX_SV_NATDEX["Venusaur"].formes = ["Venusaur", "Mega Venusaur"]; +POKEDEX_SV_NATDEX["Charizard"].formes = ["Charizard", "Mega Charizard X", "Mega Charizard Y"]; +POKEDEX_SV_NATDEX["Blastoise"].formes = ["Blastoise", "Mega Blastoise"]; +POKEDEX_SV_NATDEX["Gengar"].formes = ["Gengar", "Mega Gengar"]; + var POKEDEX_SV = {}; [ //Initial Pokemon Programmed into Scarlet and Violet @@ -17700,6 +17827,23 @@ var POKEDEX_SV = {}; //Forms for Teal Mask Pokemon 'Sandshrew-Alola', 'Sandslash-Alola', 'Vulpix-Alola', 'Ninetales-Alola', 'Geodude-Alola', 'Graveler-Alola', 'Golem-Alola', 'Weezing-Galar', 'Shaymin-Sky', 'Ursaluna-Bloodmoon', 'Ogerpon-Hearthflame', 'Ogerpon-Wellspring', 'Ogerpon-Cornerstone', + //Indigo Disk DLC Pokemon + 'Bulbasaur', 'Ivysaur', 'Venusaur', 'Squirtle', 'Wartortle', 'Blastoise', 'Oddish', 'Gloom', 'Vileplume', 'Tentacool', 'Tentacruel', 'Doduo', 'Dodrio', + 'Seel', 'Dewgong', 'Exeggcute', 'Exeggutor', 'Hitmonlee', 'Hitmonchan', 'Rhyhorn', 'Rhydon', 'Horsea', 'Seadra', 'Electabuzz', 'Magmar', 'Lapras', + 'Porygon', 'Chikorita', 'Bayleef', 'Meganium', 'Totodile', 'Croconaw', 'Feraligatr', 'Chinchou', 'Lanturn', 'Bellossom', 'Snubbull', 'Granbull', + 'Skarmory', 'Kingdra', 'Porygon2', 'Smeargle', 'Tyrogue', 'Hitmontop', 'Elekid', 'Magby', 'Raikou', 'Entei', 'Suicune', 'Lugia', 'Ho-Oh', + 'Treecko', 'Grovyle', 'Sceptile', 'Torchic', 'Combusken', 'Blaziken', 'Mudkip', 'Marshtomp', 'Swampert', 'Plusle', 'Minun', + 'Trapinch', 'Vibrava', 'Flygon', 'Beldum', 'Metang', 'Metagross', 'Regirock', 'Regice', 'Registeel', 'Latias', 'Latios', + 'Deoxys', 'Cranidos', 'Rampardos', 'Shieldon', 'Bastiodon', 'Rhyperior', 'Electivire', + 'Magmortar', 'Porygon-Z', 'Regigigas', 'Snivy', 'Servine', 'Serperior', 'Tepig', 'Pignite', 'Emboar', 'Blitzle', 'Zebstrika', 'Drilbur', 'Excadrill', + 'Cottonee', 'Whimsicott', 'Scraggy', 'Scrafty', 'Minccino', 'Cinccino', 'Solosis', 'Duosion', 'Reuniclus', 'Joltik', 'Galvantula', 'Golett', 'Golurk', + 'Cobalion', 'Terrakion', 'Virizion', 'Reshiram', 'Zekrom', 'Kyurem', 'Keldeo', 'Inkay', 'Malamar', 'Espurr', 'Meowstic', 'Litten', + 'Torracat', 'Incineroar', 'Popplio', 'Brionne', 'Primarina', 'Pikipek', 'Trumbeak', 'Toucannon', 'Dewpider', 'Araquanid', 'Comfey', 'Minior', + 'Cosmog', 'Cosmoem', 'Solgaleo', 'Lunala', 'Necrozma', 'Milcery', 'Alcremie', 'Duraludon', 'Hydrapple', 'Archaludon', 'Gouging Fire', 'Raging Bolt', + 'Iron Boulder', 'Iron Crown', 'Terapagos', 'Pecharunt', + //Forms for Indigo Disk Pokemon + 'Exeggutor-Alola', 'Deoxys-Attack', 'Deoxys-Defense', 'Deoxys-Speed', 'Kyurem-Black', 'Kyurem-White', 'Necrozma-Dusk-Mane', 'Necrozma-Dawn-Wings', + 'Terapagos-Terastal','Terapagos-Stellar', ].forEach(e => POKEDEX_SV[e] = POKEDEX_SV_NATDEX[e]); //performs deep copy; necessary to preserve form data for nat dex @@ -17707,11 +17851,11 @@ POKEDEX_SV = $.extend(true, {}, POKEDEX_SV); var NO_FORMS_SV = [ - 'Charizard', 'Pikachu', 'Slowbro', 'Gengar', 'Gyarados', 'Eevee', 'Mewtwo', 'Ampharos', 'Scizor', 'Heracross', + 'Charizard', 'Slowbro', 'Gengar', 'Gyarados', 'Mewtwo', 'Ampharos', 'Scizor', 'Heracross', 'Houndoom', 'Tyranitar', 'Gardevoir', 'Sableye', 'Medicham', 'Camerupt', 'Altaria', 'Banette', 'Glalie', 'Salamence', - 'Kyogre', 'Groudon', 'Rayquaza', 'Garchomp', 'Lucario', 'Abomasnow', 'Gallade', 'Diancie', 'Rillaboom', 'Cinderace', - 'Inteleon', 'Corviknight', 'Drednaw', 'Coalossal', 'Flapple', 'Appletun', 'Sandaconda', 'Toxtricity', 'Hatterene', 'Grimmsnarl', - 'Copperajah', 'Urshifu-Single Strike', 'Urshifu-Rapid Strike', 'Greninja', 'Snorlax' + 'Kyogre', 'Groudon', 'Rayquaza', 'Garchomp', 'Lucario', 'Abomasnow', 'Gallade', 'Diancie', 'Greninja', + //Indigo Disk additions (none in Teal Mask) + 'Venusaur', 'Blastoise', 'Sceptile', 'Blaziken', 'Swampert', 'Metagross', 'Latias', 'Latios', 'Necrozma-Dusk-Mane', 'Necrozma-Dawn-Wings', ]; NO_FORMS_SV.forEach(e => POKEDEX_SV[e].formes = null); diff --git a/script_res/setdex_boss-titan.js b/script_res/setdex_boss-titan.js new file mode 100644 index 0000000..f5456a1 --- /dev/null +++ b/script_res/setdex_boss-titan.js @@ -0,0 +1,439 @@ +var SETDEX_BOSS_SV = { + 'Klawf': { + 'Stony Cliff Titan': { + 'level': 16, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'nature': 'Gentle', + 'ability': 'Anger Shell', + 'moves': [ + 'Vise Grip', + 'Rock Smash', + 'Rock Tomb', + 'Block' + ], + }, + }, + 'Bombirdier': { + 'Open Sky Titan': { + 'level': 20, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'nature': 'Jolly', + 'ability': 'Rocky Payload', + 'moves': [ + 'Rock Throw', + 'Wing Attack', + 'Pluck', + 'Torment' + ], + }, + }, + 'Orthworm': { + 'Lurking Steel Titan': { + 'level': 29, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'nature': 'Quirky', + 'ability': 'Earth Eater', + 'moves': [ + 'Iron Tail', + 'Headbutt', + 'Wrap', + 'Sandstorm' + ], + }, + }, + 'Great Tusk': { + 'Quaking Earth Titan (Scarlet)': { + 'level': 45, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'nature': 'Naughty', + 'ability': 'Protosynthesis', + 'moves': [ + 'Rapid Spin', + 'Brick Break', + 'Knock Off', + 'Stomping Tantrum' + ], + }, + }, + 'Iron Treads': { + 'Quaking Earth Titan (Violet)': { + 'level': 45, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'nature': 'Naughty', + 'ability': 'Quark Drive', + 'moves': [ + 'Rapid Spin', + 'Iron Head', + 'Knock Off', + 'Stomping Tantrum' + ], + }, + }, + 'Dondozo': { + 'False Dragon Titan': { + 'level': 56, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'ability': 'Oblivious', + 'moves': [ + 'Aqua Tail', + 'Body Slam', + 'Water Pulse', + 'Order Up' + ], + }, + }, + 'Tatsugiri': { + 'True Dragon Titan': { + 'level': 57, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'nature': 'Quiet', + 'ability': 'Commander', + 'moves': [ + 'Muddy Water', + 'Icy Wind', + 'Taunt', + 'Dragon Pulse' + ], + }, + }, + 'Okidogi': { + 'Titanic Okidogi (Before Credits)': { + 'level': 35, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'ability': 'Toxic Chain', + 'moves': [ + 'Bite', + 'Poison Fang', + 'Low Kick', + 'Brutal Swing' + ], + }, + 'Titanic Okidogi (Post Credits)': { + 'level': 85, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'ability': 'Toxic Chain', + 'item': 'Liechi Berry', + 'moves': [ + 'Crunch', + 'Close Combat', + 'Poison Jab', + 'Brutal Swing' + ], + }, + }, + 'Munkidori': { + 'Titanic Munkidori (Before Credits)': { + 'level': 35, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'ability': 'Toxic Chain', + 'moves': [ + 'Confusion', + 'Clear Smog', + 'Psybeam', + 'Spite' + ], + }, + 'Titanic Munkidori (Post Credits)': { + 'level': 85, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'ability': 'Toxic Chain', + 'moves': [ + 'Psychic', + 'Sludge Wave', + 'Shadow Ball', + 'Nasty Plot' + ], + }, + }, + 'Fezandipiti': { + 'Titanic Fezandipiti (Before Credits)': { + 'level': 35, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'ability': 'Toxic Chain', + 'moves': [ + 'Quick Attack', + 'Wing Attack', + 'Poison Jab', + 'Dazzling Gleam' + ], + }, + 'Titanic Fezandipiti (Post Credits)': { + 'level': 85, + 'ivs': { + 'hp': 30, + 'at': 30, + 'df': 30, + 'sa': 30, + 'sd': 30, + 'sp': 30 + }, + 'ability': 'Toxic Chain', + 'moves': [ + 'Cross Poison', + 'Play Rough', + 'Dual Wingbeat', + 'Dazzling Gleam' + ], + }, + }, + 'Ogerpon': { + 'Teal Boss (Before Credits)': { + 'level': 20, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Defiant', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Growth', + 'Vine Whip' + ], + }, + 'Teal Boss (Post Credits)': { + 'level': 70, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Defiant', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Low Kick', + 'Grassy Terrain' + ], + }, + }, + 'Ogerpon-Hearthflame': { + 'Hearthflame Boss (Before Credits)': { + 'level': 20, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Mold Breaker', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Growth', + 'Vine Whip' + ], + }, + 'Hearthflame Boss (Post Credits)': { + 'level': 70, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Mold Breaker', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Low Kick', + 'Grassy Terrain' + ], + }, + }, + 'Ogerpon-Wellspring': { + 'Wellspring Boss (Before Credits)': { + 'level': 20, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Water Absorb', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Growth', + 'Vine Whip' + ], + }, + 'Wellspring Boss (Post Credits)': { + 'level': 70, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Water Absorb', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Low Kick', + 'Grassy Terrain' + ], + }, + }, + 'Ogerpon-Cornerstone': { + 'Cornerstone Boss (Before Credits)': { + 'level': 20, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Sturdy', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Growth', + 'Vine Whip' + ], + }, + 'Cornerstone Boss (Post Credits)': { + 'level': 70, + 'ivs': { + 'hp': 31, + 'at': 31, + 'df': 20, + 'sa': 20, + 'sd': 20, + 'sp': 31 + }, + 'nature': 'Lonely', + 'ability': 'Sturdy', + 'moves': [ + 'Ivy Cudgel', + 'Slam', + 'Low Kick', + 'Grassy Terrain' + ], + }, + }, + 'Ursaluna-Bloodmoon': { + 'Bloodmoon Beast (min Atk & Spe)': { + 'level': 70, + 'ivs': { + 'at': 0, + 'sp': 0 + }, + 'ability': "Mind's Eye", + 'moves': [ + 'Blood Moon', + 'Earth Power', + 'Slash', + 'Calm Mind' + ], + } + } +}; \ No newline at end of file diff --git a/script_res/setdex_custom.js b/script_res/setdex_custom.js index 7cdbf57..58adf72 100644 --- a/script_res/setdex_custom.js +++ b/script_res/setdex_custom.js @@ -34,6 +34,7 @@ var showdownToCalcFormes = [ ["Toxtricity-Low-Key-Gmax", "Toxtricity-Gmax"], ["Sinistea-Antique", "Sinistea"], ["Polteageist-Antique", "Polteageist"], + ["Indeedee", "Indeedee-M"], ["Zarude-Dada", "Zarude"], ["Dudunsparce-Three-Segment", "Dudunsparce-Big"], ["Tatsugiri-Droopy", "Tatsugiri"], @@ -52,6 +53,7 @@ var calcToShowdownFormes = [ ["Shellos-East", "Shellos"], ["Gastrodon-East", "Gastrodon"], ["Dudunsparce-Three-Segment", "Dudunsparce-Big"], + ["Indeedee", "Indeedee-M"], ]; var saveToCalcFormes = [ diff --git a/script_res/setdex_ncp-g9.js b/script_res/setdex_ncp-g9.js index e158359..4706b95 100644 --- a/script_res/setdex_ncp-g9.js +++ b/script_res/setdex_ncp-g9.js @@ -149,32 +149,27 @@ var SETDEX_VGC2023 = { }, //"Spidops": { - // "Actually worse than Ledian": { + // "very weak bug": { // "level": 50, // "evs": { - // "hp": 0, + // "hp": 252, // "at": 0, - // "df": 0, + // "df": 252, // "sa": 0, - // "sd": 0, - // "sp": 0 - // }, - // "ivs": { - // "at": 0, + // "sd": 4, // "sp": 0 // }, - // "nature": "", - // "ability": "", - // "tera_type": "", - // "item": "", + // "nature": "Impish", + // "ability": "Insomnia", + // "tera_type": "Water", + // "item": "Focus Sash", // "moves": [ - // "", - // "", - // "", - // "" + // "Circle Throw", + // "Counter", + // "Toxic Spikes", + // "Silk Trap" // ] // }, - //}, "Lokix": { "Choice Band Set": { @@ -3830,6 +3825,27 @@ var SETDEX_VGC2023 = { }, "Brambleghast": { + "Regulation E Offense": { + "level": 50, + "evs": { + "hp": 4, + "at": 252, + "df": 0, + "sa": 0, + "sd": 0, + "sp": 252 + }, + "nature": "Adamant", + "ability": "Wind Rider", + "tera_type": "Ghost", + "item": "Focus Sash", + "moves": [ + "Power Whip", + "Shadow Sneak", + "Poltergeist", + "Seed Bomb" + ] + }, "Emilio Forbes' 2023 Worlds Top 16 Sash": { "level": 50, "evs": { @@ -3928,33 +3944,32 @@ var SETDEX_VGC2023 = { // ] // }, //}, - //"Lurantis": { - // "": { - // "level": 50, - // "evs": { - // "hp": 0, - // "at": 0, - // "df": 0, - // "sa": 0, - // "sd": 0, - // "sp": 0 - // }, - // "ivs": { - // "at": 0, - // "sp": 0 - // }, - // "nature": "", - // "ability": "", - // "tera_type": "", - // "item": "", - // "moves": [ - // "", - // "", - // "", - // "" - // ] - // }, - //}, + "Lurantis": { + "TR Sitrus Set": { + "level": 50, + "evs": { + "hp": 252, + "at": 252, + "df": 0, + "sa": 0, + "sd": 4, + "sp": 0 + }, + "ivs": { + "sp": 0 + }, + "nature": "Brave", + "ability": "Contrary", + "tera_type": "Poison", + "item": "Sitrus Berry", + "moves": [ + "Superpower", + "Knock Off", + "Leaf Blade", + "Petal Blizzard" + ] + }, + }, //"Klawf": { // "": { // "level": 50, @@ -4386,6 +4401,30 @@ var SETDEX_VGC2023 = { }, "Salamence": { + "Bulky Rocky Helmet": { + "level": 50, + "evs": { + "hp": 236, + "at": 0, + "df": 172, + "sa": 4, + "sd": 12, + "sp": 84 + }, + "ivs": { + "at": 0, + }, + "nature": "Modest", + "ability": "Intimidate", + "tera_type": "Poison", + "item": "Rocky Helmet", + "moves": [ + "Draco Meteor", + "Air Slash", + "Tailwind", + "Roost" + ] + }, "Tera Steel Dragon Dance": { "level": 50, "evs": { @@ -5172,6 +5211,27 @@ var SETDEX_VGC2023 = { // }, //}, "Tyranitar": { + "EternalSnowman's Sacramento 1st AV Tera Psychic": { + "level": 50, + "evs": { + "hp": 4, + "at": 252, + "df": 4, + "sa": 0, + "sd": 4, + "sp": 244 + }, + "nature": "Adamant", + "ability": "Sand Stream", + "tera_type": "Psychic", + "item": "Assault Vest", + "moves": [ + "Rock Slide", + "Knock Off", + "Low Kick", + "Tera Blast" + ] + }, "Tera Flying AV": { "level": 50, "evs": { @@ -5727,7 +5787,7 @@ var SETDEX_VGC2023 = { "sp": 20 }, "nature": "Adamant", - "ability": "Multiscale", + "ability": "Inner Focus", "tera_type": "Normal", "item": "Choice Band", "moves": [ @@ -6443,6 +6503,29 @@ var SETDEX_VGC2023 = { }, "Flutter Mane": { + "Bulky Speed Booster Energy": { + "level": 50, + "evs": { + "hp": 212, + "at": 0, + "df": 132, + "sa": 36, + "sd": 4, + "sp": 124 + }, + "ivs": { + "at": 0, + }, + "nature": "Timid", + "item": "Booster Energy", + "tera_type": "Fairy", + "moves": [ + "Shadow Ball", + "Moonblast", + "Dazzling Gleam", + "Icy Wind" + ] + }, "Sash Set": { "level": 50, "evs": { @@ -6512,7 +6595,6 @@ var SETDEX_VGC2023 = { "Protect" ] }, - }, "Slither Wing": { "Tera Fire Booster Energy": { @@ -7050,7 +7132,7 @@ var SETDEX_VGC2023 = { "moves": [ "Sucker Punch", "Icicle Crash", - "Crunch", + "Lash Out", "Sacred Sword" ] }, @@ -8178,31 +8260,32 @@ var SETDEX_VGC2023 = { ] }, }, - //"Articuno-Galar": { - // "": { - // "level": 50, - // "evs": { - // "hp": 0, - // "at": 0, - // "df": 0, - // "sa": 0, - // "sd": 0, - // "sp": 0 - // }, - // "ivs": { - // "at": 0, - // }, - // "nature": "", - // "ability": "", - // "item": "", - // "moves": [ - // "", - // "", - // "", - // "" - // ] - // }, - //}, + "Articuno-Galar": { + "Jamie Boyt's Gda\u0144sk Tera Ground": { + "level": 50, + "evs": { + "hp": 252, + "at": 0, + "df": 140, + "sa": 44, + "sd": 12, + "sp": 60 + }, + "ivs": { + "at": 0, + }, + "nature": "Modest", + "ability": "Competitive", + "tera_type": "Ground", + "item": "Rocky Helmet", + "moves": [ + "Freezing Glare", + "Tera Blast", + "Calm Mind", + "Recover" + ] + }, + }, "Zapdos": { "Bold Rocky Helmet": { "level": 50, @@ -8406,50 +8489,50 @@ var SETDEX_VGC2023 = { // }, //}, "Heatran": { - "Kenji Miura's 2023 Worlds Top 16 Magma Storm": { + "Offensive Life Orb": { "level": 50, "evs": { - "hp": 244, + "hp": 252, "at": 0, - "df": 20, - "sa": 76, - "sd": 148, - "sp": 20 + "df": 0, + "sa": 252, + "sd": 0, + "sp": 4 }, "ivs": { "at": 0, }, "nature": "Modest", - "tera_type": "Grass", - "item": "Leftovers", + "tera_type": "Fairy", + "item": "Life Orb", "moves": [ - "Magma Storm", + "Heat Wave", + "Flash Cannon", "Earth Power", - "Tera Blast", - "Protect" + "Flamethrower" ] }, - "Offensive Life Orb": { + "Kenji Miura's 2023 Worlds Top 16 Magma Storm": { "level": 50, "evs": { - "hp": 252, + "hp": 244, "at": 0, - "df": 0, - "sa": 252, - "sd": 0, - "sp": 4 + "df": 20, + "sa": 76, + "sd": 148, + "sp": 20 }, "ivs": { "at": 0, }, "nature": "Modest", "tera_type": "Grass", - "item": "Life Orb", + "item": "Leftovers", "moves": [ - "Heat Wave", - "Flash Cannon", + "Magma Storm", "Earth Power", - "Tera Blast" + "Tera Blast", + "Protect" ] }, }, @@ -8527,6 +8610,31 @@ var SETDEX_VGC2023 = { "Tailwind" ] }, + "Thiago Lattanzi's 2024 LAIC Finalist Bulky Set": { + "level": 50, + "evs": { + "hp": 252, + "at": 0, + "df": 252, + "sa": 0, + "sd": 4, + "sp": 0 + }, + "ivs": { + "at": 0, + "sp": 28, + }, + "nature": "Bold", + "ability": "Prankster", + "tera_type": "Dark", + "item": "Safety Goggles", + "moves": [ + "Bleakwind Storm", + "Protect", + "Rain Dance", + "Tailwind" + ] + }, }, //"Tornadus-Therian": { // "": { @@ -8596,7 +8704,7 @@ var SETDEX_VGC2023 = { "at": 0, }, "nature": "Timid", - "tera_type": "Ice", + "tera_type": "Flying", "item": "Life Orb", "moves": [ "Wildbolt Storm", @@ -9755,6 +9863,27 @@ var SETDEX_VGC2023 = { "Clangerous Soul" ] }, + "EternalSnowman's Sacramento 1st Body Press": { + "level": 50, + "evs": { + "hp": 252, + "at": 4, + "df": 156, + "sa": 0, + "sd": 92, + "sp": 4 + }, + "nature": "Impish", + "ability": "Bulletproof", + "tera_type": "Steel", + "item": "Leftovers", + "moves": [ + "Body Press", + "Iron Head", + "Iron Defense", + "Protect" + ] + }, }, "Weezing": { "General Disruption": { @@ -9767,15 +9896,12 @@ var SETDEX_VGC2023 = { "sd": 252, "sp": 0 }, - "ivs": { - "at": 0, - }, - "nature": "Bold", + "nature": "Impish", "ability": "Neutralizing Gas", "tera_type": "Grass", "item": "Sitrus Berry", "moves": [ - "Sludge Bomb", + "Gunk Shot", "Pain Split", "Will-O-Wisp", "Taunt" @@ -9956,7 +10082,7 @@ var SETDEX_VGC2023 = { "Icy Wind", "Moonblast", "Follow Me", - "Heling Hand" + "Helping Hand" ] }, }, @@ -10313,7 +10439,7 @@ var SETDEX_VGC2023 = { }, }, "Ursaluna-Bloodmoon": { - "Trick Room Throat Spray": { + "Trick Room Special Offense": { "level": 50, "evs": { "hp": 252, @@ -10329,7 +10455,7 @@ var SETDEX_VGC2023 = { }, "nature": "Quiet", "tera_type": "Normal", - "item": "Throat Spray", + "item": "Life Orb", "moves": [ "Hyper Voice", "Earth Power", diff --git a/script_res/setdex_sidon-g9.js b/script_res/setdex_sidon-g9.js index dd9301a..263cf5c 100644 --- a/script_res/setdex_sidon-g9.js +++ b/script_res/setdex_sidon-g9.js @@ -460,4 +460,270 @@ var SETDEX_MISSING_VGC2023 = { ] }, }, + "Walking Wake": { + "Default Set": { + "level": 50, + "evs": { + "hp": 4, + "at": 0, + "df": 4, + "sa": 244, + "sd": 4, + "sp": 252 + }, + "nature": "Modest", + "ability": "Protosynthesis", + "item": "Life Orb", + "moves": [ + "Hydro Steam", + "Draco Meteor", + "Flamethrower", + "Protect" + ] + }, + }, + "Iron Leaves": { + "Default Set": { + "level": 50, + "evs": { + "hp": 4, + "at": 252, + "df": 0, + "sa": 0, + "sd": 0, + "sp": 252 + }, + "nature": "Jolly", + "ability": "Quark Drive", + "item": "Booster Energy", + "moves": [ + "Psyblade", + "Close Combat", + "Swords Dance", + "Protect" + ] + }, + }, + "Archaludon": { + "James Boyt's Assault Vest": { + "level": 50, + "evs": { + "hp": 252, + "at": 0, + "df": 4, + "sa": 116, + "sd": 124, + "sp": 12 + }, + "nature": "Modest", + "ability": "Stamina", + "tera_type": "Flying", + "item": "Assault Vest", + "moves": [ + "Flash Cannon", + "Draco Meteor", + "Body Press", + "Electro Shot" + ] + }, + }, + "Gouging Fire": { + "Default Set": { + "level": 50, + "evs": { + "hp": 4, + "at": 252, + "df": 0, + "sa": 0, + "sd": 0, + "sp": 252 + }, + "nature": "Modest", + "ability": "Protosynthesis", + "item": "Life Orb", + "moves": [ + "Breaking Swipe", + "Flare Blitz", + "Flame Charge", + "Burning Bulwark" + ] + }, + }, + "Raging Bolt": { + "James Boyt's offensive set": { + "level": 50, + "evs": { + "hp": 4, + "at": 0, + "df": 4, + "sa": 244, + "sd": 4, + "sp": 252 + }, + "nature": "Modest", + "ability": "Protosynthesis", + "item": "Life Orb", + "moves": [ + "Thunderbolt", + "Draco Meteor", + "Thunderclap", + "Protect" + ] + }, + "James Boyt's bulky": { + "level": 50, + "evs": { + "hp": 252, + "at": 0, + "df": 148, + "sa": 44, + "sd": 4, + "sp": 60 + }, + "nature": "Modest", + "ability": "Protosynthesis", + "tera_type": "Fairy", + "item": "Leftovers", + "moves": [ + "Thunderclap", + "Dragon Pulse", + "Calm Mind", + "Protect" + ] + }, + }, + "Iron Crown": { + "Default Set": { + "level": 50, + "evs": { + "hp": 0, + "at": 0, + "df": 4, + "sa": 252, + "sd": 0, + "sp": 252 + }, + "nature": "Timid", + "ability": "Quark Drive", + "tera_type": "Water", + "item": "Booster Energy", + "moves": [ + "Expanding Force", + "Tachyon Cutter", + "Tera Blast", + "Protect" + ] + }, + }, + "Iron Boulder": { + "Default Set": { + "level": 50, + "evs": { + "hp": 4, + "at": 252, + "df": 0, + "sa": 0, + "sd": 0, + "sp": 252 + }, + "nature": "Jolly", + "ability": "Quark Drive", + "tera_type": "Water", + "item": "Booster Energy", + "moves": [ + "Mighty Cleave", + "Zen Headbutt", + "Earthquake", + "Protect" + ] + }, + }, + "Primarina": { + "Leftovers Calm Mind": { + "level": 50, + "evs": { + "hp": 252, + "at": 0, + "df": 220, + "sa": 28, + "sd": 4, + "sp": 4 + }, + "nature": "Modest", + "ability": "Liquid Voice", + "tera_type": "Grass", + "item": "Leftovers", + "moves": [ + "Hyper Voice", + "Moonblast", + "Calm Mind", + "Protect" + ] + }, + }, + "Incineroar": { + "Defalt Set": { + "level": 50, + "evs": { + "hp": 252, + "at": 4, + "df": 92, + "sa": 0, + "sd": 156, + "sp": 4 + }, + "nature": "Adament", + "ability": "Intimidate", + "tera_type": "Water", + "item": "Sitrus Berry", + "moves": [ + "Flare Blitz", + "Knock Off", + "Fake Out", + "Parting Shot" + ] + }, + }, + "Urshifu-Rapid Strike": { + "James Boyt's Mystic Water Swords Dance": { + "level": 50, + "evs": { + "hp": 236, + "at": 76, + "df": 4, + "sa": 0, + "sd": 172, + "sp": 20 + }, + "nature": "Adament", + "moves": [ + "Surging Strikes", + "Drain Punch", + "Swords Dance", + "Detect" + ] + }, + }, + "Urshifu-Single Strike": { + "Default Set": { + "level": 50, + "evs": { + "hp": 4, + "at": 252, + "df": 0, + "sa": 0, + "sd": 0, + "sp": 252 + }, + "nature": "Jolly", + "item": "Black Glasses", + "moves": [ + "Wicked Blow", + "Close Combat", + "Sucker Punch", + "Detect" + ] + }, + }, + } diff --git a/script_res/switch_mode.js b/script_res/switch_mode.js index c7410de..2a10f72 100644 --- a/script_res/switch_mode.js +++ b/script_res/switch_mode.js @@ -19,6 +19,16 @@ if (localStorage.getItem("dex") == "natdex") { //loadDex("vgcdex"); Don't load when starting, it'll be easier if ap_calc handles it by itself } +//LEVEL TOGGLING +//Load the leveling system according to localStorage +if (localStorage.getItem("level") == true) { + $("#douswitch").prop("checked", false); +} + +//GEN TOGGLING +//Load the generation according to localStorage +//see function getGen() in ap_calc.js + $(function(){ $("#switchTheme").on("click", function(){ @@ -51,7 +61,21 @@ $(function(){ localStorage.setItem("dex", "vgcdex"); } }); - + + $("#douswitch").on("click", function () { + if (!$(this).is(":checked")) { + localStorage.setItem("level", true); + } + else { + localStorage.setItem("level", false); + } + }); + + //see $(".gen").change(function ()) in ap_calc.js for changing gen value in localStorage + + $(".set-toggle").on("click", function () { + loadSets("#" + $(this).closest(".poke-info").prop("id")); + }) }) function loadTheme(color){ @@ -121,19 +145,40 @@ function loadDex(dexMode) { $('label[for="zL' + i + '"]').show(); $('label[for="zR' + i + '"]').show(); } + $('div #primal-weather').show(); } else { for (i = 1; i <= 4; i++) { $('label[for="zL' + i + '"]').hide(); $('label[for="zR' + i + '"]').hide(); } + $('div #primal-weather').hide(); + } + } + if (gen >= 9) { + if (localStorage.getItem("dex") == "vgcdex") { + $('div #auras').show(); + $('div #protect-field').show(); + $('div #flower-gift').show(); + } + else { + $('div #auras').hide(); + $('div #protect-field').hide(); + $('div #flower-gift').hide(); } } if (typeChart !== undefined) { - var typeOptions = getSelectOptions(Object.keys(typeChart)); + var types = Object.keys(typeChart); + types.splice(types.indexOf('Typeless'), 1); + var teraTypes = $.extend(true, [], types); + if (gen >= 2) types.push('Typeless'); + types.splice(types.indexOf('Stellar'), 1); + var typeOptions = getSelectOptions(types); + var teraTypeOptions = getSelectOptions(teraTypes); } - $("select.type1, select.move-type, select.tera-type").find("option").remove().end().append(typeOptions); + $("select.type1, select.move-type").find("option").remove().end().append(typeOptions); $("select.type2").find("option").remove().end().append("" + typeOptions); + $("select.tera-type").find("option").remove().end().append(teraTypeOptions); var moveOptions = getSelectOptions(Object.keys(moves), true); $("select.move-selector").find("option").remove().end().append(moveOptions); var abilityOptions = getSelectOptions(abilities, true); @@ -141,6 +186,14 @@ function loadDex(dexMode) { var itemOptions = getSelectOptions(items, true); $("select.item").find("option").remove().end().append("" + itemOptions); - $(".set-selector").val(getSetOptions()[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); - $(".set-selector").change(); + $("#p1 .set-selector").val(getSetOptions("#p1")[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); + $("#p1 .set-selector").change(); + $("#p2 .set-selector").val(getSetOptions("#p2")[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); + $("#p2 .set-selector").change(); +} + +function loadSets(p) { + setStartup(p) + $(p + " .set-selector").val(getSetOptions(p)[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); + $(p + " .set-selector").change(); } \ No newline at end of file diff --git a/script_res/translate/README b/script_res/translate/README new file mode 100644 index 0000000..2ac36ad --- /dev/null +++ b/script_res/translate/README @@ -0,0 +1,5 @@ +Steps to convert names to pinyin + +1. Copy move and Pokemon names from https://wiki.52poke.com/wiki/%E6%8B%9B%E5%BC%8F%E5%88%97%E8%A1%A8 and https://wiki.52poke.com/wiki/%E5%AE%9D%E5%8F%AF%E6%A2%A6%E5%88%97%E8%A1%A8%EF%BC%88%E6%8C%89%E5%85%A8%E5%9B%BD%E5%9B%BE%E9%89%B4%E7%BC%96%E5%8F%B7%EF%BC%89/%E7%AE%80%E5%8D%95%E7%89%88 +2. Copy to spreadsheet, and use https://www.branah.com/chinese-to-pinyin to convert to pinyin (no tone) +3. Use concatenation of first letters to get acryonyms diff --git a/script_res/translate/gen9_moves.csv b/script_res/translate/gen9_moves.csv index 077b10e..827360f 100644 --- a/script_res/translate/gen9_moves.csv +++ b/script_res/translate/gen9_moves.csv @@ -1,4 +1,3 @@ -en, chs, ja, pinyin, pingyin-first Thunder Cage,雷电囚笼,サンダープリズン,leidianqiulong,ldql Dragon Energy,巨龙威能,ドラゴンエナジー,julongweineng,jlwn Freezing Glare,冰冷视线,いてつくしせん,binglengshixian,blsx @@ -31,57 +30,72 @@ Wildbolt Storm,鸣雷风暴,かみなりあらし,mingleifengbao,mlfb Sandsear Storm,热沙风暴,ねっさのあらし,reshafengbao,rsfb Lunar Blessing,新月祈祷,みかづきのいのり,xinyueqidao,xyqd Take Heart,勇气填充,ブレイブチャージ,yongqitianchong,yqtc -Tera Blast,太晶爆发,テラバースト,taijingbaofa,zwm -Silk Trap,线阱,スレッドトラップ,xianjing,tjbf -Axe Kick,下压踢,かかとおとし,xiayati,xj -Last Respects,扫墓,おはかまいり,saomu,xyt -Lumina Crash,琉光冲激,ルミナコリジョン,liuguangchongji,sm -Order Up,上菜,いっちょうあがり,shangcai,lgcj -Jet Punch,喷射拳,ジェットパンチ,penshequan,sc -Spicy Extract,辣椒精华,ハバネロエキス,lajiaojinghua,psq -Spin Out,疾速转轮,ホイールスピン,jisuzhuanlun,ljjh -Population Bomb,鼠数儿,ネズミざん,shushuer,jszl -Ice Spinner,冰旋,アイススピナー,bingxuan,sse -Glaive Rush,巨剑突击,きょけんとつげき,jujiantuji,bx -Revival Blessing,复生祈祷,さいきのいのり,fushengqidao,jjtj -Salt Cure,盐腌,しおづけ,yanyan,fsqd -Triple Dive,三连钻,トリプルダイブ,sanlianzuan,yy -Mortal Spin,晶光转转,キラースピン,jingguangzhuanzhuan,slz -Doodle,描绘,うつしえ,miaohui,jgzz -Fillet Away,甩肉,みをけずる,shuairou,mh -Kowtow Cleave,仆刀,ドゲザン,pudao,sr -Flower Trick,千变万花,トリックフラワー,qianbian[wan mo]hua,pd -Torch Song,闪焰高歌,フレアソング,shanyangaoge,qb[mh -Aqua Step,流水旋舞,アクアステップ,liushuixuanwu,sygg -Raging Bull,怒牛,レイジングブル,nuniu,lsxw -Make It Rain,淘金潮,ゴールドラッシュ,taojinchao,nn -Psyblade,精神剑,サイコブレイド,jingshenjian,tjc -Hydro Steam,水蒸气,ハイドロスチーム,shuizhengqi,jsj -Ruination,大灾难,カタストロフィ,dazainan,szq -Collision Course,全开猛撞,アクセルブレイク,quankaimengzhuang,dzn -Electro Drift,闪电猛冲,イナズマドライブ,shandianmengchong,qkmz -Shed Tail,断尾,しっぽきり,duanwei,sdmc -Chilly Reception,冷笑话,さむいギャグ,lengxiaohua,dw -Tidy Up,大扫除,おかたづけ,dasaochu,lxh -Snowscape,雪景,ゆきげしき,xuejing,dsc -Pounce,虫扑,とびつく,chongpu,xj -Trailblaze,起草,くさわけ,qicao,cp -Chilling Water,泼冷水,ひやみず,polengshui,qc -Hyper Drill,强力钻,ハイパードリル,qianglizuan,pls -Twin Beam,双光束,ツインビーム,shuangguangshu,qlz -Rage Fist,愤怒之拳,ふんどのこぶし,fennuzhiquan,sgs -Armor Cannon,铠农炮,アーマーキャノン,kainongpao,fnzq -Bitter Blade,悔念剑,むねんのつるぎ,huinianjian,knp -Double Shock,电光双击,でんこうそうげき,dianguangshuangji,hnj -Gigaton Hammer,巨力锤,デカハンマー,julichui,dgsj -Comeuppance,复仇,ほうふく,fuchou,jlc -Aqua Cutter,水波刀,アクアカッター,shuibodao,fc -Blazing Torque,灼热暴冲,バーンアクセル,zhuorebaochong,sbd -Wicked Torque,黑暗暴冲,ダークアクセル,heianbaochong,zrbc -Noxious Torque,剧毒暴冲,ポイズンアクセル,judubaochong,habc -Combat Torque,格斗暴冲,ファイトアクセル,gedoubaochong,jdbc -Magical Torque,魔法暴冲,マジカルアクセル,mofabaochong,gdbc -Blood Moon,血月,ブラッドムーン,xueyue,mfbc -Matcha Gotcha,刷刷茶炮,シャカシャカほう,shuashuachapao,xy -Syrup Bomb‎,糖浆炸弹,みずあめボム‎,tangjiangzhadan,sscp -Ivy Cudgel,棘藤棒,ツタこんぼう,jitengbang,tjzd +Tera Blast,太晶爆发,テラバースト,taijingbaofa,tjbf +Silk Trap,线阱,スレッドトラップ,xianjing,xj +Axe Kick,下压踢,かかとおとし,xiayati,xyt +Last Respects,扫墓,おはかまいり,saomu,sm +Lumina Crash,琉光冲激,ルミナコリジョン,liuguangchongji,lgcj +Order Up,上菜,いっちょうあがり,shangcai,sc +Jet Punch,喷射拳,ジェットパンチ,penshequan,psq +Spicy Extract,辣椒精华,ハバネロエキス,lajiaojinghua,ljjh +Spin Out,疾速转轮,ホイールスピン,jisuzhuanlun,jszl +Population Bomb,鼠数儿,ネズミざん,shushuer,sse +Ice Spinner,冰旋,アイススピナー,bingxuan,bx +Glaive Rush,巨剑突击,きょけんとつげき,jujiantuji,jjtj +Revival Blessing,复生祈祷,さいきのいのり,fushengqidao,fsqd +Salt Cure,盐腌,しおづけ,yanyan,yy +Triple Dive,三连钻,トリプルダイブ,sanlianzuan,slz +Mortal Spin,晶光转转,キラースピン,jingguangzhuanzhuan,jgzz +Doodle,描绘,うつしえ,miaohui,mh +Fillet Away,甩肉,みをけずる,shuairou,sr +Kowtow Cleave,仆刀,ドゲザン,pudao,pd +Flower Trick,千变万花,トリックフラワー,qianbian[wan mo]hua,qb[mh +Torch Song,闪焰高歌,フレアソング,shanyangaoge,sygg +Aqua Step,流水旋舞,アクアステップ,liushuixuanwu,lsxw +Raging Bull,怒牛,レイジングブル,nuniu,nn +Make It Rain,淘金潮,ゴールドラッシュ,taojinchao,tjc +Psyblade,精神剑,サイコブレイド,jingshenjian,jsj +Hydro Steam,水蒸气,ハイドロスチーム,shuizhengqi,szq +Ruination,大灾难,カタストロフィ,dazainan,dzn +Collision Course,全开猛撞,アクセルブレイク,quankaimengzhuang,qkmz +Electro Drift,闪电猛冲,イナズマドライブ,shandianmengchong,sdmc +Shed Tail,断尾,しっぽきり,duanwei,dw +Chilly Reception,冷笑话,さむいギャグ,lengxiaohua,lxh +Tidy Up,大扫除,おかたづけ,dasaochu,dsc +Snowscape,雪景,ゆきげしき,xuejing,xj +Pounce,虫扑,とびつく,chongpu,cp +Trailblaze,起草,くさわけ,qicao,qc +Chilling Water,泼冷水,ひやみず,polengshui,pls +Hyper Drill,强力钻,ハイパードリル,qianglizuan,qlz +Twin Beam,双光束,ツインビーム,shuangguangshu,sgs +Rage Fist,愤怒之拳,ふんどのこぶし,fennuzhiquan,fnzq +Armor Cannon,铠农炮,アーマーキャノン,kainongpao,knp +Bitter Blade,悔念剑,むねんのつるぎ,huinianjian,hnj +Double Shock,电光双击,でんこうそうげき,dianguangshuangji,dgsj +Gigaton Hammer,巨力锤,デカハンマー,julichui,jlc +Comeuppance,复仇,ほうふく,fuchou,fc +Aqua Cutter,水波刀,アクアカッター,shuibodao,sbd +Blazing Torque,灼热暴冲,バーンアクセル,zhuorebaochong,zrbc +Wicked Torque,黑暗暴冲,ダークアクセル,heianbaochong,habc +Noxious Torque,剧毒暴冲,ポイズンアクセル,judubaochong,jdbc +Combat Torque,格斗暴冲,ファイトアクセル,gedoubaochong,gdbc +Magical Torque,魔法暴冲,マジカルアクセル,mofabaochong,mfbc +Blood Moon,血月,ブラッドムーン,xueyue,xy +Matcha Gotcha,刷刷茶炮,シャカシャカほう,shuashuachapao,sscp +Syrup Bomb,糖浆炸弹,みずあめボム‎,tangjiangzhadan,tjzd +Ivy Cudgel,棘藤棒,ツタこんぼう,jitengbang,jtb +Electro Shot,电光束,エレクトロビーム,dianguangshu,dgs +Tera Starstorm,晶光星群,テラクラスター,jingguangxingqun,jgxq +Fickle Beam,随机光,きまぐレーザー,suijiguang,sjg +Burning Bulwark,火焰守护,かえんのまもり,huoyanshouhu,hysh +Thunderclap,迅雷,じんらい,xunlei,xl +Mighty Cleave,强刃攻击,パワフルエッジ,qiangrengongji,qrgj +Tachyon Cutter,迅子利刃,タキオンカッター,xunziliren,xzlr +Hard Press,硬压,ハードプレス,yingya,yy +Dragon Cheer,龙声鼓舞,ドラゴンエール,longshengguwu,lsgw +Alluring Voice,魅诱之声,みわくのボイス,meiyouzhisheng,myzs +Temper Flare,豁出去,やけっぱち,huochuqu,hcq +Supercell Slam,闪电强袭,サンダーダイブ,shandianqiangxi,sdqx +Psychic Noise,精神噪音,サイコノイズ,jingshenzaoyin,jszy +Upper Hand,快手还击,はやてがえし,kuaishouhaiji,kshj +Malignant Chain,邪毒锁链,じゃどくのくさり,xiedusuolian,xdsl \ No newline at end of file diff --git a/script_res/translate/gen9_pokemon.csv b/script_res/translate/gen9_pokemon.csv new file mode 100644 index 0000000..e3ca9ab --- /dev/null +++ b/script_res/translate/gen9_pokemon.csv @@ -0,0 +1,8 @@ +#1018,铝钢桥龙,ブリジュラス,Archaludon,lvgangqiaolong,lgql,lü gang qiao long,lü,gang,qiao,long,,l,g,q,l +#1019,蜜集大蛇,カミツオロチ,Hydrapple,mijidashe,mjds,mi ji da she,mi,ji,da,she,,m,j,d,s +#1020,破空焰,ウガツホムラ,Gouging Fire,pokongyan,pky,po kong yan,po,kong,yan,,,p,k,y, +#1021,猛雷鼓,タケルライコ,Raging Bolt,mengleigu,mlg,meng lei gu,meng,lei,gu,,,m,l,g, +#1022,铁磐岩,テツノイワオ,Iron Boulder,tiepanyan,tpy,tie pan yan,tie,pan,yan,,,t,p,y, +#1023,铁头壳,テツノカシラ,Iron Crown,tietouke,ttk,tie tou ke,tie,tou,ke,,,t,t,k, +#1024,太乐巴戈斯,テラパゴス,Terapagos,tailebagesi,tlbg,tai le ba ge si,tai,le,ba,ge,si,t,l,b,g +#1025,桃歹郎,モモワロウ,Pecharunt,taodailang,tdl,tao dai lang,tao,dai,lang,,,t,d,l, \ No newline at end of file diff --git a/script_res/translate/moves.json b/script_res/translate/moves.json new file mode 100644 index 0000000..0bffa18 --- /dev/null +++ b/script_res/translate/moves.json @@ -0,0 +1,103 @@ +{ + "Thunder Cage": "雷电囚笼", + "Dragon Energy": "巨龙威能", + "Freezing Glare": "冰冷视线", + "Fiery Wrath": "怒火中烧", + "Thunderous Kick": "雷鸣蹴击", + "Glacial Lance": "雪矛", + "Astral Barrage": "星碎", + "Eerie Spell": "诡异咒语", + "Dire Claw": "克命爪", + "Psyshield Bash": "屏障猛攻", + "Power Shift": "力量转换", + "Stone Axe": "岩斧", + "Springtide Storm": "阳春风暴", + "Mystical Power": "神秘之力", + "Raging Fury": "大愤慨", + "Wave Crash": "波动冲", + "Chloroblast": "叶绿爆震", + "Mountain Gale": "冰山风", + "Victory Dance": "胜利之舞", + "Headlong Rush": "突飞猛扑", + "Barb Barrage": "毒千针", + "Esper Wing": "气场之翼", + "Bitter Malice": "冤冤相报", + "Shelter": "闭关", + "Triple Arrows": "三连箭", + "Infernal Parade": "群魔乱舞", + "Ceaseless Edge": "秘剑・千重涛", + "Bleakwind Storm": "枯叶风暴", + "Wildbolt Storm": "鸣雷风暴", + "Sandsear Storm": "热沙风暴", + "Lunar Blessing": "新月祈祷", + "Take Heart": "勇气填充", + "Tera Blast": "太晶爆发", + "Silk Trap": "线阱", + "Axe Kick": "下压踢", + "Last Respects": "扫墓", + "Lumina Crash": "琉光冲激", + "Order Up": "上菜", + "Jet Punch": "喷射拳", + "Spicy Extract": "辣椒精华", + "Spin Out": "疾速转轮", + "Population Bomb": "鼠数儿", + "Ice Spinner": "冰旋", + "Glaive Rush": "巨剑突击", + "Revival Blessing": "复生祈祷", + "Salt Cure": "盐腌", + "Triple Dive": "三连钻", + "Mortal Spin": "晶光转转", + "Doodle": "描绘", + "Fillet Away": "甩肉", + "Kowtow Cleave": "仆刀", + "Flower Trick": "千变万花", + "Torch Song": "闪焰高歌", + "Aqua Step": "流水旋舞", + "Raging Bull": "怒牛", + "Make It Rain": "淘金潮", + "Psyblade": "精神剑", + "Hydro Steam": "水蒸气", + "Ruination": "大灾难", + "Collision Course": "全开猛撞", + "Electro Drift": "闪电猛冲", + "Shed Tail": "断尾", + "Chilly Reception": "冷笑话", + "Tidy Up": "大扫除", + "Snowscape": "雪景", + "Pounce": "虫扑", + "Trailblaze": "起草", + "Chilling Water": "泼冷水", + "Hyper Drill": "强力钻", + "Twin Beam": "双光束", + "Rage Fist": "愤怒之拳", + "Armor Cannon": "铠农炮", + "Bitter Blade": "悔念剑", + "Double Shock": "电光双击", + "Gigaton Hammer": "巨力锤", + "Comeuppance": "复仇", + "Aqua Cutter": "水波刀", + "Blazing Torque": "灼热暴冲", + "Wicked Torque": "黑暗暴冲", + "Noxious Torque": "剧毒暴冲", + "Combat Torque": "格斗暴冲", + "Magical Torque": "魔法暴冲", + "Blood Moon": "血月", + "Matcha Gotcha": "刷刷茶炮", + "Syrup Bomb": "糖浆炸弹", + "Ivy Cudgel": "棘藤棒", + "Electro Shot": "电光束", + "Tera Starstorm": "晶光星群", + "Fickle Beam": "随机光", + "Burning Bulwark": "火焰守护", + "Thunderclap": "迅雷", + "Mighty Cleave": "强刃攻击", + "Tachyon Cutter": "迅子利刃", + "Hard Press": "硬压", + "Dragon Cheer": "龙声鼓舞", + "Alluring Voice": "魅诱之声", + "Temper Flare": "豁出去", + "Supercell Slam": "闪电强袭", + "Psychic Noise": "精神噪音", + "Upper Hand": "快手还击", + "Malignant Chain": "邪毒锁链" +} \ No newline at end of file diff --git a/script_res/translate/moves.py b/script_res/translate/moves.py new file mode 100644 index 0000000..6cbdc50 --- /dev/null +++ b/script_res/translate/moves.py @@ -0,0 +1,38 @@ +import csv +import json + +def translate_moves(csv_file_path, json_file_path, encoding='utf-8'): + data = [] + trans_name = {} + with open(csv_file_path, 'r', encoding=encoding) as csvfile: + reader = csv.reader(csvfile) + for row in reader: + # Extract the desired key-value pair + en = row[0] + ch = row[1] + trans_name[en] = ch + + with open(json_file_path, 'w', encoding=encoding) as jsonfile: + json.dump(trans_name, jsonfile, indent=4, ensure_ascii=False) # Indent for readability + +# "en": "Ivy Cudgel", +# "chs": "棘藤棒", +# "ja": "ツタこんぼう", +# "pinyin": "jitengbang", +# "pingyin-first": "jtb" +def translate_moves_input(csv_file_path, json_file_path, encoding='utf-8'): + data = {} + with open(csv_file_path, 'r', encoding=encoding) as csvfile: + reader = csv.reader(csvfile) + for row in reader: + trans_input = {"en": row[0], "chs": row[1], "ja": row[2], "pinyin": row[3], "pinyin-first": row[4]} + data[row[0]] = trans_input + + with open(json_file_path, 'w', encoding=encoding) as jsonfile: + json.dump(data, jsonfile, indent=4, ensure_ascii=False) # Indent for readability + + +# Example usage: +csv_file = "gen9_moves.csv" +translate_moves(csv_file, "moves.json") +translate_moves_input(csv_file, "moves_input.json") diff --git a/script_res/translate/moves_input.json b/script_res/translate/moves_input.json new file mode 100644 index 0000000..eb33349 --- /dev/null +++ b/script_res/translate/moves_input.json @@ -0,0 +1,709 @@ +{ + "Thunder Cage": { + "en": "Thunder Cage", + "chs": "雷电囚笼", + "ja": "サンダープリズン", + "pinyin": "leidianqiulong", + "pinyin-first": "ldql" + }, + "Dragon Energy": { + "en": "Dragon Energy", + "chs": "巨龙威能", + "ja": "ドラゴンエナジー", + "pinyin": "julongweineng", + "pinyin-first": "jlwn" + }, + "Freezing Glare": { + "en": "Freezing Glare", + "chs": "冰冷视线", + "ja": "いてつくしせん", + "pinyin": "binglengshixian", + "pinyin-first": "blsx" + }, + "Fiery Wrath": { + "en": "Fiery Wrath", + "chs": "怒火中烧", + "ja": "もえあがるいかり", + "pinyin": "nuhuozhongshao", + "pinyin-first": "nhzs" + }, + "Thunderous Kick": { + "en": "Thunderous Kick", + "chs": "雷鸣蹴击", + "ja": "らいめいげり", + "pinyin": "leimingcuji", + "pinyin-first": "lmcj" + }, + "Glacial Lance": { + "en": "Glacial Lance", + "chs": "雪矛", + "ja": "ブリザードランス", + "pinyin": "xuemao", + "pinyin-first": "xm" + }, + "Astral Barrage": { + "en": "Astral Barrage", + "chs": "星碎", + "ja": "アストラルビット", + "pinyin": "xingsui", + "pinyin-first": "xs" + }, + "Eerie Spell": { + "en": "Eerie Spell", + "chs": "诡异咒语", + "ja": "ぶきみなじゅもん", + "pinyin": "guiyizhouyu", + "pinyin-first": "gyzy" + }, + "Dire Claw": { + "en": "Dire Claw", + "chs": "克命爪", + "ja": "フェイタルクロー", + "pinyin": "kemingzhao", + "pinyin-first": "kmz" + }, + "Psyshield Bash": { + "en": "Psyshield Bash", + "chs": "屏障猛攻", + "ja": "バリアーラッシュ", + "pinyin": "pingzhangmenggong", + "pinyin-first": "pzmg" + }, + "Power Shift": { + "en": "Power Shift", + "chs": "力量转换", + "ja": "パワーシフト", + "pinyin": "liliangzhuanhuan", + "pinyin-first": "llzh" + }, + "Stone Axe": { + "en": "Stone Axe", + "chs": "岩斧", + "ja": "がんせきアックス", + "pinyin": "yanfu", + "pinyin-first": "yf" + }, + "Springtide Storm": { + "en": "Springtide Storm", + "chs": "阳春风暴", + "ja": "はるのあらし", + "pinyin": "yangchunfengbao", + "pinyin-first": "ycfb" + }, + "Mystical Power": { + "en": "Mystical Power", + "chs": "神秘之力", + "ja": "しんぴのちから", + "pinyin": "shenmizhili", + "pinyin-first": "smzl" + }, + "Raging Fury": { + "en": "Raging Fury", + "chs": "大愤慨", + "ja": "だいふんげき", + "pinyin": "dafenkai", + "pinyin-first": "dfk" + }, + "Wave Crash": { + "en": "Wave Crash", + "chs": "波动冲", + "ja": "ウェーブタックル", + "pinyin": "bodongchong", + "pinyin-first": "bdc" + }, + "Chloroblast": { + "en": "Chloroblast", + "chs": "叶绿爆震", + "ja": "クロロブラスト", + "pinyin": "yelübaozhen", + "pinyin-first": "ylbz" + }, + "Mountain Gale": { + "en": "Mountain Gale", + "chs": "冰山风", + "ja": "ひょうざんおろし", + "pinyin": "bingshanfeng", + "pinyin-first": "bsf" + }, + "Victory Dance": { + "en": "Victory Dance", + "chs": "胜利之舞", + "ja": "しょうりのまい", + "pinyin": "shenglizhiwu", + "pinyin-first": "slzw" + }, + "Headlong Rush": { + "en": "Headlong Rush", + "chs": "突飞猛扑", + "ja": "ぶちかまし", + "pinyin": "tufeimengpu", + "pinyin-first": "tfmp" + }, + "Barb Barrage": { + "en": "Barb Barrage", + "chs": "毒千针", + "ja": "どくばりセンボン", + "pinyin": "duqianzhen", + "pinyin-first": "dqz" + }, + "Esper Wing": { + "en": "Esper Wing", + "chs": "气场之翼", + "ja": "オーラウイング", + "pinyin": "qichangzhiyi", + "pinyin-first": "qczy" + }, + "Bitter Malice": { + "en": "Bitter Malice", + "chs": "冤冤相报", + "ja": "うらみつらみ", + "pinyin": "yuanyuanxiangbao", + "pinyin-first": "yyxb" + }, + "Shelter": { + "en": "Shelter", + "chs": "闭关", + "ja": "たてこもる", + "pinyin": "biguan", + "pinyin-first": "bg" + }, + "Triple Arrows": { + "en": "Triple Arrows", + "chs": "三连箭", + "ja": "3ぼんのや", + "pinyin": "sanlianjian", + "pinyin-first": "slj" + }, + "Infernal Parade": { + "en": "Infernal Parade", + "chs": "群魔乱舞", + "ja": "ひゃっきやこう", + "pinyin": "qunmoluanwu", + "pinyin-first": "qmlw" + }, + "Ceaseless Edge": { + "en": "Ceaseless Edge", + "chs": "秘剑・千重涛", + "ja": "ひけん・ちえなみ", + "pinyin": "mijian・qianzhongtao", + "pinyin-first": "mjqzt" + }, + "Bleakwind Storm": { + "en": "Bleakwind Storm", + "chs": "枯叶风暴", + "ja": "こがらしあらし", + "pinyin": "kuyefengbao", + "pinyin-first": "kyfb" + }, + "Wildbolt Storm": { + "en": "Wildbolt Storm", + "chs": "鸣雷风暴", + "ja": "かみなりあらし", + "pinyin": "mingleifengbao", + "pinyin-first": "mlfb" + }, + "Sandsear Storm": { + "en": "Sandsear Storm", + "chs": "热沙风暴", + "ja": "ねっさのあらし", + "pinyin": "reshafengbao", + "pinyin-first": "rsfb" + }, + "Lunar Blessing": { + "en": "Lunar Blessing", + "chs": "新月祈祷", + "ja": "みかづきのいのり", + "pinyin": "xinyueqidao", + "pinyin-first": "xyqd" + }, + "Take Heart": { + "en": "Take Heart", + "chs": "勇气填充", + "ja": "ブレイブチャージ", + "pinyin": "yongqitianchong", + "pinyin-first": "yqtc" + }, + "Tera Blast": { + "en": "Tera Blast", + "chs": "太晶爆发", + "ja": "テラバースト", + "pinyin": "taijingbaofa", + "pinyin-first": "tjbf" + }, + "Silk Trap": { + "en": "Silk Trap", + "chs": "线阱", + "ja": "スレッドトラップ", + "pinyin": "xianjing", + "pinyin-first": "xj" + }, + "Axe Kick": { + "en": "Axe Kick", + "chs": "下压踢", + "ja": "かかとおとし", + "pinyin": "xiayati", + "pinyin-first": "xyt" + }, + "Last Respects": { + "en": "Last Respects", + "chs": "扫墓", + "ja": "おはかまいり", + "pinyin": "saomu", + "pinyin-first": "sm" + }, + "Lumina Crash": { + "en": "Lumina Crash", + "chs": "琉光冲激", + "ja": "ルミナコリジョン", + "pinyin": "liuguangchongji", + "pinyin-first": "lgcj" + }, + "Order Up": { + "en": "Order Up", + "chs": "上菜", + "ja": "いっちょうあがり", + "pinyin": "shangcai", + "pinyin-first": "sc" + }, + "Jet Punch": { + "en": "Jet Punch", + "chs": "喷射拳", + "ja": "ジェットパンチ", + "pinyin": "penshequan", + "pinyin-first": "psq" + }, + "Spicy Extract": { + "en": "Spicy Extract", + "chs": "辣椒精华", + "ja": "ハバネロエキス", + "pinyin": "lajiaojinghua", + "pinyin-first": "ljjh" + }, + "Spin Out": { + "en": "Spin Out", + "chs": "疾速转轮", + "ja": "ホイールスピン", + "pinyin": "jisuzhuanlun", + "pinyin-first": "jszl" + }, + "Population Bomb": { + "en": "Population Bomb", + "chs": "鼠数儿", + "ja": "ネズミざん", + "pinyin": "shushuer", + "pinyin-first": "sse" + }, + "Ice Spinner": { + "en": "Ice Spinner", + "chs": "冰旋", + "ja": "アイススピナー", + "pinyin": "bingxuan", + "pinyin-first": "bx" + }, + "Glaive Rush": { + "en": "Glaive Rush", + "chs": "巨剑突击", + "ja": "きょけんとつげき", + "pinyin": "jujiantuji", + "pinyin-first": "jjtj" + }, + "Revival Blessing": { + "en": "Revival Blessing", + "chs": "复生祈祷", + "ja": "さいきのいのり", + "pinyin": "fushengqidao", + "pinyin-first": "fsqd" + }, + "Salt Cure": { + "en": "Salt Cure", + "chs": "盐腌", + "ja": "しおづけ", + "pinyin": "yanyan", + "pinyin-first": "yy" + }, + "Triple Dive": { + "en": "Triple Dive", + "chs": "三连钻", + "ja": "トリプルダイブ", + "pinyin": "sanlianzuan", + "pinyin-first": "slz" + }, + "Mortal Spin": { + "en": "Mortal Spin", + "chs": "晶光转转", + "ja": "キラースピン", + "pinyin": "jingguangzhuanzhuan", + "pinyin-first": "jgzz" + }, + "Doodle": { + "en": "Doodle", + "chs": "描绘", + "ja": "うつしえ", + "pinyin": "miaohui", + "pinyin-first": "mh" + }, + "Fillet Away": { + "en": "Fillet Away", + "chs": "甩肉", + "ja": "みをけずる", + "pinyin": "shuairou", + "pinyin-first": "sr" + }, + "Kowtow Cleave": { + "en": "Kowtow Cleave", + "chs": "仆刀", + "ja": "ドゲザン", + "pinyin": "pudao", + "pinyin-first": "pd" + }, + "Flower Trick": { + "en": "Flower Trick", + "chs": "千变万花", + "ja": "トリックフラワー", + "pinyin": "qianbian[wan mo]hua", + "pinyin-first": "qb[mh" + }, + "Torch Song": { + "en": "Torch Song", + "chs": "闪焰高歌", + "ja": "フレアソング", + "pinyin": "shanyangaoge", + "pinyin-first": "sygg" + }, + "Aqua Step": { + "en": "Aqua Step", + "chs": "流水旋舞", + "ja": "アクアステップ", + "pinyin": "liushuixuanwu", + "pinyin-first": "lsxw" + }, + "Raging Bull": { + "en": "Raging Bull", + "chs": "怒牛", + "ja": "レイジングブル", + "pinyin": "nuniu", + "pinyin-first": "nn" + }, + "Make It Rain": { + "en": "Make It Rain", + "chs": "淘金潮", + "ja": "ゴールドラッシュ", + "pinyin": "taojinchao", + "pinyin-first": "tjc" + }, + "Psyblade": { + "en": "Psyblade", + "chs": "精神剑", + "ja": "サイコブレイド", + "pinyin": "jingshenjian", + "pinyin-first": "jsj" + }, + "Hydro Steam": { + "en": "Hydro Steam", + "chs": "水蒸气", + "ja": "ハイドロスチーム", + "pinyin": "shuizhengqi", + "pinyin-first": "szq" + }, + "Ruination": { + "en": "Ruination", + "chs": "大灾难", + "ja": "カタストロフィ", + "pinyin": "dazainan", + "pinyin-first": "dzn" + }, + "Collision Course": { + "en": "Collision Course", + "chs": "全开猛撞", + "ja": "アクセルブレイク", + "pinyin": "quankaimengzhuang", + "pinyin-first": "qkmz" + }, + "Electro Drift": { + "en": "Electro Drift", + "chs": "闪电猛冲", + "ja": "イナズマドライブ", + "pinyin": "shandianmengchong", + "pinyin-first": "sdmc" + }, + "Shed Tail": { + "en": "Shed Tail", + "chs": "断尾", + "ja": "しっぽきり", + "pinyin": "duanwei", + "pinyin-first": "dw" + }, + "Chilly Reception": { + "en": "Chilly Reception", + "chs": "冷笑话", + "ja": "さむいギャグ", + "pinyin": "lengxiaohua", + "pinyin-first": "lxh" + }, + "Tidy Up": { + "en": "Tidy Up", + "chs": "大扫除", + "ja": "おかたづけ", + "pinyin": "dasaochu", + "pinyin-first": "dsc" + }, + "Snowscape": { + "en": "Snowscape", + "chs": "雪景", + "ja": "ゆきげしき", + "pinyin": "xuejing", + "pinyin-first": "xj" + }, + "Pounce": { + "en": "Pounce", + "chs": "虫扑", + "ja": "とびつく", + "pinyin": "chongpu", + "pinyin-first": "cp" + }, + "Trailblaze": { + "en": "Trailblaze", + "chs": "起草", + "ja": "くさわけ", + "pinyin": "qicao", + "pinyin-first": "qc" + }, + "Chilling Water": { + "en": "Chilling Water", + "chs": "泼冷水", + "ja": "ひやみず", + "pinyin": "polengshui", + "pinyin-first": "pls" + }, + "Hyper Drill": { + "en": "Hyper Drill", + "chs": "强力钻", + "ja": "ハイパードリル", + "pinyin": "qianglizuan", + "pinyin-first": "qlz" + }, + "Twin Beam": { + "en": "Twin Beam", + "chs": "双光束", + "ja": "ツインビーム", + "pinyin": "shuangguangshu", + "pinyin-first": "sgs" + }, + "Rage Fist": { + "en": "Rage Fist", + "chs": "愤怒之拳", + "ja": "ふんどのこぶし", + "pinyin": "fennuzhiquan", + "pinyin-first": "fnzq" + }, + "Armor Cannon": { + "en": "Armor Cannon", + "chs": "铠农炮", + "ja": "アーマーキャノン", + "pinyin": "kainongpao", + "pinyin-first": "knp" + }, + "Bitter Blade": { + "en": "Bitter Blade", + "chs": "悔念剑", + "ja": "むねんのつるぎ", + "pinyin": "huinianjian", + "pinyin-first": "hnj" + }, + "Double Shock": { + "en": "Double Shock", + "chs": "电光双击", + "ja": "でんこうそうげき", + "pinyin": "dianguangshuangji", + "pinyin-first": "dgsj" + }, + "Gigaton Hammer": { + "en": "Gigaton Hammer", + "chs": "巨力锤", + "ja": "デカハンマー", + "pinyin": "julichui", + "pinyin-first": "jlc" + }, + "Comeuppance": { + "en": "Comeuppance", + "chs": "复仇", + "ja": "ほうふく", + "pinyin": "fuchou", + "pinyin-first": "fc" + }, + "Aqua Cutter": { + "en": "Aqua Cutter", + "chs": "水波刀", + "ja": "アクアカッター", + "pinyin": "shuibodao", + "pinyin-first": "sbd" + }, + "Blazing Torque": { + "en": "Blazing Torque", + "chs": "灼热暴冲", + "ja": "バーンアクセル", + "pinyin": "zhuorebaochong", + "pinyin-first": "zrbc" + }, + "Wicked Torque": { + "en": "Wicked Torque", + "chs": "黑暗暴冲", + "ja": "ダークアクセル", + "pinyin": "heianbaochong", + "pinyin-first": "habc" + }, + "Noxious Torque": { + "en": "Noxious Torque", + "chs": "剧毒暴冲", + "ja": "ポイズンアクセル", + "pinyin": "judubaochong", + "pinyin-first": "jdbc" + }, + "Combat Torque": { + "en": "Combat Torque", + "chs": "格斗暴冲", + "ja": "ファイトアクセル", + "pinyin": "gedoubaochong", + "pinyin-first": "gdbc" + }, + "Magical Torque": { + "en": "Magical Torque", + "chs": "魔法暴冲", + "ja": "マジカルアクセル", + "pinyin": "mofabaochong", + "pinyin-first": "mfbc" + }, + "Blood Moon": { + "en": "Blood Moon", + "chs": "血月", + "ja": "ブラッドムーン", + "pinyin": "xueyue", + "pinyin-first": "xy" + }, + "Matcha Gotcha": { + "en": "Matcha Gotcha", + "chs": "刷刷茶炮", + "ja": "シャカシャカほう", + "pinyin": "shuashuachapao", + "pinyin-first": "sscp" + }, + "Syrup Bomb": { + "en": "Syrup Bomb", + "chs": "糖浆炸弹", + "ja": "みずあめボム‎", + "pinyin": "tangjiangzhadan", + "pinyin-first": "tjzd" + }, + "Ivy Cudgel": { + "en": "Ivy Cudgel", + "chs": "棘藤棒", + "ja": "ツタこんぼう", + "pinyin": "jitengbang", + "pinyin-first": "jtb" + }, + "Electro Shot": { + "en": "Electro Shot", + "chs": "电光束", + "ja": "エレクトロビーム", + "pinyin": "dianguangshu", + "pinyin-first": "dgs" + }, + "Tera Starstorm": { + "en": "Tera Starstorm", + "chs": "晶光星群", + "ja": "テラクラスター", + "pinyin": "jingguangxingqun", + "pinyin-first": "jgxq" + }, + "Fickle Beam": { + "en": "Fickle Beam", + "chs": "随机光", + "ja": "きまぐレーザー", + "pinyin": "suijiguang", + "pinyin-first": "sjg" + }, + "Burning Bulwark": { + "en": "Burning Bulwark", + "chs": "火焰守护", + "ja": "かえんのまもり", + "pinyin": "huoyanshouhu", + "pinyin-first": "hysh" + }, + "Thunderclap": { + "en": "Thunderclap", + "chs": "迅雷", + "ja": "じんらい", + "pinyin": "xunlei", + "pinyin-first": "xl" + }, + "Mighty Cleave": { + "en": "Mighty Cleave", + "chs": "强刃攻击", + "ja": "パワフルエッジ", + "pinyin": "qiangrengongji", + "pinyin-first": "qrgj" + }, + "Tachyon Cutter": { + "en": "Tachyon Cutter", + "chs": "迅子利刃", + "ja": "タキオンカッター", + "pinyin": "xunziliren", + "pinyin-first": "xzlr" + }, + "Hard Press": { + "en": "Hard Press", + "chs": "硬压", + "ja": "ハードプレス", + "pinyin": "yingya", + "pinyin-first": "yy" + }, + "Dragon Cheer": { + "en": "Dragon Cheer", + "chs": "龙声鼓舞", + "ja": "ドラゴンエール", + "pinyin": "longshengguwu", + "pinyin-first": "lsgw" + }, + "Alluring Voice": { + "en": "Alluring Voice", + "chs": "魅诱之声", + "ja": "みわくのボイス", + "pinyin": "meiyouzhisheng", + "pinyin-first": "myzs" + }, + "Temper Flare": { + "en": "Temper Flare", + "chs": "豁出去", + "ja": "やけっぱち", + "pinyin": "huochuqu", + "pinyin-first": "hcq" + }, + "Supercell Slam": { + "en": "Supercell Slam", + "chs": "闪电强袭", + "ja": "サンダーダイブ", + "pinyin": "shandianqiangxi", + "pinyin-first": "sdqx" + }, + "Psychic Noise": { + "en": "Psychic Noise", + "chs": "精神噪音", + "ja": "サイコノイズ", + "pinyin": "jingshenzaoyin", + "pinyin-first": "jszy" + }, + "Upper Hand": { + "en": "Upper Hand", + "chs": "快手还击", + "ja": "はやてがえし", + "pinyin": "kuaishouhaiji", + "pinyin-first": "kshj" + }, + "Malignant Chain": { + "en": "Malignant Chain", + "chs": "邪毒锁链", + "ja": "じゃどくのくさり", + "pinyin": "xiedusuolian", + "pinyin-first": "xdsl" + } +} \ No newline at end of file diff --git a/script_res/translate/poke.py b/script_res/translate/poke.py new file mode 100644 index 0000000..f41be6c --- /dev/null +++ b/script_res/translate/poke.py @@ -0,0 +1,34 @@ +import csv +import json + +def translate_name(csv_file_path, json_file_path, encoding='utf-8'): + data = [] + trans_name = {} + with open(csv_file_path, 'r', encoding=encoding) as csvfile: + reader = csv.reader(csvfile) + for row in reader: + # Extract the desired key-value pair + en = row[3] + ch = row[1] + trans_name[en] = ch + + with open(json_file_path, 'w', encoding=encoding) as jsonfile: + json.dump(trans_name, jsonfile, indent=4, ensure_ascii=False) # Indent for readability + +# "input0": "jitengbang", +# "input1": "jtb" +def translate_name_input(csv_file_path, json_file_path, encoding='utf-8'): + data = {} + with open(csv_file_path, 'r', encoding=encoding) as csvfile: + reader = csv.reader(csvfile) + for row in reader: + trans_input = {"input0": row[1], "input1": row[2], "input2": row[3], "input3": row[4], "input4": row[5]} + data[row[3]] = trans_input + + with open(json_file_path, 'w', encoding=encoding) as jsonfile: + json.dump(data, jsonfile, indent=4, ensure_ascii=False) # Indent for readability + + +csv_file = "gen9_pokemon.csv" +translate_name(csv_file, "pokemon.json") +translate_name_input(csv_file, "pokemon_input.json") diff --git a/script_res/translate/pokemon.json b/script_res/translate/pokemon.json new file mode 100644 index 0000000..e0cc8db --- /dev/null +++ b/script_res/translate/pokemon.json @@ -0,0 +1,10 @@ +{ + "Archaludon": "铝钢桥龙", + "Hydrapple": "蜜集大蛇", + "Gouging Fire": "破空焰", + "Raging Bolt": "猛雷鼓", + "Iron Boulder": "铁磐岩", + "Iron Crown": "铁头壳", + "Terapagos": "太乐巴戈斯", + "Pecharunt": "桃歹郎" +} \ No newline at end of file diff --git a/script_res/translate/pokemon_input.json b/script_res/translate/pokemon_input.json new file mode 100644 index 0000000..aa07d2e --- /dev/null +++ b/script_res/translate/pokemon_input.json @@ -0,0 +1,58 @@ +{ + "Archaludon": { + "input0": "铝钢桥龙", + "input1": "ブリジュラス", + "input2": "Archaludon", + "input3": "lvgangqiaolong", + "input4": "lgql" + }, + "Hydrapple": { + "input0": "蜜集大蛇", + "input1": "カミツオロチ", + "input2": "Hydrapple", + "input3": "mijidashe", + "input4": "mjds" + }, + "Gouging Fire": { + "input0": "破空焰", + "input1": "ウガツホムラ", + "input2": "Gouging Fire", + "input3": "pokongyan", + "input4": "pky" + }, + "Raging Bolt": { + "input0": "猛雷鼓", + "input1": "タケルライコ", + "input2": "Raging Bolt", + "input3": "mengleigu", + "input4": "mlg" + }, + "Iron Boulder": { + "input0": "铁磐岩", + "input1": "テツノイワオ", + "input2": "Iron Boulder", + "input3": "tiepanyan", + "input4": "tpy" + }, + "Iron Crown": { + "input0": "铁头壳", + "input1": "テツノカシラ", + "input2": "Iron Crown", + "input3": "tietouke", + "input4": "ttk" + }, + "Terapagos": { + "input0": "太乐巴戈斯", + "input1": "テラパゴス", + "input2": "Terapagos", + "input3": "tailebagesi", + "input4": "tlbgs" + }, + "Pecharunt": { + "input0": "桃歹郎", + "input1": "モモワロウ", + "input2": "Pecharunt", + "input3": "taodailang", + "input4": "tdl" + } +} diff --git a/script_res/translate/search_input.js b/script_res/translate/search_input.js index a4e93ca..701434a 100644 --- a/script_res/translate/search_input.js +++ b/script_res/translate/search_input.js @@ -1053,22 +1053,19 @@ const POKEMON_NAMES_INPUTS = { "input0": "jidongniao", "input1": "jdn", "input2": "articuno", - "input3": "freezer", - "input4": "急冻鸟" + "input3": "急冻鸟" }, "Zapdos": { "input0": "shandianniao", "input1": "sdn", "input2": "zapdos", - "input3": "thunder", - "input4": "闪电鸟" + "input3": "闪电鸟" }, "Moltres": { "input0": "huoyanniao", "input1": "hyn", "input2": "moltres", - "input3": "fire", - "input4": "火焰鸟" + "input3": "火焰鸟" }, "Dratini": { "input0": "minilong", @@ -1835,19 +1832,17 @@ const POKEMON_NAMES_INPUTS = { "Lugia": { "input0": "luoqiya", "input1": "lqy", - "input2": "yinniao", - "input3": "lugia", - "input4": "rugia", - "input5": "洛奇亚" + "input2": "lugia", + "input3": "rugia", + "input4": "洛奇亚" }, "Ho-Oh": { "input0": "fengwang", "input1": "fw", - "input2": "jinniao", - "input3": "fenghuang", - "input4": "hooh", - "input5": "houou", - "input6": "凤王" + "input2": "fenghuang", + "input3": "hooh", + "input4": "houou", + "input5": "凤王" }, "Celebi": { "input0": "shilabi", @@ -2372,7 +2367,7 @@ const POKEMON_NAMES_INPUTS = { "input4": "呆火驼" }, "Camerupt": { - "input0": "penghuotuo", + "input0": "penhuotuo", "input1": "pht", "input2": "camerupt", "input3": "bakuuda", @@ -2792,7 +2787,7 @@ const POKEMON_NAMES_INPUTS = { "input0": "ladiyasi", "input1": "ldys", "input2": "hongshuidu", - "input3": "hongfeiji", + "input3": "meimei", "input4": "latias", "input5": "拉帝亚斯" }, @@ -2800,7 +2795,7 @@ const POKEMON_NAMES_INPUTS = { "input0": "ladiousi", "input1": "ldos", "input2": "lanshuidu", - "input3": "lanfeiji", + "input3": "gege", "input4": "latios", "input5": "拉帝欧斯" }, @@ -2854,10 +2849,9 @@ const POKEMON_NAMES_INPUTS = { "Deoxys": { "input0": "daiouqixisi", "input1": "doqxs", - "input2": "waixingren", - "input3": "dna", - "input4": "deoxys", - "input5": "代欧奇希斯" + "input2": "dna", + "input3": "deoxys", + "input4": "代欧奇希斯" }, "Turtwig": { "input0": "caomiaogui", @@ -3599,18 +3593,16 @@ const POKEMON_NAMES_INPUTS = { "input3": "ganglong", "input4": "shijianlong", "input5": "shijianshen", - "input6": "zuanshi", - "input7": "dialga", - "input8": "帝牙卢卡" + "input6": "dialga", + "input7": "帝牙卢卡" }, "Palkia": { "input0": "paluqiya", "input1": "plqy", "input2": "kongjianlong", "input3": "kongjianshen", - "input4": "zhenzhu", - "input5": "palkia", - "input6": "帕路奇亚" + "input4": "palkia", + "input5": "帕路奇亚" }, "Heatran": { "input0": "xiduolanen", @@ -3853,7 +3845,7 @@ const POKEMON_NAMES_INPUTS = { "input3": "食梦梦" }, "Musharna": { - "input0": "mengmeng", + "input0": "mengmengshi", "input1": "mms", "input2": "musharna", "input3": "梦梦蚀" @@ -3936,7 +3928,7 @@ const POKEMON_NAMES_INPUTS = { "input4": "螺钉地鼠" }, "Excadrill": { - "input0": "lontoudishu", + "input0": "longtoudishu", "input1": "ltds", "input2": "excadrill", "input3": "doryuzu", @@ -4667,7 +4659,7 @@ const POKEMON_NAMES_INPUTS = { "input3": "秃鹰娜" }, "Heatmor": { - "input0": "ronyishou", + "input0": "rongyishou", "input1": "rys", "input2": "heatmor", "input3": "kuitaran", @@ -5403,11 +5395,10 @@ const POKEMON_NAMES_INPUTS = { "Primarina": { "input0": "xishihairen", "input1": "xshr", - "input2": "haishi", - "input3": "weinianghaishi", - "input4": "primarina", - "input5": "ashirenu", - "input6": "西狮海壬" + "input2": "weinianghaishi", + "input3": "primarina", + "input4": "ashirenu", + "input5": "西狮海壬" }, "Pikipek": { "input0": "xiaoduer", @@ -7448,6 +7439,62 @@ const POKEMON_NAMES_INPUTS = { "input1": "egp", "input2": "ogerpon", "input3": "厄诡椪" + }, + "Archaludon": { + "input0": "铝钢桥龙", + "input1": "ブリジュラス", + "input2": "Archaludon", + "input3": "lvgangqiaolong", + "input4": "lgql" + }, + "Hydrapple": { + "input0": "蜜集大蛇", + "input1": "カミツオロチ", + "input2": "Hydrapple", + "input3": "mijidashe", + "input4": "mjds" + }, + "Gouging Fire": { + "input0": "破空焰", + "input1": "ウガツホムラ", + "input2": "Gouging Fire", + "input3": "pokongyan", + "input4": "pky" + }, + "Raging Bolt": { + "input0": "猛雷鼓", + "input1": "タケルライコ", + "input2": "Raging Bolt", + "input3": "mengleigu", + "input4": "mlg" + }, + "Iron Boulder": { + "input0": "铁磐岩", + "input1": "テツノイワオ", + "input2": "Iron Boulder", + "input3": "tiepanyan", + "input4": "tpy" + }, + "Iron Crown": { + "input0": "铁头壳", + "input1": "テツノカシラ", + "input2": "Iron Crown", + "input3": "tietouke", + "input4": "ttk" + }, + "Terapagos": { + "input0": "太乐巴戈斯", + "input1": "テラパゴス", + "input2": "Terapagos", + "input3": "tailebagesi", + "input4": "tlbgs" + }, + "Pecharunt": { + "input0": "桃歹郎", + "input1": "モモワロウ", + "input2": "Pecharunt", + "input3": "taodailang", + "input4": "tdl" } } @@ -21346,7 +21393,7 @@ const MOVE_NAMES_INPUTS = { }, "Syrup Bomb": { - "en": "Syrup Bomb‎", + "en": "Syrup Bomb", "chs": "糖浆炸弹", "ja": "みずあめボム", "pinyin": "tangjiangzhadan", @@ -21359,7 +21406,112 @@ const MOVE_NAMES_INPUTS = { "ja": "ツタこんぼう", "pinyin": "jitengbang", "pingyin-first": "jtb" - } + }, + "Electro Shot": { + "en": "Electro Shot", + "chs": "电光束", + "ja": "エレクトロビーム", + "pinyin": "dianguangshu", + "pinyin-first": "dgs" + }, + "Tera Starstorm": { + "en": "Tera Starstorm", + "chs": "晶光星群", + "ja": "テラクラスター", + "pinyin": "jingguangxingqun", + "pinyin-first": "jgxq" + }, + "Fickle Beam": { + "en": "Fickle Beam", + "chs": "随机光", + "ja": "きまぐレーザー", + "pinyin": "suijiguang", + "pinyin-first": "sjg" + }, + "Burning Bulwark": { + "en": "Burning Bulwark", + "chs": "火焰守护", + "ja": "かえんのまもり", + "pinyin": "huoyanshouhu", + "pinyin-first": "hysh" + }, + "Thunderclap": { + "en": "Thunderclap", + "chs": "迅雷", + "ja": "じんらい", + "pinyin": "xunlei", + "pinyin-first": "xl" + }, + "Mighty Cleave": { + "en": "Mighty Cleave", + "chs": "强刃攻击", + "ja": "パワフルエッジ", + "pinyin": "qiangrengongji", + "pinyin-first": "qrgj" + }, + "Tachyon Cutter": { + "en": "Tachyon Cutter", + "chs": "迅子利刃", + "ja": "タキオンカッター", + "pinyin": "xunziliren", + "pinyin-first": "xzlr" + }, + "Hard Press": { + "en": "Hard Press", + "chs": "硬压", + "ja": "ハードプレス", + "pinyin": "yingya", + "pinyin-first": "yy" + }, + "Dragon Cheer": { + "en": "Dragon Cheer", + "chs": "龙声鼓舞", + "ja": "ドラゴンエール", + "pinyin": "longshengguwu", + "pinyin-first": "lsgw" + }, + "Alluring Voice": { + "en": "Alluring Voice", + "chs": "魅诱之声", + "ja": "みわくのボイス", + "pinyin": "meiyouzhisheng", + "pinyin-first": "myzs" + }, + "Temper Flare": { + "en": "Temper Flare", + "chs": "豁出去", + "ja": "やけっぱち", + "pinyin": "huochuqu", + "pinyin-first": "hcq" + }, + "Supercell Slam": { + "en": "Supercell Slam", + "chs": "闪电强袭", + "ja": "サンダーダイブ", + "pinyin": "shandianqiangxi", + "pinyin-first": "sdqx" + }, + "Psychic Noise": { + "en": "Psychic Noise", + "chs": "精神噪音", + "ja": "サイコノイズ", + "pinyin": "jingshenzaoyin", + "pinyin-first": "jszy" + }, + "Upper Hand": { + "en": "Upper Hand", + "chs": "快手还击", + "ja": "はやてがえし", + "pinyin": "kuaishouhaiji", + "pinyin-first": "kshj" + }, + "Malignant Chain": { + "en": "Malignant Chain", + "chs": "邪毒锁链", + "ja": "じゃどくのくさり", + "pinyin": "xiedusuolian", + "pinyin-first": "xdsl" + } }; function match_pokemon_name_inputs(name, term) { diff --git a/script_res/translate/translate.js b/script_res/translate/translate.js index e6419c3..b6e97c0 100644 --- a/script_res/translate/translate.js +++ b/script_res/translate/translate.js @@ -2043,6 +2043,7 @@ var MOVENAMES = { 'Psybeam': '幻象光线', 'Psyblade': '精神剑', 'Splash': '跃起', + 'Strange Steam': '神奇蒸汽', 'Strength': '怪力', 'Tar Shot': '沥青射击', 'Teatime': '茶会', @@ -2051,6 +2052,23 @@ var MOVENAMES = { 'Water Gun': '水枪', 'Whirlpool': '潮旋', 'Withdraw': '缩入壳中', + + // New in S/V DLC2 + "Electro Shot": "电光束", + "Tera Starstorm": "晶光星群", + "Fickle Beam": "随机光", + "Burning Bulwark": "火焰守护", + "Thunderclap": "迅雷", + "Mighty Cleave": "强刃攻击", + "Tachyon Cutter": "迅子利刃", + "Hard Press": "硬压", + "Dragon Cheer": "龙声鼓舞", + "Alluring Voice": "魅诱之声", + "Temper Flare": "豁出去", + "Supercell Slam": "闪电强袭", + "Psychic Noise": "精神噪音", + "Upper Hand": "快手还击", + "Malignant Chain": "邪毒锁链" }; function translate_move(name) { @@ -3127,7 +3145,14 @@ var POKENAMES = { "Munkidori": "愿增猿", "Fezandipiti": "吉雉鸡", "Ogerpon": "厄诡椪", - + "Archaludon": "铝钢桥龙", + "Hydrapple": "蜜集大蛇", + "Gouging Fire": "破空焰", + "Raging Bolt": "猛雷鼓", + "Iron Boulder": "铁磐岩", + "Iron Crown": "铁头壳", + "Terapagos": "太乐巴戈斯", + "Pecharunt": "桃歹郎" } function pokemonname_noforme(name) { @@ -3467,6 +3492,7 @@ var TYPENAMES = { "Steel": "钢", "Typeless": "无属性", "Fairy": "妖精", + "Stellar": "星晶", } function translate_type(name) { @@ -3494,6 +3520,7 @@ var TYPENAMES_SHORT = { "Steel": "钢", "Typeless": "无", "Fairy": "仙", + "Stellar": "星晶", } function translate_type_short(name) { @@ -3591,6 +3618,8 @@ var KO_REPLACE_TEXTS = { "something broke; please tell nerd of now": "出错了", "The battlers shared their pain": "双方平分了痛苦", "Might as well Thunderbolt a Landorus": "并没有造成伤害", + "No damage for you": "并没有造成伤害", + "It's a status move, it won't deal damage": "变化招式并不造成伤害", "the Water-Type attack evaporated in the harsh sunlight": "水属性攻击因日光非常猛烈而蒸发", "the Fire-Type attack fizzled out in the heavy rain": "火属性攻击因下大雨而熄灭", "[The Smooth Taste Of] IMMUNE": "防御方免疫了伤害", diff --git a/script_res/type_data.js b/script_res/type_data.js index a76efd2..8a8b54c 100644 --- a/script_res/type_data.js +++ b/script_res/type_data.js @@ -275,80 +275,96 @@ var TYPE_CHART_GSC = $.extend(true, {}, TYPE_CHART_RBY, { Normal: { Dark: 1, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Grass: { Dark: 1, Steel: 0.5, + Typeless: 1, + '???': 1 }, Fire: { Dark: 1, Steel: 2, - Typeless: 1 + Typeless: 1, + '???': 1 }, Water: { Dark: 1, Steel: 1, - Typeless: 1 + Typeless: 1, + '???': 1 }, Electric: { Dark: 1, Steel: 1, - Typeless: 1 + Typeless: 1, + '???': 1 }, Ice: { Fire: 0.5, Dark: 1, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Flying: { Dark: 1, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Bug: { Poison: 0.5, Dark: 2, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Poison: { Bug: 1, Dark: 1, Steel: 0, - Typeless: 1 + Typeless: 1, + '???': 1 }, Ground: { Dark: 1, Steel: 2, - Typeless: 1 + Typeless: 1, + '???': 1 }, Rock: { Dark: 1, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Fighting: { Dark: 2, Steel: 2, - Typeless: 1 + Typeless: 1, + '???': 1 }, Psychic: { Dark: 0, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Ghost: { Psychic: 2, Dark: 0.5, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Dragon: { Dark: 1, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Dark: { category: 'Special', @@ -369,7 +385,8 @@ var TYPE_CHART_GSC = $.extend(true, {}, TYPE_CHART_RBY, { Dragon: 1, Dark: 0.5, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 }, Steel: { category: 'Physical', @@ -390,9 +407,31 @@ var TYPE_CHART_GSC = $.extend(true, {}, TYPE_CHART_RBY, { Dragon: 1, Dark: 1, Steel: 0.5, - Typeless: 1 + Typeless: 1, + '???': 1 + }, + '???': { + category: 'Physical', + Normal: 1, + Grass: 1, + Fire: 1, + Water: 1, + Electric: 1, + Ice: 1, + Flying: 1, + Bug: 1, + Poison: 1, + Ground: 1, + Rock: 1, + Fighting: 1, + Psychic: 1, + Ghost: 1, + Dragon: 1, + Dark: 1, + Steel: 1, + Typeless: 1, + '???': 1 }, - Typeless: { category: 'Physical', Normal: 1, @@ -412,11 +451,15 @@ var TYPE_CHART_GSC = $.extend(true, {}, TYPE_CHART_RBY, { Dragon: 1, Dark: 1, Steel: 1, - Typeless: 1 - } + Typeless: 1, + '???': 1 + }, }); -var TYPE_CHART_XY = $.extend(true, {}, TYPE_CHART_GSC, { +var TYPE_CHART_BW = $.extend(true, {}, TYPE_CHART_GSC, {}); +delete TYPE_CHART_BW['???']; + +var TYPE_CHART_XY = $.extend(true, {}, TYPE_CHART_BW, { Normal: { Fairy: 1 }, @@ -495,3 +538,85 @@ var TYPE_CHART_XY = $.extend(true, {}, TYPE_CHART_GSC, { Fairy: 1 } }); + +var TYPE_CHART_SV = $.extend(true, {}, TYPE_CHART_XY, { + Normal: { + Stellar: 1 + }, + Grass: { + Stellar: 1 + }, + Fire: { + Stellar: 1 + }, + Water: { + Stellar: 1 + }, + Electric: { + Stellar: 1 + }, + Ice: { + Stellar: 1 + }, + Flying: { + Stellar: 1 + }, + Bug: { + Stellar: 1 + }, + Poison: { + Stellar: 1 + }, + Ground: { + Stellar: 1 + }, + Rock: { + Stellar: 1 + }, + Fighting: { + Stellar: 1 + }, + Psychic: { + Stellar: 1 + }, + Ghost: { + Stellar: 1 + }, + Dragon: { + Stellar: 1 + }, + Dark: { + Stellar: 1 + }, + Steel: { + Stellar: 1 + }, + Fairy: { + Stellar: 1 + }, + Typeless: { + Stellar: 1 + }, + Stellar: { + Normal: 1, + Grass: 1, + Fire: 1, + Water: 1, + Electric: 1, + Ice: 1, + Flying: 1, + Bug: 1, + Poison: 1, + Ground: 1, + Rock: 1, + Fighting: 1, + Psychic: 1, + Ghost: 1, + Dragon: 1, + Dark: 1, + Steel: 1, + Fairy: 1, + Typeless: 1, + Stellar: 1 + }, +}); \ No newline at end of file