Example #1
0
		// note that this method will be called when attached to either a mobile or a weapon
		// when attached to a weapon, only that weapon will do additional damage
		// when attached to a mobile, any weapon the mobile wields will do additional damage
		public override void OnWeaponHit(Mobile attacker, Mobile defender, BaseWeapon weapon, int damageGiven)
		{
			// if it is still refractory then return
			if(DateTime.UtcNow < m_EndTime) return;

			int damage = 0;

			if(m_Damage > 0)
				damage = Utility.Random(m_Damage);

			if(defender != null && attacker != null && damage > 0)
			{
				attacker.MovingParticles( defender, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160 );
				attacker.PlaySound( 0x15E );

				SpellHelper.Damage( TimeSpan.Zero, defender, attacker, damage, 0, 100, 0, 0, 0 );
			    
				m_EndTime = DateTime.UtcNow + Refractory;
			}
		}
		public static void ThrowBomb( Mobile m, Mobile bomber )
		{
			m.DoHarmful( m );

			bomber.MovingParticles( m, 0x1AD7, 1, 0, false, true, 0, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0 );

			new BomberTimer( m, bomber ).Start();
		}
Example #3
0
		public override void OnTrigger(object activator, Mobile m)
		{
			if(m == null ) return;

			// if it is still refractory then return
			if(DateTime.UtcNow < m_EndTime) return;

			int damage = 0;

			if(m_Damage > 0)
				damage = Utility.Random(m_Damage);

			if(damage > 0)
			{
				m.MovingParticles( m, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160 );
				m.PlaySound( 0x15E );
				SpellHelper.Damage( TimeSpan.Zero, m, damage, 0, 100, 0, 0, 0 );
			}

			m_EndTime = DateTime.UtcNow + Refractory;

		}    
Example #4
0
		public virtual void WrathOfFray_OnTarget( Mobile from, object target )
		{
			if( !from.CanSee( target ) )
			{
				from.SendLocalizedMessage( 500237 ); //Target cannot be seen.
			}
			else if( target is Mobile )
			{
				Mobile t = (Mobile)target;

				from.MovingParticles( t, 0x379F, 7, 0, false, true, 3043, 4043, 0x211 );
				from.PlaySound( 0x307 );
				t.PlaySound( 0x307 );

				AOS.Damage( t, from, Utility.RandomMinMax( 25, 45 ), 20, 20, 20, 20, 20, false );

				this.Delete();
			}
			else
				from.SendMessage( "This spell will not work on that." );

			from.Frozen = false;
		}