mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 22:52:29 +01:00
Merge pull request #4134 from Shiiyu/dev
MISC: FIX #3649 Preventing server starting security level from going above 100
This commit is contained in:
commit
b8f8246294
@ -75,10 +75,11 @@ export class Server extends BaseServer {
|
|||||||
this.moneyMax = 25 * this.moneyAvailable * BitNodeMultipliers.ServerMaxMoney;
|
this.moneyMax = 25 * this.moneyAvailable * BitNodeMultipliers.ServerMaxMoney;
|
||||||
|
|
||||||
//Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty
|
//Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty
|
||||||
this.hackDifficulty =
|
const realDifficulty =
|
||||||
params.hackDifficulty != null ? params.hackDifficulty * BitNodeMultipliers.ServerStartingSecurity : 1;
|
params.hackDifficulty != null ? params.hackDifficulty * BitNodeMultipliers.ServerStartingSecurity : 1;
|
||||||
|
this.hackDifficulty = Math.min(realDifficulty, 100);
|
||||||
this.baseDifficulty = this.hackDifficulty;
|
this.baseDifficulty = this.hackDifficulty;
|
||||||
this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));
|
this.minDifficulty = Math.min(Math.max(1, Math.round(realDifficulty / 3)), 100);
|
||||||
this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()
|
this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()
|
||||||
|
|
||||||
//Port information, required for porthacking servers to get admin rights
|
//Port information, required for porthacking servers to get admin rights
|
||||||
|
Loading…
Reference in New Issue
Block a user