Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steely Spirit + missing moves + max + crit bug fix #111

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,14 @@ <h4 class="panel-title">Field
<input class="btn-input calc-trigger" type="checkbox" id="powerSpotR" /><label class="btn btn-xxwide" for="powerSpotR">Power Spot</label>
</div>
</div>
<div class="btn-group gen-specific g8">
<div class="left" title="Is this Pokemon boosted by an ally's Steely Spirit?">
<input class="btn-input calc-trigger" type="checkbox" id="steelySpiritL" /><label class="btn btn-xxwide" for="steelySpiritL">Steely Spirit</label>
</div>
<div class="right" title="Is this Pokemon boosted by an ally's Steely Spirit?">
<input class="btn-input calc-trigger" type="checkbox" id="steelySpiritR" /><label class="btn btn-xxwide" for="steelySpiritR">Steely Spirit</label>
</div>
</div>

<div class="btn-group gen-specific g7 g8">
<div class="left" title="Has this Pokemon used Geomancy?">
Expand Down
6 changes: 4 additions & 2 deletions script_res/ap_calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions script_res/damage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -776,6 +783,9 @@ function buildDescription(description) {
if (description.isPowerSpot) {
output += "Power Spot ";
}
if (description.isSteelySpirit) {
output += "Steely Spirit ";
}
if (description.isBattery) {
output += "Battery ";
}
Expand Down
26 changes: 26 additions & 0 deletions script_res/move_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
},
Expand Down