Esempio n. 1
0
        private void SpawnWaterCaveItems(int budgetScale)
        {
            int dungeonID = 1;

            int dungeonStartLevel = Game.Dungeon.DungeonInfo.GetDungeonStartLevel(dungeonID);
            int dungeonEndLevel = Game.Dungeon.DungeonInfo.GetDungeonEndLevel(dungeonID);

            for (int i = dungeonStartLevel; i <= dungeonEndLevel; i++)
            {

                //Spawn bonus potions

                int totalPotions = 1 + Game.Random.Next(3);

                for (int j = 0; j < totalPotions; j++)
                {
                    int randomChance = Game.Random.Next(100);

                    Item potion;

                    if (randomChance < 50)
                        potion = new Items.PotionSpeedUp();
                    else
                        potion = new Items.PotionSightUp();

                    PlaceItemOnLevel(potion, i, 50);
                }

                //Spawn restore / heal potions

                totalPotions = 1 + Game.Random.Next(3);

                for (int j = 0; j < totalPotions; j++)
                {
                    int randomChance = Game.Random.Next(100);

                    Item potion;

                    if (randomChance < 50)
                        potion = new Items.Potion();
                    else
                        potion = new Items.PotionMPRestore();

                    PlaceItemOnLevel(potion, i, 50);
                }
            }
        }
Esempio n. 2
0
        private void SpawnPrinceItems(int budgetScale)
        {
            int dungeonID = 6;

            int dungeonStartLevel = Game.Dungeon.DungeonInfo.GetDungeonStartLevel(dungeonID);
            int dungeonEndLevel = Game.Dungeon.DungeonInfo.GetDungeonEndLevel(dungeonID);

            int totalPotions = 1 + Game.Random.Next(3);
            /*
            //bonus potions for the dragon level
            for (int j = 0; j < totalPotions; j++)
            {
                int randomChance = Game.Random.Next(100);

                Item potion;

                if (randomChance < 50)
                    potion = new Items.Potion();
                else
                    potion = new Items.PotionMPRestore();

                PlaceItemOnLevel(potion, dungeonEndLevel, 0);
            }*/

            for (int i = dungeonStartLevel; i <= dungeonEndLevel; i++)
            {

                //Spawn bonus potions

                totalPotions = 2 + Game.Random.Next(4);

                for (int j = 0; j < totalPotions; j++)
                {
                    int randomChance = Game.Random.Next(100);

                    Item potion;

                    if (randomChance < 25)
                        potion = new Items.PotionSpeedUp();
                    else if(randomChance < 50)
                        potion = new Items.PotionSightUp();
                    else if(randomChance < 75)
                        potion = new Items.PotionToHitUp();
                    else
                        potion = new Items.PotionDamUp();

                    PlaceItemOnLevel(potion, i, 50);
                }

                //Spawn restore / heal potions

                totalPotions = 1 + Game.Random.Next(3);

                for (int j = 0; j < totalPotions; j++)
                {
                    int randomChance = Game.Random.Next(100);

                    Item potion;

                    if (randomChance < 50)
                        potion = new Items.Potion();
                    else
                        potion = new Items.PotionMPRestore();

                    PlaceItemOnLevel(potion, i, 50);
                }
            }
        }