internal static float GetPlayerToughnessRating()
        {
            float toughness = ModdedPlayer.Stats.TotalMaxHealth;

            toughness /= ModdedPlayer.Stats.allDamageTaken;
            toughness /= 1f - ModReferences.DamageReduction(ModdedPlayer.Stats.armor);
            return(toughness);
        }
Beispiel #2
0
        private void Update()
        {
            if (isOn)
            {
                if ((LocalPlayer.Transform.position - transform.position).sqrMagnitude < 49)
                {
                    float dmgPerTick = Time.deltaTime * damage * ModdedPlayer.Stats.allDamageTaken * ModdedPlayer.Stats.magicDamageTaken * ModReferences.DamageReduction((int)ModdedPlayer.Stats.TotalArmor);

                    if (LocalPlayer.Stats.Health - 1 > dmgPerTick)
                    {
                        LocalPlayer.Stats.Health -= dmgPerTick;
                    }

                    BuffDB.AddBuff(10, 72, 0.7f, 5);
                    BuffDB.AddBuff(21, 73, Time.deltaTime * damage / 30, 15);
                }
            }
        }