Пример #1
0
        public void SummonWraith(Mobile target)
        {
            Ghoul w = new Ghoul();

            w.Name = "a wraith";
            w.Hue  = 0x4FFF;
            w.SetSkill(SkillName.Magery, 75, 100);
            w.SetMana(100);
            w.AI = AIType.AI_Mage;

            if (this.Rider != null)
            {
                if (this.Rider.Map == Map.Internal)
                {
                    w.MoveToWorld(Rider.LogoutLocation, Rider.LogoutMap);
                }
                else
                {
                    w.MoveToWorld(Rider.Location, Rider.Map);
                    target = Rider;
                }
            }
            else
            {
                w.MoveToWorld(this.Location, this.Map);
            }

            if (target != null && w.CanBeHarmful(target) && w.InRange(target, 15))
            {
                w.Attack(target);
            }
            else
            {
                w.NextReaquireTime = DateTime.Now;
            }

            w.PlaySound(w.GetAngerSound());
            w.PlaySound(this.GetDeathSound());
            Delete();
        }
Пример #2
0
        public void SpawnGhouls(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int newGhoul = Utility.RandomMinMax(2, 5);

            for (int i = 0; i < newGhoul; ++i)
            {
                Ghoul ghoul = new Ghoul();

                ghoul.Team      = this.Team;
                ghoul.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);
                    }
                }

                ghoul.MoveToWorld(loc, map);
                ghoul.Combatant = target;
            }
        }
Пример #3
0
		public void SpawnGhouls( Mobile target )
		{
			Map map = this.Map;
			
			if( map == null )
				return;
			
			int newGhoul = Utility.RandomMinMax( 2, 5 );
			
			for( int i = 0; i < newGhoul; ++i )
			{
				Ghoul ghoul = new Ghoul();
				
				ghoul.Team = this.Team;
				ghoul.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 );
				}
				
				ghoul.MoveToWorld( loc, map );
				ghoul.Combatant = target;
			}
		}
Пример #4
0
        public void SummonWraith( Mobile target )
        {
            Ghoul w = new Ghoul();
            w.Name = "a wraith";
            w.Hue = 0x4FFF;
            w.SetSkill( SkillName.Magery, 75, 100 );
            w.SetMana( 100 );
            w.AI = AIType.AI_Mage;

            if ( this.Rider != null )
            {
                if ( this.Rider.Map == Map.Internal )
                {
                    w.MoveToWorld( Rider.LogoutLocation, Rider.LogoutMap );
                }
                else
                {
                    w.MoveToWorld( Rider.Location, Rider.Map );
                    target = Rider;
                }
            }
            else
            {
                w.MoveToWorld( this.Location, this.Map );
            }

            if ( target != null && w.CanBeHarmful( target ) && w.InRange( target, 15 ) )
                w.Attack( target );
            else
                w.NextReaquireTime = DateTime.Now;

            w.PlaySound( w.GetAngerSound() );
            w.PlaySound( this.GetDeathSound() );
            Delete();
        }