Esempio n. 1
0
 /// <summary>
 /// Adds a new Blank Creature to the Encounter's Creature Collection
 /// </summary>
 /// <param name="monster">The Creature is a Monster</param>
 /// <param name="hidden">The Creature is hidden</param>
 public void AddBlank(bool monster, bool hidden = false)
 {
     Creature m = new Creature();
     m.IsBlank = true;
     m.IsMonster = monster;
     m.IsHidden = hidden;
     m.Name = this.GetUnusedName(monster ? "Monster" : "Player");
     this.AddCreature(m);
 }
Esempio n. 2
0
 /// <summary>
 /// Adds a Creature to the Encounter's Creature Collection
 /// </summary>
 /// <param name="creature">The Creature to be added</param>
 public void AddCreature(Creature creature)
 {
     this.Creatures.Add(creature);
 }
Esempio n. 3
0
        /// <summary>
        /// Returns a copy of this Creature
        /// </summary>
        /// <returns>Returns a copy of this Creature</returns>
        public object Clone()
        {
            Creature creature = new Creature();

            creature.name = this.name;
            creature.hp = this.hp;
            creature.maxHp = this.maxHp;
            creature.notes = this.notes;
            creature.id = Guid.NewGuid();

            creature.isMonster = this.isMonster;
            if (this.monster == null)
            {
                creature.monster = null;
            }
            else
            {
                creature.monster = (MonsterStat)this.monster.Clone();
            }

            creature.isActive = this.isActive;
            creature.currentInit = this.currentInit;
            creature.hasInitChanged = false;
            creature.initRolled = this.initRolled;
            if (this.initCount != null)
            {
                creature.initCount = new InitiativeCount(this.initCount);
            }

            creature.isHidden = this.isHidden;

            return creature;
        }