mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 11:10:58 +02:00
FEATURE: BitNode options (#1411)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user