BUGFIX: Fix manual hack exploit (#1324)

Formula is updated to be still relevant, but not crushing
This commit is contained in:
catloversg 2024-06-05 08:32:24 +07:00 committed by GitHub
parent 2316bf5b69
commit 7321d64383
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

@ -24,7 +24,6 @@ export const CONSTANTS: {
IntelligenceCrimeBaseExpGain: number;
IntelligenceProgramBaseExpGain: number;
IntelligenceGraftBaseExpGain: number;
IntelligenceTerminalHackBaseExpGain: number;
IntelligenceSingFnBaseExpGain: number;
MillisecondsPer20Hours: number;
GameCyclesPer20Hours: number;
@ -101,7 +100,6 @@ export const CONSTANTS: {
IntelligenceCrimeBaseExpGain: 0.05,
IntelligenceProgramBaseExpGain: 0.1, // Program required hack level divided by this to determine int exp gain
IntelligenceGraftBaseExpGain: 0.05,
IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain
IntelligenceSingFnBaseExpGain: 1.5,
// Time-related constants

@ -211,7 +211,7 @@ export class Terminal {
Router.toPage(Page.BitVerse, { flume: false, quick: false });
return;
}
// Manunally check for faction invites
// Manually check for faction invitations
Engine.Counters.checkFactionInvitations = 0;
Engine.checkCounters();
@ -225,7 +225,9 @@ export class Terminal {
server.moneyAvailable -= moneyGained;
Player.gainMoney(moneyGained, "hacking");
Player.gainHackingExp(expGainedOnSuccess);
Player.gainIntelligenceExp(expGainedOnSuccess / CONSTANTS.IntelligenceTerminalHackBaseExpGain);
if (expGainedOnSuccess > 1) {
Player.gainIntelligenceExp(4 * Math.log10(expGainedOnSuccess));
}
const oldSec = server.hackDifficulty;
server.fortify(ServerConstants.ServerFortifyAmount);