public void CheckFeatCount(string Feats)
        {
            string CheckName = "Feat Count";

            string hold = Feats;

            Utility.ParenCommaFix(ref hold);
            List <string> MythicFeats = new List <string>();
            List <string> FeatsTemp   = hold.Replace("*", string.Empty).Split(',').ToList <string>();

            FeatsTemp.RemoveAll(p => p == string.Empty);
            List <string> NewFeats = new List <string>();

            FeatsTemp = RemoveSuperScripts(FeatsTemp); //not mythic M
            FeatsTemp.RemoveAll(p => p == " ");

            int Count = FeatsTemp.Count - 1;

            for (int a = Count; a >= 0; a--)
            {
                string feat = FeatsTemp[a];
                if (feat.Contains("- "))
                {
                    _messageXML.AddFail("Feat Spelling", "hyphen space in feat name");
                }
                if (feat.Contains("("))
                {
                    int    Pos   = feat.IndexOf("(");
                    string temp3 = feat.Substring(Pos);
                    temp3 = temp3.Replace("(", string.Empty);
                    temp3 = temp3.Replace(")", string.Empty);
                    int count;
                    int.TryParse(temp3, out count);
                    if (count > 0)
                    {
                        NewFeats.Add(feat);
                    }
                    else
                    {
                        if (temp3.Contains("|"))
                        {
                            List <string> MultipleFeats = temp3.Split('|').ToList <string>();

                            Pos = feat.IndexOf("(");
                            string baseFeat = feat.Substring(0, Pos).Trim();
                            FeatsTemp[a] = baseFeat + " (" + MultipleFeats[0].Trim() + ")";

                            for (int b = 1; b <= MultipleFeats.Count - 1; b++)
                            {
                                NewFeats.Add(baseFeat + " (" + MultipleFeats[b].Trim() + ")");
                            }
                        }
                    }
                }
                //if (feat.EndsWith("M") || feat.Contains("M "))
                if (feat.Contains("[M]"))
                {
                    string temp2 = feat.Replace("[M]", string.Empty);
                    if (temp2.EndsWith("M"))
                    {
                        temp2 = temp2.Substring(0, temp2.Length - 1);
                    }
                    string tempOld = temp2;
                    if (temp2.Contains("("))
                    {
                        int Pos = temp2.IndexOf("(");
                        temp2 = temp2.Substring(0, Pos).Trim();
                    }
                    temp2 = temp2.Trim();
                    MythicFeats.Add(temp2.Trim());
                    IFeatStatBlock tempFeat = StatBlockService.GetMythicFeatByName(temp2);
                    if (tempFeat != null && tempFeat.prerequisite_feats == temp2)
                    {
                        FeatsTemp[a] = tempOld;
                    }
                    else
                    {
                        FeatsTemp[a] = string.Empty;
                    }
                }
            }
            FeatsTemp.Remove(string.Empty);
            FeatsTemp.AddRange(NewFeats);
            if (_monSBSearch.IsMythic)
            {
                int value           = _monSBSearch.MythicValue;
                int MythicFeatCount = StatBlockInfo.GetMythicFeats(value);

                if (MythicFeatCount == MythicFeats.Count)
                {
                    _messageXML.AddPass("Mythic Feat Count");
                }
                else
                {
                    _messageXML.AddFail("Mythic Feat Count", MythicFeatCount.ToString(), MythicFeats.Count.ToString(), "");
                }
            }

            int    FeatCount = CharacterClasses.FindClassFeatCount();
            string formula   = FeatCount.ToString() + " classes";

            if ((FeatsTemp.Contains("AlertnessB") || FeatsTemp.Contains("Alertness")) && _monSBSearch.HasFamiliar())
            {
                FeatCount++;
                formula += " +1 Familiar bonus";
            }

            if (_monSBSearch.HasHex("cauldron"))
            {
                FeatCount++;
                formula += " +1 cauldron hex";
            }

            //if (Race_Base.RaceBaseType != RaceBase.RaceType.Race)
            //{
            int count2 = FeatsTemp.Count;

            for (int a = count2 - 1; a >= 0; a--)
            {
                if (FeatsTemp[a].LastIndexOf("B") == FeatsTemp[a].Length - 1)
                {
                    FeatsTemp.Remove(FeatsTemp[a]);
                }
                else if (FeatsTemp[a].Contains("("))
                {
                    string tempFeat = FeatsTemp[a].Substring(0, FeatsTemp[a].IndexOf("(")).Trim();
                    if (tempFeat.LastIndexOf("B") == tempFeat.Length - 1)
                    {
                        FeatsTemp.Remove(FeatsTemp[a]);
                    }
                }
                else if (FeatsTemp[a].Contains("B "))
                {
                    FeatsTemp.Remove(FeatsTemp[a]);
                }
            }
            //}

            if (_monSBSearch.HasSQ("secrets")) //loremaster
            {
                if (_monSBSearch.HasSQ("secret health"))
                {
                    FeatCount++;
                    formula += " +1 secret health";
                }
                if (_monSBSearch.HasSQ("applicable knowledge"))
                {
                    FeatCount++;
                    formula += " +1 applicable knowledge";
                }
            }

            if (_monSBSearch.HasSQ("slayer talents"))
            {
                if (_monSBSearch.HasSQ("combat trick"))
                {
                    FeatCount++;
                    formula += " +1 combat trick";
                }
            }

            if (_monSBSearch.HasSQ("rogue talent") || _monSBSearch.HasSQ("ninja tricks"))
            {
                if (_monSBSearch.HasSQ("combat trick"))
                {
                    FeatCount++;
                    formula += " +1 combat trick";
                }
                if (_monSBSearch.HasSQ("finesse rogue"))
                {
                    FeatCount++; //weapon finesse
                    formula += " +1 finesse rogue";
                }
                if (_monSBSearch.HasSQ("weapon training"))
                {
                    FeatCount++;
                    formula += " +1 weapon training";
                }
                if (_monSBSearch.HasSQ("feat"))
                {
                    FeatCount++;
                    formula += " +1 rogue talent feat";
                }
                if (_monSBSearch.HasSQ("card sharp"))
                {
                    FeatCount++;
                    formula += " +1 card sharp";
                }
                if (_monSBSearch.HasSQ("grit"))
                {
                    FeatCount += 2;
                    formula   += " +2 grit";
                }
            }

            if (_monSBSearch.HasCavalierOrder("order of the cockatrice"))
            {
                int cavalierLevels = CharacterClasses.FindClassLevel("cavalier");
                if (cavalierLevels >= 2)
                {
                    FeatCount++;
                    formula += " +1 order of the cockatrice";
                }
            }

            if (_monSBSearch.HasCavalierOrder("order of the whip"))
            {
                int cavalierLevels = CharacterClasses.FindClassLevel("cavalier");
                if (cavalierLevels >= 2)
                {
                    FeatCount++;
                    formula += " +1 order of the whip";
                }
            }

            if (_monSBSearch.HasSQ("revelations") && _monSBSearch.HasSQ("weapon mastery")) // oracle battle mystery
            {
                int OracleLevel = CharacterClasses.FindClassLevel("oracle");
                FeatCount++;
                formula += " +1 weapon focus";
                if (OracleLevel >= 8)
                {
                    FeatCount++;
                    formula += " +1 Improved Critical";
                }
                if (OracleLevel >= 12)
                {
                    FeatCount++;
                    formula += " +1 Greater Weapon Focus";
                }
            }

            if (_monSBSearch.HasSQ("revelations") && _monSBSearch.HasSQ("stone stability")) // oracle stone mystery
            {
                int OracleLevel = CharacterClasses.FindClassLevel("oracle");
                if (OracleLevel >= 5)
                {
                    FeatCount++;
                    formula += " +1  Improved Trip";
                }
                if (OracleLevel >= 10)
                {
                    FeatCount++;
                    formula += " +1 Greater Trip";
                }
            }

            if (_monSBSearch.HasSQ("revelations") && _monSBSearch.HasSQ("cinder dance")) // oracle flame mystery
            {
                int OracleLevel = CharacterClasses.FindClassLevel("oracle");
                if (OracleLevel >= 5)
                {
                    FeatCount++;
                    formula += " +1  Nimble Moves";
                }
                if (OracleLevel >= 10)
                {
                    FeatCount++;
                    formula += " +1 Acrobatic Steps";
                }
            }

            #region ClassArchetypes
            if (_monSBSearch.HasAnyClassArchetypes())
            {
                if (_monSBSearch.HasClassArchetype("unarmed fighter"))
                {
                    FeatCount++;
                    formula += " +1 Unarmed Style";
                }

                if (_monSBSearch.HasClassArchetype("pirate"))
                {
                    FeatCount++;
                    formula += " +1 Sea Legs";
                }

                if (_monSBSearch.HasClassArchetype("musketeer"))
                {
                    FeatCount += 2;
                    formula   += " +2 Musketeer Instruction";
                }

                if (_monSBSearch.HasClassArchetype("cad"))
                {
                    int CadLevels = CharacterClasses.FindClassLevel("fighter");
                    if (CadLevels >= 3)
                    {
                        FeatCount++;                 // Catch Off Guard
                    }
                    formula += " +1 Catch Off Guard";
                }

                if (_monSBSearch.HasClassArchetype("steel hound"))
                {
                    int investigatorLevels = CharacterClasses.FindClassLevel("investigator");
                    if (investigatorLevels >= 2)
                    {
                        FeatCount += 2;                          // Amateur Gunslinger and Gunsmithing
                    }
                    formula += " +2 Packing Heat";
                }

                if (_monSBSearch.HasClassArchetype("constable"))
                {
                    FeatCount++; // Apprehend (Ex)
                    formula += " +1 Apprehend";
                }

                if (_monSBSearch.HasClassArchetype("staff magus"))
                {
                    FeatCount++; // Quarterstaff Master (Ex)
                    formula += " +1 Quarterstaff Master";
                }

                if (_monSBSearch.HasClassArchetype("musket master"))
                {
                    FeatCount++; // Rapid Reloader
                    formula += " +1 Rapid Reloader";
                }

                if (_monSBSearch.HasClassArchetype("weapon adept"))
                {
                    int monkLevels = CharacterClasses.FindClassLevel("monk");
                    if (monkLevels >= 1)
                    {
                        FeatCount++;
                    }
                    formula += " +1 Perfect Strike";
                    if (monkLevels >= 2)
                    {
                        FeatCount++;
                        formula += " +1 Weapon Focus";
                    }
                }
            }
            #endregion ClassArchetypes

            if (_monSBSearch.HasSpellDomians())
            {
                int clericLevel = CharacterClasses.FindClassLevel("cleric");
                if (clericLevel == 0)
                {
                    clericLevel = CharacterClasses.FindClassLevel("druid");
                }
                if (_monSBSearch.HasSpellDomain("Nobility") && clericLevel >= 8)
                {
                    FeatCount++;
                    formula += " +1 Nobility";
                }
                if (_monSBSearch.HasSpellDomain("Rune"))
                {
                    FeatCount++;
                    formula += " +1 Rune";
                }
                if (_monSBSearch.HasSpellDomain("Darkness"))
                {
                    FeatCount++;
                    formula += " +1 Darkness";
                }
                if (_monSBSearch.HasSpellDomain("Persistence"))
                {
                    FeatCount++;  //step up
                    formula += " +1 Persistence";
                }
                if (_monSBSearch.HasSpellDomain("Black Powder"))
                {
                    FeatCount++;  //Gunsmithing  inquisition
                    formula += " +1 Black Powder";
                }
            }

            if (_monSBSearch.HasTemplate("worm that walks"))
            {
                FeatCount++;  //diehard
                formula += " +1 worm that walks";
            }

            if (CharacterClasses.HasClass("arcanist"))
            {
                if (_monSBSearch.HasSpecialAttack("metamagic knowledge"))
                {
                    FeatCount++;  //Metamagic Knowledge
                    formula += " +1 metamagic knowledge";
                }
            }

            if (CharacterClasses.HasClass("slayer"))
            {
                if (_monSBSearch.HasSQ("ranger combat style"))
                {
                    int slayerLevel = CharacterClasses.FindClassLevel("slayer");
                    int tempMod     = 0;

                    if (slayerLevel >= 2)
                    {
                        tempMod++;
                    }
                    if (slayerLevel >= 6)
                    {
                        tempMod++;
                    }
                    if (slayerLevel >= 10)
                    {
                        tempMod++;
                    }
                    if (slayerLevel >= 14)
                    {
                        tempMod++;
                    }
                    if (slayerLevel >= 18)
                    {
                        tempMod++;
                    }

                    if (tempMod > 0)
                    {
                        FeatCount += tempMod;
                        formula   += " +" + tempMod.ToString() + " ranger combat style";
                    }
                }

                if (_monSBSearch.HasSQ("weapon training"))
                {
                    FeatCount += 1;
                    formula   += " +1 weapon training";
                }
            }

            if (CharacterClasses.HasClass("hellknight signifer"))
            {
                int hellknightSigniferLevel = CharacterClasses.FindClassLevel("hellknight signifer");
                if (hellknightSigniferLevel >= 2 && _monSBSearch.HasFeat("Arcane Armor Training"))
                {
                    FeatCount++;  //Arcane Armor Mastery
                    formula += " +1 Arcane Armor Expertise";
                }
            }

            if (_monSBSearch.HasSQ("investigator talent") && _monSBSearch.HasSQ("bonus feat")) // oracle battle mystery
            {
                FeatCount++;                                                                   //Investigator Talents
                formula += " +1 Investigator Talent";
            }


            int temp = 0;
            if (Race_Base != null)
            {
                if (Race_Base.RaceBaseType == RaceBase.RaceType.StatBlock && Race_Base.UseRacialHD)
                {
                    if (!HasEnvirmonment)
                    {
                        temp       = Race_Base.BonusFeatCount();
                        formula   += " +" + temp.ToString() + " Race";
                        FeatCount += temp;
                    }
                }

                //FeatCount += StatBlockInfo.GetHDFeats(CharacterClasses.FindTotalClassLevels());
                temp       = StatBlockInfo.GetHDFeats(HDValue);
                formula   += " +" + temp.ToString() + " Hit Dice";
                FeatCount += temp;
                if (Race_Base.RaceBaseType == RaceBase.RaceType.Race)
                {
                    temp       = Race_Base.BonusFeatCount();
                    formula   += " +" + temp.ToString() + " Race";
                    FeatCount += temp;
                }
            }

            int SB_count = FeatsTemp.Count();

            if (IntAbilityScoreValue == 0)
            {
                FeatCount = 0;
                formula   = " Int=0";
            }

            if (SB_count == FeatCount)
            {
                _messageXML.AddPass(CheckName, formula);
            }
            else
            {
                _messageXML.AddFail(CheckName, FeatCount.ToString(), SB_count.ToString(), formula);
            }
        }