// Method which prints out several properties and methods of the Vampire Bat Class
        public static void DisplayVampireBat()
        {
            Console.WriteLine(
                "Here is a Vampire Bat, it is derived from the " +
                "Animal -> Mammal -> Bat Classes in order.\n");

            Console.WriteLine(
                "The Vampire Bat inherets all of the properties and methods accociated with those Classes.\n" +
                "It also Implements the IBeEvil Interface and inherets the ICanFly Interface from the Bat Class.\n");

            VampireBat vampBat = new VampireBat();

            Console.WriteLine($"How a Vampire Bat eats: {vampBat.Eat(vampBat.Diet)}\n");

            Console.WriteLine($"What does a Vampire Bat wear: {vampBat.BodyCovering}\n");

            Console.WriteLine($"What sound does a Vampire Bat make: {vampBat.MakeSound(vampBat.Sound)}\n");

            Console.WriteLine(
                $"Is it true that a Vampire Bat has inner ear bones: {vampBat.HasEarBones}\n");

            Console.WriteLine($"How does a Vampire Bat fly: {vampBat.HowIFly()}\n");

            Console.WriteLine($"Which phobias does a Vampire Bat cause: {vampBat.PhobiaCaused}\n");
        }
Exemple #2
0
        public static void Vampire(Mobile from)
        {
            AncientMystery.MysteryTypeDetail mysteryTypeDetail = AncientMystery.GetMysteryDetails(AncientMystery.MysteryType.Vampire);

            if (mysteryTypeDetail == null || from == null)
            {
                return;
            }

            Point3D mysteryPoint    = mysteryTypeDetail.m_MysteryLocation;
            Point3D VampireLocation = new Point3D(mysteryPoint.X + 1, mysteryPoint.Y, mysteryPoint.Z);

            MysteryLocation mysteryLocation = new MysteryLocation(AncientMystery.MysteryType.Vampire, from);

            mysteryLocation.ItemID = 16142;
            mysteryLocation.Name   = "an ancient's vampire's coffin";
            mysteryLocation.MoveToWorld(mysteryPoint, from.Map);
            mysteryLocation.Visible = true;


            for (int a = 0; a < 3; a++)
            {
                VampireBat vampireBat  = new VampireBat();
                Point3D    batLocation = VampireLocation;
                //Point3D batLocation = new Point3D(VampireLocation.X + Utility.RandomList(-1, 1), VampireLocation.Y + Utility.RandomList(-1, 1), VampireLocation.Z);

                vampireBat.Murderer = true;
                vampireBat.ResolveAcquireTargetDelay = 1.0;
                vampireBat.RangePerception           = 18;
                vampireBat.MoveToWorld(batLocation, from.Map);
                mysteryLocation.m_Mobiles.Add(vampireBat);

                Effects.PlaySound(batLocation, from.Map, 0x657);
            }

            MysteryVampire mysteryVampire = new MysteryVampire();

            mysteryVampire.Body = 317;
            mysteryVampire.Hue  = 2105;
            mysteryVampire.Name = "a vampire bat";
            mysteryVampire.MoveToWorld(VampireLocation, from.Map);
            mysteryLocation.m_Mobiles.Add(mysteryVampire);

            int projectiles   = 6;
            int particleSpeed = 4;

            for (int a = 0; a < projectiles; a++)
            {
                Point3D newLocation = new Point3D(VampireLocation.X + Utility.RandomList(-5, -4, -3, -2, -1, 1, 2, 3, 4, 5), VampireLocation.Y + Utility.RandomList(-5, -4, -3, -2, -1, 1, 2, 3, 4, 5), VampireLocation.Z);
                SpellHelper.AdjustField(ref newLocation, from.Map, 12, false);

                IEntity effectStartLocation = new Entity(Serial.Zero, new Point3D(VampireLocation.X, VampireLocation.Y, VampireLocation.Z + 5), from.Map);
                IEntity effectEndLocation   = new Entity(Serial.Zero, new Point3D(newLocation.X, newLocation.Y, newLocation.Z + 5), from.Map);

                Effects.SendMovingEffect(effectStartLocation, effectEndLocation, Utility.RandomList(0x3728), particleSpeed, 0, false, false, 0, 0);
            }

            Effects.PlaySound(VampireLocation, from.Map, 0x657);
            Effects.SendLocationParticles(EffectItem.Create(VampireLocation, from.Map, TimeSpan.FromSeconds(5)), 0x3728, 10, 10, 2023);
        }
        public void BatmanAndVampireBatCanReturnDifferentStringsForHowIFlyMethod_ProvingMethodOverride()
        {
            Batman     bruceWayne = new Batman();
            VampireBat vampBat    = new VampireBat();


            Assert.NotEqual(bruceWayne.HowIFly(), vampBat.HowIFly());
        }
        public void VampireBatIsAssignableFromAnimal_ProvingVampireBatImplementsICanFly()
        {
            VampireBat vampBat = new VampireBat();

            Assert.IsAssignableFrom <ICanFly>(vampBat);
        }