Exemplo n.º 1
0
 public bool GetDamage(Witcher a)
 {
     if (Health > 0)
     {
         Health -= a.Attack();
     }
     else
     {
         IsLife = false;
     }
     return(IsLife);
 }
Exemplo n.º 2
0
        public void ToDisplay()
        {
            Console.Clear();

            Console.SetCursorPosition(4, 2);
            Console.WriteLine("Geralt");
            Console.SetCursorPosition(2, 3);
            Console.WriteLine("Level = {0}", Geralt.Level + 1);
            Console.SetCursorPosition(2, 4);
            Console.WriteLine("Health = {0}/{1}", Geralt.Health, Geralt.MaxHealth);
            Console.SetCursorPosition(2, 5);
            Console.WriteLine("Money = {0}", Geralt.Money);
            Console.SetCursorPosition(2, 6);
            Console.WriteLine("Weapon = {1} {0}", Geralt.InHande, Geralt.GetWeapon());
            Console.SetCursorPosition(2, 7);
            Console.WriteLine("Power = {0}", Geralt.Attack());

            Console.SetCursorPosition(4, 10);
            Console.WriteLine("Beast");
            Console.SetCursorPosition(2, 11);
            Console.WriteLine("Name = {0}", Enemies[Beast].GetName());
            Console.SetCursorPosition(2, 12);
            Console.WriteLine("Level = {0}", Enemies[Beast].ShowLvl());
            Console.SetCursorPosition(2, 13);
            Console.WriteLine("Health = {0}", Enemies[Beast].ShowHp());
            Console.SetCursorPosition(2, 14);
            Console.WriteLine("Power = {0}", Enemies[Beast].Attack());
            Console.SetCursorPosition(2, 15);
            Console.WriteLine("Trophy = {0}", Enemies[Beast].Trophy());

            Console.SetCursorPosition(4, 19);
            Console.WriteLine("Menu");
            Console.SetCursorPosition(2, 20);
            Console.WriteLine("Q - Attack");
            Console.SetCursorPosition(2, 21);
            Console.WriteLine("W - Buy mew weapon");
            Console.SetCursorPosition(2, 22);
            Console.WriteLine("E - Buy heal");
        }