Example #1
0
        private void LoadResources()
        {
            if (monster.SpecialAttacks != null)
            {
                //find rage
                Match m = Regex.Match(monster.SpecialAttacks, "[Rr]age \\((?<count>[0-9]+) rounds?/ ?day\\)");
                if (m.Success)
                {
                    int            count = int.Parse(m.Groups["count"].Value);
                    ActiveResource r     = new ActiveResource()
                    {
                        Name = "Rage", Max = count, Current = count, Uses = count + " rounds/day"
                    };
                    Resources.Add(r);
                }
            }

            if (monster.SQ != null)
            {
                //find rage
                Match m = Regex.Match(monster.SQ, "[Kk]i [Pp]ool \\((?<count>[0-9]+) points?,");
                if (m.Success)
                {
                    int            count = int.Parse(m.Groups["count"].Value);
                    ActiveResource r     = new ActiveResource()
                    {
                        Name = "Ki pool", Max = count, Current = count
                    };
                    Resources.Add(r);
                }
            }
        }
Example #2
0
 public ActiveResource(ActiveResource resource)
 {
     _Name    = resource.Name;
     _Uses    = resource.Uses;
     _Type    = resource._Type;
     _Min     = resource._Min;
     _Max     = resource._Max;
     _Current = resource.Current;
 }