mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
GANG: Clarify install behavior & add getInstallResult() (#1119)
New function returns post-install ascension ratios. * Add ascension penalty to Gang constants * Improve wording of Gang install message * Add GangMember#getInstallResults() * Update prestiging to use getInstallResults() * Add ns.gang.getInstallResults(memberName) * Update definitions * Add ram cost for ns.gang.getInstallResult() * Fix typo * More specific wording in documentation * Fix another typo * Run prettier * Rename getInstallResults to getPostInstallPoints * Update Prestige.ts * Update Gang.ts
This commit is contained in:
@@ -297,6 +297,22 @@ export function NetscriptGang(): InternalAPI<IGang> {
|
||||
...member.getAscensionResults(),
|
||||
};
|
||||
},
|
||||
getInstallResult: (ctx) => (_memberName) => {
|
||||
const memberName = helpers.string(ctx, "memberName", _memberName);
|
||||
getGang(ctx);
|
||||
const member = getGangMember(ctx, memberName);
|
||||
if (!member.canAscend()) return;
|
||||
const preInstall = member.getCurrentAscensionMults();
|
||||
const postInstall = member.getPostInstallPoints();
|
||||
return {
|
||||
hack: member.calculateAscensionMult(postInstall.hack) / preInstall.hack,
|
||||
str: member.calculateAscensionMult(postInstall.str) / preInstall.str,
|
||||
def: member.calculateAscensionMult(postInstall.def) / preInstall.def,
|
||||
dex: member.calculateAscensionMult(postInstall.dex) / preInstall.dex,
|
||||
agi: member.calculateAscensionMult(postInstall.agi) / preInstall.agi,
|
||||
cha: member.calculateAscensionMult(postInstall.cha) / preInstall.cha,
|
||||
};
|
||||
},
|
||||
setTerritoryWarfare: (ctx) => (_engage) => {
|
||||
const engage = !!_engage;
|
||||
const gang = getGang(ctx);
|
||||
|
||||
Reference in New Issue
Block a user