CORPORATION: Give Employees some RNG (#152)

Authored-by: zerbosh <115591472+zerbosh@users.noreply.github.com>
This commit is contained in:
Snarling 2022-10-24 16:33:25 -04:00 committed by GitHub
parent 6dc5990b63
commit df70458e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,6 +3,7 @@ import { CorporationConstants } from "./data/Constants";
import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../utils/JSONReviver"; import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../utils/JSONReviver";
import { Industry } from "./Industry"; import { Industry } from "./Industry";
import { Corporation } from "./Corporation"; import { Corporation } from "./Corporation";
import { getRandomInt } from "../utils/helpers/getRandomInt";
interface IParams { interface IParams {
loc?: string; loc?: string;
@ -227,10 +228,16 @@ export class OfficeSpace {
++this.employeeJobs[position]; ++this.employeeJobs[position];
++this.employeeNextJobs[position]; ++this.employeeNextJobs[position];
this.totalExp += 75; this.totalExp += getRandomInt(50, 100);
this.avgMor = (this.avgMor * this.totalEmployees + 75) / (this.totalEmployees + 1);
this.avgHap = (this.avgHap * this.totalEmployees + 75) / (this.totalEmployees + 1); this.avgMor = (this.avgMor * this.totalEmployees + getRandomInt(50, 100)) / (this.totalEmployees + 1);
this.avgEne = (this.avgEne * this.totalEmployees + 75) / (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; return true;
} }