Пример #1
0
        public static void Choice(ICharacters character)
        {
            Console.Clear();
            Console.WriteLine("You have: ");
            ChangeNumbersToPlus.Durability(character);
            ChangeNumbersToPlus.Intelligence(character);
            ChangeNumbersToPlus.Skill(character);
            ChangeNumbersToPlus.Strength(character);
            Console.WriteLine("Do you want to do Sometching else? You have: " + character.AmountOfAtributes + " atributes to allocate");
            Console.WriteLine("1.Decrease mode");
            Console.WriteLine("2.Increase mode");
            Console.WriteLine("3.GO TO MAP");
            int choice = OnInputWork.ChoiceHandler();

            switch (choice)
            {
            case 1:
            {
                Decrease.DecreaseAtribute(character);
                break;
            }

            case 2:
            {
                Increase.Add(character);
                break;
            }

            case 3:
            {
                if (character.AmountOfAtributes == 0)
                {
                    Console.Clear();
                    Console.WriteLine("Are you sure? You couldn't go back from there");
                    Console.WriteLine("Click Y if yes N to go back");
                    string Map = Console.ReadLine();
                    Map = Map.ToUpper();
                    if (Map == "Y")
                    {
                        CityMap.ShowMap(character);
                    }
                    else if (Map == "N")
                    {
                        MoreOnChoices.Choice(character);
                    }
                    else
                    {
                        Console.Clear();
                        Console.WriteLine("Wrong Letter. Try Again");
                        MoreOnChoices.Choice(character);
                    }
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("You couldn't go to arena. You have: " + character.AmountOfAtributes + " atributes to allocate!");
                    Thread.Sleep(1500);
                    MoreOnChoices.Choice(character);
                }


                break;
            }

            default:
            {
                Console.Clear();
                Console.WriteLine("Wrong number try again");
                Thread.Sleep(750);
                Console.Clear();
                CreationACharacter.Choice(character);
                break;
            }
            }
        }
Пример #2
0
        public static void DecreaseAtribute(ICharacters character)
        {
Again:
            Console.Clear();
            Console.WriteLine("You Have: ");
            ChangeNumbersToPlus.Durability(character);
            ChangeNumbersToPlus.Intelligence(character);
            ChangeNumbersToPlus.Skill(character);
            ChangeNumbersToPlus.Strength(character);
            Console.WriteLine("What atribute would you like to decrease?");
            int Where = OnInputWork.ChoiceHandler();

            switch (Where)
            {
            case 1:
            {
                Console.WriteLine("Write how many atributes do you want to remove:");
                int NumberOfEnter1;
                Int32.TryParse(Console.ReadLine(), out NumberOfEnter1);
                if (NumberOfEnter1 <= character.Durability)
                {
                    character.Durability -= NumberOfEnter1;
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Too big number!");
                    Thread.Sleep(750);
                    Console.Clear();
                    goto Again;
                }
                character.AmountOfAtributes = character.AmountOfAtributes + NumberOfEnter1;
                MoreOnChoices.Choice(character);
                break;
            }

            case 2:
            {
                Console.WriteLine("Write how many atributes do you want to remove: ");
                int NumberOfEnter2;
                Int32.TryParse(Console.ReadLine(), out NumberOfEnter2);
                if (NumberOfEnter2 <= character.Intelligence)
                {
                    character.Intelligence -= NumberOfEnter2;
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Too big number!");
                    Thread.Sleep(750);
                    Console.Clear();
                    goto Again;
                }

                character.AmountOfAtributes = character.AmountOfAtributes + NumberOfEnter2;
                MoreOnChoices.Choice(character);
                break;
            }

            case 3:
            {
                Console.WriteLine("Write how many atributes do you want to remove:");
                int NumberOfEnter3;
                Int32.TryParse(Console.ReadLine(), out NumberOfEnter3);
                if (NumberOfEnter3 <= character.Range)
                {
                    character.Range -= NumberOfEnter3;;
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Too big number!");
                    Thread.Sleep(750);
                    Console.Clear();
                    goto Again;
                }
                character.AmountOfAtributes = character.AmountOfAtributes + NumberOfEnter3;
                MoreOnChoices.Choice(character);
                break;
            }

            case 4:
            {
                Console.WriteLine("Write how many atributes do you want to remove:");
                int NumberOfEnter4;
                Int32.TryParse(Console.ReadLine(), out NumberOfEnter4);
                if (NumberOfEnter4 <= character.Alchemics)
                {
                    character.Alchemics -= NumberOfEnter4;
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Too big number!");
                    Thread.Sleep(750);
                    Console.Clear();
                    goto Again;
                }
                character.AmountOfAtributes = character.AmountOfAtributes + NumberOfEnter4;
                MoreOnChoices.Choice(character);
                break;
            }

            case 5:
            {
                Console.WriteLine("Write how many atributes do you want to remove:");
                int NumberOfEnter5;
                Int32.TryParse(Console.ReadLine(), out NumberOfEnter5);
                if (NumberOfEnter5 <= character.Strength)
                {
                    character.Strength -= NumberOfEnter5;
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Too big number!");
                    Thread.Sleep(750);
                    Console.Clear();
                    goto Again;
                }
                character.AmountOfAtributes = character.AmountOfAtributes + NumberOfEnter5;
                MoreOnChoices.Choice(character);

                break;
            }

            case 6:
            {
                CreationACharacter.Choice(character);
                break;
            }

            case 7:
            {
                Increase.Add(character);
                break;
            }

            default:
            {
                Console.Clear();
                Console.WriteLine("Wrong number try again");
                Thread.Sleep(750);
                Console.Clear();
                break;
            }
            }
        }
Пример #3
0
        public static void Add(ICharacters character)
        {
            while (character.AmountOfAtributes > 0)
            {
Again:

                Console.Clear();
                Console.WriteLine("There are your atributes: ");
                ChangeNumbersToPlus.Durability(character);
                ChangeNumbersToPlus.Intelligence(character);
                ChangeNumbersToPlus.Skill(character);
                ChangeNumbersToPlus.Strength(character);

                Console.WriteLine($"Now, you can use: " + character.AmountOfAtributes + " atributes. Select where do you want to add Atribute\n1-Durability\n2-Intelligence\n3-Skill\n4-Strength\nMake a mistake?Click 5 and go to decrease to correct it");
                int Where;
                Int32.TryParse(Console.ReadLine(), out Where);
                switch (Where)
                {
                case 1:
                {
                    Console.WriteLine("Write how many atributes do you want to add:");
                    int NumberOfEnter1;
                    Int32.TryParse(Console.ReadLine(), out NumberOfEnter1);
                    if (NumberOfEnter1 <= character.AmountOfAtributes)
                    {
                        character.Durability += NumberOfEnter1;
                    }
                    else
                    {
                        Console.Clear();
                        Console.WriteLine("Wrong number");
                        Thread.Sleep(750);
                        Console.Clear();
                        goto Again;
                    }
                    character.AmountOfAtributes = character.AmountOfAtributes - NumberOfEnter1;
                    break;
                }

                case 2:
                {
                    Console.WriteLine("Write how many atributes do you want to add: ");
                    int NumberOfEnter2;
                    Int32.TryParse(Console.ReadLine(), out NumberOfEnter2);
                    if (NumberOfEnter2 <= character.AmountOfAtributes)
                    {
                        character.Intelligence += NumberOfEnter2;
                    }
                    else
                    {
                        Console.Clear();
                        Console.WriteLine("Wrong number");
                        Thread.Sleep(750);
                        Console.Clear();
                        goto Again;
                    }

                    character.AmountOfAtributes = character.AmountOfAtributes - NumberOfEnter2;
                    break;
                }

                case 3:
                {
                    Console.WriteLine("Write how many atributes do you want to add:");
                    int NumberOfEnter4;
                    Int32.TryParse(Console.ReadLine(), out NumberOfEnter4);
                    if (NumberOfEnter4 <= character.AmountOfAtributes)
                    {
                        character.Alchemics += NumberOfEnter4;
                    }
                    else
                    {
                        Console.Clear();
                        Console.WriteLine("Wrong number");
                        Thread.Sleep(750);
                        Console.Clear();
                        goto Again;
                    }
                    character.AmountOfAtributes = character.AmountOfAtributes - NumberOfEnter4;
                    break;
                }

                case 4:
                {
                    Console.WriteLine("Write how many atributes do you want to add:");
                    int NumberOfEnter5;
                    Int32.TryParse(Console.ReadLine(), out NumberOfEnter5);
                    if (NumberOfEnter5 <= character.AmountOfAtributes)
                    {
                        character.Strength += NumberOfEnter5;
                    }
                    else
                    {
                        Console.Clear();
                        Console.WriteLine("Wrong number");
                        Thread.Sleep(750);
                        Console.Clear();
                        goto Again;
                    }
                    character.AmountOfAtributes = character.AmountOfAtributes - NumberOfEnter5;
                    break;
                }

                case 5:
                {
                    Decrease.DecreaseAtribute(character);
                    break;
                }

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