Exemple #1
0
        public void SpawnBogling(Mobile m)
        {
            Map map = Map;

            if (map == null)
            {
                return;
            }

            Bogling spawned = new Bogling();

            spawned.Team = Team;

            bool    validLocation = false;
            Point3D loc           = 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, 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);
                }
            }

            spawned.MoveToWorld(loc, map);
            spawned.Combatant = m;
        }
Exemple #2
0
		public void SpawnBogling( Mobile m )
		{
			Map map = this.Map;

			if ( map == null )
				return;

			Bogling spawned = new Bogling();

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

			spawned.MoveToWorld( loc, map );
			spawned.Combatant = m;
		}
Exemple #3
0
        public void SpawnBogling(Mobile m)
        {
            var map = Map;

            if (map == null)
            {
                return;
            }

            var spawned = new Bogling {
                Team = Team
            };

            spawned.MoveToWorld(map.GetRandomNearbyLocation(Location), map);
            spawned.Combatant = m;
        }
Exemple #4
0
        public void SpawnBogling(Mobile m)
        {
            var map = Map;

            if (map == null)
                return;

            var spawned = new Bogling();

            spawned.Team = Team;

            var validLocation = false;
            var loc = Location;

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

                if (validLocation = map.CanFit(x, y, 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);
            }

            spawned.MoveToWorld(loc, map);
            spawned.Combatant = m;
        }
        public void SpawnLesser(Mobile m)
        {
            Map map = this.Map;

            if (map == null)
                return;

            Bogling bl = new Bogling();
            bl.Hue = 30000;
            bl.Name = "Lesser Harvester";
            bl.HitsMaxSeed = 200;
            bl.Hits = 200;
            bl.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);
            }

            bl.MoveToWorld(loc, map);
            bl.Combatant = m;
        }