Skip to content

Commit

Permalink
Update calcWildyPkChance.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
TastyPumPum committed Oct 13, 2023
1 parent b7de1a8 commit 656d96a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/util/calcWildyPkChance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export async function calcWildyPKChance(
): Promise<[number, boolean, string]> {
// Chance per minute, Difficulty from 1 to 10, and factor a million difference, High peak 5x as likley encounter, Medium peak 1x, Low peak 5x as unlikley
const peakInfluence = peakFactor.find(_peaktier => _peaktier.peakTier === peak?.peakTier)?.factor ?? 1;
let pkChance;
let pkChance = 1;
if (monster.canBePked && monster.pkActivityRating && monster.pkActivityRating >= 4) {
pkChance = (1 / (7_000_000 / (Math.pow(monster.pkActivityRating, 6) * peakInfluence))) * 100;
} else {
} else {
pkChance = (1 / (7_000_000 / (Math.pow(4, 6) * peakInfluence))) * 100;
}
}
let chanceString = `**PK Chance:** ${pkChance.toFixed(2)}% per min (${peak.peakTier} peak time)`;

const evasionReduction = await getWildEvasionPercent(user);
Expand Down

0 comments on commit 656d96a

Please sign in to comment.