Skip to content

Commit

Permalink
Correct Rising Voltage, Lash Out, and Grav Apple
Browse files Browse the repository at this point in the history
  • Loading branch information
DaWoblefet committed Aug 8, 2021
1 parent 9600747 commit 2556c31
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions calc/src/mechanics/gen78.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,6 @@ export function calculateBasePowerSMSS(
basePower = move.bp * (attacker.hasItem('Flying Gem') || !attacker.item ? 2 : 1);
desc.moveBP = basePower;
break;
case 'Grav Apple':
basePower = move.bp * (field.isGravity ? 1.5 : 1);
desc.moveBP = basePower;
break;
case 'Assurance':
basePower = move.bp * (defender.hasAbility('Parental Bond (Child)') ? 2 : 1);
// NOTE: desc.attackerAbility = 'Parental Bond' will already reflect this boost
Expand All @@ -650,6 +646,10 @@ export function calculateBasePowerSMSS(
basePower = move.bp * (isGrounded(attacker, field) && field.terrain ? 2 : 1);
desc.moveBP = basePower;
break;
case 'Rising Voltage':
basePower = move.bp * ((isGrounded(defender, field) && field.hasTerrain('Electric')) ? 2 : 1);
desc.moveBP = basePower;
break;
case 'Fling':
basePower = getFlingPower(attacker.item);
desc.moveBP = basePower;
Expand Down Expand Up @@ -698,10 +698,6 @@ export function calculateBasePowerSMSS(
basePower = move.hits === 2 ? 15 : move.hits === 3 ? 30 : 10;
desc.moveBP = basePower;
break;
case 'Lash Out':
basePower = move.bp * (countBoosts(gen, attacker.boosts) < 0 ? 2 : 1);
desc.moveBP = basePower;
break;
case 'Crush Grip':
case 'Wring Out':
basePower = 100 * Math.floor((defender.curHP() * 4096) / defender.maxHP());
Expand Down Expand Up @@ -775,13 +771,14 @@ export function calculateBPModsSMSS(
if ((move.named('Facade') && attacker.hasStatus('brn', 'par', 'psn', 'tox')) ||
(move.named('Brine') && defender.curHP() <= defender.maxHP() / 2) ||
(move.named('Venoshock') && defender.hasStatus('psn', 'tox')) ||
(move.named('Rising Voltage') && isGrounded(defender, field) && field.hasTerrain('Electric'))
(move.named('Lash Out') && (countBoosts(gen, attacker.boosts) < 0))
) {
bpMods.push(8192);
desc.moveBP = basePower * 2;
} else if ((move.named('Knock Off') && !resistedKnockOffDamage) ||
(move.named('Expanding Force') && isGrounded(attacker, field) && field.hasTerrain('Psychic')) ||
(move.named('Misty Explosion') && isGrounded(attacker, field) && field.hasTerrain('Misty'))
(move.named('Misty Explosion') && isGrounded(attacker, field) && field.hasTerrain('Misty')) ||
(move.named('Grav Apple') && field.isGravity)
) {
bpMods.push(6144);
desc.moveBP = basePower * 1.5;
Expand Down

0 comments on commit 2556c31

Please sign in to comment.