Ejemplo n.º 1
0
        /// <summary>
        /// This function returns a fabled BattleCharm of a certain type with stats depending on the itemlevel. Adds 2, 3 or 4 attributes to the item.
        /// NOTE: Because there are 4 battlecharms in each inventory and they can give attack and armor, the attributes needed are much lower.
        /// </summary>
        /// <param name="_bcName">The name of the BattleCharm. NOTE: Set this to null if you want the item's name to be random</param>
        /// <param name="_itemlevel">The itemlevel of the BattleCharm</param>
        /// <returns>A fabled BattleCharm</returns>
        public static BattleCharm GenerateFabledBattleCharm(string _bcName, int _itemlevel)
        {
            int _armor = 1;
            if (_itemlevel >= 0)
                _armor = (int)r.Next(1, _itemlevel);
            BattleCharm returnedBC = new BattleCharm(_bcName, EnumItemType.Battlecharm, EnumItemQuality.Fabled, _itemlevel);

            // Fabled items have prefixes and suffixes
            if (_bcName == null)
                returnedBC.ItemName = Function.ItemGeneration.GenerateBattleCharmName(returnedBC, true, true);

            for (int i = 0; i < 5; i++)
            {
                returnedBC.AddAttributeToItem(GetRandomAttribute(_itemlevel + r.Next(48), returnedBC.ItemType), r.Next(_itemlevel / 4, _itemlevel/2));
            }

            return returnedBC;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// This function returns a grand BattleCharm of a certain type with stats depending on the itemlevel. Adds 1 or 2 attributes to the item.
        /// NOTE: Because there are 4 battlecharms in each inventory and they can give attack and armor, the attributes needed are much lower.
        /// </summary>
        /// <param name="_bcName">The name of the BattleCharm. NOTE: Set this to null if you want the item's name to be random</param>
        /// <param name="_itemlevel">The itemlevel of the BattleCharm</param>
        /// <returns>A grand BattleCharm</returns>
        public static BattleCharm GenerateGrandBattleCharm(string _bcName, int _itemlevel)
        {
            int _armor = 1;
            if (_itemlevel != 0)
                _armor = (int)r.Next(1, _itemlevel);
            BattleCharm returnedBC = new BattleCharm(_bcName, EnumItemType.Battlecharm, EnumItemQuality.Grand, _itemlevel);

            // Grand items only have prefixes
            if (_bcName == null)
                returnedBC.ItemName = Function.ItemGeneration.GenerateBattleCharmName(returnedBC, true, false);

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

            return returnedBC;
        }