Exemplo n.º 1
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;
            }
            }
        }
Exemplo n.º 2
0
        public static void CreatingCharacter(ref ICharacters character)
        {
            Console.Clear();
            Console.WriteLine("What type of character would you like to choose?");
            Console.WriteLine("1.Giant");
            Console.WriteLine("2.Wizard");
            Console.WriteLine("3.Archer");
            Console.WriteLine("4.To get more information about them");
            Console.WriteLine("5.Back");
            int Choice = OnInputWork.ChoiceHandler();

            switch (Choice)
            {
            case 1:
            {
                Console.WriteLine("Are you sure? You couldn't go back from there");
                Console.WriteLine("Click Y if yes N to go back");
                string select = Console.ReadLine();
                select = select.ToUpper();

                if (select == "Y")
                {
                    StartGame.GiantCharacter(out character);
                    CreationACharacter.Choice(character);
                }
                else if (select == "N")
                {
                    StartGame.CreatingCharacter(ref character);
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Wrong Letter. Try Again");
                    StartGame.CreatingCharacter(ref character);
                }

                break;
            }

            case 2:
            {
                Console.WriteLine("Are you sure? You couldn't go back from there");
                Console.WriteLine("Click Y if yes N to go back");
                string select = Console.ReadLine();
                select = select.ToUpper();

                if (select == "Y")
                {
                    StartGame.WizardCharacter(out character);
                    CreationACharacter.Choice(character);
                }
                else if (select == "N")
                {
                    StartGame.CreatingCharacter(ref character);
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Wrong Letter. Try Again");
                    StartGame.CreatingCharacter(ref character);
                }


                break;
            }

            case 3:
            {
                Console.WriteLine("Are you sure? You couldn't go back from there");
                Console.WriteLine("Click Y if yes N to go back");
                string select = Console.ReadLine();
                select = select.ToUpper();

                if (select == "Y")
                {
                    StartGame.ArcherCharacter(out character);
                    CreationACharacter.Choice(character);
                }
                else if (select == "N")
                {
                    StartGame.CreatingCharacter(ref character);
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Wrong Letter. Try Again");
                    StartGame.CreatingCharacter(ref character);
                }
                break;
            }

            case 4:
            {
                Console.Clear();
                StartGame.HeroTypeInformation(character);
                break;
            }

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

            default:
            {
                StartGame.CreatingCharacter(ref character);
                break;
            }
            }
        }
Exemplo n.º 3
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;
            }
            }
        }