Inheritance: BaseCreature
示例#1
0
        public void SpawnDaemons(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            this.Say(1042154);               // You shall never defeat me as long as I have my queen!

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

            for (int i = 0; i < newDaemons; ++i)
            {
                Daemon daemon = new Daemon();

                daemon.Team      = this.Team;
                daemon.FightMode = FightMode.Closest;

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

                daemon.MoveToWorld(loc, map);
                daemon.Combatant = target;
            }
        }
示例#2
0
        public void SpawnDaemon(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int newDaemon = 1;

            for (int i = 0; i < newDaemon; ++i)
            {
                Daemon Daemon = new Daemon();

                Daemon.Team      = this.Team;
                Daemon.FightMode = FightMode.Closest;

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

                Daemon.MoveToWorld(loc, map);
                Daemon.Combatant = target;
            }
        }
示例#3
0
        public void SpawnDaemon(Mobile target)
        {
            Map map = target.Map;

            if (map == null)
            {
                return;
            }

            BaseCreature daemon = new Daemon();

            daemon.Name      = "Stone Daemon";
            daemon.Hue       = 846;
            daemon.Direction = Direction.Up;

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

            for (int j = 0; !validLocation && j < 10; ++j)
            {
                int x = this.X;
                int y = this.Y;
                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);
                }
            }

            daemon.MoveToWorld(loc, map);

            daemon.Combatant = target;
        }
		public void SpawnDaemon( Mobile target )
		{
			Map map = this.Map;

			if ( map == null )
				return;

			int newDaemon = 1;

			for ( int i = 0; i < newDaemon; ++i )
			{
				Daemon Daemon = new Daemon();

				Daemon.Team = this.Team;
				Daemon.FightMode = FightMode.Closest;

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

				Daemon.MoveToWorld( loc, map );
				Daemon.Combatant = target;
			}
		}
示例#5
0
		private void SpawnDaemon( Mobile owner )
		{
			Daemon daemon = new Daemon();
			Point3D point = new Point3D( owner.X + 2, owner.Y + 2, owner.Z );
			
			daemon.MoveToWorld( point, owner.Map );
			daemon.Controlled = true;
			daemon.ControlMaster = owner;
			daemon.ControlOrder = OrderType.Follow;
			daemon.ControlTarget = owner;

			Effects.SendLocationEffect( new Point3D( daemon.X, daemon.Y, daemon.Z + 1 ), daemon.Map, 0x3709, 13 );
			Effects.SendLocationEffect( new Point3D( daemon.X, daemon.Y, daemon.Z ), daemon.Map, 0x37CC, 13 );
			daemon.BoltEffect( 3 );
		}
			protected override void OnTick()
			{
				if ( m_Item.Deleted )
					return;

				Mobile spawn;

				switch ( Utility.Random( 2 ) )
				{
					default:
					case 0: spawn = new Daemon(); break;
					case 1: spawn = new Daemon(); break;
				}

				spawn.MoveToWorld( m_Item.Location, m_Item.Map );

				m_Item.Delete();
			}