Пример #1
0
        internal static void combatGenerate(int specials, int level, int mobquality, bool boss, string name)
        {
            int          quality;
            ItemAbstract test = null;

            int chance = Globals.Random(0, 100);
            int min;

            switch (mobquality)
            {
            case Globals.MOB_WEAK:
                min = 70;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_COMMON;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_TRASH;
                }
                break;

            case Globals.MOB_NORMAL:
                min = 60;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_UNCOMMON;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_COMMON;
                }
                break;

            case Globals.MOB_HARD:
                min = 50;
                if (Globals.Random(0, 100) > 90)
                {
                    quality = Globals.ITEM_QUALITY_RARE;
                }
                else if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_UNCOMMON;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_COMMON;
                }
                break;

            case Globals.MOB_VERY_HARD:
                min = 40;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_RARE;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_UNCOMMON;
                }
                break;

            case Globals.MOB_INSANE:
                min = 30;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_EPIC;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_MASTERWORK;
                }
                break;

            case Globals.MOB_BOSS:
                min     = 20;
                quality = Globals.ITEM_QUALITY_LEGENDARY;
                break;

            case Globals.MOB_SPECIAL:
            default:                               // Default means it's GREATER than MOB_SPECIAL.
                min     = 0;
                quality = Globals.ITEM_QUALITY_MYTHICAL;
                break;
            }

            if (boss)
            {
                min    = 0;
                level += 2;
            }

            if (chance < min)
            {
                return;
            }

            test = generateItem(specials, level, quality, "");

            string[] temp = new string[1];
            temp[0] = "You have acquired a " + test.Name;

            SubStateDisplayMessage message = new SubStateDisplayMessage(temp, 50, 400, 350, 350, StateHandler.State);

            StateHandler.State = message;
        }
Пример #2
0
        internal static ItemAbstract CreateItem(int wearflags, int specials, int level, int difficulty, int quality, string name)
        {
            ItemAbstract newItem = new ItemAbstract();

            return(newItem);
        }
Пример #3
0
        internal static ItemAbstract CreateItem(int wearflags, int specials, int level, int difficulty, int quality, string name)
        {
            ItemAbstract newItem = new ItemAbstract();

            return newItem;
        }