Esempio n. 1
0
        public Monster(dynamic jsonObject)
        {
            Name      = jsonObject.name;
            Meta      = jsonObject.meta;
            Languages = jsonObject.Languages == "--" ? null : jsonObject.Languages;
            Senses    = jsonObject.Senses;

            HitPoints       = StatBlockParser.ParseHP(jsonObject.HitPoints);
            ChallengeRating = StatBlockParser.ParseChallengeRating(jsonObject.Challenge);
            ArmourClass     = StatBlockParser.ParseAC(jsonObject.ArmorClass);

            CurrentHitPoints = HitPoints;
            CurrentHPCount.Add(HitPoints);

            Speed               = jsonObject.Speed;
            DamageResistances   = jsonObject.Damage_Resistances;
            DamageImmunities    = jsonObject.Damage_Immunities;
            ConditionImmunities = jsonObject.Condition_Immunities;
            SavingThrows        = jsonObject.SavingThrows;
            Skills              = jsonObject.Skills;

            ParseActions(jsonObject);

            Strength     = (byte)jsonObject.STR;
            Dexterity    = (byte)jsonObject.DEX;
            Constitution = (byte)jsonObject.CON;
            Intelligence = (byte)jsonObject.INT;
            Wisdom       = (byte)jsonObject.WIS;
            Charisma     = (byte)jsonObject.CHA;

            ImgURL = jsonObject.img_url;
            SetModifiers();
        }
Esempio n. 2
0
        private List <string> ParseModifiers()
        {
            List <string> modifiers = new List <string>();

            modifiers.Add(StatBlockParser.StringModifier(Strength));
            modifiers.Add(StatBlockParser.StringModifier(Dexterity));
            modifiers.Add(StatBlockParser.StringModifier(Constitution));
            modifiers.Add(StatBlockParser.StringModifier(Intelligence));
            modifiers.Add(StatBlockParser.StringModifier(Wisdom));
            modifiers.Add(StatBlockParser.StringModifier(Charisma));

            return(modifiers);
        }