Ejemplo n.º 1
0
        // static Player PlayerSetup()
        // {
        //     Color.Green("Hey what's yer name anyway?");
        //     Color.Yellow("Type yer name below!");

        //     string name = Console.ReadLine();
        //     string choice = "";

        //     Color.Green($"{name}? Weird name but what do I know? My son's named Umami!");
        //     Color.Blue("A jolly burst of laughter echoes through the room. It wasn't that funny.");
        //     Color.Green("What kinda Timenaut are ye? There's only one answer right now.");
        //     while(choice !="1" && choice != "2"){
        //         Color.Yellow("1. Time-Knight \n2.You better not");
        //         choice = Console.ReadLine();
        //     }

        //     switch (choice)
        //     {
        //         case ("1"):
        //             Color.Green("Ah, yer a TIME KNIGHT!");
        //             Knight knight = new Knight (name);
        //             return knight;
        //         case ("2"):
        //             Color.Green("Yer a jerk.");
        //             Knight knight2 = new Knight(name);
        //             return knight2;
        //     }
        //             // Knight knight = new Knight (name);
        //             // return knight;
        //     return null;
        // }

        // static void StartGame (Player player) {

        // }

        static void StartGame()
        {
            Color.Blue("You're a newly minted Time Thief, having just passed your initiation into the Time Mafia. \nIt's your job to go throughout history to get important artifacts for the Time Godfather.");
            // Color.Yellow("select 1");
            Pause.Enter();
            Color.Green("Ah there ye argh! Yer Late!");
            Question.FirstQ();
            // Pause.Enter();
            Player player = PlayerSetup.Setup();

            Color.Green("The first mission we got is fer ye is ta go get King Arthur's Sword, Excalibur from jolly ol' medieval England!");
            Pause.Enter();
            Color.Blue("You hop in your new time machine, that the time mafia provided with time mafia money\n and just like that you're off to old England.");
            Pause.Enter();
            Color.Green("BZZZZZZZZZZZZZZZZZZZZZZ");
            Color.Yellow("BZZZZZZZZZZZZZZZZZZZZZZ");
            Color.Red("BZZZZZZZZZZZZZZZZZZZZZZ");
            Color.Blue("And just like that you're in medieval times");
            Pause.Enter();
            Color.Blue("Looking around you realize that you've materialized in the middle of stonehenge. It turns out that this is what it was for all along.\nIn the distance you notice a gathering of knights around what appears to be a giraffe.");
            Pause.Enter("Press Enter to Approach");
            Color.Blue("You run down the hill to reach the gathering of knights.\nThey are surrouned in a circle. A round circle. Like a table.\nYou were right before, they were standing around a Giraffe. A voice cries out\nOi! Wot are YEE dewen 'ere!");
            Color.Green("Whoops lad ye fergot to turn on yer translator!");
            Pause.Enter("Press Enter to turn on your translator");
            Color.Blue("'Excuse me what are you doing here?' A short but handsome man riding a white horse bearing a nametag that says 'King Arthur' on it.");
            Pause.Enter("Press Enter to say 'Don't worry about it, man, just pretend I'm not here.'");
            Color.Blue("I'm sorry I don't understand your accent");
            Color.Green("NOW LAD! WHILE HE'S CONFUSED!");
            Pause.Enter("Press Enter to attack while he's confused");
            Battle.First(player);
            Sword excal = new Sword();

            player.Inventory.Add(excal);
            Console.WriteLine();
            //start battle against arthur
        }
Ejemplo n.º 2
0
        public static void First(Player player)
        {
            // player.CurrentWeapon =0;
            // player.CurrentWeapon = 1;/
            Arthur art = new Arthur();

            Color.Red("########## TIME FOR BATTLE! ###########");
            while (art.Health > 0 && player.Health > 0)
            {
                Weapon selectedWeapon = player.Inventory[Int32.Parse(player.CurrentWeapon) - 1];
                void ChooseWeapon()
                {
                    selectedWeapon = player.Inventory[Int32.Parse(player.CurrentWeapon) - 1];
                    Color.Blue($"Equipped Weapon: {selectedWeapon.Name}");
                }

                // ChooseWeapon();
                //enemy
                Color.Red("==========Enemy==========");
                Color.RedWord("||");
                Color.EnemyName($" {art.Name.ToUpper()} ");
                Color.RedWord("|| HP:");
                Color.GreenWord($"{art.Health}");
                Color.Red("||");
                Color.Red("==========================");

                Color.BlueWord("==========");
                Color.CyanWord("Player");
                Color.Blue("==========");
                Color.BlueWord("||");
                Color.PlayerName($" {player.Name.ToUpper()} ");
                Color.BlueWord("|| HP:");
                Color.GreenWord($"{player.Health}");
                Color.Blue("||");
                Color.BlueWord("|++++++");
                Color.CyanWord("Inventory");
                Color.Blue("++++++|");
                // Color.Red ($"{selectedWeapon}");
                foreach (Weapon item in player.Inventory)
                {
                    Color.BlueWord("|+");

                    if (selectedWeapon == item)
                    {
                        Color.YellowWord($"{item.Name}");
                    }
                    else
                    {
                        Color.CyanWord($"{item.Name}");
                    }
                    Color.Blue("+|");
                }
                Color.Blue("==========================");

                Color.Yellow("What will you do?");

                string choice = "";

                //BATTLE
                bool endTurn = true; //decides if an action lets the enemy hit the player
                void Fight()
                {
                    endTurn = true;
                    while (choice == "")
                    {
                        Color.Yellow("1.Attack\n2.Boost Strength\n3.Use Weapon\n4.Switch Weapon");
                        choice = Console.ReadLine();
                    }

                    //BATTLE CONTROLS
                    string c1 = "";

                    switch (choice)
                    {
                    case ("1"):
                        player.Attack(art);
                        Color.Green("YA GOT HIM!");
                        Color.Blue($"WHAM! You punch King Arthur right in his smug face for {player.Strength} damage!");
                        break;

                    case ("2"):
                        Color.Blue($"{player.Name} boosted their strength from {player.Strength}to {player.Strength+5}");
                        player.SpecialMove(art);
                        break;

                    case ("3"):
                        // Color.Blue("you dont know what that is");
                        player.Inventory[Int32.Parse(player.CurrentWeapon) - 1].Use(player, art);
                        break;

                    case ("4"):
                        int i = 1;
                        // string c2 = "";
                        //
                        endTurn = false;
                        Color.Yellow($"Current Weapon = {selectedWeapon.Name}");
                        Color.Red("hitting 4");
                        foreach (Weapon item in player.Inventory)
                        {
                            Color.Yellow($"{i}. {item.Name}");
                            i++;
                        }

                        c1 = Console.ReadLine();
                        player.CurrentWeapon = c1;
                        ChooseWeapon();
                        break;
                    }
                }

                Fight();
                if (endTurn == true)
                {
                    art.Attack(player);
                }
            }
            Color.Blue("%%%%%%%%%% V I C T O R Y %%%%%%%%%%%%%%");
            Color.Red("'Ow, fine I give up!' Said King Arthur, still reeling from getting his world rocked by your fists.\n'Here, TAKE Excalibur, I didn't want to be king anyway'");
            Pause.Enter();
            Color.Blue("King Arthur hands you Excalibur");
            Color.Green("YA DID IT MATEY!");
        }