예제 #1
0
 static void Main(string[] args)
 {
     while (true)
     {
         gameMenu();
         firstChapter();
         Encounters.firstEncounter();
         Player.playerStats();
         secondChapter();
         Player.playerStats();
         thirdChapter();
         Player.playerStats();
         fourthChapter();
         Player.playerStats();
         fifthChapter();
     }
 }
예제 #2
0
        public static void fifthChapter()
        {
            string    choice;
            Adventure adventuresDescription = jsonReader();

            Console.WriteLine($"{adventuresDescription.fifthChapterDescription}");
            choice = Console.ReadLine().ToLower();
            Console.Clear();

            switch (choice)
            {
            case "1":
                Console.WriteLine("");
                Console.WriteLine("You feel weak and little dizzy...");
                firstChapter();
                break;

            case "2":
                Encounters.sergeEncounter();
                if (Program.currentPlayer.health <= 0)
                {
                    //Player is dead
                    Console.ReadLine();
                    Console.Clear();
                    Console.WriteLine($"{adventuresDescription.playerIsDead}");
                    Console.ReadKey();
                    Program.gameOver();
                }
                else
                {
                    youWin();
                }
                break;

            case "3":
                Console.WriteLine("You tourned the door handle and in the same time you felt like thousand little nedles");
                Console.WriteLine("Poisoned darts fly out of the walls...");
                gameOver();
                break;

            default:
                Console.WriteLine("I do not understand this command...");
                break;
            }
        }
예제 #3
0
        public static void secondChapter()
        {
            string    choice, secondChoice;
            Adventure adventuresDescription = jsonReader();

            Console.WriteLine($"{adventuresDescription.secondChapterDescription}");
            choice = Console.ReadLine().ToLower();
            Console.Clear();

            switch (choice)
            {
            case "y":
            case "yes":
                do
                {
                    Console.WriteLine($"{adventuresDescription.secondChapterRiddle}");
                    secondChoice = Console.ReadLine().ToLower();
                    Console.Clear();
                    switch (secondChoice)
                    {
                    case "w":
                    case "wisdom":
                        Console.WriteLine("");
                        Console.WriteLine("No, try again...");
                        Console.ReadLine();
                        Console.Clear();
                        break;

                    case "h":
                    case "happiness":
                        Console.WriteLine("");
                        Console.WriteLine("No, try again...");
                        Console.ReadLine();
                        Console.Clear();
                        break;

                    case "p":
                    case "patience":
                        Console.WriteLine("");
                        Console.WriteLine("No, try again...");
                        Console.ReadLine();
                        Console.Clear();
                        break;

                    case "m":
                    case "meeknes":
                        Console.WriteLine($"{adventuresDescription.secondChapterPropAnswer}");
                        Program.currentPlayer.health += 2;
                        Console.ReadLine();
                        Console.Clear();
                        Player.playerStats();
                        asciiDoor();
                        Console.ReadLine();
                        Console.Clear();
                        Encounters.basicEncounter();
                        break;
                    }
                } while (secondChoice != "m");

                break;

            case "n":
            case "no":
                Encounters.basicEncounter();
                break;

            default:
                Console.WriteLine("If you cannot press the button proper I am pretty sure you cannot solve my riddle!");
                gameOver();
                break;
            }
        }