/// <summary>
 /// Constructor with just ID and Race
 /// </summary>
 /// <param name="justID"></param>
 /// <param name="justRace"></param>
 public AbstractEnemy(string justID, EnemyRace justRace)
 {
     this._id        = justID;
     this._hp        = 100;
     this._name      = "Unamed";
     this._enemyRace = justRace;
 }
 /// <summary>
 /// Constructor with all variables
 /// </summary>
 /// <param name="uniqueID"></param>
 /// <param name="hp"></param>
 /// <param name="name"></param>
 /// <param name="enemyRace"></param>
 public AbstractEnemy(string uniqueID, int hp, string name, EnemyRace enemyRace)
 {
     this._id        = uniqueID;
     this._hp        = hp;
     this._name      = name;
     this._enemyRace = enemyRace;
 }
Example #3
0
        public void GenerateNewEnemy(int heroLevel)
        {
            EnemyType type = (EnemyType)random.Next(0, 4);
            EnemyRace race = (EnemyRace)random.Next(0, 5);

            switch (type)
            {
            case EnemyType.Archer:
                enemy = new Enemy()
                {
                    Type         = type,
                    Race         = race,
                    Health       = (100 * heroLevel),
                    AttackDamage = (15 * heroLevel),
                    Armor        = (2 * heroLevel),
                    AttackSpeed  = (30 * heroLevel)
                };
                break;

            case EnemyType.Berserker:
                enemy = new Enemy()
                {
                    Type         = type,
                    Race         = race,
                    Health       = (150 * heroLevel),
                    AttackDamage = (30 * heroLevel),
                    Armor        = (10 * heroLevel),
                    AttackSpeed  = (60 * heroLevel)
                };
                break;

            case EnemyType.Mage:
                enemy = new Enemy()
                {
                    Type         = type,
                    Race         = race,
                    Health       = (75 * heroLevel),
                    AttackDamage = (45 * heroLevel),
                    Armor        = (2 * heroLevel),
                    AttackSpeed  = (30 * heroLevel)
                };
                break;

            case EnemyType.Shielder:
                enemy = new Enemy()
                {
                    Type         = type,
                    Race         = race,
                    Health       = (300 * heroLevel),
                    AttackDamage = (7 * heroLevel),
                    Armor        = (30 * heroLevel),
                    AttackSpeed  = (5 * heroLevel)
                };
                break;

            case EnemyType.Warrior:
                enemy = new Enemy()
                {
                    Type         = type,
                    Race         = race,
                    Health       = (200 * heroLevel),
                    AttackDamage = (15 * heroLevel),
                    Armor        = (20 * heroLevel),
                    AttackSpeed  = (10 * heroLevel)
                };
                break;
            }
        }
 public UnknownEnemy(string justID, EnemyRace justRace) : base(justID, justRace)
 {
 }
Example #5
0
 /// <summary>
 /// Constructor that inherits from the base class
 /// </summary>
 /// <param name="uniqueID"></param>
 /// <param name="hp"></param>
 /// <param name="name"></param>
 /// <param name="enemyRace"></param>
 public GoblinEnemy(string uniqueID, int hp, string name, EnemyRace enemyRace) : base(uniqueID, hp, name, enemyRace)
 {
 }