public static void LowerResistanceAttack( Mobile from, ref ExpireTimer timer, TimeSpan duration, Mobile target, ResistanceMod[] mod, Hashtable hashtbl )
		{
			target.PlaySound( 0x1E9 );
			target.FixedParticles( 0x376A, 9, 32, 5008, EffectLayer.Waist );

			timer = new ExpireTimer( target, mod, duration, hashtbl );
			timer.Start();

			hashtbl[target] = timer;

			for (int i=0;i<mod.Length;i++)
				target.AddResistanceMod( mod[i] );		

			if ( hashtbl == m_RuneBeetleRMT )
				target.SendLocalizedMessage( 1070845 ); // The creature continues to corrupt your armor!

			if ( hashtbl == m_FanDancerRMT )
				target.SendLocalizedMessage( 1070835 ); // The creature surrounds you with fire, reducing your resistance to fire attacks.

			from.DoHarmful( target );

			return;
		}
示例#2
0
        public static void LowerResistanceAttack(Mobile from, ref ExpireTimer timer, TimeSpan duration, Mobile target, ResistanceMod[] mod, Hashtable hashtbl)
        {
            target.PlaySound(0x1E9);
            target.FixedParticles(0x376A, 9, 32, 5008, EffectLayer.Waist);

            timer = new ExpireTimer(target, mod, duration, hashtbl);
            timer.Start();

            hashtbl[target] = timer;

            for (int i = 0; i < mod.Length; i++)
            {
                target.AddResistanceMod(mod[i]);
            }

            if (hashtbl == m_RuneBeetleRMT)
            {
                target.SendLocalizedMessage(1070845);                   // The creature continues to corrupt your armor!
            }

            if (hashtbl == m_FanDancerRMT)
            {
                target.SendLocalizedMessage(1070835);                   // The creature surrounds you with fire, reducing your resistance to fire attacks.
            }

            from.DoHarmful(target);

            return;
        }
示例#3
0
        public static void HiryuAbilitiesAttack(Mobile from, ref ExpireTimer timer)
        {
            Mobile target = GetRandomAttacker(from, 1);

            if (target == null)
            {
                return;
            }

            if (Utility.RandomBool())
            {
                if (IsUnderEffect(target, BaseAttackHelperSE.m_HiryuRMT))
                {
                    return;
                }

                ResistanceMod[] mod = new ResistanceMod[1]
                {
                    new ResistanceMod(ResistanceType.Physical, -15)
                };

                LowerResistanceAttack(from, ref timer, TimeSpan.FromSeconds(5.0), target, mod, m_HiryuRMT);
            }
            else
            {
                if (!target.Mounted)
                {
                    return;
                }

                DismountAttack(from, target);
            }
        }
示例#4
0
		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if ( 0.1 > Utility.RandomDouble() && !IsStunned( defender ) )
			{
				/* Lightning Fist
				 * Cliloc: 1070839
				 * Effect: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(884 715, 10)" ToLocation: "(884 715, 10)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
				 * Damage: 35-65, 100% energy, resistable
				 * Freezes for 4 seconds
				 * Effect cannot stack
				 */

				defender.FixedEffect( 0x37B9, 10, 5 );
				defender.SendLocalizedMessage( 1070839 ); // The creature attacks with stunning force!
 
				// This should be done in place of the normal attack damage.
				//AOS.Damage( defender, this, Utility.RandomMinMax( 35, 65 ), 0, 0, 0, 0, 100 );

				defender.Frozen = true; 

				ExpireTimer timer = new ExpireTimer( defender, TimeSpan.FromSeconds( 4.0 ) );
				timer.Start();
				m_Table[defender] = timer;
			}
		}
        public static void CorruptArmorAttack(Mobile from, ref ExpireTimer timer, Mobile target)
        {
            ResistanceMod[] mod = new ResistanceMod[5]
            {
                new ResistanceMod(ResistanceType.Fire, -target.FireResistance),
                new ResistanceMod(ResistanceType.Poison, -target.PoisonResistance),
                new ResistanceMod(ResistanceType.Cold, -target.ColdResistance),
                new ResistanceMod(ResistanceType.Energy, -target.EnergyResistance),
                new ResistanceMod(ResistanceType.Physical, -target.PhysicalResistance)
            };

            target.SendLocalizedMessage(1070846);               // The creature magically corrupts your armor!

            TimeSpan duration = TimeSpan.FromSeconds(2 + Utility.Random(3));

            LowerResistanceAttack(from, ref timer, duration, target, mod, m_RuneBeetleRMT);

            return;
        }
示例#6
0
        public static void CorruptArmorAttack( Mobile from, ref ExpireTimer timer, Mobile target )
        {
            ResistanceMod[] mod = new ResistanceMod[5]
            {
                new ResistanceMod( ResistanceType.Fire, -target.FireResistance / 2 ),
                new ResistanceMod( ResistanceType.Poison, -target.PoisonResistance / 2 ),
                new ResistanceMod( ResistanceType.Cold, -target.ColdResistance / 2 ),
                new ResistanceMod( ResistanceType.Energy, -target.EnergyResistance / 2 ),
                new ResistanceMod( ResistanceType.Physical, -target.PhysicalResistance / 2 )
            };

            target.SendLocalizedMessage( 1070846 ); // The creature magically corrupts your armor!

            TimeSpan duration = TimeSpan.FromSeconds( 2 + Utility.Random( 3 ) );

            LowerResistanceAttack( from, ref timer, duration, target, mod, m_RuneBeetleRMT );

            return;
        }
示例#7
0
		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if ( Utility.RandomDouble() < 0.1 )
			{
				ExpireTimer timer;

				if ( m_Table.TryGetValue( defender, out timer ) )
					timer.DoExpire();

				defender.FixedParticles( 0x3709, 10, 30, 5052, EffectLayer.LeftFoot );
				defender.PlaySound( 0x208 );
				defender.SendLocalizedMessage( 1070833 ); // The creature fans you with fire, reducing your resistance to fire attacks.

				ResistanceMod mod = new ResistanceMod( ResistanceType.Fire, -10 );
				defender.AddResistanceMod( mod );

				m_Table[defender] = timer = new ExpireTimer( defender, mod );
				timer.Start();
			}
		}
		public PlayerVendorPlaceholder( PlayerVendor vendor ) : base( 0x1F28 )
		{
			Hue = 0x672;
			Movable = false;

			m_Vendor = vendor;

			m_Timer = new ExpireTimer( this );
			m_Timer.Start();
		}
示例#9
0
		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if ( !IsFanned( defender ) && 0.05 > Utility.RandomDouble() )
			{
				/* Fanning Fire
				 * Graphic: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x3709" ItemIdName: "fire column" FromLocation: "(994 325, 16)" ToLocation: "(994 325, 16)" Speed: "10" Duration: "30" FixedDirection: "True" Explode: "False" Hue: "0x0" RenderMode: "0x0" Effect: "0x34" ExplodeEffect: "0x1" ExplodeSound: "0x0" Serial: "0x57D4F5B" Layer: "5" Unknown: "0x0"
				 * Sound: 0x208
				 * Start cliloc: 1070833
				 * Effect: Fire res -10% for 10 seconds
				 * Damage: 35-45, 100% fire
				 * End cliloc: 1070834
				 * Effect does not stack
				 */

				defender.SendLocalizedMessage( 1070833 ); // The creature fans you with fire, reducing your resistance to fire attacks.

				int effect = -(defender.FireResistance / 10);

				ResistanceMod mod = new ResistanceMod( ResistanceType.Fire, effect );

				defender.FixedParticles( 0x37B9, 10, 30, 0x34, EffectLayer.RightFoot );
				defender.PlaySound( 0x208 );

				// This should be done in place of the normal attack damage.
				//AOS.Damage( defender, this, Utility.RandomMinMax( 35, 45 ), 0, 100, 0, 0, 0 );

				defender.AddResistanceMod( mod );
		
				ExpireTimer timer = new ExpireTimer( defender, mod, TimeSpan.FromSeconds( 10.0 ) );
				timer.Start();
				m_Table[defender] = timer;
			}
		}
示例#10
0
        public static void HiryuAbilitiesAttack( Mobile from, ref ExpireTimer timer )
        {
            Mobile target = GetRandomAttacker( from, 1 );

            if ( target == null )
            {
                return;
            }

            if ( Utility.RandomBool() )
            {
                if ( IsUnderEffect( target, BaseAttackHelperSE.m_HiryuRMT ) )
                    return;

                ResistanceMod[] mod = new ResistanceMod[1]
                {
                    new ResistanceMod( ResistanceType.Physical, -15 )
                };

                LowerResistanceAttack( from, ref timer, TimeSpan.FromSeconds( 5.0 ), target, mod, m_HiryuRMT );
            }
            else
            {
                if ( !target.Mounted )
                    return;

                DismountAttack( from, target );
            }
        }
示例#11
0
文件: Hiryu.cs 项目: nathanvy/runuo
		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if( 0.1 > Utility.RandomDouble() )
			{
				/* Grasping Claw
				 * Start cliloc: 1070836
				 * Effect: Physical resistance -15% for 5 seconds
				 * End cliloc: 1070838
				 * Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
				 */

				ExpireTimer timer = (ExpireTimer)m_Table[defender];

				if( timer != null )
				{
					timer.DoExpire();
					defender.SendLocalizedMessage( 1070837 ); // The creature lands another blow in your weakened state.
				}
				else
					defender.SendLocalizedMessage( 1070836 ); // The blow from the creature's claws has made you more susceptible to physical attacks.

				int effect = -(defender.PhysicalResistance * 15 / 100);

				ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, effect );

				defender.FixedEffect( 0x37B9, 10, 5 );
				defender.AddResistanceMod( mod );

				timer = new ExpireTimer( defender, mod, TimeSpan.FromSeconds( 5.0 ) );
				timer.Start();
				m_Table[defender] = timer;
			}
		}
		public static void HiryuAbilitiesAttack( Mobile from, ref ExpireTimer timer )
		{
			Mobile target = GetRandomAttacker( from, 1 );

			if (target == null) return;

			if (Utility.RandomBool())
			{
				if (IsUnderEffect( target, BaseAttackHelperSE.m_HiryuRMT )) return;

				TimeSpan duration = TimeSpan.FromSeconds( 121 - (int)(target.Skills[SkillName.MagicResist].Value) );

				ResistanceMod[] mod = new ResistanceMod[1]
				{
					new ResistanceMod( ResistanceType.Physical, -25 )
				};

				LowerResistanceAttack( from, ref timer, duration, target, mod, m_HiryuRMT );
			}
			else
			{
				if (!target.Mounted) return;

				DismountAttack( from, target );
			}
		}
示例#13
0
/*
		public override void OnChop( Mobile from )
		{
			if ( from.AccessLevel <= AccessLevel.GameMaster )
				return;
			base.OnChop( from );
		}
*/
		public void OnSymbolUsed( SymbolComponent symbol, Mobile from )
		{
			if ( !from.InRange( Location, 2 ) || !from.InLOS( this ) )
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
			else if ( m_InUse || ( m_CurrentCombo != null && m_CurrentCombo.Length >= 6 ) )
				from.SendMessage( "You notice the stargate is already activated." );
			else if ( m_ActiveSymbols.Contains( symbol ) )
				from.SendMessage( "You notice this symbol has already been activated." );
			else
			{
				m_CurrentCombo += symbol.Letter;
				m_ActiveSymbols.Add( symbol );
				symbol.PlaySymbolEffect( true );

				if ( m_CurrentCombo.Length != 6 )
				{
					if ( m_Expire != null )
						m_Expire.Stop();

					m_Expire = new ExpireTimer( this );
					m_Expire.Start();
					return;
				}
				
				StargateDesign design = Stargate.Stargate.FindGate( m_CurrentCombo );
				if ( design != null && design.Gate != null )
					ActivateGate( from, design.Gate );
				else
				{
					from.SendMessage( "The stargate could not find a destination." );
					DeactivateGate( null, null, null );
				}

				if ( m_Expire != null )
				{
					m_Expire.Stop();
					m_Expire = null;
				}
			}
		}
示例#14
0
        public override void OnCast()
        {
            BaseWeapon weapon = Caster.Weapon as BaseWeapon;

            if (weapon == null || weapon is Fists)
            {
                Caster.SendLocalizedMessage(501078); // You must be holding a weapon.
            }
            else if (CheckSequence())
            {
                if (weapon.Enchanted == true)
                {
                    Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                    return;
                }

                if (!Caster.CanBeginAction(typeof(EnchantSpell)))
                {
                    Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                    return;
                }
                else
                {
                    if (Caster.HasGump(typeof(EnchantGump)))
                        Caster.CloseGump(typeof(EnchantGump));

                    Caster.SendGump(new EnchantGump());
                    Caster.FixedParticles(0x3779, 1, 15, 9905, 32, 2, EffectLayer.Head);
                    Caster.FixedParticles(0x37B9, 1, 14, 9502, 32, 5, (EffectLayer)255);

                    TimeSpan duration = TimeSpan.FromSeconds((Caster.Skills[SkillName.Mysticism].Value / 3.4) * 4 + 9.0);

                    if (Caster.Skills[SkillName.Mysticism].Value >= 80.0)
                        weapon.Attributes.SpellChanneling = 1;


                    Timer t = (Timer)m_Table[weapon];

                    if (t != null)
                        t.Stop();

                    weapon.Enchanted = true;

                    m_Table[weapon] = t = new ExpireTimer(weapon, duration);

                    t.Start();
                }

                FinishSequence();
            }
        }
示例#15
0
		public override void Execute( CommandEventArgs e, object obj )
		{
			Mobile m = (Mobile)obj;

			//CommandLogging.WriteLine( e.Mobile, "{0} {1} {2} {3}", e.Mobile.AccessLevel, CommandLogging.Format( e.Mobile ), m_Value ? "hiding" : "unhiding", CommandLogging.Format( m ) );

			if( e.Length == 1 )
			{
				if( ( m is PlayerMobile) && ( m.AccessLevel == AccessLevel.Player ) ) // Can't put bounty on staff.
				{
					PlayerMobile bountyPlacer = (PlayerMobile)e.Mobile;
					Container cont = bountyPlacer.BankBox;

					int amount = 0;
					try
					{
						amount = Int32.Parse( e.GetString(0) );
					}
					catch
					{
						AddResponse( "Bounty Amount was improperly formatted!" );
						return;
					}

					if ( amount < 500 )
					{
						AddResponse( "No one would hunt for that low of a bounty!" );
					}
					else if ( cont != null && cont.ConsumeTotal( typeof( Gold ), amount ) )
					{
						BountyKeeper.Add( new Bounty(bountyPlacer, (PlayerMobile)m, amount, false) );
						AddResponse( "You have posted a bounty for the head of " + m.Name + "!" );
						AddResponse( "Amount of GP removed from your bank: " + amount );
						((PlayerMobile)m).SendMessage(bountyPlacer.Name + " has just placed a bounty on your head for " + amount + " gold.");
						
						//Flag player criminal, but don't guardwhack
						//bountyPlacer.Criminal = true;
						//Flag to only the player you place the bounty on.
						if( !bountyPlacer.PermaFlags.Contains(m) )
						{
							bountyPlacer.PermaFlags.Add( m );
							bountyPlacer.Delta( MobileDelta.Noto );
							ExpireTimer et = new ExpireTimer(bountyPlacer, m, TimeSpan.FromMinutes( 2.0 ));
							et.Start();
						}
					}
					else
					{
						AddResponse( "You do not have that much GP in your bank!" );
					}
				}
				else
				{
					AddResponse( "Please target a player." );
				}
			}
			else
			{
				AddResponse( "You must specify the amount of the bounty." );
			}
		}
        public override void OnGaveMeleeAttack( Mobile defender )
        {
            base.OnGaveMeleeAttack( defender );

            if( 0.1 > Utility.RandomDouble() )
            {
                /* Flurry of Twigs
                 * Start cliloc: 1070850
                 * Effect: Physical resistance -15% for 5 seconds
                 * End cliloc: 1070852
                 * Effect: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(1048 779, 6)" ToLocation: "(1048 779, 6)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
                 */

                ExpireTimer timer = (ExpireTimer)m_FlurryOfTwigsTable[defender];

                if( timer != null )
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage( 1070851 ); // The creature lands another blow in your weakened state.
                }
                else
                    defender.SendLocalizedMessage( 1070850 ); // The creature's flurry of twigs has made you more susceptible to physical attacks!

                int effect = -(defender.PhysicalResistance * 15 / 100);

                ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, effect );

                defender.FixedEffect( 0x37B9, 10, 5 );
                defender.AddResistanceMod( mod );

                timer = new ExpireTimer( defender, mod, m_FlurryOfTwigsTable, TimeSpan.FromSeconds( 5.0 ) );
                timer.Start();
                m_FlurryOfTwigsTable[defender] = timer;
            }
            else if( 0.05 > Utility.RandomDouble() )
            {
                /* Chlorophyl Blast
                 * Start cliloc: 1070827
                 * Effect: Energy resistance -50% for 10 seconds
                 * End cliloc: 1070829
                 * Effect: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(1048 779, 6)" ToLocation: "(1048 779, 6)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
                 */

                ExpireTimer timer = (ExpireTimer)m_ChlorophylBlastTable[defender];

                if( timer != null )
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage( 1070828 ); // The creature continues to hinder your energy resistance!
                }
                else
                    defender.SendLocalizedMessage( 1070827 ); // The creature's attack has made you more susceptible to energy attacks!

                int effect = -(defender.EnergyResistance / 2);

                ResistanceMod mod = new ResistanceMod( ResistanceType.Energy, effect );

                defender.FixedEffect( 0x37B9, 10, 5 );
                defender.AddResistanceMod( mod );

                timer = new ExpireTimer( defender, mod, m_ChlorophylBlastTable, TimeSpan.FromSeconds( 10.0 ) );
                timer.Start();
                m_ChlorophylBlastTable[defender] = timer;
            }
        }
示例#17
0
        public override void OnGaveMeleeAttack( Mobile defender )
        {
            base.OnGaveMeleeAttack( defender );

            // TODO: Taken from "Lady of the snow". Check real ability at OSI.

            if ( 0.1 > Utility.RandomDouble() )
            {
                ExpireTimer timer = (ExpireTimer) m_Table[defender];

                if ( timer != null )
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage( 1070831 ); // The freezing wind continues to blow!
                }
                else
                    defender.SendLocalizedMessage( 1070832 ); // An icy wind surrounds you, freezing your lungs as you breathe!

                timer = new ExpireTimer( defender, this );
                timer.Start();

                m_Table[defender] = timer;
            }
        }
示例#18
-1
        public override void OnGaveMeleeAttack( Mobile defender )
        {
            base.OnGaveMeleeAttack( defender );

            if ( 0.1 > Utility.RandomDouble() )
            {
                ExpireTimer timer = (ExpireTimer) m_Table[defender];

                if ( timer != null )
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage( 1070837 ); // The creature lands another blow in your weakened state.
                }
                else
                    defender.SendLocalizedMessage( 1070836 ); // The blow from the creature's claws has made you more susceptible to physical attacks.

                int effect = -( defender.PhysicalResistance * 15 / 100 );

                ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, effect );

                defender.FixedEffect( 0x37B9, 10, 5 );
                defender.AddResistanceMod( mod );

                timer = new ExpireTimer( defender, mod, TimeSpan.FromSeconds( 5.0 ) );
                timer.Start();
                m_Table[defender] = timer;
            }
        }