Exemplo n.º 1
0
        public void SpawnHalloween(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int ghosts = 0;

            foreach (Mobile m in this.GetMobilesInRange(10))
            {
                if (m is GhostPhysical || m is GhostMagical || m is HalloweenNightmare || m is HalloweenWitch || m is HalloweenScarecrow || m is HalloweenMummy || m is HalloweenZombie || m is WhiteChocolateDragon || m is MilkChocolateDragon || m is DarkChocolateDragon || m is HalloweenSkeleton)
                {
                    ++ghosts;
                }
            }

            if (ghosts < 16)
            {
                PlaySound(0x3D);

                int newghostsx = Utility.RandomMinMax(3, 6);

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

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

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

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

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

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

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

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

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

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

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

                    case 10: ghostsx = new HalloweenSkeleton(); break;
                    }

                    ghostsx.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);
                        }
                    }

                    ghostsx.MoveToWorld(loc, map);
                    ghostsx.Combatant = target;
                }
            }
        }
Exemplo n.º 2
0
        public void SpawnGhosts(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int ghosts = 0;

            foreach (Mobile m in this.GetMobilesInRange(10))
            {
                if (m is GhostPhysical || m is GhostMagical)
                {
                    ++ghosts;
                }
            }

            if (ghosts < 16)
            {
                PlaySound(0x3D);

                int newghostsx = Utility.RandomMinMax(3, 6);

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

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

                    case 2:
                    case 3: ghostsx = new GhostMagical(); break;

                    case 4:                 ghostsx = new GhostPhysical(); break;
                    }

                    ghostsx.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);
                        }
                    }

                    ghostsx.MoveToWorld(loc, map);
                    ghostsx.Combatant = target;
                }
            }
        }
Exemplo n.º 3
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);
            }
        }