From 8da5bdde73f8313108cae141ff0c9ca1ed92075b Mon Sep 17 00:00:00 2001 From: Zollnerd <60597400+Zollnerd@users.noreply.github.com> Date: Tue, 4 Feb 2020 17:51:43 +0900 Subject: [PATCH] Steely Spirit + missing moves + max + crit bug fix Added Steely Spirit with a selector similar to how Helping Hand or Power Spot are handled now. Added Mystical Fire, Frenzy Plant, Blast Burn, Hydro Cannon and Rock Wrecker. Fixed bug that was preventing crit + max move from being selected at the same time. --- index.html | 8 ++++++++ script_res/ap_calc.js | 6 ++++-- script_res/damage.js | 10 ++++++++++ script_res/move_data.js | 26 ++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c01d1ba..6f249e8 100644 --- a/index.html +++ b/index.html @@ -344,6 +344,14 @@

Field +
+
+ +
+
+ +
+
diff --git a/script_res/ap_calc.js b/script_res/ap_calc.js index 286dae2..1ba54fc 100644 --- a/script_res/ap_calc.js +++ b/script_res/ap_calc.js @@ -713,6 +713,7 @@ function Field() { var isFriendGuard = [$("#friendGuardL").prop("checked"), $("#friendGuardR").prop("checked")]; var isBattery = [$("#batteryR").prop("checked"), $("#batteryL").prop("checked")]; var isPowerSpot = [$("#powerSpotR").prop("checked"), $("#powerSpotL").prop("checked")]; // affects attacks against opposite side + var isSteelySpirit = [$("#steelySpiritR").prop("checked"), $("#steelySpiritL").prop("checked")]; // affects attacks against opposite side this.getWeather = function() { return weather; @@ -724,11 +725,11 @@ function Field() { weather = ""; }; 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]); + 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]); }; } -function Side(format, terrain, weather, isGravity, isSR, spikes, isReflect, isLightScreen, isForesight, isHelpingHand, isFriendGuard, isBattery, isProtect, isPowerSpot) { +function Side(format, terrain, weather, isGravity, isSR, spikes, isReflect, isLightScreen, isForesight, isHelpingHand, isFriendGuard, isBattery, isProtect, isPowerSpot, isSteelySpirit) { this.format = format; this.terrain = terrain; this.weather = weather; @@ -743,6 +744,7 @@ function Side(format, terrain, weather, isGravity, isSR, spikes, isReflect, isLi this.isBattery = isBattery; this.isProtect = isProtect; this.isPowerSpot = isPowerSpot; + this.isSteelySpirit = isSteelySpirit; } var gen, pokedex, setdex, typeChart, moves, abilities, items, STATS, calculateAllMoves, calcHP, calcStat; diff --git a/script_res/damage.js b/script_res/damage.js index 64c3fe5..57f60d6 100644 --- a/script_res/damage.js +++ b/script_res/damage.js @@ -99,8 +99,10 @@ function GET_DAMAGE_SM(attacker, defender, move, field) { else if(tempMove.bp >= 45) move.bp = 100; else move.bp = 90; } + moveDescName = MAXMOVES_LOOKUP[move.type] + " (" + move.bp + " BP)"; move.category = tempMove.category; + move.isCrit = tempMove.isCrit; move.isMax = true; if(attacker.item == "Choice Band" || attacker.item == "Choice Specs" || attacker.item == "Choice Scarf") { attacker.item = ""; @@ -343,6 +345,11 @@ function GET_DAMAGE_SM(attacker, defender, move, field) { description.isPowerSpot = true; } + if (field.isSteelySpirit && move.type === "Steel") { + bpMods.push(0x1800) + description.isSteelySpirit = true; + } + if (attacker.ability === "Sheer Force" && move.hasSecondaryEffect) { bpMods.push(0x14CD); description.attackerAbility = attacker.ability; @@ -776,6 +783,9 @@ function buildDescription(description) { if (description.isPowerSpot) { output += "Power Spot "; } + if (description.isSteelySpirit) { + output += "Steely Spirit "; + } if (description.isBattery) { output += "Battery "; } diff --git a/script_res/move_data.js b/script_res/move_data.js index e947b33..fbcd5e2 100644 --- a/script_res/move_data.js +++ b/script_res/move_data.js @@ -3237,6 +3237,32 @@ var MOVES_SS = $.extend(true, {}, MOVES_SM, { type: 'Steel', category: 'Special', }, + 'Mystical Fire': { + bp: 75, + type: 'Fire', + category: 'Special', + hasSecondaryEffect: true, + }, + 'Rock Wrecker': { + bp: 150, + type: 'Rock', + category: 'Physical', + }, + 'Blast Burn': { + bp: 150, + type: 'Fire', + category: 'Special', + }, + 'Hydro Cannon': { + bp: 150, + type: 'Water', + category: 'Special', + }, + 'Frenzy Plant': { + bp: 150, + type: 'Grass', + category: 'Special', + }, 'Max Strike': { type: 'Normal' },