Ejemplo n.º 1
0
        public override void OnTrigger(Mobile from)
        {
            if (m_Image == null || m_Type == null || !from.Player || !from.Alive || from.AccessLevel > AccessLevel.Player)
            {
                return;
            }

            if (m_Type != AmbushTrapType.Cage)
            {
                Point3D loc = new Point3D(this.X, this.Y, this.Z);

                DoLaunch(this, from, loc, this.Map);
            }
            else
            {
                //Make Cage Around the Player
                BoneWallAddon BoneCage;
                Point3D       Target = new Point3D(this.X, this.Y, this.Z);
                for (int i = 0; i < 4; i++)
                {
                    BoneCage = new BoneWallAddon();
                    if (i == 0)
                    {
                        Target.X++;
                    }
                    else if (i == 1)
                    {
                        Target.X--;
                        Target.X--;
                    }
                    else if (i == 2)
                    {
                        Target.X++;
                        Target.Y++;
                    }
                    else if (i == 3)
                    {
                        Target.Y--;
                        Target.Y--;
                    }

                    bool canfit = AdjustField(ref Target, this.Map, 22, true);

                    if (canfit)
                    {
                        BoneCage.Map      = this.Map;
                        BoneCage.Location = Target;
                        //Add Sparkles
                        Effects.SendLocationParticles(BoneCage, 0x376A, 9, 10, 5025);
                    }
                    else
                    {
                        BoneCage.Delete();
                    }
                }
            }

            this.Delete();
        }
Ejemplo n.º 2
0
		public BoneWallSkeleton(BoneWallAddon wall) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			CantWalk = true;
			Name = "a skeleton";
			Body = Utility.RandomList( 50, 56 );
			BaseSoundID = 0x48D;

			SetStr( 56, 80 );
			SetDex( 56, 75 );
			SetInt( 16, 40 );

			SetHits( 34, 48 );

			SetDamage( 3, 7 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 15, 20 );
			SetResistance( ResistanceType.Fire, 5, 10 );
			SetResistance( ResistanceType.Cold, 25, 40 );
			SetResistance( ResistanceType.Poison, 25, 35 );
			SetResistance( ResistanceType.Energy, 5, 15 );

			SetSkill( SkillName.MagicResist, 45.1, 60.0 );
			SetSkill( SkillName.Tactics, 45.1, 60.0 );
			SetSkill( SkillName.Wrestling, 45.1, 55.0 );

			Fame = 450;
			Karma = -450;

			VirtualArmor = 16;

			switch ( Utility.Random( 5 ))
			{
				case 0: PackItem( new BoneArms() ); break;
				case 1: PackItem( new BoneChest() ); break;
				case 2: PackItem( new BoneGloves() ); break;
				case 3: PackItem( new BoneLegs() ); break;
				case 4: PackItem( new BoneHelm() ); break;
			}
			
			this.Wall = wall;
		}
Ejemplo n.º 3
0
		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( targeted is IPoint3D )
			{
				from.SendMessage("Valid spot for a bone wall!");
				
				IPoint3D p = targeted as IPoint3D;

				Point3D targ3D;
				Point3D Right;
				Point3D Left;
				if ( p is Item )
					targ3D = ((Item)p).GetWorldLocation();
				else
					targ3D = new Point3D( p );
				
				//Determine if the wall should be northtosouth or easttowest
				
				int dx = from.Location.X - targ3D.X;
				int dy = from.Location.Y - targ3D.Y;
				int rx = (dx - dy) * 44;
				int ry = (dx + dy) * 44;

				bool eastToWest;

				if ( rx >= 0 && ry >= 0 )
				{
					eastToWest = false;
				}
				else if ( rx >= 0 )
				{
					eastToWest = true;
				}
				else if ( ry >= 0 )
				{
					eastToWest = true;
				}
				else
				{
					eastToWest = false;
				}
				
				if (!eastToWest)
				{
					//northtosouth
					//only if the target is west or east of the caster
					Right = new Point3D(targ3D.X, targ3D.Y-1, targ3D.Z);
					Left = new Point3D(targ3D.X, targ3D.Y+1, targ3D.Z);
					
				}
				else
				{
					//easttowest
					//only if the target is north or south of the caster
					Right = new Point3D(targ3D.X-1, targ3D.Y, targ3D.Z);
					Left = new Point3D(targ3D.X+1, targ3D.Y, targ3D.Z);
				}
				
				//Create the bone walls!
				bool canFit = AdjustField( ref targ3D, from.Map, 22, true );
				if ( canFit )
				{
					Item BoneWall = new BoneWallAddon();
					BoneWall.Map = from.Map;
					BoneWall.Location = targ3D;
					//Add Sparkles
					Effects.SendLocationParticles( BoneWall, 0x376A, 9, 10, 5025 );
				}
				
				canFit = AdjustField( ref Right, from.Map, 22, true );
				if ( canFit )
				{
					Item BoneWall2 = new BoneWallAddon();
					BoneWall2.Map = from.Map;
					BoneWall2.Location = Right;
					
					Effects.SendLocationParticles( BoneWall2, 0x376A, 9, 10, 5025 );
				}
				
				canFit = AdjustField( ref Left, from.Map, 22, true );
				if ( canFit )
				{
					Item BoneWall3 = new BoneWallAddon();
					BoneWall3.Map = from.Map;
					BoneWall3.Location = Left;
					Effects.SendLocationParticles( BoneWall3, 0x376A, 9, 10, 5025 );
				}
			}
			else
			{
				from.SendMessage("Invalid spot for a bone wall!");
			}
		}
Ejemplo n.º 4
0
		public override void OnTrigger( Mobile from )
		{
			if ( m_Image == null || m_Type == null || !from.Player || !from.Alive || from.AccessLevel > AccessLevel.Player )
				return;
				
			if ( m_Type != AmbushTrapType.Cage )
			{
				Point3D loc = new Point3D(this.X,this.Y,this.Z);
				
				DoLaunch( this, from, loc, this.Map );
			}
			else
			{
				//Make Cage Around the Player
				BoneWallAddon BoneCage;
				Point3D Target = new Point3D(this.X, this.Y, this.Z);
				for ( int i=0; i < 4; i++ )
				{
					BoneCage = new BoneWallAddon();
					if ( i == 0 )
					{
						Target.X++;
					}
					else if ( i == 1 )
					{
						Target.X--;
						Target.X--;
					}
					else if ( i == 2 )
					{
						Target.X++;
						Target.Y++;
					}
					else if ( i == 3 )
					{
						Target.Y--;
						Target.Y--;
					}
					
					bool canfit = AdjustField( ref Target, this.Map, 22, true );
				
					if ( canfit )
					{
						BoneCage.Map = this.Map;
						BoneCage.Location = Target;
						//Add Sparkles
						Effects.SendLocationParticles( BoneCage, 0x376A, 9, 10, 5025 );
					}
					else
					{
						BoneCage.Delete();
					}
				}
			}
			
			this.Delete();
		}
Ejemplo n.º 5
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (targeted is IPoint3D)
            {
                from.SendMessage("Valid spot for a bone wall!");

                IPoint3D p = targeted as IPoint3D;

                Point3D targ3D;
                Point3D Right;
                Point3D Left;
                if (p is Item)
                {
                    targ3D = ((Item)p).GetWorldLocation();
                }
                else
                {
                    targ3D = new Point3D(p);
                }

                //Determine if the wall should be northtosouth or easttowest

                int dx = from.Location.X - targ3D.X;
                int dy = from.Location.Y - targ3D.Y;
                int rx = (dx - dy) * 44;
                int ry = (dx + dy) * 44;

                bool eastToWest;

                if (rx >= 0 && ry >= 0)
                {
                    eastToWest = false;
                }
                else if (rx >= 0)
                {
                    eastToWest = true;
                }
                else if (ry >= 0)
                {
                    eastToWest = true;
                }
                else
                {
                    eastToWest = false;
                }

                if (!eastToWest)
                {
                    //northtosouth
                    //only if the target is west or east of the caster
                    Right = new Point3D(targ3D.X, targ3D.Y - 1, targ3D.Z);
                    Left  = new Point3D(targ3D.X, targ3D.Y + 1, targ3D.Z);
                }
                else
                {
                    //easttowest
                    //only if the target is north or south of the caster
                    Right = new Point3D(targ3D.X - 1, targ3D.Y, targ3D.Z);
                    Left  = new Point3D(targ3D.X + 1, targ3D.Y, targ3D.Z);
                }

                //Create the bone walls!
                bool canFit = AdjustField(ref targ3D, from.Map, 22, true);
                if (canFit)
                {
                    Item BoneWall = new BoneWallAddon();
                    BoneWall.Map      = from.Map;
                    BoneWall.Location = targ3D;
                    //Add Sparkles
                    Effects.SendLocationParticles(BoneWall, 0x376A, 9, 10, 5025);
                }

                canFit = AdjustField(ref Right, from.Map, 22, true);
                if (canFit)
                {
                    Item BoneWall2 = new BoneWallAddon();
                    BoneWall2.Map      = from.Map;
                    BoneWall2.Location = Right;

                    Effects.SendLocationParticles(BoneWall2, 0x376A, 9, 10, 5025);
                }

                canFit = AdjustField(ref Left, from.Map, 22, true);
                if (canFit)
                {
                    Item BoneWall3 = new BoneWallAddon();
                    BoneWall3.Map      = from.Map;
                    BoneWall3.Location = Left;
                    Effects.SendLocationParticles(BoneWall3, 0x376A, 9, 10, 5025);
                }
            }
            else
            {
                from.SendMessage("Invalid spot for a bone wall!");
            }
        }