Ejemplo n.º 1
0
        public override void EncounterResult(bool action1Selected)
        {
            if (action1Selected)
            {
                int roll = Random.Next(1, 5);

                string message = "They find no way to help, and wish you good luck.";
                switch (roll)
                {
                case 1:
                    roll              = Random.Next(1, 10);
                    message           = string.Format("Excellent, scanner range improved by {0}%!", roll);
                    Player.LongRange += (int)(Player.LongRange * roll / 100);
                    break;

                case 2:
                    roll              = Random.Next(9, 26);
                    message           = string.Format("Excellent, scanner range improved by {0}%!", roll);
                    Player.LongRange += (int)(Player.LongRange * roll / 100);
                    break;

                case 3:
                    roll = Random.Next(1, 10);
                    if (roll == 7)
                    {
                        message           = "Through and unfortunate accident, the scanner array is damaged, range reduced to 80%!!";
                        Player.LongRange -= (int)(Player.LongRange * 0.80);
                    }
                    break;

                case 4:
                    roll = Random.Next(1, 10);
                    if (roll == 10)
                    {
                        message       = "The entire crew has been exposed to an alien deseases and the quarantine failed.\r\nThe entire crew eventually dies.\r\nYou’ve failed and human's are extinct.";
                        Game1.Failure = true;
                    }
                    break;

                case 5:
                    roll                = Random.Next(1, 9);
                    message             = string.Format("Engine's improved, speed increased by {0}%!", roll);
                    Player.PlayerSpeed += (int)(Player.PlayerSpeed * roll / 100);
                    break;
                }
                FadeMessageManager.Show(message);
            }

            EncounterManager.EncounterActive = false;

            LongRangeScanned = true;

            TextureNames textureName = (TextureNames)Random.Next((int)TextureNames.Empty1, (int)TextureNames.Empty4);
            TextureLink  textureLink = TextureManager.Textures[textureName];

            BaseSprite.TintColor = Color.Gray;

            Encounter = false;
        }
        public override void EncounterResult(bool action1Selected)
        {
            if (action1Selected)
            {
                int roll = Random.Next(1, 30);

                string message = "The scout ship hits a space mine and is discovered!\r\nThe planet hits the ship with several nuclear weapons!\r\nRadiation kills most of the crew.\r\nYou have failed.\r\nHumanity devolves to is caveman roots.";
                Game1.Failure = true;
                FadeMessageManager.Show(message);
            }

            EncounterManager.EncounterActive = false;

            BaseSprite.TintColor = Color.Gray;

            Encounter = false;
        }
Ejemplo n.º 3
0
        public override void EncounterResult(bool action1Selected)
        {
            if (action1Selected)
            {
                int roll = Random.Next(1, 30);

                string message = "You find nothing but a hauntingly empty planet.";
                switch (roll)
                {
                case 1:
                    message           = "You accidently bring a computer virus back to the ship.\r\nIt damages the sensors before being nuetralized, scanner range decreased 40%!";
                    Player.LongRange -= (int)(Player.LongRange * 0.40);
                    break;

                case 2:
                    message           = "An automated defensive system hacker the computer and uploads a virus.\r\nDamage to the sensors reduces range by 25%!";
                    Player.LongRange -= (int)(Player.LongRange * 0.25);
                    break;

                case 3:
                    message = "Several crew men are exposed to ERL,\r\nluckily quarantine procedures worked and the mission is not harmed.";
                    break;

                case 4:
                    message       = "Due to a quarantine failure the entire crew has been exposed to a new strain of ERL.\r\nThe entire crew eventually dies.\r\nYou’ve failed and humanity has been completely whipped out.";
                    Game1.Failure = true;
                    break;

                case 5:
                    message       = "You discover that the planet was suffering from ERL too.\r\nAstoundingly, they managed to study the disease for two CENTRIES before succumbing!\r\nTheir treatments will slow the progress of the disease tremendously and save billions of lives.\r\nCongratulations, the mission is a success.  You are a hero.\r\nHumanity learns to manage the disease and eventually after fourteen centuries develops a cure.\r\n\r\nIts origins still remain a mystery.";
                    Game1.Success = true;
                    break;
                }
                FadeMessageManager.Show(message);
            }

            EncounterManager.EncounterActive = false;

            BaseSprite.TintColor = Color.Gray;

            Encounter = false;
        }
        private void RestartGame()
        {
            int startX = Random.Next(Convert.ToInt32(TileMap.MapWidth * 0.4), Convert.ToInt32(TileMap.MapWidth * .6));
            int startY = Random.Next(Convert.ToInt32(TileMap.MapHeight * 0.4), Convert.ToInt32(TileMap.MapHeight * .6));

            Player.Initialize(
                spriteSheet,
                new Rectangle(0, 64, 32, 32),
                6,
                new Vector2(startX * TileMap.TileWidth, startY * TileMap.TileHeight)
                );


            Camera.WorldRectangle = new Rectangle(0, 0, TileMap.MapWidth * TileMap.TileWidth, TileMap.MapHeight * TileMap.TileHeight);
            Camera.ViewPortWidth  = 800;
            Camera.ViewPortHeight = 600;
            Camera.Position       = new Vector2(startX * TileMap.TileWidth - Camera.ViewPortWidth / 2, startY * TileMap.TileHeight - Camera.ViewPortHeight / 2);

            TileMap.Initialize(spriteSheet);

            EncounterManager.EncounterActive = false;
            FadeMessageManager.Show("Good Luck Captain!  All of humanity is with you.");
        }