Beispiel #1
0
        public static void Armor(ICharacters character, List <CreatingItems> buildingitems, int wynik)
        {
            switch (wynik)
            {
            case 1:
            {
                CreatingItems one = buildingitems[0];
                if (character.Durability >= one.Required)
                {
                    if (one.Price <= character.Money)
                    {
                        character.HeldArmor += one.Max;
                        character.Money     -= one.Price;
                        Console.WriteLine("You have: " + character.Money + " money and your armour increase to: " + character.Armor);
                        Thread.Sleep(750);
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                    else
                    {
                        Console.WriteLine("You dont have enought money!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                else
                {
                    Console.WriteLine("You don't have enought Strength:( ");
                    BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                }

                break;
            }

            case 2:
            {
                CreatingItems one = buildingitems[1];
                if (character.Durability >= one.Required)
                {
                    if (one.Price <= character.Money)
                    {
                        character.HeldArmor += one.Max;
                        character.Money     -= one.Price;
                        Console.WriteLine("You have: " + character.Money + " money and your armour increase to: " + character.Armor);
                        Thread.Sleep(750);
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                    else
                    {
                        Console.WriteLine("You dont have enought money!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                else
                {
                    Console.WriteLine("You don't have enought Strength:( ");
                    BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                }
                break;
            }

            case 3:
            {
                CreatingItems one = buildingitems[2];
                if (character.Durability >= one.Required)
                {
                    if (one.Price <= character.Money)
                    {
                        character.HeldArmor += one.Max;
                        character.Money     -= one.Price;
                        Console.WriteLine("You have: " + character.Money + " money and your armour increase to: " + character.Armor);
                        Thread.Sleep(750);
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                    else
                    {
                        Console.WriteLine("You dont have enought money!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                else
                {
                    Console.WriteLine("You don't have enought Strength:( ");
                    BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                }
                break;
            }

            case 4:
            {
                CreatingItems one = buildingitems[3];
                if (character.Durability >= one.Required)
                {
                    if (one.Price <= character.Money)
                    {
                        character.HeldArmor += one.Max;
                        character.Money     -= one.Price;
                        Console.WriteLine("You have: " + character.Money + " money and your armour increase to: " + character.Armor);
                        Thread.Sleep(750);
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                    else
                    {
                        Console.WriteLine("You dont have enought money!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                else
                {
                    Console.WriteLine("You don't have enought Strength:( ");
                    BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                }
                break;
            }

            default:
            {
                Console.WriteLine("Wrong Number!");
                BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                break;
            }
            }
        }
Beispiel #2
0
        public static void Item(ICharacters character, List <CreatingItems> buildingitems, int wynik)
        {
            switch (wynik)
            {
            case 1:
            {
                CreatingItems one = buildingitems[0];
                if (character.Alchemics >= one.RequiredLevel)
                {
                    if (character.ListOfItems.Count < 4)
                    {
                        if (one.Price <= character.Money)
                        {
                            character.Money -= one.Price;
                            character.ListOfItems.Add(one.Max);

                            Console.WriteLine("You add to your items health! Now you can use it at attack.");
                            Thread.Sleep(750);
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                        else
                        {
                            Console.WriteLine("You dont have enought money!");
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                    }
                    else
                    {
                        Console.WriteLine("Too many health items! You can own only 4 items!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                else
                {
                    Console.WriteLine("You don't have required Strength!");
                }
                break;
            }

            case 2:
            {
                CreatingItems one = buildingitems[1];
                if (character.Alchemics >= one.RequiredLevel)
                {
                    if (character.ListOfItems.Count < 4)
                    {
                        if (one.Price <= character.Money)
                        {
                            character.Money -= one.Price;
                            character.ListOfItems.Add(one.Max);
                            Console.WriteLine("You add to your items health! Now you can use it at attack.");
                            Thread.Sleep(750);
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                        else
                        {
                            Console.WriteLine("You dont have enought money!");
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                    }
                    else
                    {
                        Console.WriteLine("Too many health items! You can own only 4 items!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                break;
            }

            case 3:
            {
                CreatingItems one = buildingitems[2];
                if (character.Alchemics >= one.RequiredLevel)
                {
                    if (character.ListOfItems.Count < 4)
                    {
                        if (one.Price <= character.Money)
                        {
                            character.Money -= one.Price;
                            character.ListOfItems.Add(one.Max);

                            Console.WriteLine("You add to your items health! Now you can use it at attack.");
                            Thread.Sleep(750);
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                        else
                        {
                            Console.WriteLine("You dont have enought money!");
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                    }
                    else
                    {
                        Console.WriteLine("Too many health items! You can own only 4 items!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                break;
            }

            case 4:
            {
                CreatingItems one = buildingitems[3];
                if (character.Alchemics >= one.RequiredLevel)
                {
                    if (character.ListOfItems.Count < 4)
                    {
                        if (one.Price <= character.Money)
                        {
                            character.Money -= one.Price;
                            character.ListOfItems.Add(one.Max);

                            Console.WriteLine("You add to your items health! Now you can use it at attack.");
                            Thread.Sleep(750);
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                        else
                        {
                            Console.WriteLine("You dont have enought money!");
                            BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                        }
                    }
                    else
                    {
                        Console.WriteLine("Too many health items! You can own only 4 items!");
                        BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                    }
                }
                break;
            }

            default:
            {
                Console.WriteLine("Wrong Number!");
                BuildingPurchase.Buying(OnInputWork.MovingOnMapHandler(), character);
                break;
            }
            }
        }
Beispiel #3
0
        public static void ChangeGraphics()
        {
            Console.Clear();
            Console.WriteLine("Change the graphics: ");
            Console.WriteLine("1. Minimum Quality");
            Console.WriteLine("2. Medium Quality");
            Console.WriteLine("3. Max Quality");
            Console.WriteLine("4. Back");

            int choice = OnInputWork.ChoiceHandler();

            switch (choice)
            {
            case 1:
            {
                Console.Clear();
                Console.WriteLine("Ehh.. so now you can see how good is your computer :) ");
                Thread.Sleep(3000);
                Console.Clear();
                Options.Changes();
                break;
            }

            case 2:
            {
                Console.Clear();
                Console.WriteLine("This graphics is too advanced for your computer :(");
upper:
                Console.WriteLine("1.Back and set another graphics");
                int choice2 = OnInputWork.ChoiceHandler();

                if (choice2 == 1)
                {
                    Graphics.ChangeGraphics();
                }
                else
                {
                    Console.WriteLine("Write correct number!");
                    Thread.Sleep(750);
                    Console.Clear();
                    goto upper;
                }
                break;
            }

            case 3:
            {
                Console.Clear();
                Console.WriteLine("Your Computer is too shity :(");
upper:
                Console.WriteLine("1.Back and set another graphics");
                int choice2 = OnInputWork.ChoiceHandler();

                if (choice2 == 1)
                {
                    Graphics.ChangeGraphics();
                }
                else
                {
                    Console.WriteLine("Write correct number!");
                    Thread.Sleep(750);
                    Console.Clear();
                    goto upper;
                }
                break;
            }

            case 4:
            {
                Console.Clear();
                GameInvocation.OptionsSelector();
                break;
            }

            default:
            {
                Console.Clear();
                Console.WriteLine("Wrong number try again");
                Thread.Sleep(750);
                Console.Clear();
                Graphics.ChangeGraphics();
                break;
            }
            }
        }