Beispiel #1
0
 public static void DepthIndicator(int depth)
 {
     if (depth <= 10)
     {
         Coloring.SurfaceColor();
     }
     else if (depth <= 50 && depth > 10)
     {
         Coloring.SoilColor();
     }
     else if (depth <= 100 && depth > 50)
     {
         Coloring.CrustColor();
     }
     else if (depth <= 200 && depth > 100)
     {
         Coloring.UpperMantleColor();
     }
     else if (depth <= 300 && depth > 200)
     {
         Coloring.LowerMantleColor();
     }
     else if (depth <= 400 && depth > 300)
     {
         Coloring.OuterCoreColor();
     }
     else if (depth <= 500 && depth > 400)
     {
         Coloring.InnerCoreColor();
     }
 }
Beispiel #2
0
        public static void IntroScreenText()
        {
            string[] introbox = new string[]
            {
                @"[]+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+[]",
                @"+|             _____                                                                        __                       |+",
                @"%|            |     \                                                                      |  \                      |%",
                @"+|             \$$$$$  ______   __    __   ______   _______    ______   __    __          _| $$_     ______          |+",
                @"%|               | $$ /      \ |  \  |  \ /      \ |       \  /      \ |  \  |  \        |   $$ \   /      \         |%",
                @"+|          __   | $$|  $$$$$$\| $$  | $$|  $$$$$$\| $$$$$$$\|  $$$$$$\| $$  | $$         \$$$$$$  |  $$$$$$\        |+",
                @"%|         |  \  | $$| $$  | $$| $$  | $$| $$   \$$| $$  | $$| $$    $$| $$  | $$          | $$ __ | $$  | $$        |%",
                @"+|         | $$__| $$| $$__/ $$| $$__/ $$| $$      | $$  | $$| $$$$$$$$| $$__/ $$          | $$|  \| $$__/ $$        |+",
                @"%|          \$$    $$ \$$    $$ \$$    $$| $$      | $$  | $$ \$$     \ \$$    $$           \$$  $$ \$$    $$        |%",
                @"+|           \$$$$$$   \$$$$$$   \$$$$$$  \$$       \$$   \$$  \$$$$$$$ _\$$$$$$$            \$$$$   \$$$$$$         |+",
                @"%|                                                                     |  \__| $$                                    |%",
                @"+|                                                                      \$$    $$                                    |+",
                @"%|                                                                       \$$$$$$                                     |%",
                @"+|                                 _______             __                          __                                |+",
                @"%|                                |       \           |  \                        |  \                               |%",
                @"+|                                | $$$$$$$\  ______  | $$  ______   __   __   __ | $$                               |+",
                @"%|                                | $$__/ $$ /      \ | $$ /      \ |  \ |  \ |  \| $$                               |%",
                @"+|                                | $$    $$|  $$$$$$\| $$|  $$$$$$\| $$ | $$ | $$| $$                               |+",
                @"%|                                | $$$$$$$\| $$    $$| $$| $$  | $$| $$ | $$ | $$ \$$                               |%",
                @"+|                                | $$$$$$$\| $$    $$| $$| $$  | $$| $$ | $$ | $$ \$$                               |+",
                @"%|                                | $$__/ $$| $$$$$$$$| $$| $$__/ $$| $$_/ $$_/ $$ __                                |%",
                @"+|                                | $$    $$ \$$     \| $$ \$$    $$ \$$   $$   $$|  \                               |+",
                @"%|                                 \$$$$$$$   \$$$$$$$ \$$  \$$$$$$   \$$$$$\$$$$  \$$                               |%",
                @"+|                                                                                                                   |+",
                @"%|         Good morning Captain! You have been selected to lead an expedition to the center of the earth!            |%",
                @"+|      Your crew is the best of the best, but drilling is hard work, and there’s not a lot of room in there.        |+",
                @"%|       You must balance the needs of your crew with the maintenance of your craft else you’ll never reach          |%",
                @"+|                                                the center of the Earth!                                           |+",
                @"[]+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+%+[]"
            };
            Console.SetWindowSize(120, 30);
            Console.CursorVisible = false;
            Console.SetCursorPosition(0, 0);

            Debug.WriteLine($"Intro screen width:{Console.WindowWidth}");
            Debug.WriteLine($"Intro screen height:{Console.WindowHeight}");

            Coloring.IntroGradientColor(introbox);
            Thread.Sleep(10_000); //5 seconds

            Debug.WriteLine($"text color before reset:{Console.ForegroundColor}");

            Console.ReplaceAllColorsWithDefaults();
            Console.Clear();

            Debug.WriteLine($"text color after reset:{Console.ForegroundColor}");
        }
        public void DriveDrill()//takes input, validates it, and calls the correct method
        {
            Coloring.DepthIndicator(Depth);
            CrewStatus();
            var comparison = ValidKeyPress();

            if (comparison == ConsoleKey.D)
            {
                Debug.WriteLine($"Dig down happened, Depth is {Depth}");
                Event();
            }
            else if (comparison == ConsoleKey.S)
            {
                if (ValidHeal())
                {
                    UseHealthKit();
                }
                else
                {
                    Console.WriteLine("You don't have any health kits remaining."); Thread.Sleep(2_000);
                }
                Debug.WriteLine($"Heal happened, heal kits is {HealKits}");
            }
            else if (comparison == ConsoleKey.F)
            {
                if (ValidFix())
                {
                    UseRepairKit();
                }
                else
                {
                    Console.WriteLine("You don't have any repair kits remaining."); Thread.Sleep(2_000);
                }
                Debug.WriteLine($"Fix happened, repair kits is {RepairKits}");
            }
            else
            {
                Console.WriteLine("whoops this line shouldn't be displayed");
            }
            DriveDrill();
        }
Beispiel #4
0
        public static Drill PlayerSetup()
        {
            Coloring.PaperworkColor();
            Console.CursorVisible = true;
            Console.WriteLine("Hello Captain! It seems we mis-placed the paperwork. What is your first name?\n");
            string firstName = NameValidation();

            Console.WriteLine($"Ok, so your first name is {firstName}! Sorry I am new here what was your last name again?\n");
            string lastName = NameValidation();

            Console.WriteLine($"OHHHH!! You are {firstName} {lastName}! It is a pleasure to meet you.\n");
            int crewSize = CrewSizeValidation();

            Console.WriteLine($"Ahh yes! Now I found you! Captain {firstName} {lastName}, total crew of {crewSize}.\n\nGive me a second and I will grab your crew roster.\n");
            Sounds.Printer();
            Console.WriteLine($"It looks like eveyone is ready to go and already waiting for you in the drill.\n\n" +
                              $"Some of your crew is a little quirky but just like you they went through a drill development apprenticeship,\nso you should be fine.\n\nI wish you luck on your journey!");
            CrewPerson player = new CrewPerson(firstName, lastName);
            Drill      drill  = new Drill(player, crewSize);

            Thread.Sleep(8_000);
            return(drill);
        }
        private void Event()// determines where you go
        {
            Random random      = new Random();
            int    eventChance = random.Next(1, 101); //1-101

            //eventChance = 52; //determinism used to test specific events
            if (eventChance <= 65) // triggers maintence issues, some dangerous
            {
                Console.Clear();
                if (eventChance <= 20)//20%
                {
                    Console.WriteLine("You found a very soft pocket of material and went double the speed you expected");
                    DrillDown(20);
                    Thread.Sleep(4_000);
                }
                else if (eventChance <= 50)//30%
                {
                    Console.WriteLine("The engines have stopped.\n\nYou will have to send someone out to repair them.\n\nBe warned it is dangerous out there.\n\n");
                    RepairEngines();
                    Thread.Sleep(4_000);
                }
                else if (eventChance <= 55) //5%
                {
                    Console.WriteLine("You hear the whistle of escaping steam but it is too late a pipe bursts.\n");
                    int i = RandomCrewPerson();
                    CrewPeople[i].Injury();
                    if (CrewPeople[i].Chances == 0)
                    {
                        CrewPeople[i].Death();
                        Console.WriteLine($"{CrewPeople[i].FirstName} died from their injuries");
                        Sounds.DeathScream();
                    }
                    else
                    {
                        Console.WriteLine($"{CrewPeople[i].FirstName} was hit by the blast.\n\nLuckily it wasn't deadly.");
                    }
                    DrillDown();
                    Debug.WriteLine($"{CrewPeople[i].FirstName} is {CrewPeople[i].Dead}");
                    Thread.Sleep(3_000);
                }
                else if (eventChance <= 60) //5%
                {
                    Console.WriteLine("Odd. It felt like you went nowhere. Try digging again.");
                    Thread.Sleep(4_000);
                }
                else if (eventChance <= 65)//5%
                {
                    Console.WriteLine($"You found a way to boost the drill sytem.");
                    DrillDamage(-10);
                    Thread.Sleep(4_000);
                }
                else//0%
                {
                    Console.WriteLine("All operations normal");
                    DrillDown();
                    Thread.Sleep(4_000);
                }
            }
            if (Depth <= 100 && eventChance > 65) // triggers crust level scenarios
            {
                if (!VistedLostCity)
                {
                    if (eventChance > 65 && eventChance <= 85)//Archaeologist
                    {
                        Coloring.LostCityColor();
                        Texts.LostCityText(HaveTrait("Archaeologist"));
                        if (HaveTrait("Archaeologist"))
                        {
                            DrillDamage(-20);
                            DrillDown(40);
                            VistedLostCity = true;
                        }
                        else if (!HaveTrait("Archaeologist"))
                        {
                            DrillDamage(20);
                            DrillDown(20);
                            VistedLostCity = true;
                        }
                    }
                }
                else
                {
                    DrillDown();
                }

                if (!VistedTardisCave)
                {
                    if (eventChance > 85)// doctor
                    {
                        Coloring.TardisCaveColor();
                        Texts.TardisCaveText(HaveTrait("Doctor"));
                        if (HaveTrait("Doctor"))
                        {
                            for (int i = 0; i < CrewPeople.Count; i++)
                            {
                                if (CrewPeople[i].Trait == "Doctor")
                                {
                                    CrewPeople[i].Death();
                                }
                            }
                            DrillDown(60);
                            VistedTardisCave = true;
                        }
                        else if (!HaveTrait("Doctor"))
                        {
                            DrillDown(40);
                            VistedTardisCave = true;
                        }
                    }
                }
                else
                {
                    DrillDown();
                }
            }
            else if (Depth <= 300 && eventChance >= 65) // triggers mantle level scenarios
            {
                if (!VistedCoreMantel)
                {
                    if (eventChance > 65 && eventChance < 77) //geologist
                    {
                        Console.Clear();                      //no custom color for this event
                        Texts.MagmaFlowText(HaveTrait("Geologist"));
                        if (HaveTrait("Geologist"))
                        {
                            DrillDown(150);
                            DrillDamage();
                            VistedCoreMantel = true;
                        }
                        else if (!HaveTrait("Geologist"))
                        {
                            DrillDown(50);
                            DrillDamage(30);
                            VistedCoreMantel = true;
                        }
                    }
                }
                else
                {
                    DrillDown();
                }

                if (!VistedSatan)
                {
                    if (eventChance >= 77 && eventChance <= 88)// priest
                    {
                        Coloring.HeySatanColor();
                        Texts.HeySatanText(HaveTrait("Priest"));
                        if (HaveTrait("Priest"))
                        {
                            DrillDown(50);
                            VistedSatan = true;
                        }
                        else if (!HaveTrait("Priest"))
                        {
                            DrillDamage(30);
                            VistedSatan = true;
                        }
                    }
                }
                else
                {
                    DrillDown();
                }

                if (!VistedDinoDNA)
                {
                    if (eventChance > 88)// dinos
                    {
                        Coloring.DinosaursColor();
                        Texts.DinosaursText(HaveTrait("Paleontologist"));
                        if (HaveTrait("Paleontologist"))
                        {
                            for (int i = 0; i < CrewPeople.Count; i++)
                            {
                                if (CrewPeople[i].Trait == "Paleontologist")
                                {
                                    Sounds.DeathScream();
                                    CrewPeople[i].Death();
                                }
                            }
                            VistedDinoDNA = true;
                        }
                        else if (!HaveTrait("Paleontologist"))
                        {
                            for (int i = 0; i < CrewPeople.Count; i++)
                            {
                                if (CrewPeople[i].Chances == 1 && !CrewPeople[i].Dead)
                                {
                                    CrewPeople[i].Injury(-1);
                                }
                            }
                            DrillDown(20);
                            VistedDinoDNA = true;
                        }
                    }
                }
                else
                {
                    DrillDown();
                }
            }
            else if (Depth > 300 && eventChance >= 65) // triggers core level scenarios
            {
                if (!VistedCthulu)
                {
                    if (eventChance > 65 && eventChance <= 85)//Cthulu
                    {
                        Coloring.HeyCthulhuColor();
                        Texts.HeyCthulhuText(HaveTrait("Priest"));
                        if (HaveTrait("Priest"))
                        {
                            Coloring.YouFreakingSummonedCthulhuColor();
                            Texts.YouFreakingSummonedCthulhuEnding();
                            VistedCthulu = true;
                        }
                        else if (!HaveTrait("Priest"))
                        {
                            DrillDown(40);
                            VistedCthulu = true;
                        }
                    }
                }
                else
                {
                    DrillDown();
                }

                if (!VistedLizardPeeps)
                {
                    if (eventChance > 85) // Lizard Peeps
                    {
                        Coloring.HeyLizardPeepsColor();
                        Texts.HeyLizardPeepsText(HaveTrait("Mechanist"));
                        if (HaveTrait("Mechanist"))
                        {
                            Texts.BowToTheRobotsIMeanLizardsEnding();
                            VistedLizardPeeps = true;
                        }
                        else if (!HaveTrait("Mechanist"))
                        {
                            DrillDown(50);
                            DrillDamage(50);
                            VistedLizardPeeps = true;
                        }
                    }
                }
                else
                {
                    DrillDown();
                }
            }
        }
 private void CrewStatus()// displayed on main screen
 {
     if (Health <= 0)
     {
         if (HaveTrait("Brave"))
         {
             for (int i = 0; i < CrewPeople.Count; i++)
             {
                 if (CrewPeople[i].Trait == "Brave")
                 {
                     Console.WriteLine($"{CrewPeople[i].FirstName} sacrifices themselves to perform a last minute fix.\n\n" +
                                       $"The drill manages to not explode.\n\n" +
                                       $"Their bravery will hopefully live on through us.");
                     DrillDamage(-30);
                     Sounds.DeathScream();
                     CrewPeople[i].Death();
                     Thread.Sleep(5_000);
                     Console.Clear();
                 }
             }
         }
         else
         {
             Texts.DrillHealthDepletedEnding();
             Sounds.DeathScream();
         }
     }
     else if (AreAllDeadValidation())
     {
         Coloring.CrewAllDeadColor();
         Texts.CrewAllDeadEnding();
     }
     else if (Depth > 490)
     {
         Coloring.AtTheCenterColor();
         Texts.AtTheCenterEnding();
     }
     Console.Clear();
     Console.WriteLine($"{Player.FirstName} \"The {Player.Trait}\" {Player.LastName}\n");
     Texts.DrillApperanceText(this.Health);
     Texts.KitInventoryText(this.HealKits, this.RepairKits);
     for (int i = 0; i < CrewSize - 1; i++)
     {
         char healthSymbol = '*';
         if (CrewPeople[i].Chances > 1)
         {
             healthSymbol = ')';
         }
         else if (CrewPeople[i].Chances == 1)
         {
             healthSymbol = '(';
         }
         else if (CrewPeople[i].Chances < 1)
         {
             CrewPeople[i].Death();
             healthSymbol = 'X';
         }
         Console.WriteLine($"{i + 1}. :{healthSymbol} - {CrewPeople[i].FirstName} \"The {CrewPeople[i].Trait}\" {CrewPeople[i].LastName}\n");
     }
     Console.WriteLine($"To drill down press the \"d\" key\n" +
                       $"To heal push \"s\"\n" +
                       $"To fix the drill push \"f\"\n");
 }