private static float SkillBuffModifier(Skill.Type type, float amount) { if (PlayerBuff.HasBuff <Productive>()) { var statIncModifier = new StatIncreaseArgs(amount); PlayerBuff.GetBuff <Productive>()?.TakeEffect(statIncModifier); amount = statIncModifier.Amount; } return(amount); }
public virtual void Finish() { foreach (Skill.Type type in RequiredSkills.Keys) { Stats.AddXP(type, XPbonus); } WorkedToday = true; var salary = WagePerHour * (float)System.TimeSpan.FromSeconds(JobManager.Instance.CurrentWorkingTime).TotalHours; if (PlayerBuff.HasBuff <Motivated>()) { var statIncrease = new StatIncreaseArgs(salary); PlayerBuff.GetBuff <Motivated>()?.TakeEffect(statIncrease); salary = statIncrease.Amount; } Stats.AddMoney(salary); }
private static float StatBuffModifier(Status.Type type, float amount) { switch (type) { case Status.Type.Mood when amount > 0 && PlayerBuff.HasBuff <Freedom>(): var statIncModifier = new StatIncreaseArgs(amount); PlayerBuff.GetBuff <Freedom>()?.TakeEffect(statIncModifier); amount = statIncModifier.Amount; break; case Status.Type.Health when PlayerBuff.HasBuff <Suppression>(): { var statDecModifier = new StatDecreaseArgs(amount); PlayerBuff.GetBuff <Suppression>()?.TakeEffect(statDecModifier); amount = statDecModifier.Amount; break; } } return(amount); }
private void UpdateStat(StatIncreaseArgs args) { args.IncreaseValue(percentIncrease); }
private void UpdateStat(StatIncreaseArgs args) { args.IncreaseValue(percentIncrease); Notify.Show($"You received additional money for a great job!", Icon); }