Exemple #1
0
 public InternalTarget(Shadowjump owner) : base(11, true, TargetFlags.None)
 {
     m_Owner = owner;
 }
			public InternalTarget( Shadowjump owner ) : base( 11, true, TargetFlags.None )
			{
				m_Owner = owner;
			}
		public override bool MoveTo( Mobile m, bool run, int range )
		{
			if ( m_Mobile.Hidden && !m_Mobile.Poisoned && m_CanUseNinjitsu )
			{
				Server.SkillHandlers.Stealth.OnUse( m_Mobile );

				if ( base.MoveTo( m, false, range ) == false )
				{
					if ( m_Mobile.Hidden && m_Mobile.AllowedStealthSteps >= 1 && m_CanUseNinjitsu )
					{
						Spell spell = new Shadowjump( m_Mobile, null );
						spell.Cast();
					}

					return false;
				}
				else
					return true;
			}
			else if ( !m_Melees && m != null ) 
			{
				if ( m_Mobile.InRange( m, 2 ) && CheckMove() )
				{
					Direction d = Direction.North;

					switch( m_Mobile.GetDirectionTo( m ) )
					{
						case Direction.North: d = Direction.South; break;
						case Direction.South: d = Direction.North; break;
						case Direction.East: d = Direction.West; break;
						case Direction.West: d = Direction.East; break;
						case Direction.Up: d = Direction.Down; break;
						case Direction.Down: d = Direction.Up; break;
						case Direction.Right: d = Direction.Left; break;
						case Direction.Left: d = Direction.Right; break;
					}

					return DoMove( d, run );
					// base.DoActionFlee();
				}
				else if ( m_Mobile.InRange( m, 4 ) )
					return true;
			}

			return base.MoveTo( m, run, range );
		}