Esempio n. 1
0
        public Enemy( Armor[] armor, string name, int[] stats, Weapon weapon, int experienceWorth, AI actions )
            : base(armor,  name, stats, weapon, actions)
        {
            /* start constructor */

            mExperienceWorth = experienceWorth;
        }
Esempio n. 2
0
        public Enemy( Armor[] armor, string name, int[] stats, Weapon weapon, int experienceWorth, AI ai, EnemyType type )
            : base(armor,  name, stats, weapon, ai)
        {
            /* start constructor */

            mExperienceWorth = experienceWorth;
            mAI = ai;
            mIsPlayer = false;
            mType = type;

            mAI.Enemy = this;
        }
Esempio n. 3
0
        private void setAI()
        {
            /* start setAI */

            Random random = new Random();
            int choice = random.Next(AI.AMOUNTOFAI);

            if (choice == 0)
                mAi = new Berserker();

            if (choice == 1)
                mAi = new Striker();

            if (choice == 2)
                mAi = new HealerAttacker();
        }
Esempio n. 4
0
        private Enemy getDragon()
        {
            /* start getDragon */

            Random random = new Random();
            mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.WARRIOR);
            mName = "The Dragon";
            mType = EnemyType.DRAGON;
            mWeapon = WeaponFactory.getWeapon(WeaponEnum.WETIREDSWORD);
            mExperienceWorth = 100000;

            mAi = new Striker();

            mStats = new int[Character.MAXSTATS];

            mStats[(int)StatEnum.AGILITY] = 50 + random.Next(STATVARIANCE);
            mStats[(int)StatEnum.MAGIC] = 50 + random.Next(STATVARIANCE);
            mStats[(int)StatEnum.STRENGTH] = 50 + random.Next(STATVARIANCE);
            mStats[(int)StatEnum.STAMINA] = 50 + random.Next(STATVARIANCE);

            mAi.addAbility( AbilitiesFactory.getInstance().getAbility(AbilitesEnum.BLAZE));

            return new Enemy(mArmor, mName, mStats, mWeapon, mExperienceWorth, mAi, mType);
        }