Beispiel #1
0
        public static void BatlleTransformer(Transformer transformerOne, Transformer transformerTwo)
        {
            Console.WriteLine("!!!Нехай битва розпочнеться!!!");

            transformerOne.Transform();
            transformerOne.Run();
            transformerOne.FindEnemy();
            transformerTwo.Transform();
            transformerTwo.Run();
            transformerTwo.FindEnemy();
            transformerOne.CaptureTheTarget(transformerTwo);
            transformerTwo.CaptureTheTarget(transformerOne);

            while (transformerOne.Health > 0 && transformerTwo.Health > 0)
            {
                if (GreatRandom.GenerateWeapon() == 0)
                {
                    transformerOne.ShootAtEnemy();
                }
                else
                {
                    transformerTwo.ShootAtEnemy();
                }
            }
            Console.WriteLine(transformerOne.Health > 0 ? $"{transformerOne.Name} !Переможець!" : $"{transformerTwo.Name} !Переможець!");
        }
Beispiel #2
0
        public override void ShootAtEnemy()
        {
            var uron = GreatRandom.GenerateUron();

            if (Weapon.GetChargeCritCounter() == 2)
            {
                Fire();
                EnemyTransformer.GetUron(uron * 4);
                Console.WriteLine($" {Name} - Наносить !Критичний Урон: {uron * 4}!");
                Weapon.ResetChargeCritCounter();
            }
            else
            {
                Fire();
                EnemyTransformer.GetUron(uron);
                Console.WriteLine($"{Name} - Наносить !Урон:  {uron}!");
            }
        }