Beispiel #1
0
        static void Main(string[] args)
        {
            Wizard  joe        = new Wizard("joe");
            Ninja   sassypants = new Ninja("sassy pants");
            Samurai dopey      = new Samurai("dopey");

            joe.Attack(dopey);
            joe.Attack(sassypants);
            joe.Attack(joe);
            joe.Heal(joe);
        }
        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();
        }
Beispiel #3
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);
        }
        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);
        }
Beispiel #5
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();
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            Wizard  wizard1  = new Wizard("Gandalph");
            Ninja   ninja1   = new Ninja("Ninjjja");
            Samurai samurai1 = new Samurai("Samurrraiiii");

            // ninja1.Attack(wizard1);
            // samurai1.Attack(wizard1);
            // samurai1.Attack(wizard1);
            // wizard1.Heal(samurai1);
            // wizard1.Heal(samurai1);
            wizard1.Attack(samurai1);
            samurai1.Meditate();
            ninja1.Steal(samurai1);
        }
        static void Main(string[] args)
        {
            Human   jack = new Human("Jack Sprat");
            Ninja   jill = new Ninja("Jill Sprat");
            Wizard  tom  = new Wizard("Tom Jones");
            Samurai hei  = new Samurai("Hei Chi");

            hei.Attack(jack);
            System.Console.WriteLine(jack.Health);
            tom.Heal(jack);
            tom.Heal(jack);
            jill.Steal(jack);
            tom.Attack(jack);
            System.Console.WriteLine($"How is {jack.Name} doing? HP: {jack.Health}");
        }
        static void Main(string[] args)
        {
            Human   Greg    = new Human("Greg");
            Human   Dean    = new Human("Dean");
            Wizard  Gandalf = new Wizard("Gandalf");
            Samurai Tonchu  = new Samurai("Tonchu");

            Greg.Attack(Gandalf);
            Dean.Attack(Tonchu);
            Tonchu.Attack(Dean);
            Gandalf.Attack(Dean);
            Dean.Attack(Tonchu);



            Console.WriteLine(Greg.Dexterity);
        }
Beispiel #10
0
        static void Main(string[] args)
        {
            Wizard  Nat    = new Wizard("Nat");
            Ninja   Josh   = new Ninja("Josh");
            Human   Balazs = new Human("Balazs");
            Samurai Will   = new Samurai("Will");

            Nat.Attack(Josh);
            Nat.Fireball(Josh);
            Josh.Steal(Nat);
            Will.Attack(Balazs);
            Josh.getAway();
            Nat.Heal();
            Will.Meditate();
            Will.deathBlow(Nat);
            Will.deathBlow(Josh);
        }
Beispiel #11
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);
        }
Beispiel #12
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Ninja   ninja1   = new Ninja("Ninja Hanzo");
            Wizard  wizard1  = new Wizard("Wizard Merlin");
            Samurai samurai1 = new Samurai("Samurai Tomoe");
            Ninja   ninja2   = new Ninja("Ninja Kotaro");

            wizard1.Attack(ninja1);
            wizard1.Heal(ninja2);
            wizard1.Stats();
            ninja1.Stats();
            ninja1.Steal(samurai1);
            ninja1.Stats();
            samurai1.Stats();
            samurai1.Meditate();
            samurai1.Stats();
        }
Beispiel #13
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("_,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_");
        }