Exemplo n.º 1
0
        public static void Choice(ICharacters character)
        {
            Console.Clear();
            int origWidth = 110;

            origWidth = Console.WindowWidth;
            string k = "At the start of the game you have: " + character.AmountOfAtributes + " atributes to alocate.";
            string g = "                         You will get atributes also when you will win fight with opponent.";

            Console.WriteLine("\n\n\n\n\n\n\n\n\n\n\n\n\n");
            Console.SetCursorPosition((origWidth - k.Length) / 2, Console.CursorTop);
            Console.WriteLine(k + "\n" + g);
            Console.ReadKey();
            Increase.Add(character);
        }
Exemplo n.º 2
0
 public static void AfterFight(ref ICharacters character, ref ICharacters opponent)
 {
     if (opponent.HitPoints <= 80)
     {
         Console.Clear();
         Console.WriteLine("YOU WIN!!! :)");
         Thread.Sleep(2000);
         character.AmountOfAtributes += 5;
         Arena.CharacterStatsAfterFight(ref character, ref opponent);
         MoneyAssignment.MoneyAfterFight(ref character);
         Increase.Add(character);
         character.Level += 1;
     }
     if (character.HitPoints <= 80)
     {
         Console.WriteLine("YOU LOST!");
         Thread.Sleep(2000);
         Arena.CharacterStatsAfterFight(ref character, ref opponent);
         MoneyAfterDefeat.MoneyAfterFight(character);
         CityMap.ShowMap(character);
     }
 }
Exemplo n.º 3
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.º 4
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;
            }
            }
        }