DungeonMasterParser.DungeonData.ParseFightCombos C# (CSharp) Method

ParseFightCombos() private method

private ParseFightCombos ( ) : IList
return IList
        private IList<FightComboDescriptor> ParseFightCombos()
        {
            var documet = new HtmlDocument();
            documet.LoadHtml(File.ReadAllText("Data/combos.html"));

            var data = documet.DocumentNode.SelectSingleNode("//table")
                .Descendants("tr")
                .Skip(1)
                .Select(tr => tr.Elements("td").Select(td => td.InnerText).ToArray())
                .ToArray();

            var res = new List<FightComboDescriptor>();
            for (int i = 0; i < data.Length; i += 3)
            {
                var entries = new List<ComboEntry>();
                for (int j = i; j < i + 3; j++)
                {
                    int offset = j == i ? 1 : 0;

                    int fightActionIndex = int.Parse(data[j][offset]);
                    if (fightActionIndex == 255)
                        break;

                    entries.Add(new ComboEntry
                    {
                        ActionDescriptor = FightActions[fightActionIndex],
                        UseCharges = int.Parse(data[j][offset + 2]),
                        MinimumSkillLevel = int.Parse(data[j][offset + 3])
                    });
                }

                res.Add(new FightComboDescriptor
                {
                    ComboIndex = i / 3,
                    Actions = entries
                });
            }

            return res;
        }