Exemple #1
0
        public void Attack(IShip enemy)
        {
            int damage = Rand.Next(minDamage, maxDamage);

            if (critChange >= Rand.Next(100))
            {
                damage *= critMod;
            }

            enemy.Defend(damage);

            Console.WriteLine("{0} нанес {1} урона {2}", Name, damage, enemy.Name);
        }