private static void ApplyLowSalaryLoyalty(GameEntity company, ref Bonus <int> bonus, HumanFF worker) { bool isFounder = worker.hasShareholder; // && // company.shareholders.Shareholders.ContainsKey(worker.shareholder.Id); if (isFounder) { return; } var salary = Humans.GetSalary(worker); var expectedSalary = (double)GetSalaryPerRating(worker); bool isGreedy = Humans.HasTrait(worker, Trait.Greedy); bool isShy = Humans.HasTrait(worker, Trait.Shy); float multiplier = 0.8f; if (isGreedy) { multiplier = 0.9f; } else if (isShy) { multiplier = 0.5f; } // multiply on 4 cause period = week if (salary * 4 < expectedSalary * multiplier) { bonus.Append("Low salary", -5); } }
// team cost public static Bonus <long> GetSalaries(GameEntity e, GameContext gameContext) { Bonus <long> salaries = new Bonus <long>("Manager salaries"); foreach (var t in e.team.Teams) { foreach (var human in t.Managers) { var salary = Humans.GetSalary(human); salaries.Append(Humans.GetFullName(human), salary); } } return(salaries); }