static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Wizard mitchell = new Wizard("Mitchell");
            Wizard greg     = new Wizard("Greg");

            Ninja adrien  = new Ninja("Adrien");
            Ninja michael = new Ninja("Michael Choi");

            Samurai anne = new Samurai("Anne");

            mitchell.getStats();
            adrien.getStats();
            anne.getStats();
            mitchell.Attack(anne);
            anne.Attack(mitchell);
            adrien.Steal(anne);
            anne.Meditate();
            greg.Heal(anne);
            anne.getStats();
            Console.WriteLine("Greg says: She's... Unkillable... What have I done.");
            anne.Attack(greg);
            michael.Attack(anne);

            // adrien.Attack(mitchell);
            // adrien.Attack(mitchell);
            // adrien.Attack(mitchell);
            // adrien.Attack(mitchell);
            // adrien.Attack(mitchell);
            // adrien.Attack(mitchell);


            // adrien.getStats();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Wizard  wizard1  = new Wizard("Wizard 1");
            Ninja   ninja1   = new Ninja("Ninja 1");
            Samurai samurai1 = new Samurai("Samurai 1");

            Console.WriteLine(wizard1.Health);
            ninja1.Attack(wizard1);
            ninja1.Attack(samurai1);
            samurai1.Attack(wizard1);
            Console.WriteLine(samurai1.Health);
            samurai1.Meditate("Samurai 1");
            Console.WriteLine(samurai1.Health);
            wizard1.Heal(ninja1);
            Console.WriteLine(ninja1.Health);
            ninja1.Steal(wizard1);
            Console.WriteLine(ninja1.Health);
        }
        static void Main(string[] args)
        {
            Wizard elsa  = new Wizard("elsa");
            Wizard harry = new Wizard("harry");
            Ninja  ken   = new Ninja("ken");

            ken.Attack(elsa);
            elsa.Attack(harry);
            harry.Heal(elsa);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Wizard  Sam   = new Wizard("Sam");
            Ninja   James = new Ninja("James");
            Samurai Jeff  = new Samurai("Jeff");

            Sam.Attack(James);
            James.Attack(Jeff);
            Jeff.Attack(Sam);
            Sam.Heal(James);
            James.Steal(Jeff);
            Jeff.Meditate();
        }
        static void Main(string[] args)
        {
            Human   Dave     = new Human("Dave");
            Wizard  Gandolf  = new Wizard("Gandolf");
            Ninja   Shredder = new Ninja("Shredder");
            Samurai Kyoto    = new Samurai("Kyoto");

            Dave.Attack(Shredder);
            Gandolf.Attack(Shredder);
            Kyoto.Attack(Gandolf);
            Shredder.Attack(Gandolf);
            Gandolf.Heal(Kyoto);
            Shredder.Steal(Kyoto);
            Kyoto.Meditate();
        }
Exemple #6
0
        static void Main(string[] args)
        {
            Wizard  w1 = new Wizard("Tom");
            Wizard  w2 = new Wizard("Tim");
            Ninja   n1 = new Ninja("Frank");
            Samurai s1 = new Samurai("Josh");

            // w1.Attack(w2);
            s1.Attack(w1);
            n1.Attack(s1);
            n1.Attack(s1);
            n1.Attack(s1);
            n1.Attack(s1);
            n1.Attack(s1);
            n1.Attack(s1);
            n1.Attack(s1);
            n1.Attack(s1);
        }
Exemple #7
0
        static void Main(string[] args)
        {
            Wizard  jack = new Wizard("Jack", 3, 3);
            Ninja   tom  = new Ninja("Tom", 3, 3, 100);
            Samurai ben  = new Samurai("Ben", 3, 3, 3);

            jack.Health = 4;
            int jackHealth = jack.Attack(tom);

            Console.WriteLine("jackHealth  = " + jackHealth);
            int samuariHealth = tom.Attack(ben);

            Console.WriteLine("samuariHealth  = " + samuariHealth);
            jack.Heal(tom);
            ben.Meditate(100);
            tom.Steal(jack);
        }
Exemple #8
0
        static void Main(string[] args)
        {
            Human   joe     = new Human("Joe");
            Wizard  gandalf = new Wizard("Gandalf");
            Ninja   naruto  = new Ninja("Naruto");
            Samurai hanzo   = new Samurai("Hanzo");

            Console.WriteLine(hanzo.Health);
            gandalf.Attack(hanzo);
            gandalf.Attack(hanzo);
            naruto.Attack(gandalf);
            hanzo.Attack(naruto);
            gandalf.Heal(gandalf);
            hanzo.Meditate();
            naruto.Steal(hanzo);
            Console.WriteLine(hanzo.Health);
            Console.WriteLine(gandalf.Health);
            Console.WriteLine(naruto.Health);
        }
Exemple #9
0
        // Use a switch statement for attack or heal.
        public void Action(string do_this, Wizard w1, Samurai s1, Ninja n1, Human mon)
        {
            Random rand = new Random();

            System.Console.WriteLine("_,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_");
            switch (do_this)
            {
            case "a":
                w1.Attack(mon);
                int x = rand.Next(3);
                int y = rand.Next(2);
                if (x == 1)
                {
                    System.Console.WriteLine($"{s1.Name} has decided to help you attack!");
                    s1.Attack(mon);
                }
                else if (x == 2)
                {
                    System.Console.WriteLine($"{n1.Name} has decided to help you attack!");
                    n1.Attack(mon);
                }
                System.Console.WriteLine("-------------------------------------------------");
                if (y == 0)
                {
                    mon.Attack(w1);
                }
                if (y == 1)
                {
                    mon.Attack1(w1);
                }
                break;

            case "h":
                w1.Heal(w1);
                System.Console.WriteLine("-------------------------------------------------");
                mon.Attack(w1);
                break;
            }
            System.Console.WriteLine("-------------------------------------------------");
            mon.GetInfo();
            w1.GetInfo();
            System.Console.WriteLine("_,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_");
        }