diff --git a/calc/src/mechanics/gen12.ts b/calc/src/mechanics/gen12.ts index c5690f569..35acf35ff 100644 --- a/calc/src/mechanics/gen12.ts +++ b/calc/src/mechanics/gen12.ts @@ -74,6 +74,12 @@ export function calculateRBYGSC( } } + // In Gen 1, Super Fang can hit Ghost types + if (gen.num === 1 && (move.named('Super Fang'))) { + const lostHP = Math.floor(defender.curHP() / 2) || 1; + result.damage = lostHP; + return result; + } const type1Effectiveness = getMoveEffectiveness(gen, move, firstDefenderType, field.defenderSide.isForesight); diff --git a/calc/src/mechanics/gen3.ts b/calc/src/mechanics/gen3.ts index f3f7474ee..ee6febd97 100644 --- a/calc/src/mechanics/gen3.ts +++ b/calc/src/mechanics/gen3.ts @@ -122,6 +122,12 @@ export function calculateADV( desc.HPEVs = `${defender.evs.hp} HP`; + if (move.named('Super Fang')) { + const lostHP = Math.floor(defender.curHP() / 2) || 1; + result.damage = lostHP; + return result; + } + const fixedDamage = handleFixedDamageMoves(attacker, move); if (fixedDamage) { result.damage = fixedDamage; diff --git a/calc/src/mechanics/gen4.ts b/calc/src/mechanics/gen4.ts index fbcc2da6f..7fc14faf5 100644 --- a/calc/src/mechanics/gen4.ts +++ b/calc/src/mechanics/gen4.ts @@ -174,6 +174,12 @@ export function calculateDPP( desc.HPEVs = `${defender.evs.hp} HP`; + if (move.named('Super Fang')) { + const lostHP = Math.floor(defender.curHP() / 2) || 1; + result.damage = lostHP; + return result; + } + const fixedDamage = handleFixedDamageMoves(attacker, move); if (fixedDamage) { result.damage = fixedDamage; diff --git a/calc/src/mechanics/gen56.ts b/calc/src/mechanics/gen56.ts index 4640ddf0b..9c5d9386e 100644 --- a/calc/src/mechanics/gen56.ts +++ b/calc/src/mechanics/gen56.ts @@ -249,6 +249,12 @@ export function calculateBWXY( desc.HPEVs = `${defender.evs.hp} HP`; + if (move.named('Super Fang')) { + const lostHP = Math.floor(defender.curHP() / 2) || 1; + result.damage = lostHP; + return result; + } + const fixedDamage = handleFixedDamageMoves(attacker, move); if (fixedDamage) { if (attacker.hasAbility('Parental Bond')) { diff --git a/calc/src/mechanics/gen789.ts b/calc/src/mechanics/gen789.ts index 719f2cdbe..f2f537f6b 100644 --- a/calc/src/mechanics/gen789.ts +++ b/calc/src/mechanics/gen789.ts @@ -400,8 +400,8 @@ export function calculateSMSSSV( return result; } - if (move.named('Nature\'s Madness')) { - const lostHP = field.defenderSide.isProtected ? 0 : Math.floor(defender.curHP() / 2); + if (move.named('Nature\'s Madness', 'Super Fang', 'Ruination')) { + const lostHP = field.defenderSide.isProtected ? 0 : Math.floor(defender.curHP() / 2) || 1; result.damage = lostHP; return result; } diff --git a/calc/src/mechanics/util.ts b/calc/src/mechanics/util.ts index 816ad6388..291c43d6f 100644 --- a/calc/src/mechanics/util.ts +++ b/calc/src/mechanics/util.ts @@ -531,7 +531,6 @@ export function handleFixedDamageMoves(attacker: Pokemon, move: Move) { } return 0; } - // Game Freak rounds DOWN on .5 export function pokeRound(num: number) { return num % 1 > 0.5 ? Math.ceil(num) : Math.floor(num); diff --git a/src/js/moveset_import.js b/src/js/moveset_import.js index 825c58aaa..8de7f7f5b 100644 --- a/src/js/moveset_import.js +++ b/src/js/moveset_import.js @@ -153,7 +153,7 @@ function getStats(currentPoke, rows, offset) { } currentNature = rows[x] ? rows[x].trim().split(" ") : ''; - if (currentNature[1] == "Nature") { + if (currentNature[1] == "Nature" && currentNature[2] !== "Power") { // edge case with the move nature power that overwrite nature) currentPoke.nature = currentNature[0]; } }