Example #1
0
 private static void MovingHandler(ICharacters character)
 {
     OnBuildingActions.InDoors(character);
     CityMap.ShowWSAD();
     CityMap.Move(OnInputWork.MovingOnMapHandler(), out MoveX, out MoveY);
     CityMap.ShowMap(character);
 }
Example #2
0
 public static void Buying(string choice, ICharacters character)
 {
     choice = choice.ToUpper();
     if (choice == "D")
     {
         CityMap.ShowMap(choice, character);
     }
 }
Example #3
0
        public static void FightInArena(ICharacters myHero, int choice)
        {
            switch (choice)
            {
            case 1:
            {
                ICharacters opponent;
                int         enemy = Arena.TypeOfEnemy(3);
                if (enemy == 1)
                {
                    opponent = new OpponentDracula(myHero.Level);
                }
                else if (enemy == 2)
                {
                    opponent = new OpponentDragon(myHero.Level);
                }
                else if (enemy == 3)
                {
                    opponent = new OpponentRay(myHero.Level);
                }
                else
                {
                    opponent = new OpponentDracula(myHero.Level);
                }
                Arena.FightLayout(myHero, opponent, true);
                break;
            }

            case 2:
            {
                ICharacters opponent;
                opponent = new ThreeHeadedDragon(16);
                if (myHero.Level >= opponent.Level && myHero.Money >= opponent.RequiredMoney)
                {
                    Arena.FightLayout(myHero, opponent, true);
                }
                else
                {
                    Console.WriteLine("You are not allowed to enter there. You have to have the " + opponent.Level + " and " + opponent.RequiredMoney + " money");
                    Thread.Sleep(2000);
                    CityMap.ShowMap(myHero);
                }
                break;
            }

            default:
            {
                Console.WriteLine();
                Console.WriteLine("You chose life!");
                Console.WriteLine();
                break;
            }
            }
        }
Example #4
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);
     }
 }
Example #5
0
 public static void Boss(ICharacters character, ICharacters opponent)
 {
     if (opponent.HitPoints <= 80)
     {
         Console.Clear();
         Console.WriteLine("YOU WIN with bossss!!! :)");
         Thread.Sleep(2000);
         character.AmountOfAtributes += 5;
         Arena.CharacterStatsAfterFight(ref character, ref opponent);
         MoneyAssignment.MoneyAfterFight(ref character);
         Console.WriteLine("YOU WIN THE GAME. YOU ARE THE BEST! :D");
         Thread.Sleep(5000);
         Ending.TheEnd();
     }
     if (character.HitPoints <= 80)
     {
         Console.WriteLine("YOU LOST :(");
         Thread.Sleep(2000);
         Arena.CharacterStatsAfterFight(ref character, ref opponent);
         MoneyAfterDefeat.MoneyAfterFight(character);
         CityMap.ShowMap(character);
     }
 }
Example #6
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;
            }
            }
        }
Example #7
0
 private static void MovingHandler(string choice, ICharacters character)
 {
     CityMap.ShowWSAD();
     CityMap.Move(choice, out MoveX, out MoveY);
     CityMap.ShowMap(character);
 }