Exemplo n.º 1
0
 public DelayTimer(Atomic potion) : base(TimeSpan.FromSeconds(0.75), TimeSpan.FromSeconds(1.0))
 {
     Priority = TimerPriority.FiftyMS;
     m_Potion = potion;
     m_Index  = 3;
     m_Potion.Internalize();
 }
Exemplo n.º 2
0
 public DelayTimer( Atomic potion) : base(TimeSpan.FromSeconds(0.75), TimeSpan.FromSeconds(1.0))
 {
     Priority = TimerPriority.FiftyMS;
     m_Potion = potion;
     m_Index = 3;
     m_Potion.Internalize();
 }
Exemplo n.º 3
0
        public void DungeonHop()
        {
            Atomic bomb = new Atomic();
            bomb.MoveToWorld( this.Location, this.Map );

            Point3D shame = new Point3D( 5414, 20, 20 );
            Point3D destard = new Point3D( 5259, 809, 3 );
            Point3D despise = new Point3D( 5393, 625, 30 );
            Point3D deceit = new Point3D( 5146, 619, -50 );
            Point3D hythloth = new Point3D( 5966, 80, 0 );
            Point3D wrong = new Point3D( 5825, 535, 0 );
            Point3D fire = new Point3D( 5789, 1475, 23 );
            Point3D ice = new Point3D( 5765, 187, -4 );
            Point3D covetous = new Point3D( 5425, 1900, 0 );
            Point3D tera = new Point3D( 5344, 1548, 0 );
            Point3D khaldun = new Point3D( 5463, 1294, 0 );

            int location = Utility.Random( 11 );

            switch ( location )
            {
                case 0: World.Broadcast( 0x35, true, "The creature has fled to Shame!"); this.MoveToWorld( shame, this.Map ); break;
                case 1: World.Broadcast( 0x35, true, "The creature has fled to Destard!"); this.MoveToWorld( destard, this.Map ); break;
                case 2: World.Broadcast( 0x35, true, "The creature has fled to Despise!"); this.MoveToWorld( despise, this.Map ); break;
                case 3: World.Broadcast( 0x35, true, "The creature has fled to Deceit!"); this.MoveToWorld( deceit, this.Map ); break;
                case 4: World.Broadcast( 0x35, true, "The creature has fled to Hythloth!" ); this.MoveToWorld( hythloth, this.Map ); break;
                case 5: World.Broadcast( 0x35, true, "The creature has fled to Wrong!"); this.MoveToWorld( wrong, this.Map ); break;
                case 6: World.Broadcast( 0x35, true, "The creature has fled to Fire!"); this.MoveToWorld( fire, this.Map ); break;
                case 7: World.Broadcast( 0x35, true, "The creature has fled to Ice!"); this.MoveToWorld( ice, this.Map ); break;
                case 8: World.Broadcast( 0x35, true, "The creature has fled to Covetous!"); this.MoveToWorld( covetous, this.Map ); break;
                case 9: World.Broadcast( 0x35, true, "The creature has fled to Terathan Keep!"); this.MoveToWorld( tera, this.Map ); break;
                case 10: World.Broadcast( 0x35, true, "The creature has fled to Khaldun!"); this.MoveToWorld( khaldun, this.Map ); break;
            }
        }
Exemplo n.º 4
0
        public void Bomb(object state)
        {
            Mobile caster = (Mobile)state;

            Atomic bomb = new Atomic();
            bomb.MoveToWorld(caster.Location, caster.Map);
        }
Exemplo n.º 5
0
		public override bool OnDragDrop( Mobile from, Item dropped )
		{
			bool IsQuestItem = false;

			if ( dropped is BloodKey && m_Type == BellType.DarkIron &&  Tallon.Active == false )
			{
				IsQuestItem = true;
			}
			if ( dropped is WoodenKey && m_Type == BellType.Wooden &&  Zirux.Active == false)
			{
				IsQuestItem = true;
			}
			if ( dropped is ShimmeringKey && m_Type == BellType.Blood &&  Krog.Active == false)
			{
				IsQuestItem = true;
			}
			if ( dropped is ClawKey && m_Type == BellType.Beast &&  Alfirix.Active == false)
			{
				IsQuestItem = true;
			}
			if ( dropped is VenomKey && m_Type == BellType.Noxious &&  Ignis.Active == false)
			{
				IsQuestItem = true;
			}
			if (
                dropped is BloodKey && m_Type != BellType.DarkIron
                || dropped is WoodenKey && m_Type != BellType.Wooden
                || dropped is ShimmeringKey && m_Type != BellType.Blood
                || dropped is ClawKey && m_Type != BellType.Beast
                || dropped is VenomKey && m_Type != BellType.Noxious
               )
               {
                SayTo(from, "This is not the key I desire you pathetic mortal!");
                from.Poison = Poison.Lethal;
                from.Freeze (TimeSpan.FromSeconds(15.0));
                return base.OnDragDrop( from, dropped );
               }

			if ( IsQuestItem )
			{
				dropped.Delete();

				BeginRemove( TimeSpan.FromSeconds( 4.0 ) );

				if ( m_AngryAt == from )
					m_AngryAt = null;

				switch ( m_Type )
				{
					case BellType.DarkIron: m_Boss = new Tallon(); break;
					case BellType.Wooden: m_Boss = new Zirux(); break;
					case BellType.Blood: m_Boss = new Krog(); break;
					case BellType.Beast: m_Boss = new Alfirix(); break;
					case BellType.Noxious: m_Boss = new Ignis(); break;
				}

				m_Boss.MoveToWorld( this.Location, this.Map );
				SayTo(from, "So mortal you bring me the correct item, now go slay the creature!");
				from.AddToBackpack( new ItemClaimer() );
				from.SendMessage( "You have recieved an item that is used to collect your reward, if there is one..." );
				return false;
			}
			else
			{
        		Atomic bomb = new Atomic();
        		bomb.MoveToWorld(from.Location, from.Map);
				return base.OnDragDrop( from, dropped );
			}
		}
		private void DoAtomicBomb(Mobile combatant, string message)
    	{
        		this.Say(true, message);

           		Mobile from = (Mobile)combatant;
           		Map map = from.Map;

            	if (map == null)
                	return;

            int count = 1;

            	for (int i = 0; i < count; ++i)
            	{
                		int x = from.X + Utility.RandomMinMax(-1, 1);
                		int y = from.Y + Utility.RandomMinMax(-1, 1);
                		int z = from.Z;

                		if (!map.CanFit(x, y, z, 16, false, true))
                		{
                    		z = map.GetAverageZ(x, y);

                    		if (z == from.Z || !map.CanFit(x, y, z, 16, false, true))
                        		continue;
                		}

                		Atomic bomb = new Atomic();

                		bomb.MoveToWorld(new Point3D(x, y, z), map);
            	}

    	}
Exemplo n.º 7
0
        public void Explode(bool direct, Point3D loc, Map map)
        {
            if (Deleted)
            {
                return;
            }

            Delete();

            if (map == null)
            {
                return;
            }

            Effects.PlaySound(loc, map, 0x207);
            for (int i = 0; i < 20; i++)
            {
                Point3D temp1 = new Point3D(loc.X, loc.Y, (loc.Z + i));
                Effects.SendLocationEffect(temp1, map, 0x3709, 60);
            }

            IPooledEnumerable eable     = LeveledExplosion ? map.GetObjectsInRange(loc, ExplosionRange) : map.GetMobilesInRange(loc, ExplosionRange);
            ArrayList         toExplode = new ArrayList();

            foreach (object o in eable)
            {
                if (o is Mobile)
                {
                    if (o is ElementalChamp)
                    {
                    }
                    else
                    {
                        toExplode.Add(o);
                    }
                }

                else if (o is Atomic && o != this)
                {
                    toExplode.Add(o);
                }
            }

            eable.Free();

            for (int i = 0; i < toExplode.Count; ++i)
            {
                object o = toExplode[i];

                if (o is Mobile)
                {
                    Mobile m = (Mobile)o;

                    Spells.SpellHelper.Damage(TimeSpan.FromTicks(0), m, 40);
                }
                else if (o is Atomic)
                {
                    Atomic pot = (Atomic)o;

                    pot.Explode(false, pot.GetWorldLocation(), pot.Map);
                }
            }
            if (map != null)
            {
                for (int x = -8; x <= 8; ++x)
                {
                    for (int y = -8; y <= 8; ++y)
                    {
                        double dist = Math.Sqrt(x * x + y * y);

                        if (dist <= 8)
                        {
                            Explotion(loc, map, X + x, Y + y);
                        }
                    }
                }
            }
        }