From 79631584709a1cead8c81666222e7982a4114ac7 Mon Sep 17 00:00:00 2001 From: "tyasuh.taeragan@gmail.com" Date: Mon, 20 Feb 2023 21:40:47 -0500 Subject: [PATCH] Requested Correction --- src/PersonObjects/Sleeve/Sleeve.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index bcfa85955..5a8f543bf 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -172,7 +172,10 @@ 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 = this.shock - 0.0001 * calculateIntelligenceBonus(this.skills.intelligence, 0.75) * cyclesUsed; + this.shock = Math.max( + 0, + this.shock - 0.0001 * calculateIntelligenceBonus(this.skills.intelligence, 0.75) * cyclesUsed, + ); this.currentWork.process(this, cyclesUsed); this.storedCycles -= cyclesUsed; }