protected override int CalculateBaseNumberOfFiefs(Clan clan, NumberOfFiefsCalculationMethod calculationMethod)
        {
            switch (calculationMethod)
            {
            case NumberOfFiefsCalculationMethod.WithoutRestrictions: return(-1);

            case NumberOfFiefsCalculationMethod.ByClanTier: return(1 + (clan.Kingdom != null && clan.Kingdom.RulingClan == clan ? 1 : 0) + clan.Tier / 2);

            case NumberOfFiefsCalculationMethod.ByClanMembers: return((int)Math.Ceiling(clan.Heroes.Where(h => h.IsAlive).Sum(h => clan.Tier < 5 ? (h.IsChild ? 0.5 : 1) : Math.Min(1.0, h.Age / Campaign.Current.Models.AgeModel.HeroComesOfAge))) + (clan.Kingdom != null && clan.Kingdom.RulingClan == clan ? 1 : 0));

            default:
                throw new ArgumentOutOfRangeException(nameof(calculationMethod), calculationMethod, "Is not supported NumberOfFiefsCalculationMethod value.");
            }
        }
 protected abstract int CalculateBaseNumberOfFiefs(Clan clan, NumberOfFiefsCalculationMethod calculationMethod);
        //CalculateTraitsModifierForDesiredFiefs
        private int CalculateTraitsModifierForDesiredFiefs(DecisionMaker decisionMaker, NumberOfFiefsCalculationMethod calculationMethod)
        {
            int fairFiefNumber = GetNumberOfFiefsDeemedFair(decisionMaker.Hero.Clan);
            int baseFiefNumber = CalculateBaseNumberOfFiefs(decisionMaker.Hero.Clan, calculationMethod);

            if (fairFiefNumber <= baseFiefNumber + Settings.Instance.DesiredFiefsModifier &&
                decisionMaker.Hero.GetTraitLevel(DefaultTraits.Honor) > 0 &&
                decisionMaker.Hero.GetTraitLevel(DefaultTraits.Honor) > GetTraitLevelModifier(decisionMaker.Hero.GetTraitLevel(DefaultTraits.Calculating) - decisionMaker.Hero.GetTraitLevel(DefaultTraits.Generosity)))
            {
                return(fairFiefNumber - (baseFiefNumber + Settings.Instance.DesiredFiefsModifier));
            }

            double modifierValue = (baseFiefNumber * GetTraitLevelModifier(decisionMaker.Hero.GetTraitLevel(DefaultTraits.Calculating) - decisionMaker.Hero.GetTraitLevel(DefaultTraits.Generosity), 0.5)) - baseFiefNumber;

            return((int)Math.Truncate(modifierValue));
        }