Exemplo n.º 1
0
        public MonsterModel GetMonster(int level, MonsterType type, string name = null, string text = null)
        {
            int hp = 1;

            switch (type)
            {
            case MonsterType.Stooge:
                hp = 1;
                break;

            case MonsterType.Goon:
            {
                if (level < 5)
                {
                    hp = 4;
                }
                else
                {
                    hp = 5;
                }
            }
            break;

            case MonsterType.Standard:
                hp = (level * 2) + 6;
                break;

            case MonsterType.Elite:
                hp = ((level * 2) + 6) * 2;
                break;

            case MonsterType.Champion:
            case MonsterType.Titan:
                hp = ((level * 2) + 6) * 4;
                break;
            }

            MonsterModel m = MonsterModel.NewMonsterModel();

            m.Name      = string.IsNullOrEmpty(name) ? this.Name : name + " (" + this.Name + ")";
            m.Level     = level;
            m.Speed     = this.Speed;
            m.Text      = string.IsNullOrEmpty(text) ? this.Text : text;
            m.Powers    = this.Powers.GetPowerList(level, type, this.IsSpecialist);
            m.Traits    = this.Traits.GetTraitList(level, type, this.IsSpecialist);
            m.HitPoints = hp;
            m.Type      = type;
            m.Size      = this.Size;

            return(m);
        }