From df70458e4f3230b75c669106168d6e01481636d3 Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Mon, 24 Oct 2022 16:33:25 -0400 Subject: [PATCH] CORPORATION: Give Employees some RNG (#152) Authored-by: zerbosh <115591472+zerbosh@users.noreply.github.com> --- src/Corporation/OfficeSpace.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Corporation/OfficeSpace.ts b/src/Corporation/OfficeSpace.ts index ed429c1ae..36b0325c3 100644 --- a/src/Corporation/OfficeSpace.ts +++ b/src/Corporation/OfficeSpace.ts @@ -3,6 +3,7 @@ import { CorporationConstants } from "./data/Constants"; import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../utils/JSONReviver"; import { Industry } from "./Industry"; import { Corporation } from "./Corporation"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; interface IParams { loc?: string; @@ -227,10 +228,16 @@ export class OfficeSpace { ++this.employeeJobs[position]; ++this.employeeNextJobs[position]; - this.totalExp += 75; - this.avgMor = (this.avgMor * this.totalEmployees + 75) / (this.totalEmployees + 1); - this.avgHap = (this.avgHap * this.totalEmployees + 75) / (this.totalEmployees + 1); - this.avgEne = (this.avgEne * this.totalEmployees + 75) / (this.totalEmployees + 1); + this.totalExp += getRandomInt(50, 100); + + this.avgMor = (this.avgMor * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1); + this.avgHap = (this.avgHap * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1); + this.avgEne = (this.avgEne * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1); + + this.avgInt = (this.avgInt * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1); + this.avgCha = (this.avgCha * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1); + this.avgCre = (this.avgCre * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1); + this.avgEff = (this.avgEff * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1); return true; }