Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Creature"/> class.
        /// </summary>
        /// <param name="monster">A monster stat</param>
        /// <param name="rollHitPoints">the hit points are rolled</param>
        public Creature(MonsterStat monster, bool rollHitPoints)
            : this()
        {
            this.monster = (MonsterStat)monster.Clone();
            this.name    = this.monster.Name;

            if (!rollHitPoints || !this.TryParseHitPoints())
            {
                this.hp = monster.HitPoints;
            }

            this.maxHp     = this.hp;
            this.isMonster = true;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Creature"/> class.
        /// </summary>
        /// <param name="monster">A monster stat</param>
        /// <param name="rollHitPoints">the hit points are rolled</param>
        public Creature(MonsterStat monster, bool rollHitPoints)
            : this()
        {
            this.monster = (MonsterStat)monster.Clone();
            this.name = this.monster.Name;

            if (!rollHitPoints || !this.TryParseHitPoints())
            {
                this.hp = monster.HitPoints;
            }

            this.maxHp = this.hp;
            this.isMonster = true;
        }