Пример #1
0
        //for regular blow for blow battles
        public static void RegularFight(LilCleetus lilCleet, IAdversary bloke)
        {
            Console.WriteLine($"You've been confronted with {bloke.Name}, they don't look friendly");
            bool isRunning = true;

            while (isRunning)
            {
                Console.WriteLine($"You have {lilCleet.Health} health");
                Console.WriteLine("What would you like to do?\n" +
                                  "\n1. Attack that sucka" +
                                  "\n2. Let's get out of here (run)");

                string response = Console.ReadLine();

                int yourDamage  = 0;
                int theirDamage = 0;

                if (response == "1")
                {
                    //damage is calculated here for
                    yourDamage  = lilCleet.Attack();
                    theirDamage = bloke.Attack();
                }
                else if (response == "2")
                {
                    //you get a %50 chance to run.
                    Random r         = new Random();
                    int    flipACoin = r.Next(1, 3);
                    if (flipACoin == 2)
                    {
                        Console.WriteLine("If you want to run so much, learn to run.");
                        yourDamage  = 0;
                        theirDamage = bloke.Attack();
                    }
                    else
                    {
                        Console.WriteLine("You got away!");
                        isRunning = false;
                        break;
                    }
                }
                else
                {
                    Console.WriteLine("Enter a number 1 or 2 please thaaaaaanks.");
                    Console.ReadKey();
                }

                Console.WriteLine($"You did {yourDamage.ToString()}\n" +
                                  $"{bloke.Name} did {theirDamage.ToString()}");
                //take any damage away.
                lilCleet.Health -= theirDamage;
                bloke.Health    -= yourDamage;

                if (lilCleet.Health <= 0 || bloke.Health <= 0)
                {
                    if (lilCleet.Health <= 0)
                    {
                        Console.WriteLine("Dang it ya died!");
                    }
                    else
                    {
                        Console.WriteLine($"{bloke.Name} fell to his knees, staring longingly at the setting sun and dies peacefully");
                    }
                    isRunning = false;
                    break;
                }

                ConsoleStuff.Break();
            }
        }
Пример #2
0
        public static LilCleetus GetWoke(LilCleetus lil)
        {
            string playerChoice;

            Buff maskBuff       = new Buff("Health", 2);
            Buff sunglassesBuff = new Buff("Attitude", 1);

            List <Buff> maskBuffs = new List <Buff>()
            {
                maskBuff
            };
            List <Buff> sunglassesBuffs = new List <Buff>()
            {
                sunglassesBuff
            };

            //descriptions
            string maskDes     = "Nothing that cool about the mask other than the fangs you drew on it.";
            string sunglassDes = "Awesome pre-rag sunglasses that only have a few scratches on them.";

            Item mask       = new Item("Face Mask", maskDes, false, maskBuffs);
            Item sunglasses = new Item("Cool Sunglasses", sunglassDes, false, sunglassesBuffs);

            //for checking if actions were made or not
            bool didLookUnderNews = false;
            bool didLookInMirror  = false;
            bool didCheckCloset   = false;

            while (true)
            {
                Console.Clear();
                Console.WriteLine("The morning has not been kind, You lack purpose and direction. You know you need to get outside. " +
                                  "You need a mask and some cool sunglasses. " +
                                  "\nThere is a dusty looking newspaper on the foot of your bed." +
                                  "\nThere is mirror hanging from your sick mounted moose antlers." +
                                  "\nThere is are snores coming from the closet" +
                                  "\nOne thing you know is that you arent going outside without looking rad. Also you'd probably expire." +
                                  "\nWhat would you like to do?");
                if (!didLookUnderNews)
                {
                    Console.WriteLine("\n1. Read Newspaper");
                }
                if (!didLookInMirror)
                {
                    Console.WriteLine("\n2. Check the mirror for good looks.");
                }
                if (!didCheckCloset)
                {
                    Console.WriteLine("\n3. Investigate snores.");
                }
                Console.WriteLine("\n4. Go outside.");
                Console.WriteLine("Enter the number of the choice you'd like to make");

                playerChoice = Console.ReadLine();

                switch (playerChoice)
                {
                case "1":
                    if (didLookUnderNews)
                    {
                        Console.WriteLine("The newspaper was old and depricated. It is no more.");
                    }
                    else
                    {
                        Console.WriteLine("You check the newspaper, the front page reads: \"Fenrir devours another small Michigan town\"" +
                                          "Where the newspaper was, you find an awesome mask!");
                        lil.ItemBag.Add(mask);
                        didLookUnderNews = true;
                    }
                    break;

                case "2":
                    if (didLookInMirror)
                    {
                        Console.WriteLine("Yup, still freaking gorgeous");
                    }
                    else
                    {
                        Console.WriteLine("You look in the mirror, ignoring the backs under your eyes, you notice " +
                                          "you slept with your sunglasses on your head again. Better pop those on your peepers.");
                        lil.ItemBag.Add(sunglasses);
                        didLookInMirror = true;
                    }
                    break;

                case "3":
                    if (didCheckCloset)
                    {
                        Console.WriteLine("Flufflze needs his damn rest.");
                    }
                    else
                    {
                        Console.WriteLine("The snores get only louder as you approach. You hesitate but slowly open the door" +
                                          "\nto reveal your lil pet hampster \"Flufflez\", \"hey buddy!\" you say as you give him a couple of head scratches");
                        didCheckCloset = true;
                    }
                    break;

                case "4":
                    bool response = true;
                    if (!didLookUnderNews && !didLookInMirror)
                    {
                        response = ConsoleStuff.YesOrNo("You are incredibly unprepared, do you still want to roll the dice? One wink from Odin and you'd be toast.");
                    }
                    else if (!didLookInMirror)
                    {
                        response = ConsoleStuff.YesOrNo("You didn't do your morning tick check, are you sure you would like to continue?");
                    }
                    else if (!didLookUnderNews)
                    {
                        response = ConsoleStuff.YesOrNo("That newspaper may be old but what if you missed a sweet Marmaduke comic, are you sure?");
                    }
                    else
                    {
                        Console.WriteLine("You look awesome, you feel awesome, time to head outside!");
                        break;
                    }

                    if (response)
                    {
                        Console.WriteLine("Odin's horse's sixth leg, I tried to warn you.\n The sunlight beams through the few thin layers of atmosphere that are left" +
                                          " and burns out your eyes.\n You wander the wasteland as a blind beggar for the rest of your surprisingly not terrible days." +
                                          "\nYeah you could have had pretty sweet adventure if you hadn't lost your vision, but Ol Lil Cleetus just turns the page...");
                    }
                    break;

                default:
                    Console.WriteLine("Please enter a number 1-4.");
                    break;
                }

                if (didLookUnderNews && didLookInMirror)
                {
                    break;
                }
                else
                {
                    Console.WriteLine("You have all the things you need for basic survival: Peeper cover, slop hole cover. " +
                                      "\nTime to see if the unforgiving world has any forgiveness...");
                    ConsoleStuff.Break();
                    continue;
                }
            }

            return(lil);
        }