private StatBlockInfo.MetaMagicPowers ParseMetaMagicPowers(ref string scroll) { StatBlockInfo.MetaMagicPowers powers = StatBlockInfo.MetaMagicPowers.None; List <string> MetaMagicList = CommonInfo.GetMetaMagicPowers(); foreach (string Meta in MetaMagicList) { if (scroll.Contains(Meta)) { if ((Meta == "silent" && scroll.Contains("silent image"))) { continue; } if ((Meta == "heightened" && scroll.Contains("heightened awareness"))) { continue; } scroll = scroll.ReplaceFirst(Meta, string.Empty); string temp = Meta; if (temp == "still") { temp = "stilled"; } powers |= (StatBlockInfo.MetaMagicPowers)Enum.Parse(typeof(StatBlockInfo.MetaMagicPowers), temp); } } return(powers); }