mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 10:42:51 +02:00
Int Buff to shock recovery speed
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user