Beispiel #1
0
		public bool ApplyNightSight(PlayerMobile Wearer)
		{
			Spell spell = new NightSightSpell(Wearer,null);

			if( Wearer == null )
				return false;

			if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false)
			{
				Wearer.SendMessage("The magic normally within this object seems absent.");
				return false;
			}	
			//Pix: this was borrowed from the NightSight spell...
			else if( Wearer.BeginAction( typeof( LightCycle ) ) )
			{
				new LightCycle.NightSightTimer( Wearer ).Start();

				int level = 25;

				Wearer.LightLevel = level;

				Wearer.FixedParticles( 0x376A, 9, 32, 5007, EffectLayer.Waist );
				Wearer.PlaySound( 0x1E3 );

				return true;
			}

			return false;
		}
Beispiel #2
0
        public static void OnVirtueRejected( PlayerMobile protector, PlayerMobile protectee )
        {
            string args = String.Format( "{0}\t{1}", protector.Name, protectee.Name );

            protectee.SendLocalizedMessage( 1049453, args ); // You have declined protection from ~1_NAME~.
            protector.SendLocalizedMessage( 1049454, args ); // ~2_NAME~ has declined your protection.

            if ( protector.BeginAction( typeof( JusticeVirtue ) ) )
                Timer.DelayCall( TimeSpan.FromMinutes( 15.0 ), new TimerStateCallback( RejectDelay_Callback ), protector );
        }
Beispiel #3
0
		public bool ApplyMagicReflectEffect(PlayerMobile Wearer)
		{
			if (Wearer == null)
				return false;

			Spell spell = new MagicReflectSpell(Wearer,null); 
	
			if ( Wearer.MagicDamageAbsorb > 0 )
			{
				Wearer.SendMessage("The magic of this item is already protecting you.");
				return false;
			}
			else if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false)
			{
				Wearer.SendMessage("The magic normally within this object seems absent.");
				return false;
			}	
			else if ( !Wearer.CanBeginAction( typeof( DefensiveSpell ) ) )
			{
				Wearer.SendLocalizedMessage( 1005385 ); // The spell will not adhere to you at this time.
				return false;
			}
			else
			{
				if ( Wearer.BeginAction( typeof( DefensiveSpell ) ) )
				{
					int value = (int)((Utility.Random(51) + 50) + (Utility.Random(51) + 50)); // Random value of up to 100 for magery and up to 100 for scribing - lowest though is 50 magery/50 scribing equivalent strength
					value = (int)(8 + (value/200)*7.0);//absorb from 8 to 15 "circles"

					Wearer.MagicDamageAbsorb = value;

					Wearer.FixedParticles( 0x375A, 10, 15, 5037, EffectLayer.Waist );
					Wearer.PlaySound( 0x1E9 );
					Wearer.SendMessage("You feel the magic of the item envelope you.");
					return true;
				}
				else
				{
					Wearer.SendLocalizedMessage( 1005385 ); // The spell will not adhere to you at this time.
					return false;
				}
			}
		}