Esempio n. 1
0
        public static void attack()
        {
            if (YourChar.Type == "Priest" || YourChar.Type == "Mage")
            {
                Enemy.HP -= Decimal.ToInt32(YourChar.intellect);
                statCheck();
                if (Enemy.HP > 0)
                {
                    Console.WriteLine("\n" + Enemy.Type + " was hit for " + YourChar.intellect + ". " + Enemy.Type + " HP is now " + Enemy.HP);
                }


                statCheck();
            }
            else
            {
                if (EnemyCharDodge() == false)
                {
                    var attack = YourChar.attack();
                    Enemy.HP -= attack;
                    statCheck();
                    if (Enemy.HP > 0)
                    {
                        Console.WriteLine(Enemy.Type + " was hit for " + attack + ". " + Enemy.Type + " HP is now " + Enemy.HP);
                    }
                }
                else
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine(Enemy.Type + " dodged your attack");
                    Console.ForegroundColor = ConsoleColor.White;
                }



                statCheck();
            }
            if (YourCharDodge() == false)
            {
                damage();
                statCheck();
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("You dodged the " + Enemy.Type + "'s attack");
                Console.ForegroundColor = ConsoleColor.White;
            }
            Console.ReadKey();
            ClearScreen();
            characterStats();
            EnemyStats();
            YourChar.turncounter += 1;
            FightDecide();
        }
Esempio n. 2
0
 public static bool YourCharDodge()
 {
     return(YourChar.Dodge());
 }