mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 12:45:45 +01:00
BUGFIX: Cap Gang recruit member calculation (#1523)
This commit is contained in:
parent
ad5e2b0fe5
commit
6cae65fc0d
@ -320,12 +320,11 @@ export class Gang {
|
|||||||
if (this.members.length >= GangConstants.MaximumGangMembers) {
|
if (this.members.length >= GangConstants.MaximumGangMembers) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
const numFreeMembers = 3;
|
const numFreeMembers = GangConstants.numFreeMembers;
|
||||||
const recruitCostBase = 5;
|
const recruitCostBase = GangConstants.recruitThresholdBase;
|
||||||
if (this.members.length < numFreeMembers && this.respect < Math.pow(recruitCostBase, numFreeMembers)) {
|
const membersRecruitabile =
|
||||||
return numFreeMembers - this.members.length; // if the max possible is less than freeMembers
|
Math.floor(Math.max(Math.log(this.respect), 0) / Math.log(recruitCostBase)) + numFreeMembers;
|
||||||
}
|
return Math.min(membersRecruitabile, GangConstants.MaximumGangMembers) - this.members.length;
|
||||||
return Math.floor(Math.log(this.respect) / Math.log(recruitCostBase)) + numFreeMembers - this.members.length; //else
|
|
||||||
}
|
}
|
||||||
|
|
||||||
recruitMember(name: string): boolean {
|
recruitMember(name: string): boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user