FEATURE: BitNode options (#1411)

This commit is contained in:
catloversg
2024-07-15 04:30:30 +07:00
committed by GitHub
parent 0e1e8a9862
commit 783120c886
71 changed files with 1315 additions and 308 deletions
+7 -1
View File
@@ -1,3 +1,9 @@
import { Player } from "@player";
export function calculateIntelligenceBonus(intelligence: number, weight = 1): number {
return 1 + (weight * Math.pow(intelligence, 0.8)) / 600;
const effectiveIntelligence =
Player.bitNodeOptions.intelligenceOverride !== undefined
? Math.min(Player.bitNodeOptions.intelligenceOverride, intelligence)
: intelligence;
return 1 + (weight * Math.pow(effectiveIntelligence, 0.8)) / 600;
}