Inheritance: BaseCreature, ICarvable, IMediumPrey
Esempio n. 1
0
        public override bool OnBeforeDeath()
        {
            foreach (Mobile m in m_sheep)
            {
                if (m is ShepherdsSheep && m.Alive && ((ShepherdsSheep)m).ControlMaster == null)
                {
                    Point3D sheeploc = m.Location;
                    Sheep   sheepa   = new Sheep();
                    sheepa.Location = sheeploc;
                    sheepa.MoveToWorld(sheeploc, m.Map);
                    sheepa.Hue = m.Hue;
                    m.Delete();
                }
            }

            foreach (Mobile m in m_dog)
            {
                if (m is ShepherdsDog && m.Alive && ((ShepherdsDog)m).ControlMaster == null)
                {
                    Point3D dogloc = m.Location;
                    Dog     doga   = new Dog();
                    doga.Location = dogloc;
                    doga.MoveToWorld(dogloc, m.Map);
                    doga.Hue = m.Hue;
                    m.Delete();
                }
            }

            return(base.OnBeforeDeath());
        }
Esempio n. 2
0
            public InternalTimer(Mobile from, Sheep sheep) : base(TimeSpan.FromSeconds(1.0))
            {
                m_From  = from;
                m_Sheep = sheep;

                if (from is PlayerMobile)
                {
                    ((PlayerMobile)from).ResetPlayerAction(this);
                }
            }
Esempio n. 3
0
        public override bool OnBeforeDeath()
        {	
            foreach( Mobile m in m_sheep )
            {
                if (m is ShepherdsSheep && m.Alive && ((ShepherdsSheep)m).ControlMaster == null)
                {
                    Point3D sheeploc = m.Location;
                    Sheep sheepa = new Sheep();
                    sheepa.Location = sheeploc;
                    sheepa.MoveToWorld(sheeploc, m.Map);
                    sheepa.Hue = m.Hue;
                    m.Delete();
                }
            }

            foreach (Mobile m in m_dog)
            {
                if (m is ShepherdsDog && m.Alive && ((ShepherdsDog)m).ControlMaster == null)
                {
                    Point3D dogloc = m.Location;
                    Dog doga = new Dog();
                    doga.Location = dogloc;
                    doga.MoveToWorld(dogloc, m.Map);
                    doga.Hue = m.Hue;
                    m.Delete();
                }
            }
			
            return base.OnBeforeDeath();
        }
Esempio n. 4
0
		public virtual void SpawnEnemies( RVS Handeling, String RegionName, int amount)
		{
			int numberOfEnemies = amount;
			int kindOfEnemy = 0;
			int randomEnemy = 0;
			Mobile Enemy = null;
			//Mobile Enemy = new Sheep();
			
			int randomValueX = 0;
			int randomValueY = 0;
			int negative = 0;
			
			Point3D spawn;
			Map spawnmap;
			
			if ( RegionName == "Sheep" )
			{
				spawn = SheepSpawnPoint;
				spawnmap = SheepSpawnMap;
				kindOfEnemy = 0;
			}
			else if ( RegionName == "Rabbit" )
			{
				spawn = RabbitSpawnPoint;
				spawnmap = RabbitSpawnMap;
				kindOfEnemy = 1;
			}
			else
			{
				spawn = SheepSpawnPoint;
				spawnmap = SheepSpawnMap;
				kindOfEnemy = 0;
			}
			
			for ( int i = 0; i < numberOfEnemies; i++ )
			{
				//kindOfEnemy = Utility.Random( 5 );
				
				randomValueX = Utility.Random( 11 );
				negative = Utility.Random( 2 );
				if ( negative > 0 )
					randomValueX *= -1;
					
				negative = Utility.Random( 2 );
				randomValueY = Utility.Random( 11 );
				if ( negative > 0 )
					randomValueY *= -1;
				
				if ( Handeling.RvS )
				{ 
					switch ( kindOfEnemy )
					{
						case 0:
							{
								Enemy = new Sheep();
								break;
							}
						case 1:
							{
								Enemy = new Rabbit();
								break;
							}
					}
				}
				else if ( Handeling.Orcs )
				{ 
					kindOfEnemy = 0;
					randomEnemy = Utility.Random( 100 );
					if ( randomEnemy <= 20 )
						kindOfEnemy++;
					if ( randomEnemy <= 10 )
						kindOfEnemy++;
					if ( randomEnemy <= 5 )
						kindOfEnemy++;
					
					switch ( kindOfEnemy )
					{
						case 0:
							{
								Enemy = new Orc();
								break;
							}
						case 1:
							{
								Enemy = new OrcishLord();
								break;
							}
						case 2:
							{
								Enemy = new Ettin();
								break;
							}
						case 3:
							{
								Enemy = new OrcishMage();
								break;
							}
					}
				}
				else if ( Handeling.Lizardmen )
				{ 
					kindOfEnemy = 0;
					randomEnemy = Utility.Random( 100 );
					if ( randomEnemy <= 20 )
						kindOfEnemy++;
					if ( randomEnemy <= 10 )
						kindOfEnemy++;
					if ( randomEnemy <= 5 )
						kindOfEnemy++;
					switch ( kindOfEnemy )
					{
						case 0:
							{
								Enemy = new Snake();
								break;
							}
						case 1:
							{
								Enemy = new GiantSerpent();
								break;
							}
						case 2:
							{
								Enemy = new Lizardman();
								break;
							}
						case 3:
							{
								Enemy = new Drake();
								break;
							}
					}
				}
				else if ( Handeling.Ratmen )
				{ 
					kindOfEnemy = 0;
					randomEnemy = Utility.Random( 100 );
					if ( randomEnemy <= 20 )
						kindOfEnemy++;
					if ( randomEnemy <= 15 )
						kindOfEnemy++;
					if ( randomEnemy <= 10 )
						kindOfEnemy++;
					if ( randomEnemy <= 5 )
						kindOfEnemy++;
					switch ( kindOfEnemy )
					{
						case 0:
							{
								Enemy = new Sewerrat();
								break;
							}
						case 1:
							{
								Enemy = new GiantRat();
								break;
							}
						case 2:
							{
								Enemy = new Ratman();
								break;
							}
						case 3:
							{
								Enemy = new RatmanMage();
								break;
							}	
						case 4:
							{
								Enemy = new RatmanArcher();
								break;
							}
					}
				}
				else if ( Handeling.Undead )
				{ 
					kindOfEnemy = 0;
					randomEnemy = Utility.Random( 100 );
					if ( randomEnemy <= 50 )
						kindOfEnemy++;
					if ( randomEnemy <= 40 )
						kindOfEnemy++;
					if ( randomEnemy <= 30 )
						kindOfEnemy++;
					if ( randomEnemy <= 20 )
						kindOfEnemy++;
					if ( randomEnemy <= 10 )
						kindOfEnemy++;
					if ( randomEnemy <= 5 )
						kindOfEnemy++;
						
					switch ( kindOfEnemy )
					{
						case 0:
							{
								Enemy = new Skeleton();
								break;
							}
						case 1:
							{
								Enemy = new Zombie();
								break;
							}
						case 2:
							{
								Enemy = new RestlessSoul();
								break;
							}
						case 3:
							{
								Enemy = new SkeletalMage();
								break;
							}
						case 4:
							{
								Enemy = new SkeletalKnight();
								break;
							}
						case 5:
							{
								Enemy = new Mummy();
								break;
							}
						case 6:
							{
								Enemy = new Lich();
								break;
							}
					}
				}
				
				Enemy.Map = spawnmap;
				Enemy.Location = new Point3D((spawn.X + randomValueX), (spawn.Y + randomValueY), (spawn.Z));
				
				Enemies.Add(Enemy);
			}
		}
Esempio n. 5
0
            public InternalTimer(Mobile from, Sheep sheep) : base(TimeSpan.FromSeconds(1.0))
            {
                m_From = from;
                m_Sheep = sheep;

                if (from is PlayerMobile)
                    ((PlayerMobile)from).ResetPlayerAction(this);
            }