Esempio n. 1
0
        public static BarModel SurgeBarModel(Character ch)
        {
            BarModel model = new BarModel
            {
                Max = ch.MaxSurges,
                Min = 0,
                Current = ch.CurrentSurges,
                Class = "surges",
                Label = string.Format("Surges: {0}/{1}", ch.CurrentSurges, ch.MaxSurges)
            };

            return model;
        }
Esempio n. 2
0
        public static BarModel HPBarModel(Character ch)
        {
            string temp = string.Empty;
            if(ch.TempHP > 0)
                temp = string.Format("+{0}", ch.TempHP);

            BarModel model = new BarModel
            {
                Max = ch.MaxHP,
                Min = 0,
                Current = Math.Max(0, ch.CurrentHP),
                Class = "hp",
                Label = string.Format("HP: {0}{1}/{2}", ch.CurrentHP, temp, ch.MaxHP)
            };
            model.AddConditionalClass(50, "Bloodied");
            return model;
        }