Example #1
0
        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);
        }
Example #2
0
        public override void Drain(float timeScale)
        {
            float multiplier  = (GameLibOfMethods.isSleeping) ? 0.5f : 1;
            float drainAmount = data.drainPerHour * timeScale * multiplier;

            if (PlayerBuff.HasBuff <Suppression>())
            {
                var statModifier = new StatDecreaseArgs(drainAmount);
                PlayerBuff.GetBuff <Suppression>()?.TakeEffect(statModifier);
                drainAmount = statModifier.Amount;
            }

            Add(drainAmount);
        }
Example #3
0
    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);
    }
Example #4
0
        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);
        }