示例#1
0
        /// <summary>
        /// This function returns a fabled armor of a certain type with stats depending on the itemlevel. Adds 2 or 3 attributes to the item.
        /// </summary>
        /// <param name="_armorName">The name of the armor. NOTE: Set this to null if you want the item's name to be random</param>
        /// <param name="_armorType">The type of the armor. NOTE: Set this to EnumArmorType.Null if you want the armors type to be random</param>
        /// <param name="_itemlevel">The itemlevel of the armor</param>
        /// <param name="_armor">The base armor of the weapon</param>
        /// <returns>A fabled weapon</returns>
        public static Armor GenerateFabledArmor(string _armorName, EnumArmorType _armorType, int _itemlevel)
        {
            int _armor = 1;
            if (_itemlevel >= 0)
                _armor = (int)r.Next(1, _itemlevel);

            Armor returnedArmor = null;

            if (_armorType == EnumArmorType.Null)
                returnedArmor = new Armor(_armorName, EnumItemType.Armor, EnumItemQuality.Fabled, _itemlevel, GetRandomArmorType(), _armor);
            else
                returnedArmor = new Armor(_armorName, EnumItemType.Armor, EnumItemQuality.Fabled, _itemlevel, _armorType, _armor);

            if (_armorName == null)
                returnedArmor.ItemName = Function.ItemGeneration.GenerateArmorName(returnedArmor, true, true);

            //This code adds 2 or 3 attributes to the item. The _itemlevel+r.Next(48) is to ensure randomness.
            for (int i = 0; i < 5; i++)
            {
                returnedArmor.AddAttributeToItem(GetRandomAttribute(_itemlevel + r.Next(48), returnedArmor.ItemType), r.Next(_itemlevel / 4, _itemlevel));
            }

            return returnedArmor;
        }
示例#2
0
        public static Item Return5560Epochal(int _npclevel)
        {
            Item returnedItem = new Item();
            int increasedStat = _npclevel + 2;

            switch (r.Next(0, 10))
            {
                case 0:
                    returnedItem = new Weapon("The Occulus", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Staff, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 1:
                    returnedItem = new Weapon("The End", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Axe, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, (int)(increasedStat*1.4));
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 2:
                    returnedItem = new Weapon("Eiwars Bow", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Bow, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 3:
                    returnedItem = new Armor("Halo", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Headarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, (int)(increasedStat*1.1));
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 4:
                    returnedItem = new Armor("Carriers", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Legarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, (int)(increasedStat * 1.2));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 5:
                    returnedItem = new Armor("The Exposed Heart", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Chestarmor, -(increasedStat/4));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat*2);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, -(increasedStat/4));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat*2);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 6:
                    returnedItem = new BattleCharm("Sigil of Madness", EnumItemType.Battlecharm, EnumItemQuality.Epochal, _npclevel);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Attackdamage, increasedStat);
                    returnedItem = (BattleCharm)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 7:
                    returnedItem = new Weapon("Justice", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Sword, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 8:
                    returnedItem = new Weapon("The Destroyer", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Mace, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 9:
                    returnedItem = new Weapon("Throatslitter", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Dagger, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                default:
                    break;
            }
            return returnedItem;
        }
示例#3
0
        public static Item Return5055Epochal(int _npclevel)
        {
            Item returnedItem = new Item();
            int increasedStat = _npclevel + 2;

            switch (r.Next(0, 9))
            {
                case 0:
                    returnedItem = new Weapon("Eiwars Blade", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Sword, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 1:
                    returnedItem = new Weapon("The Myst", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Mace, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, (int)(increasedStat*1.4));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, (int)(increasedStat*1.4));
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 2:
                    returnedItem = new Weapon("Splint", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Dagger, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 3:
                    returnedItem = new Armor("Nobility", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Headarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, (int)(increasedStat*1.4));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, (int)(increasedStat*1.4));
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 4:
                    returnedItem = new Armor("Hide of Scales", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Legarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat/2);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 5:
                    returnedItem = new Armor("The Bulwark", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Chestarmor, (int)(increasedStat*1.2));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, (int)(increasedStat*1.2));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 6:
                    returnedItem = new Weapon("Decapitation", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Axe, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, (int)(increasedStat*1.1));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, (int)(increasedStat*1.3));
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 7:
                    returnedItem = new Weapon("Multistrike", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Bow, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, (int)(increasedStat*1.5));
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 8:
                    returnedItem = new Weapon("The Pyre", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Staff, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, (int)(increasedStat * 1.5));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                default:
                    break;
            }
            return returnedItem;
        }
示例#4
0
        public static Item Return4050Epochal(int _npclevel)
        {
            Item returnedItem = new Item();
            int increasedStat = _npclevel + 2;

            switch (r.Next(0, 10))
            {
                case 0:
                    returnedItem = new Weapon("Branch of Yggdrasil", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Staff, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 1:
                    returnedItem = new Weapon("Skullsplitter", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Axe, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 2:
                    returnedItem = new Weapon("Hawks' Aim", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Bow, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 3:
                    returnedItem = new Armor("Hood of Power", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Headarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, (int)(increasedStat * 1.1));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, (int)(increasedStat * 1.1));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, (int)(increasedStat*1.1));
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 4:
                    returnedItem = new Armor("The Heavy Plates", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Legarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, (int)(increasedStat*1.5));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 5:
                    returnedItem = new Armor("Eiwars Armor", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Chestarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 6:
                    returnedItem = new BattleCharm("The Energy Gem", EnumItemType.Battlecharm, EnumItemQuality.Epochal, _npclevel);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem = (BattleCharm)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 7:
                    returnedItem = new Weapon("The Impaler", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Sword, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, (int)(increasedStat*1.3));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, (int)(increasedStat*0.3));
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 8:
                    returnedItem = new Weapon("Frosttorch", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Mace, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 9:
                    returnedItem = new Weapon("Sabretooth", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Dagger, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                default:
                    break;
            }
            return returnedItem;
        }
示例#5
0
        public static Item Return3040Epochal(int _npclevel)
        {
            Item returnedItem = new Item();
            int increasedStat = _npclevel + 2;

            switch (r.Next(0, 9))
            {
                case 0:
                    returnedItem = new Weapon("Faith Blade", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Sword, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 1:
                    returnedItem = new Weapon("Burning Omen", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Mace, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 2:
                    returnedItem = new Weapon("Leaf of the Forest", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Dagger, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 3:
                    returnedItem = new Armor("The Skull", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Headarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 4:
                    returnedItem = new Armor("Eiwars' Legwraps", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Legarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 5:
                    returnedItem = new Armor("Robes of Hope", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Chestarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 6:
                    returnedItem = new Weapon("The Divider", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Axe, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 7:
                    returnedItem = new Weapon("Simplicity", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Staff, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 8:
                    returnedItem = new Weapon("Silken String", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Bow, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                default:
                    break;
            }
            return returnedItem;
        }
示例#6
0
        public static Item Return2030Epochal(int _npclevel)
        {
            Item returnedItem = new Item();
            int increasedStat = _npclevel + 2;

            switch (r.Next(0, 10))
            {
                case 0:
                    returnedItem = new Weapon("Battlemage's Ward", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Staff, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Armor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 1:
                    returnedItem = new Weapon("Defiance", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Axe, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Armor, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 2:
                    returnedItem = new Weapon("Choosen of the Ranger", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Bow, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 3:
                    returnedItem = new Armor("The Crown", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Headarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 4:
                    returnedItem = new Armor("The Unknown", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Legarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 5:
                    returnedItem = new Armor("Harmony of Lightweave", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Chestarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 6:
                    returnedItem = new BattleCharm("The Balance", EnumItemType.Battlecharm, EnumItemQuality.Epochal, _npclevel);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem = (BattleCharm)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 7:
                    returnedItem = new Weapon("Flash of Light", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Sword, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 8:
                    returnedItem = new Weapon("Legbone of an Ogre", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Mace, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, (int)(increasedStat*0.7));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, (int)(increasedStat*1.2));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 9:
                    returnedItem = new Weapon("Swiftblade", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, EnumWeaponType.Dagger, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, (int)(increasedStat * 0.9));
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, (int)(increasedStat * 1.3));
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                default:
                    break;
            }
            return returnedItem;
        }
示例#7
0
        public static Item Return1020Epochal(int _npclevel)
        {
            Item returnedItem = new Item();
            int increasedStat = _npclevel + 2;

            switch (r.Next(0,9))
            {
                case 0:
                    returnedItem = new Weapon("Thief's Tool", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Dagger, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 1:
                    returnedItem = new Weapon("The Crusher", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Mace, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 2:
                    returnedItem = new Weapon("The Flutterer", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Sword, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 3:
                    returnedItem = new Armor("Apprentice' Headpiece", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Headarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 4:
                    returnedItem = new Armor("Quickleaps", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Legarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 5:
                    returnedItem = new Armor("The Thornebrush", EnumItemType.Armor, EnumItemQuality.Epochal, _npclevel, EnumArmorType.Chestarmor, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Crit, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem = (Armor)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 6:
                    returnedItem = new Weapon("Quickdraw", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Dagger, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Agility, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 7:
                    returnedItem = new Weapon("Glimpse of Speed", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Axe, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Strength, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                case 8:
                    returnedItem = new Weapon("Mind Loop", EnumItemType.Weapon, EnumItemQuality.Epochal, _npclevel, Core.Items.EnumWeaponType.Staff, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Health, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Speed, increasedStat);
                    returnedItem.AddAttributeToItem(EnumAttributeType.Intellect, increasedStat);
                    returnedItem = (Weapon)ItemGeneration.RandomizeEpochalItem(returnedItem);
                    break;
                default:
                    break;
            }

            return returnedItem;
        }
示例#8
0
        /// <summary>
        /// This function returns a normal armor of a certain type with stats depending on the itemlevel.
        /// </summary>
        /// <param name="_armorName">The name of the armor. NOTE: Set this to null if you want the items name to be random</param>
        /// <param name="_armorType">The type of the armor. NOTE: Set this to EnumArmorType.Null if you want the armors type to be random</param>
        /// <param name="_itemlevel">The itemlevel of the armor</param>
        /// <param name="_armor">The base armor of the armor</param>
        /// <returns>A normal armor</returns>
        public static Armor GenerateNormalArmor(string _armorName, EnumArmorType _armorType, int _itemlevel)
        {
            int _armor = 1;
            if(_itemlevel != 0)
                _armor = (int)r.Next(1, _itemlevel);
            Armor returnedArmor = null;

            if (_armorType == EnumArmorType.Null)
                returnedArmor = new Armor(_armorName, EnumItemType.Armor, EnumItemQuality.Normal, _itemlevel, GetRandomArmorType(), _armor);
            else
                returnedArmor = new Armor(_armorName, EnumItemType.Armor, EnumItemQuality.Normal, _itemlevel, _armorType, _armor);

            //A normal item has neither prefixes, nor suffixes
            if (_armorName == null)
                returnedArmor.ItemName = Function.ItemGeneration.GenerateArmorName(returnedArmor, false, false);

            return returnedArmor;
        }
示例#9
0
        /// <summary>
        /// This function returns a grand armor of a certain type with stats depending on the itemlevel. Adds 1 or 2 attributes to the item.
        /// </summary>
        /// <param name="_armorName">The name of the armor. NOTE: Set this to null if you want the item's name to be random</param>
        /// <param name="_armorType">The type of the armor. NOTE: Set this to EnumArmorType.Null if you want the armors type to be random</param>
        /// <param name="_itemlevel">The itemlevel of the armor</param>
        /// <param name="_armor">The base armor of the armor</param>
        /// <returns>A grand armor</returns>
        public static Armor GenerateGrandArmor(string _armorName, EnumArmorType _armorType, int _itemlevel)
        {
            int _armor = 1;
            if (_itemlevel != 0)
                _armor = (int)r.Next(1, _itemlevel);
            Armor returnedArmor = null;

            if (_armorType == EnumArmorType.Null)
                returnedArmor = new Armor(_armorName , EnumItemType.Armor, EnumItemQuality.Grand, _itemlevel, GetRandomArmorType(), _armor);
            else
                returnedArmor = new Armor(_armorName, EnumItemType.Armor, EnumItemQuality.Grand, _itemlevel, _armorType, _armor);

            // Grand items only have prefixes
            if (_armorName == null)
                returnedArmor.ItemName = Function.ItemGeneration.GenerateArmorName(returnedArmor, true, false);

            int upperLimit = r.Next(1, 4);
            for (int i = 0; i < upperLimit; i++)
            {
                returnedArmor.AddAttributeToItem(GetRandomAttribute(_itemlevel + r.Next(48), returnedArmor.ItemType), r.Next(_itemlevel / 4, _itemlevel));
            }

            return returnedArmor;
        }
示例#10
0
        private static string GenerateArmorName(Armor _armor, bool prefix, bool suffix)
        {
            Random r = new Random();
            int index = 0;
            string _name = "";

            if (prefix)
            {
                _name += ReturnRandomPrefix() + " ";
            }

            switch (_armor.ArmorType)
            {
                case EnumArmorType.Chestarmor:
                    index = (_armor.ItemLevel * r.Next(chestArmorNames.Count)) % (chestArmorNames.Count);
                    _name += chestArmorNames[index];
                    break;
                case EnumArmorType.Headarmor:
                    index = (_armor.ItemLevel * r.Next(helmArmorNames.Count)) % (helmArmorNames.Count);
                    _name += helmArmorNames[index];
                    break;
                case EnumArmorType.Legarmor:
                    index = (_armor.ItemLevel * r.Next(legArmorNames.Count)) % (legArmorNames.Count);
                    _name += legArmorNames[index];
                    break;
            }

            if (suffix)
            {
                _name += " " + ReturnRandomSuffix();
            }

            return _name;
        }