Пример #1
0
        //TODO: Invocacion de los ayudantes
        //public void SpawnHelpers()
        //{
        //    int amount = 1;

        //    //TODO: Debe coger de algun sitio el numero de personas que han entrado
        //    //if ( Altar != null )
        //    //	amount = Altar.Fighters.Count;

        //    if ( amount > 5 )
        //        amount = 5;

        //    for ( int i = 0; i < amount; i ++ )
        //    {
        //        switch ( Utility.Random( 2 ) )
        //        {
        //            case 0: SpawnHelper( new MantraEffervescence(), 2 ); break;
        //            case 1: SpawnHelper( new CorporealBrume(), 2 ); break;
        //            case 2: SpawnHelper( new FetidEssence(), 2 ); break;
        //        }
        //    }
        //}

        public override void OnBeforeSpawn(Point3D location, Map map)
        {
            BaseCreature brume = new CorporealBrume();

            brume.Team = this.Team;
            brume.MoveToWorld(location, map);

            BaseCreature mantra = new MantraEffervescence();

            mantra.Team = this.Team;
            mantra.MoveToWorld(location, map);

            BaseCreature fetid = new FetidEssence();

            fetid.Team = this.Team;
            fetid.MoveToWorld(location, map);

            m_Summons.Add(brume);
            m_Summons.Add(mantra);
            m_Summons.Add(fetid);

            base.OnBeforeSpawn(location, map);
        }
Пример #2
0
        public void SpawnAllies(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int allies = 0;

            foreach (Mobile m in this.GetMobilesInRange(10))
            {
                if (m is CorporealBrume || m is FetidEssence || m is MantraEffervescence)
                {
                    ++allies;
                }
            }

            if (allies < 8)
            {
                PlaySound(0x3D);

                int newAllies = Utility.RandomMinMax(3, 4);

                for (int i = 0; i < newAllies; ++i)
                {
                    BaseCreature ally;

                    switch (Utility.Random(3))
                    {
                    default:
                    case 0: ally = new CorporealBrume(); break;

                    case 1: ally = new FetidEssence(); break;

                    case 2: ally = new MantraEffervescence(); break;
                    }

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

                    ally.MoveToWorld(loc, map);
                    ally.Combatant = target;
                }
            }
        }
Пример #3
0
        //TODO: Invocacion de los ayudantes
        //public void SpawnHelpers()
        //{
        //    int amount = 1;
        //    //TODO: Debe coger de algun sitio el numero de personas que han entrado
        //    //if ( Altar != null )
        //    //	amount = Altar.Fighters.Count;
        //    if ( amount > 5 )
        //        amount = 5;
        //    for ( int i = 0; i < amount; i ++ )
        //    {
        //        switch ( Utility.Random( 2 ) )
        //        {
        //            case 0: SpawnHelper( new MantraEffervescence(), 2 ); break;
        //            case 1: SpawnHelper( new CorporealBrume(), 2 ); break;
        //            case 2: SpawnHelper( new FetidEssence(), 2 ); break;
        //        }
        //    }
        //}
        public override void OnBeforeSpawn( Point3D location, Map map )
        {
            BaseCreature brume = new CorporealBrume();
            brume.Team = this.Team;
            brume.MoveToWorld( location, map );

            BaseCreature mantra = new MantraEffervescence();
            mantra.Team = this.Team;
            mantra.MoveToWorld( location, map );

            BaseCreature fetid = new FetidEssence();
            fetid.Team = this.Team;
            fetid.MoveToWorld( location, map );

            m_Summons.Add( brume );
            m_Summons.Add( mantra );
            m_Summons.Add( fetid );

            base.OnBeforeSpawn( location, map );
        }