IPVGO: Improve favor gain from wins to balance around the rep value of favor (#2131)

This commit is contained in:
Michael Ficocelli
2025-05-17 05:36:58 -04:00
committed by GitHub
parent 2b8c008be1
commit 4749acdd4f
19 changed files with 79 additions and 51 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ import { JobTracks } from "../Company/data/JobTracks";
import { ServerConstants } from "../Server/data/Constants";
import { blackOpsArray } from "../Bladeburner/data/BlackOperations";
import { calculateEffectiveRequiredReputation } from "../Company/utils";
import { calculateFavorAfterResetting } from "../Faction/formulas/favor";
import { addRepToFavor } from "../Faction/formulas/favor";
import { validBitNodes } from "../BitNode/BitNodeUtils";
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
import { cat } from "../Terminal/commands/cat";
@@ -754,7 +754,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
helpers.checkSingularityAccess(ctx);
const companyName = getEnumHelper("CompanyName").nsGetMember(ctx, _companyName);
const company = Companies[companyName];
return calculateFavorAfterResetting(company.favor, company.playerReputation) - company.favor;
return addRepToFavor(company.favor, company.playerReputation) - company.favor;
},
getFactionInviteRequirements: (ctx) => (_facName) => {
helpers.checkSingularityAccess(ctx);
@@ -924,7 +924,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
helpers.checkSingularityAccess(ctx);
const facName = getEnumHelper("FactionName").nsGetMember(ctx, _facName);
const faction = Factions[facName];
return calculateFavorAfterResetting(faction.favor, faction.playerReputation) - faction.favor;
return addRepToFavor(faction.favor, faction.playerReputation) - faction.favor;
},
donateToFaction: (ctx) => (_facName, _amt) => {
helpers.checkSingularityAccess(ctx);