mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
Server security increases slightly when hacked
This commit is contained in:
@@ -108,6 +108,17 @@ Server.prototype.getScript = function(scriptName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//Strengthens a server's security level (difficulty) by the specified amount
|
||||
Server.prototype.fortify = function(amt) {
|
||||
this.hackDifficulty += amt;
|
||||
if (this.hackDifficulty > 99) {this.hackDifficulty = 99;}
|
||||
}
|
||||
|
||||
Server.prototype.weaken = function(amt) {
|
||||
this.hackDifficulty -= amt;
|
||||
if (this.hackDifficulty < 1) {this.hackDifficulty = 1;}
|
||||
}
|
||||
|
||||
//Functions for loading and saving a Server
|
||||
Server.prototype.toJSON = function() {
|
||||
return Generic_toJSON("Server", this);
|
||||
|
||||
Reference in New Issue
Block a user