Пример #1
0
 public void BruteSpecialAttack(Captain self, Brute Target)
 {
     Target.Health      = self.SpecAttack - Target.SpecDefence;
     Target.SpecDefence = Target.SpecDefence - 1;
 }
Пример #2
0
 public void HostileSpecialAttack(Captain self, hostile Target)
 {
     Target.Health  = Target.Health - self.SpecAttack * 2 - Target.Defence;
     Target.Defence = Target.Defence - 1;
 }
Пример #3
0
 public void CaptainSpecialAttack(Brute self, Captain Target)
 {
     Target.Health      = self.SpecAttack - Target.SpecDefence;
     Target.SpecDefence = Target.SpecDefence - 1;
 }
Пример #4
0
        static void Main(string[] args)
        {
            unit grunt = new Battle_Arena.unit();

            grunt.isAlive = true;
            grunt.Print();
            Console.WriteLine("Grunt watches as Soldier is trained");
            Console.WriteLine("-----------------------------------------------------");

            friendly Soldier = new friendly();

            Soldier.name    = "Soldier";
            Soldier.isAlive = true;
            Soldier.Health  = 100;
            Soldier.Attack  = 20;
            Soldier.Defence = 5;
            Soldier.FriendStat();
            Console.WriteLine("Soldier notices Commander is walking by");
            Console.WriteLine("-----------------------------------------------------");

            Captain Commander = new Captain();

            Commander.name        = "Commander";
            Commander.isAlive     = true;
            Commander.Health      = 200;
            Commander.Attack      = 50;
            Commander.Defence     = 20;
            Commander.SpecAttack  = 40;
            Commander.SpecDefence = 20;
            Commander.CaptainStat();
            Console.WriteLine("Commander notices that there is a Hostile near by");
            Console.WriteLine("-----------------------------------------------------");

            hostile Zombie = new hostile();

            Zombie.name    = "Zombie";
            Zombie.isAlive = true;
            Zombie.Health  = 100;
            Zombie.Attack  = 20;
            Zombie.Defence = 5;
            Zombie.HostileStat();
            Console.WriteLine(Zombie.name + "wanders around");
            Console.WriteLine("-----------------------------------------------------");


            Commander.HostileSpecialAttack(Commander, Zombie);
            Console.WriteLine("Commander special attacks " + Zombie.name);
            Zombie.HealthUpdate();
            while (Zombie.isAlive == true)
            {
                Soldier.HostileAttack(Soldier, Zombie);
                Console.WriteLine("Soldier attacks " + Zombie.name);
                Zombie.HealthUpdate();
            }
            Console.WriteLine("-----------------------------------------------------");
            Console.WriteLine("--WARNING, DETECTING MULTIPLE BRUTE CLASS LIFE FORMS IN THE REGION--");

            Brute Reaper = new Brute();

            Reaper.name        = "Reaper";
            Reaper.isAlive     = true;
            Reaper.Health      = 600;
            Reaper.Attack      = 60;
            Reaper.Defence     = 30;
            Reaper.SpecAttack  = 40;
            Reaper.SpecDefence = 20;
            Reaper.HostileBoss();

            Console.WriteLine("");

            Brute Ghost = new Brute();

            Ghost.name        = "Ghost";
            Ghost.isAlive     = true;
            Ghost.Health      = 400;
            Ghost.Attack      = 30;
            Ghost.Defence     = 20;
            Ghost.SpecAttack  = 60;
            Ghost.SpecDefence = 50;
            Ghost.HostileBoss();
            Console.WriteLine("-----------------------------------------------------");

            Ghost.SoldierAttack(Ghost, Soldier);
            Soldier.HealthUpdate();
            Console.WriteLine("-----------------------------------------------------");

            Console.WriteLine("Soldier calls for backup");
            Soldier.BruteAttack(Soldier, Ghost);
            Ghost.HealthUpdate();

            friendly Soldier2 = new friendly();

            Soldier.name    = "Soldier";
            Soldier.isAlive = true;
            Soldier.Health  = 100;
            Soldier.Attack  = 20;
            Soldier.Defence = 5;
            Soldier2.FriendStat();

            friendly FootSoldier = new friendly();

            Soldier.name    = "FootSoldier";
            Soldier.isAlive = true;
            Soldier.Health  = 100;
            Soldier.Attack  = 20;
            Soldier.Defence = 5;
            FootSoldier.FriendStat();

            Captain Captain = new Captain();

            Commander.name        = "Captain";
            Commander.isAlive     = true;
            Commander.Health      = 200;
            Commander.Attack      = 50;
            Commander.Defence     = 20;
            Commander.SpecAttack  = 40;
            Commander.SpecDefence = 20;
            Captain.CaptainStat();

            friendly Swordsman = new friendly();

            Swordsman.name    = "Swordsman";
            Swordsman.isAlive = true;
            Swordsman.Health  = 100;
            Swordsman.Attack  = 20;
            Swordsman.Defence = 5;
            Swordsman.FriendStat();

            friendly Knight = new friendly();

            Soldier.name    = "Knight";
            Soldier.isAlive = true;
            Soldier.Health  = 100;
            Soldier.Attack  = 20;
            Soldier.Defence = 5;
            Soldier2.FriendStat();

            Console.WriteLine("-----------------------------------------------------");
            Console.ReadLine();
        }
Пример #5
0
 public void CaptianAttack(hostile self, Captain Target)
 {
     Target.Health  = self.Attack / 2 - Target.Defence;
     Target.Defence = Target.Defence - 1;
 }