Esempio n. 1
0
        public void Morph()
        {
            if (m_TrueForm)
            {
                return;
            }
            m_TrueForm = true;
            PlaySound(0x1BA);
            Name      = "the corrupted lost soul";
            BodyValue = 308;
            Hue       = 1175;

            Hits = HitsMax;
            Stam = StamMax;
            Mana = ManaMax;

            PublicOverheadMessage(MessageType.Regular, GetRandomHue(), true, "Y-you!");

            Map map        = this.Map;
            int newghostsx = 8;

            for (int i = 0; i < newghostsx; ++i)
            {
                BaseCreature ghostsx;

                switch (Utility.Random(12))
                {
                default:
                case 0:  ghostsx = new DarkChocolateDragon(); break;

                case 1:  ghostsx = new WhiteChocolateDragon(); break;

                case 2:  ghostsx = new MilkChocolateDragon(); break;

                case 3:  ghostsx = new HalloweenWitch(); break;

                case 4:  ghostsx = new HalloweenScarecrow(); break;

                case 5:  ghostsx = new HalloweenSkeleton(); break;

                case 6:  ghostsx = new HalloweenZombie(); break;

                case 7:  ghostsx = new GhostPhysical(); break;

                case 8:  ghostsx = new GhostMagical(); break;

                case 9:  ghostsx = new HalloweenMummy(); break;

                case 10: ghostsx = new HalloweenVampireBat(); break;

                case 11: ghostsx = new TheVampire(); break;
                }

                ghostsx.Team = this.Team;

                bool    validLocation = false;
                Point3D loc           = this.Location;

                for (int j = 0; !validLocation && j < 10; ++j)
                {
                    int x = X + GetRandomLocation();
                    int y = Y + GetRandomLocation();
                    int z = map.GetAverageZ(x, y);

                    if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                    {
                        loc = new Point3D(x, y, Z);
                    }
                    else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                    {
                        loc = new Point3D(x, y, z);
                    }
                }

                ghostsx.MoveToWorld(loc, map);
            }
        }
Esempio n. 2
0
        public void SpawnVictim(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int victims = 0;

            foreach (Mobile m in this.GetMobilesInRange(10))
            {
                if (m is HalloweenVampireVictim || m is HalloweenVampireBat)
                {
                    ++victims;
                }
            }

            if (victims < 6)
            {
                PlaySound(0x3D);

                int newvictimsx = Utility.RandomMinMax(1, 2);

                for (int i = 0; i < newvictimsx; ++i)
                {
                    BaseCreature victimsx;

                    switch (Utility.Random(5))
                    {
                    default:
                    case 0:
                    case 1: victimsx = new HalloweenVampireVictim(); break;

                    case 2:
                    case 3: victimsx = new HalloweenVampireBat(); break;

                    case 4:                 victimsx = new HalloweenVampireVictim(); break;
                    }

                    victimsx.Team = this.Team;

                    bool    validLocation = false;
                    Point3D loc           = this.Location;

                    for (int j = 0; !validLocation && j < 10; ++j)
                    {
                        int x = X + Utility.Random(3) - 1;
                        int y = Y + Utility.Random(3) - 1;
                        int z = map.GetAverageZ(x, y);

                        if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                        {
                            loc = new Point3D(x, y, Z);
                        }
                        else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                        {
                            loc = new Point3D(x, y, z);
                        }
                    }

                    victimsx.MoveToWorld(loc, map);
                    victimsx.Combatant = target;
                }
            }
        }