From 2556c31f9fef4250f44bed0a9b0c61757588a03f Mon Sep 17 00:00:00 2001 From: Leonard Craft III Date: Fri, 28 May 2021 21:06:41 -0500 Subject: [PATCH] Correct Rising Voltage, Lash Out, and Grav Apple --- calc/src/mechanics/gen78.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/calc/src/mechanics/gen78.ts b/calc/src/mechanics/gen78.ts index 2f4167bf6..436635b8f 100644 --- a/calc/src/mechanics/gen78.ts +++ b/calc/src/mechanics/gen78.ts @@ -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 @@ -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; @@ -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()); @@ -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;