using System; namespace ET { public static class ItemHelper { public static float GetRealMainValue(float oldValue, byte level) { return (float) (oldValue*Math.Pow(mainAddCoe, level)); } private const float mainAddCoe = 1.1f; private const float reduceCoe = 0.8f; private const float reduceCoe1 = 0.6f; public static float GetRealViceValue(float oldValue, Quality quality) => quality switch { var qual when qual >= Quality.Legendary => oldValue, var qual when qual >= Quality.Rare => oldValue * reduceCoe, var qual when qual <= Quality.UnCommon => oldValue * (reduceCoe * reduceCoe1), _ => throw new ArgumentOutOfRangeException(nameof (quality), quality, null) }; } }