public static void InDoors(ICharacters character) { if (CityMap.PositionX == 20 && CityMap.PositionY == 19) { BuildingMessages.BuldingMessage("Arena"); Arena.FightInArena(character, OnInputWork.ChoiceHandler()); } else if (CityMap.PositionX == 26 && CityMap.PositionY == 11) { BuildingMessages.BuldingMessage("WeaponSmith"); Console.WriteLine("You have: " + character.Money + " money, " + character.Strength + " Strength!"); List <CreatingItems> buildingitems = new List <CreatingItems>(); buildingitems = ProductsInBuldings.GetWeaponsAvailable(character); Console.WriteLine(ProductsInBuldings.ShowProductsAvailable(buildingitems, "Strength")); WeaponShop.Weapon(character, buildingitems, OnInputWork.ChoiceHandler()); } else if (CityMap.PositionX == 30 && CityMap.PositionY == 7) { BuildingMessages.BuldingMessage("ArmorSmith"); Console.WriteLine("You have: " + character.Money + " money, " + character.Durability + " Durability!"); List <CreatingItems> buildingitems = new List <CreatingItems>(); buildingitems = ProductsInBuldings.GetArmorAvailable(character); Console.WriteLine(ProductsInBuldings.ShowProductsAvailable(buildingitems, "Durability")); ArmorSmith.Armor(character, buildingitems, OnInputWork.ChoiceHandler()); } else if (CityMap.PositionX == 16 && CityMap.PositionY == 4) { BuildingMessages.BuldingMessage("Shop"); Console.WriteLine("You have: " + character.Money + " money, " + character.Alchemics + " Alchemics!"); List <CreatingItems> buildingitems = new List <CreatingItems>(); buildingitems = ProductsInBuldings.GetShopAvailable(character); Console.WriteLine(ProductsInBuldings.ShowProductsAvailable(buildingitems, "Alchemics")); ItemShop.Item(character, buildingitems, OnInputWork.ChoiceHandler()); } }
public static void OpeningActionHandler() { int Choice = OnInputWork.ChoiceHandler(); switch (Choice) { case 1: { Console.Clear(); ICharacters character = new CharacterData(); StartGame.CreatingCharacter(ref character); break; } case 2: { Options.Changes(); break; } case 3: { Console.Clear(); Ending.TheEnd(); break; } default: { Console.WriteLine("Select action from listed above!"); Thread.Sleep(1000); Console.Clear(); GameInvocation.OptionsSelector(); break; } } }
public static void HeroTypeInformation(ICharacters character) { Console.Clear(); Console.WriteLine("1.Wizard"); Console.WriteLine("2.Giant"); Console.WriteLine("3.Archer"); Console.WriteLine("4.Back"); int choice = OnInputWork.ChoiceHandler(); switch (choice) { case 1: { Wizard wizard = new Wizard(); Console.WriteLine(" WIZARD"); wizard.Picture(); ChangeNumbersToPlus.Durability(wizard); ChangeNumbersToPlus.Intelligence(wizard); ChangeNumbersToPlus.Skill(wizard); ChangeNumbersToPlus.Strength(wizard); upper: int choice2 = OnInputWork.ChoiceHandler(); if (choice2 == 4) { StartGame.HeroTypeInformation(character); } else { Console.WriteLine("Write correct number!"); Thread.Sleep(750); Console.Clear(); goto upper; } break; } case 2: { Giant giant = new Giant(); Console.WriteLine(" GIANT"); giant.Picture(); ChangeNumbersToPlus.Durability(giant); ChangeNumbersToPlus.Intelligence(giant); ChangeNumbersToPlus.Skill(giant); ChangeNumbersToPlus.Strength(giant); upper: int choice2 = OnInputWork.ChoiceHandler(); if (choice2 == 4) { StartGame.HeroTypeInformation(character); } else { Console.WriteLine("Write correct number!"); Thread.Sleep(750); Console.Clear(); goto upper; } break; } case 3: { Archer archer = new Archer(); Console.WriteLine(" ARCHER"); archer.Picture(); ChangeNumbersToPlus.Durability(archer); ChangeNumbersToPlus.Intelligence(archer); ChangeNumbersToPlus.Skill(archer); ChangeNumbersToPlus.Strength(archer); upper: int choice2 = OnInputWork.ChoiceHandler(); if (choice2 == 4) { StartGame.HeroTypeInformation(character); } else { Console.WriteLine("Write correct number!"); Thread.Sleep(750); Console.Clear(); goto upper; } break; } case 4: { Console.Clear(); StartGame.CreatingCharacter(ref character); break; } default: { Console.Clear(); Console.WriteLine("Wrong number try again"); Thread.Sleep(750); Console.Clear(); StartGame.HeroTypeInformation(character); break; } } }
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; } } }
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; } } }
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; } } }