Пример #1
0
        static void Main(string[] args)
        {
            Knight arus   = new Knight("Arus", 2, "knight");
            Wizard wizard = new Wizard("Jennica", 23, "White wizard");

            Console.WriteLine(arus.Attack());
            Console.WriteLine(wizard.Attack(4));
            Console.WriteLine(wizard.Attack(9));
        }
Пример #2
0
        static void Main(string[] args)
        {
            Wizard  nathanWiz     = new Wizard("Wizar");
            Ninja   nathanNinja   = new Ninja("Ninja");
            Samurai nathanSamurai = new Samurai("Samurai");

            nathanWiz.Attack(nathanNinja);
            nathanNinja.Attack(nathanSamurai);
            nathanWiz.Attack(nathanSamurai);
            nathanSamurai.Attack(nathanWiz);
            nathanSamurai.Meditate();
        }
Пример #3
0
        static void Main(string[] args)
        {
            //Console.Writeline();
            Ninja   ninja1   = new Ninja("Makenna the Ninja");
            Wizard  wizard1  = new Wizard("Oscar the Wizard");
            Samurai samurai1 = new Samurai("Carlos the Samurai");
            Ninja   ninja2   = new Ninja("Dany the Ninja");

            ninja1.stats();
            wizard1.stats();
            samurai1.stats();
            //Dany.stats();
            Console.WriteLine("****New Game Starting Now****");
            samurai1.Attack(ninja1);
            ninja1.Steal(wizard1);
            ninja1.Attack(wizard1);
            wizard1.Attack(ninja1);
            wizard1.Heal(ninja1);
            //Oscar.Attack(Carlos);
            //Oscar.Attack(Dany);
            //Makenna.Attack(Dany);
            //Carlos.Attack(Dany);
            //Oscar.Attack(Dany);
            //Makenna.Attack(Dany);
            //Oscar.Heal(Dany);
            samurai1.Meditate();
            ninja1.stats();
            wizard1.stats();
            samurai1.stats();
            //Dany.stats();



            //Console.WriteLine(Makenna.Dexterity);
        }
        static void Main(string[] args)
        {
            Hero   Arus    = new Hero("Arus", 23, "Knight");
            Wizard Jennica = new Wizard("Jennica", 23, "Black Wizard");

            Console.WriteLine(Arus.Attack());
            Console.WriteLine(Jennica.Attack(8));
        }
Пример #5
0
        public void AttackTest()
        //Se prueba el metodo de ataque en un orco
        {
            //Act
            wizard.LearnSpell(spell);
            wizard.Attack(orc);

            //Assert
            Assert.AreEqual(179, orc.Health);
        }
Пример #6
0
            static void Main(string[] args)
            {
                Wizard  Naruto = new Wizard("Naruto");
                Ninja   Sauske = new Ninja("Sauske");
                Samurai Sakura = new Samurai("Sakura");

                Sakura.Attack(Naruto);
                Naruto.Attack(Sauske);
                Sauske.Attack(Sakura);
                Sauske.Steal(Naruto);
                Sakura.Meditate();
                Naruto.Heal(Naruto);
            }
Пример #7
0
        public void T4_create_a_dwarf_character_with_a_Name_and_Wizard_Class()
        {
            var dwarf = new Dwarf(0)
            {
                Name = "Gonar"
            };
            var wizard = new Wizard(dwarf);

            var attack = wizard.Attack();

            wizard.Name.Should().Be("Gonar");
            attack.Quantity.Should().Be(dwarf.NormalDamage + wizard.Damages.Quantity);
            attack.Type.Should().Be(DamageTypes.Magical);
        }
Пример #8
0
        static void Main(string[] args)
        {
            // Init Mage Gandalf
            Magus gandalf = new Magus(5);

            gandalf.Attack();
            gandalf.CastASpell();
            gandalf.Fly();

            // Init Sorcier Saroumane
            Wizard saroumane = new Wizard(6);

            saroumane.Attack();
            saroumane.CastASpell();

            // Init Sorcier Radagast
            Wizard radagast = new Wizard(5);

            radagast.Attack();
            radagast.CastASpell();

            // Init Chevelier Aragorn
            Knight aragorn = new Knight(3);

            aragorn.Attack();

            List <Character> characters = new List <Character>();

            characters.Add(gandalf);
            characters.Add(saroumane);
            characters.Add(aragorn);

            foreach (Character character in characters)
            {
                character.Attack();
            }

            Console.WriteLine("///// CREATION DE GUILDE /////");
            Guild <Wizard> wizardGuild = new Guild <Wizard>();

            wizardGuild.Add(saroumane);
            wizardGuild.Add(radagast);

            Console.WriteLine("///// ATTAQUE MASSIVE DE LA GUILDE DES SORCIERS /////");
            wizardGuild.MassiveAttack();
            Console.WriteLine("///// FIN ATTAQUE MASSIVE DE LA GUILDE DES SORCIERS /////");


            Console.ReadKey();
        }
Пример #9
0
        static void Main(string[] args)
        {
            Human  nibbles = new Human("Mr. Nibbles");
            Wizard benny   = new Wizard("Benny Bob");

            benny.Attack(nibbles);
            Ninja adam = new Ninja("Adam");

            adam.Attack(benny);
            Samurai bob = new Samurai("Bob");

            bob.Attack(benny);
            Wizard ken = new Wizard("Ken");

            ken.Heal(benny);
        }
Пример #10
0
        public void T6_a_feared_human_character_doesnt_make_damage()
        {
            var character = new Human(50)
            {
                Name = "Bill"
            };
            var characterClass = new Wizard(character);

            var damages = characterClass.Attack();

            character.Name.Should().Be("Bill");
            characterClass.Should().BeOfType <Wizard>();

            damages.Quantity.Should().Be(0);
            damages.Type.Should().Be(DamageTypes.Miss);
        }
Пример #11
0
        public void T7_a_drunk_dwarf_character_make_less_damage()
        {
            var character = new Dwarf(50)
            {
                Name = "Gonar"
            };
            var characterClass = new Wizard(character);

            var baseDamage = character.Attack();
            var damages    = characterClass.Attack();

            character.Name.Should().Be("Gonar");
            characterClass.Should().BeOfType <Wizard>();

            damages.Quantity.Should().Be(baseDamage.Quantity + characterClass.Damages.Quantity);
            damages.Type.Should().Be(characterClass.Damages.Type);
        }
Пример #12
0
        public void T5_create_a_human_character_with_a_Name_and_Wizard_Class_and_Warrior_Class()
        {
            var dwarf = new Dwarf(0)
            {
                Name = "Gonar"
            };
            var warrior       = new Warrior(dwarf);
            var wizardWarrior = new Wizard(warrior);

            warrior.Should().BeOfType <Warrior>();
            wizardWarrior.Should().BeOfType <Wizard>();

            var attack = wizardWarrior.Attack();

            wizardWarrior.Name.Should().Be("Gonar");
            attack.Quantity.Should().Be(dwarf.NormalDamage + warrior.Damages.Quantity + wizardWarrior.Damages.Quantity);
            attack.Type.Should().Be(DamageTypes.Magical);
        }
Пример #13
0
        static void Main(string[] args)
        {
            Human Zoe     = new Human("Zoe");
            Human Brent   = new Human("Brent");
            Human Shirley = new Human("Shirley");

            Wizard  Cj   = new Wizard("Cj");
            Ninja   Sam  = new Ninja("Sam");
            Samurai Lisa = new Samurai("Lisa");

            Cj.Attack(Zoe);
            Sam.Attack(Shirley);
            for (int i = 0; i < 6; i++)
            {
                Lisa.Attack(Brent);
            }

            Cj.FirstAid(Zoe);
            Sam.Attack(Shirley);
        }
        static void Main(string[] args)
        {
            Console.WriteLine("200812 Lecture"); // sanity check

            Console.WriteLine("\nBase Character ---------------------------------");
            // create an instance of the DnDCharacter class and call availble methods
            DnDCharacter baseCharacter = new DnDCharacter("base character", 3, 7, 9);

            baseCharacter.OutputProps();
            baseCharacter.Attack();
            Console.WriteLine("--------------------------------------------------");

            Console.WriteLine("\nFighter Character ---------------------------------");
            // create an instance of the Fighter class and call availble methods
            Fighter fighter1 = new Fighter("fighter character", 2, 8, 6);

            fighter1.OutputProps();
            fighter1.Attack();
            // fighter1.Slash();
            fighter1.StockUp();
            fighter1.StockWeapons();
            Console.WriteLine("---------------------------------------------------");

            Console.WriteLine("\nWizard Character ---------------------------------");
            // create an instance of the Wizard class and call availble methods
            Wizard wizard1 = new Wizard("wizard character", 1, 10, 3, "casting awesome spells");

            wizard1.OutputProps();
            wizard1.Attack();
            wizard1.OutputMagic();
            // wizard1.Spell();
            wizard1.StockUp();
            wizard1.StockMagicItems();
            wizard1.StockMagicItems();
            wizard1.StockMagicItems();
            wizard1.RemoveFromInventory(2);             // passing an integer calls the method that accepts an intger
            wizard1.RemoveFromInventory("cooked meat"); // passing a string calls the method that accepts a string
            Console.WriteLine("---------------------------------------------------");
        }
Пример #15
0
        static void Main(string[] args)
        {
            Human dummy1 = new Human("dummy1");
            Human dummy2 = new Human("dummy2");
            Human dummy3 = new Human("dummy3");

            Wizard  wizard  = new Wizard("wizard");
            Ninja   ninja   = new Ninja("ninja");
            Samurai samurai = new Samurai("samurai");

            wizard.Attack(dummy1);
            ninja.Attack(dummy2);
            for (int i = 0; i < 6; i++)
            {
                samurai.Attack(dummy3);
            }

            wizard.Heal(dummy1);
            ninja.Steal(dummy2);
            ninja.Attack(samurai);
            samurai.Meditate();
        }
Пример #16
0
        static void Main(string[] args)
        {
            Human Dave  = new Human("Dave");
            Human Bob   = new Human("Bob");
            Human Steve = new Human("Steve");

            Wizard  Izac   = new Wizard("Izac");
            Ninja   Collin = new Ninja("Collin");
            Samurai Zach   = new Samurai("Zach");

            Izac.Attack(Dave);
            Collin.Attack(Bob);
            for (int i = 0; i < 6; i++)
            {
                Zach.Attack(Steve);
            }

            Izac.FirstAid(Dave);
            Collin.Steal(Bob);
            Collin.Attack(Zach);
            Zach.Meditate();
        }
Пример #17
0
        static void Main(string[] args)
        {
            GoldenShield goldenShield = new GoldenShield("GoldenShield", 0, 25, "Escudo Protector", false);
            Sword        sword1       = new Sword("Katana", 50, 0, "Corte Fugaz", false);
            Orc          orc          = new Orc("Grom", sword1, goldenShield, "Tanque");
            Sword        sword2       = new Sword("Excalibur", 10, 0, "Corte Diagonal", false);

            orc.AttachSword(sword2);

            InvisibilityCloak invisibilityCloak = new InvisibilityCloak("Capa maxima", 0, 85, "Invisibilidad", false);
            Bow bow1 = new Bow("Arco gigante", 75, 5, "Tira fuego", false);
            Elf elf  = new Elf("Frank", bow1, invisibilityCloak, "Escurridizo");
            Bow bow2 = new Bow("Arco", 60, 5, "Automatico", false);

            elf.AttachBow(bow2);

            MagicStaff magicStaff = new MagicStaff("Varita", "Es mágica(?)", true);
            SpellBook  spellBook  = new SpellBook("Libro de Hechizos", "Tiene hechizos(?)", true);
            Wizard     wizard     = new Wizard("Harry", magicStaff, spellBook, "Support");
            Spell      spell      = new Spell("Lumos", "La varita enciende luz", true);

            wizard.LearnSpell(spell);

            Axe       axe1      = new Axe("El ejecutor", 65, 5, "Hacha giratoria", false);
            Axe       axe2      = new Axe("Verdugo", 70, 0, "Juicio final", false);
            Warhammer warhammer = new Warhammer("Mjölnir", 90, 10, "Aplastar y machacar", false);
            Dwarf     dwarf     = new Dwarf("Thorin", axe1, warhammer, "Luchador");

            dwarf.AttachAxe(axe2);

            wizard.Attack(orc);
            orc.Attack(dwarf);
            wizard.HealOrc(orc);
            dwarf.Attack(orc);
            dwarf.HealWizard(wizard);
            elf.Attack(orc);
        }
Пример #18
0
        static void Main(string[] args)
        {
            // 1. strategy pattern
            Console.WriteLine("1");
            // note that all of these are treated as actors rather than their specific type
            Actor knight = new Strategy.Knight();

            knight.Attack();
            knight.Defend();

            Actor wizard = new Wizard();

            wizard.Attack();
            wizard.Defend();

            Actor archer = new Archer();

            archer.Attack();
            archer.Defend();

            // allows you to operate on objects without caring what they are doing, only that they can perform that operation
            List <Actor> actors = new List <Actor>()
            {
                new Strategy.Knight(),
                new Wizard(),
                new Archer()
            };

            foreach (Actor actor in actors)
            {
                actor.Attack();
                actor.Defend();
            }

            // 2. observer pattern
            Console.WriteLine("2");
            Queen           queen     = new Queen();
            List <Zergling> zerglings = new List <Zergling>();

            for (int i = 0; i < 3; i++)
            {
                zerglings.Add(new Zergling(queen));
            }


            queen.SetState("DEAD");

            // 3. decorator
            Console.WriteLine("3");
            // make a gun
            GunChassis machineGun = new HeavyGunChassis();

            // add automatic mod
            machineGun = new Automatic(machineGun);
            Console.WriteLine(machineGun.GetAccuracy());
            Console.WriteLine(machineGun.GetRateOfFire());

            // make a sniper..
            GunChassis sniper = new LightGunChassis();

            sniper = new Scope(sniper);
            Console.WriteLine(sniper.GetAccuracy());
            Console.WriteLine(sniper.GetRateOfFire());

            // make the sniper automatic!
            sniper = new Automatic(sniper);
            Console.WriteLine(sniper.GetAccuracy());
            Console.WriteLine(sniper.GetRateOfFire());

            // 4. abstract factory
            Console.WriteLine("4");
            ConfigurationFactory assaultShipFactory = new AssaultConfigurationFactory();
            Spaceship            assaultShip        = new AssaultShip(assaultShipFactory);

            assaultShip.Activate();


            ConfigurationFactory transportShipFactory = new HeavyTransportConfigurationFactory();
            Spaceship            transportShip        = new HeavyTransportShip(transportShipFactory);

            transportShip.Activate();

            // Fleet fleet = new Fleet(assaultShip, transportShip);

            // 5. singleton
            Console.WriteLine("5");

            Singleton.Instance.DoAThing();

            // 6. command pattern
            Console.WriteLine("6");

            // set up some receivers
            Character roy         = new Character("Roy");
            Character targetDummy = new Character("Dummy");

            // set up invoker
            BattleActionInvoker royActionInvoker = new BattleActionInvoker();

            // some commands
            royActionInvoker.SetBasicAction(
                new AttackBattleAction(targetDummy, 10));

            royActionInvoker.SetSpecialAction(
                new EscapeBattleAction(roy));

            // perform basic attack!
            royActionInvoker.PerformBasicAction();

            // equip an item
            royActionInvoker.SetBasicAction(
                new UseItemBattleAction(new Item()));

            // use an item!
            royActionInvoker.PerformBasicAction();

            // escape!
            royActionInvoker.PerformSpecialAction();

            // 7. adapter pattern
            Console.WriteLine("7");

            Shop shop = new Shop();

            OurShopItem      ourShopItem      = new OurShopItem();
            NewVendorProduct newVendorProduct = new NewVendorProduct();

            // add our shop item
            shop.AddToCart(ourShopItem);
            // we can't add the new vendor product using our cart because it does not match our interface
            // shop.AddToCart(newVendorProduct);

            // our adapter conforms to our interface
            NewVendorProductAdapter newVendorProductAdapter = new NewVendorProductAdapter(newVendorProduct);

            shop.AddToCart(newVendorProductAdapter);

            shop.Checkout();

            // 8. facade pattern
            Console.WriteLine("7");

            Eye   leftEye  = new Eye("Green");
            Eye   rightEye = new Eye("Green");
            Mouth mouth    = new Mouth();

            // put all those subsystems into the Face (Facade)
            // The face is asked to do work (express an emotion) and knows
            // how to call the subsystems methods to accomplish that
            Face face = new Face(leftEye, rightEye, mouth);

            face.ExpressJoy();
            face.ExpressSad();
            face.ExpressMurderousIntent();

            // 9. Template Method

            // create some combos
            ComboAttack comboAttack  = new BoxerCombo();
            ComboAttack fencerAttack = new FencerCombo();

            // execute them directly
            comboAttack.Execute();
            fencerAttack.Execute();

            // add them to a collection
            Queue <ComboAttack> comboAttacks = new Queue <ComboAttack>();

            comboAttacks.Enqueue(comboAttack);
            comboAttacks.Enqueue(fencerAttack);

            // call any of them without caring about their implementation
            comboAttacks.Dequeue().Execute();
            comboAttacks.Dequeue().Execute();

            // 10. Iterator

            IBag <Loot>      goldBag         = new GoldBag(10, true);
            IIterator <Loot> goldBagIterator = goldBag.GetIterator();

            IBag <Loot> equipmentBag = new EquipmentBag(
                new EquipmentLoot[]
            {
                new EquipmentLoot("Shirt"),
                new EquipmentLoot("Pants"),
                new EquipmentLoot("Shoes")
            });

            IIterator <Loot> equipmentIterator = equipmentBag.GetIterator();

            List <IIterator <Loot> > iterators = new List <IIterator <Loot> >()
            {
                goldBagIterator,
                equipmentIterator
            };

            // just having fun with polymorphism
            foreach (IIterator <Loot> iterator in iterators)
            {
                iterator.Current().Open();

                // the important part is that we dont care how the collection is implemented, we just iterate through to the end
                // the iterator could be pulling randomly or popping from a stack/queue and it doesn't matter
                while (iterator.HasNext())
                {
                    iterator.Next().Open();
                }
            }

            // 11. Composite

            Node edmonton      = new NodeComposite("Edmonton");
            Node westEdmonton  = new NodeComposite("West Edmonton");
            Node aldergrove    = new NodeLeaf("Aldergrove");
            Node callingwood   = new NodeLeaf("Callingwood");
            Node southEdmonton = new NodeComposite("South Edmonton");
            Node millwoods     = new NodeLeaf("Mill Woods");
            Node strathcona    = new NodeLeaf("Strathcona");

            edmonton.Add(westEdmonton);
            edmonton.Add(southEdmonton);

            westEdmonton.Add(aldergrove);
            westEdmonton.Add(callingwood);

            southEdmonton.Add(millwoods);
            southEdmonton.Add(strathcona);

            edmonton.Print();     // print all of edmonton areas and neighborhoods
            westEdmonton.Print(); // only print west edmonton neighborhoods
            strathcona.Print();   // print just strathcona

            // 12. State Pattern

            Car car = new Car();

            car.TurnKey();
            car.Drive("North");
            car.Brake();
            car.Drive("West");
            car.TurnKey(); // car is already on, state won't change
            car.Brake();
            car.TurnOff();

            // 13. Proxy

            IKnight trevor = new Proxy.Knight();
            IKnight leeroy = new Proxy.Knight();
            IKnight tony   = new Proxy.KnightInTraining();

            List <IKnight> _famousTrio = new List <IKnight>()
            {
                trevor, leeroy, tony
            };

            foreach (IKnight trioMember in _famousTrio)
            {
                trioMember.DoTraining();
                trioMember.DoLocalAdventure();
                trioMember.DoEpicAdventure(); // tony won't go on the epic adventure that he was not ready for!
            }

            // 14: Flyweight

            SpriteFactory spriteFactory = new SpriteFactory();

            // even though we have all these millions of sprites, we have saved a ton memory
            // because our factory reuses existing immutable colors and textures
            List <Sprite> sprites = new List <Sprite>();

            sprites.Add(spriteFactory.GetSprite("red", "spooky", false));
            sprites.Add(spriteFactory.GetSprite("red", "scary", false));
            sprites.Add(spriteFactory.GetSprite("blue", "spooky", false));
            sprites.Add(spriteFactory.GetSprite("blue", "scary", false));
            sprites.Add(spriteFactory.GetSprite("red", "scary", false));
            sprites.Add(spriteFactory.GetSprite("red", "spooky", false));
            sprites.Add(spriteFactory.GetSprite("red", "spooky", false));
            sprites.Add(spriteFactory.GetSprite("red", "spooky", false));
            sprites.Add(spriteFactory.GetSprite("red", "scary", false));
            sprites.Add(spriteFactory.GetSprite("blue", "spooky", false));
            sprites.Add(spriteFactory.GetSprite("blue", "scary", false));
            sprites.Add(spriteFactory.GetSprite("red", "scary", false));
            sprites.Add(spriteFactory.GetSprite("red", "spooky", false));
            sprites.Add(spriteFactory.GetSprite("red", "spooky", false));
        }
Пример #19
0
        static void Main(string[] args)
        {
            RayGun     green    = new RayGun("green ray gun", 2);
            RayGun     red      = new RayGun("red ray gun", 4);
            SpaceArmor titanium = new SpaceArmor("titanium space armor", 50);
            SpaceArmor alien    = new SpaceArmor("alien tech space armor", 100);
            GravBoots  nike     = new GravBoots("Nike grav boots", 2);
            GravBoots  adidas   = new GravBoots("Adidas grav boots", 4);
            AlienText  romulan  = new AlienText("book of Romulan wisdom", 2);
            AlienText  vulcan   = new AlienText("book of Vulcan wisdom", 4);

            IEquipable[] treasure = new IEquipable[8] {
                green, red, titanium, alien, nike, adidas, romulan, vulcan
            };

            ConsoleYellow("********NINJAS IN SPACE********");

            Hero player = PlayerSetup();

            ConsoleYellow($"You, {player.Name}, have been chosen(randomly selected) to join a team of developer ninjas on a space quest!  To seek out new algorithms, new data structures, and go where no else wants to go! DEEP SPACE!!!\n\nHere you will encounter aliens, space monsters, and the unknown to bring back algorithms to benefit all humans. You now must choose your team.\n\nPress Enter to Start");

            ConsoleKey key = Console.ReadKey(true).Key;

            while (key != ConsoleKey.Enter)
            {
                key = Console.ReadKey(true).Key;
            }
            Console.WriteLine("Please select two crew members");

            Hero teammate1 = TeamSetup();
            Hero teammate2 = TeamSetup();

            List <Hero> party = new List <Hero>()
            {
                player, teammate1, teammate2
            };

            int planet = 0;

            while (planet < 5)
            {
                Console.WriteLine("");
                ConsoleYellow($"Welcome to Planet {planet+1}!");
                ConsoleYellow("=====================");
                List <Enemy> enemies = new List <Enemy>();

                Spider    enemy1 = new Spider("Space Spider 1");
                Zombie    enemy2 = new Zombie("Space Zombie 1");
                Xenomorph enemy3 = new Xenomorph("Xenomorph 1");
                enemies.Add(enemy1);
                enemies.Add(enemy2);
                enemies.Add(enemy3);

                Random die   = new Random();
                int    round = 0;
                while (SumHealthParty(party) > 0 && SumHealthEnemies(enemies) > 0)
                {
                    int turn = round % 6;
                    if (turn >= 0 && turn < 3)
                    {
                        if (party[turn].Health > 0)
                        {
                            Console.WriteLine("");
                            EncounterStatus(party, enemies);
                            if (party[turn] is Ninja)
                            {
                                Ninja ninjaClone = (Ninja)party[turn];
                                Console.WriteLine($"{ninjaClone.Name}'s turn. (A)ttack or (B)ackstab?");
                                string Action = Console.ReadLine();
                                Console.WriteLine($"Target? (1){enemies[0].Name} (2){enemies[1].Name} (3){enemies[2].Name}");
                                string Target = Console.ReadLine();
                                if (Action == "A")
                                {
                                    ninjaClone.Attack(enemies[int.Parse(Target) - 1]);
                                }
                                else if (Action == "B")
                                {
                                    ninjaClone.Backstab(enemies[int.Parse(Target) - 1]);
                                }
                                else if (Action == "Z")
                                {
                                    enemies[int.Parse(Target) - 1].Health = 0;
                                    Console.WriteLine("Let's get this over with");
                                    Console.WriteLine("");
                                }
                            }
                            else if (party[turn] is Samurai)
                            {
                                Samurai samuraiClone = (Samurai)party[turn];
                                Console.WriteLine($"{samuraiClone.Name}'s turn. (A)ttack or (M)editate?");
                                string Action = Console.ReadLine();
                                if (Action == "A")
                                {
                                    Console.WriteLine($"Target? (1){enemies[0].Name} (2){enemies[1].Name} (3){enemies[2].Name}");
                                    string Target = Console.ReadLine();
                                    samuraiClone.Attack(enemies[int.Parse(Target) - 1]);
                                }
                                else if (Action == "M")
                                {
                                    samuraiClone.Meditate();
                                }
                                else if (Action == "Z")
                                {
                                    Console.WriteLine($"Target? (1){enemies[0].Name} (2){enemies[1].Name} (3){enemies[2].Name}");
                                    string Target = Console.ReadLine();
                                    enemies[int.Parse(Target) - 1].Health = 0;
                                    Console.WriteLine("Let's get this over with");
                                    Console.WriteLine("");
                                }
                            }
                            else if (party[turn] is Wizard)
                            {
                                Wizard wizardClone = (Wizard)party[turn];
                                Console.WriteLine($"{wizardClone.Name}'s turn. (A)ttack or (S)hield?");
                                string Action = Console.ReadLine();
                                if (Action == "A")
                                {
                                    Console.WriteLine($"Target? (1){enemies[0].Name} (2){enemies[1].Name} (3){enemies[2].Name}");
                                    string Target = Console.ReadLine();
                                    wizardClone.Attack(enemies[int.Parse(Target) - 1]);
                                }
                                else if (Action == "S")
                                {
                                    Console.WriteLine($"Target? (1){party[0].Name} (2){party[1].Name} (3){party[2].Name}");
                                    string Target = Console.ReadLine();
                                    wizardClone.Shield(party[int.Parse(Target) - 1]);
                                }
                                else if (Action == "Z")
                                {
                                    Console.WriteLine($"Target? (1){enemies[0].Name} (2){enemies[1].Name} (3){enemies[2].Name}");
                                    string Target = Console.ReadLine();
                                    enemies[int.Parse(Target) - 1].Health = 0;
                                    Console.WriteLine("Let's get this over with");
                                    Console.WriteLine("");
                                }
                            }
                        }
                    }
                    else
                    {
                        if (enemies[turn - 3].Health > 0)
                        {
                            Console.WriteLine("");
                            EncounterStatus(party, enemies);
                            if (enemies[turn - 3] is Zombie)
                            {
                                Zombie zombieClone = (Zombie)enemies[turn - 3];
                                Console.WriteLine($"{zombieClone.Name}'s turn.");
                                Random rand     = new Random();
                                bool   attacked = false;
                                while (!attacked)
                                {
                                    int target = rand.Next(3);
                                    if (party[target].Health > 0)
                                    {
                                        zombieClone.Attack(party[target]);
                                        attacked = true;
                                    }
                                }
                                Console.WriteLine("Please press \"Enter\" to continue");
                                string Action = Console.ReadLine();
                            }
                            else if (enemies[turn - 3] is Spider)
                            {
                                Spider spiderClone = (Spider)enemies[turn - 3];
                                Console.WriteLine($"{spiderClone.Name}'s turn.");
                                Random rand     = new Random();
                                bool   attacked = false;
                                while (!attacked)
                                {
                                    int target = rand.Next(3);
                                    if (party[target].Health > 0)
                                    {
                                        spiderClone.Attack(party[target]);
                                        attacked = true;
                                    }
                                }
                                Console.WriteLine("Please press \"Enter\" to continue");
                                string Action = Console.ReadLine();
                            }
                            else if (enemies[turn - 3] is Xenomorph)
                            {
                                Xenomorph xenoClone = (Xenomorph)enemies[turn - 3];
                                Console.WriteLine($"{xenoClone.Name}'s turn.");
                                Random rand     = new Random();
                                bool   attacked = false;
                                while (!attacked)
                                {
                                    int target = rand.Next(3);
                                    if (party[target].Health > 0)
                                    {
                                        xenoClone.Attack(party[target]);
                                        attacked = true;
                                    }
                                }
                                Console.WriteLine("Please press \"Enter\" to continue");
                                string Action = Console.ReadLine();
                            }
                        }
                    }
                    if (SumHealthEnemies(enemies) <= 0)
                    {
                        Console.WriteLine("All enemies vanquished! Congratulations!");
                        int        d8            = die.Next(8);
                        IEquipable foundTreasure = treasure[d8];
                        Equipment  equipClone    = (Equipment)foundTreasure;
                        Console.WriteLine($"You found {equipClone.Name}! {equipClone.Desc} Who should equip it?");
                        string choice = "0";
                        while (choice != "1" && choice != "2" && choice != "3")
                        {
                            Console.WriteLine($"Please type the number of the hero you would like to equip:\n1. {party[0].Name}\n2. {party[1].Name}\n3. {party[2].Name}");
                            choice = Console.ReadLine();
                        }
                        switch (choice)
                        {
                        case ("1"):
                            foundTreasure.Equip(party[0]);
                            Console.WriteLine($"{party[0].Name} has equipped the {equipClone.Name}");
                            party[0].ShowStats();
                            Console.WriteLine("");
                            break;

                        case ("2"):
                            foundTreasure.Equip(party[1]);
                            Console.WriteLine($"{party[1].Name} has equipped the {equipClone.Name}");
                            party[1].ShowStats();
                            Console.WriteLine("");
                            break;

                        case ("3"):
                            foundTreasure.Equip(party[2]);
                            Console.WriteLine($"{party[2].Name} has equipped the {equipClone.Name}");
                            party[2].ShowStats();
                            Console.WriteLine("");
                            break;
                        }
                        Console.WriteLine("Onward to the next planet! Good thing you brought clones of everyone!");
                        player.Health    = player.MaxHealth;
                        teammate1.Health = teammate1.MaxHealth;
                        teammate2.Health = teammate2.MaxHealth;
                        Console.WriteLine("");
                        planet++;
                        if (planet == 5)
                        {
                            ConsoleYellow("You've certainly accomplished something! Saved the universe? Sure! Congratulations!");
                        }
                    }
                    if (SumHealthParty(party) <= 0)
                    {
                        ConsoleYellow("Your party was killed in self-defense! Game over!");
                        planet = 5;
                    }
                    round++;
                }
            }
        }