AdEvade.Config.Properties.Randomize C# (CSharp) Method

Randomize() private static method

private static Randomize ( SpellConfig spellConfig ) : SpellConfig
spellConfig SpellConfig
return SpellConfig
        private static SpellConfig Randomize(SpellConfig spellConfig)
        {
            if (spellConfig == null) return null;
            if(_randomizer == null) _randomizer = new Randomizer.Randomizer();
            if (!KeysExist(ConfigValue.EnableRandomizer, ConfigValue.RandomizerMaxDangerLevel, ConfigValue.RandomizerPercentage, ConfigValue.DrawBlockedRandomizerSpells))
            {
                ConsoleDebug.WriteLine("Config Keys Not Found!", true);
                return spellConfig;
            }

            if (GetBool(ConfigValue.EnableRandomizer) && GetInt(ConfigValue.RandomizerMaxDangerLevel) > (int) spellConfig.DangerLevel)
            {
                spellConfig.Dodge = _randomizer.IsAbovePercentage(1f - GetInt(ConfigValue.RandomizerPercentage) / 100f);
                spellConfig.Draw = spellConfig.Draw && GetBool(ConfigValue.DrawBlockedRandomizerSpells);
            }
            return spellConfig;
        }