From 012c5d4f86cbbd48630a5b7094e3f54a992d6477 Mon Sep 17 00:00:00 2001 From: "tyasuh.taeragan@gmail.com" Date: Sun, 19 Feb 2023 01:43:38 -0500 Subject: [PATCH] Int Buff to shock recovery speed --- src/PersonObjects/Sleeve/Sleeve.ts | 3 ++- src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 050ba2ef0..baa5da24a 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -38,6 +38,7 @@ import { SleeveBladeburnerWork } from "./Work/SleeveBladeburnerWork"; import { SleeveCrimeWork } from "./Work/SleeveCrimeWork"; import * as sleeveMethods from "./SleeveMethods"; import { SleevePerson } from "@nsdefs"; +import { calculateIntelligenceBonus } from "../formulas/intelligence"; export class Sleeve extends Person implements SleevePerson { currentWork: Work | null = null; @@ -171,7 +172,7 @@ export class Sleeve extends Person implements SleevePerson { this.storedCycles += numCycles; if (this.storedCycles < CyclesPerSecond || !this.currentWork) return; const cyclesUsed = Math.min(this.storedCycles, 15); - this.shock = Math.max(0, this.shock - 0.0001 * cyclesUsed); + this.shock =this.shock - 0.0001 * calculateIntelligenceBonus(this.skills.intelligence, .75) * cyclesUsed; this.currentWork.process(this, cyclesUsed); this.storedCycles -= cyclesUsed; } diff --git a/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts b/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts index ed0ef09a9..f286484ae 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts @@ -1,6 +1,7 @@ import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../../../utils/JSONReviver"; import { Sleeve } from "../Sleeve"; import { Work, WorkType } from "./Work"; +import { calculateIntelligenceBonus } from "../../formulas/intelligence"; export const isSleeveRecoveryWork = (w: Work | null): w is SleeveRecoveryWork => w !== null && w.type === WorkType.RECOVERY; @@ -11,7 +12,7 @@ export class SleeveRecoveryWork extends Work { } process(sleeve: Sleeve, cycles: number) { - sleeve.shock = Math.max(0, sleeve.shock - 0.0002 * cycles); + sleeve.shock = Math.max(0, sleeve.shock - 0.0002 * calculateIntelligenceBonus(sleeve.skills.intelligence, .75)* cycles); if (sleeve.shock <= 0) sleeve.stopWork(); }