Esempio n. 1
0
        Item GenerateItem()
        {
            Item result;

            int rand = Random.Next(0, 100);

            if (rand < 95)
            {
                result = Rares.ElementAt(Random.Next(0, Rares.Count()));
            }
            else
            {
                result = Legendarys.ElementAt(Random.Next(0, Legendarys.Count()));
            }

            return(Dupe(result));
        }
Esempio n. 2
0
        Item GenerateItem(Vector2I position)
        {
            // pick an item from commons rares or legendaries
            Item result;
            Item prize;

            int rand = Random.Next(0, 100);

            if (rand < 95)
            {
                prize = Rares.ElementAt(Random.Next(0, Rares.Count()));
            }
            else
            {
                prize = Legendarys.ElementAt(Random.Next(0, Legendarys.Count()));
            }

            result = Dupe(prize);

            result.Position = position;
            return(result);
        }