Пример #1
0
        private static void EventSink_DisarmRequest(DisarmRequestEventArgs e)
        {
            Mobile m = e.Mobile;

            double armsValue = m.Skills[SkillName.ArmsLore].Value;
            double wresValue = m.Skills[SkillName.Wrestling].Value;

            bool cannotDisarm = (m.Region is CustomRegion && ((CustomRegion)m.Region).CannotDisarm);

            if (cannotDisarm)
            {
                m.SendMessage("You cannot disarm here.");
                m.DisarmReady = false;
            }
            else if (!HasFreeHands(m))
            {
                m.SendLocalizedMessage(1004029);                   // You must have your hands free to attempt to disarm your opponent.
                m.DisarmReady = false;
            }
            else if (armsValue >= 80.0 && wresValue >= 80.0)
            {
                m.DisruptiveAction();
                m.DisarmReady = !m.DisarmReady;
                m.SendLocalizedMessage(m.DisarmReady ? 1019013 : 1019014);
            }
            else
            {
                m.SendLocalizedMessage(1004002);                   // You are not skilled enough to disarm your opponent.
                m.DisarmReady = false;
            }
        }
Пример #2
0
        private static void EventSink_DisarmRequest(DisarmRequestEventArgs e)
        {
            Mobile m = e.Mobile;

            if (!Engines.ConPVP.DuelContext.AllowSpecialAbility(m, "Disarm", true))
            {
                return;
            }

            if (m.IsT2A)
            {
                return;
            }

            double armsValue = m.Skills[SkillName.ArmsLore].Value;
            double wresValue = m.Skills[SkillName.Wrestling].Value;

            if (!HasFreeHands(m))
            {
                m.SendLocalizedMessage(1004029);                   // You must have your hands free to attempt to disarm your opponent.
                m.DisarmReady = false;
            }
            else if (armsValue >= 80.0 && wresValue >= 80.0)
            {
                m.DisruptiveAction();
                m.DisarmReady = !m.DisarmReady;
                m.SendLocalizedMessage(m.DisarmReady ? 1019013 : 1019014);
            }
            else
            {
                m.SendLocalizedMessage(1004002);                   // You are not skilled enough to disarm your opponent.
                m.DisarmReady = false;
            }
        }
Пример #3
0
        private static void EventSink_DisarmRequest(DisarmRequestEventArgs e)
        {
            if (Core.AOS)
            {
                return;
            }

            Mobile m = e.Mobile;

            double armsValue = m.Skills[SkillName.ArmsLore].Value;
            double wresValue = m.Skills[SkillName.Wrestling].Value;

            if (!HasFreeHands(m))
            {
                m.SendLocalizedMessage(1004029); // You must have your hands free to attempt to disarm your opponent.
                m.DisarmReady = false;
            }
            else if (armsValue >= 80.0 && wresValue >= 80.0)
            {
                m.DisruptiveAction();
                m.DisarmReady = !m.DisarmReady;
                m.SendLocalizedMessage(m.DisarmReady ? 1019013 : 1019014);
            }
            else
            {
                m.SendLocalizedMessage(1004002); // You are not skilled enough to disarm your opponent.
                m.DisarmReady = false;
            }
        }
Пример #4
0
        private static void EventSink_DisarmRequest(DisarmRequestEventArgs e)
        {
            if (Core.AOS)
            {
                return;
            }

            Mobile m = e.Mobile;

            m.DisarmReady = false;
        }
Пример #5
0
		private static void EventSink_DisarmRequest( DisarmRequestEventArgs e )
		{
			Mobile m = e.Mobile;

			double armsValue = m.Skills[SkillName.ArmsLore].Value;
			double wresValue = m.Skills[SkillName.Wrestling].Value;

			if ( !HasFreeHands( m ) )
			{
				m.SendLocalizedMessage( 1004029 ); // You must have your hands free to attempt to disarm your opponent.
				m.DisarmReady = false;
			}
			else if ( armsValue >= 80.0 && wresValue >= 80.0 )
			{
				m.DisruptiveAction();
				m.DisarmReady = !m.DisarmReady;
				m.SendLocalizedMessage( m.DisarmReady ? 1019013 : 1019014 );
			}
			else
			{
				m.SendLocalizedMessage( 1004002 ); // You are not skilled enough to disarm your opponent.
				m.DisarmReady = false;
			}
		}
Пример #6
0
        private static void EventSink_DisarmRequest(DisarmRequestEventArgs e)            // special abilities
        {
            Mobile m         = e.Mobile;
            Item   weapon    = m.FindItemOnLayer(Layer.TwoHanded);
            double anat      = m.Skills[SkillName.Anatomy].Value;
            double weapSkill = 0;

            if (HasFreeHands(m))                 // primary ability for wres (disarm)
            {
                double armsValue = m.Skills[SkillName.ArmsLore].Value;
                double wresValue = m.Skills[SkillName.Wrestling].Value;

                if (armsValue >= 80.0 && wresValue >= 80.0)
                {
                    m.DisruptiveAction();
                    m.DisarmReady = !m.DisarmReady;
                    m.SendLocalizedMessage(m.DisarmReady ? 1019013 : 1019014);
                }
                else
                {
                    m.SendLocalizedMessage(1004002);                       // You are not skilled enough to disarm your opponent.
                    m.DisarmReady = false;
                }

                return;
            }
            else if (weapon is BaseBashing)
            {
                weapSkill = m.Skills[SkillName.Macing].Value;
            }
            else if (weapon is BasePoleArm || weapon is BaseAxe)
            {
                weapSkill = m.Skills[SkillName.Swords].Value;
            }
            else if (weapon is BaseSpear)
            {
                weapSkill = m.Skills[SkillName.Fencing].Value;
            }
            else if (weapon is BaseRanged || weapon is BaseStaff)
            {
                m.HasAbilityReady = false;
                m.SendMessage("You can not think of a special technique for this weapon.");
                return;
            }
            else
            {
                m.HasAbilityReady = false;
                m.SendMessage("You must equip a two-handed weapon.");
                return;
            }


            if (weapSkill >= 80 && anat >= 80)
            {
                if (!m.HasAbilityReady && m.Mana < 15)                   // if they're toggling "on" and have < 15 mana
                {
                    m.LocalOverheadMessage(MessageType.Emote, 0x3B2, false, "Insufficient mana.");
                    m.HasAbilityReady = false;
                    return;
                }


                ISpell i = m.Spell;
                Spell  s = (Spell)i;

                if (!m.HasAbilityReady && i != null && s.State == SpellState.Sequencing)
                {
                    s.Disturb(DisturbType.EquipRequest, true, false);
                    m.SendMessage("You break your concentration to ready a technique.");
                    m.FixedEffect(0x3735, 6, 30);
                    m.HasAbilityReady = true;
                    return;
                }


                if (m.NextAbilityTime > DateTime.Now)
                {
                    m.SendMessage("You must wait to perform a special ability");
                    m.HasAbilityReady = false;
                    return;
                }

                m.HasAbilityReady = !m.HasAbilityReady;                 // toggle ability flag "on" or "off"
                m.SendMessage(m.HasAbilityReady ? "You get ready to use an advanced technique." : "You decide to save yourself the effort.");
            }
            else if (!HasFreeHands(m))                 // last problem is skill being too low, sets false and tells player so
            {
                m.HasAbilityReady = false;
                m.SendMessage("You aren't confident enough to attempt that.");
            }
        }
Пример #7
0
		private static void EventSink_DisarmRequest( DisarmRequestEventArgs e )
		{
			if ( Core.AOS )
				return;

			Mobile m = e.Mobile;

			#region Dueling
			if ( !Engines.ConPVP.DuelContext.AllowSpecialAbility( m, "Disarm", true ) )
				return;
			#endregion

			double armsValue = m.Skills[SkillName.ArmsLore].Value;
			double wresValue = m.Skills[SkillName.Wrestling].Value;

			if ( !HasFreeHands( m ) )
			{
				m.SendLocalizedMessage( 1004029 ); // You must have your hands free to attempt to disarm your opponent.
				m.DisarmReady = false;
			}
			else if ( armsValue >= 80.0 && wresValue >= 80.0 )
			{
				m.DisruptiveAction();
				m.DisarmReady = !m.DisarmReady;
				m.SendLocalizedMessage( m.DisarmReady ? 1019013 : 1019014 );
			}
			else
			{
				m.SendLocalizedMessage( 1004002 ); // You are not skilled enough to disarm your opponent.
				m.DisarmReady = false;
			}
		}
Пример #8
0
 public void InvokeDisarmRequest( DisarmRequestEventArgs e )
 {
     if ( DisarmRequest != null )
         DisarmRequest( e );
 }
Пример #9
0
		private static void EventSink_DisarmRequest( DisarmRequestEventArgs e )  // special abilities
		{

			Mobile m = e.Mobile;
			Item weapon = m.FindItemOnLayer( Layer.TwoHanded );
			double anat = m.Skills[SkillName.Anatomy].Value;
			double weapSkill = 0;
			
			if ( HasFreeHands( m ) ) // primary ability for wres (disarm)
			{

				double armsValue = m.Skills[SkillName.ArmsLore].Value;
				double wresValue = m.Skills[SkillName.Wrestling].Value;

				if ( armsValue >= 80.0 && wresValue >= 80.0 )
				{
					m.DisruptiveAction();
					m.DisarmReady = !m.DisarmReady;
					m.SendLocalizedMessage( m.DisarmReady ? 1019013 : 1019014 );
				}
				else
				{
					m.SendLocalizedMessage( 1004002 ); // You are not skilled enough to disarm your opponent.
					m.DisarmReady = false;
				}
				
				return;
						
			}
			else if ( weapon is BaseBashing )
			{
				weapSkill = m.Skills[SkillName.Macing].Value;
			}
			else if ( weapon is BasePoleArm || weapon is BaseAxe )
			{
				weapSkill = m.Skills[SkillName.Swords].Value;
			}
			else if ( weapon is BaseSpear )
			{
				weapSkill = m.Skills[SkillName.Fencing].Value;
			}
			else if (weapon is BaseRanged || weapon is BaseStaff )
			{
				m.HasAbilityReady = false;
				m.SendMessage( "You can not think of a special technique for this weapon." );
				return;
			}
			else
			{
				m.HasAbilityReady = false;
				m.SendMessage( "You must equip a two-handed weapon." ); 
				return;
			}


			if ( weapSkill >= 80 && anat >= 80 )
			{
				if ( !m.HasAbilityReady && m.Mana < 15 ) // if they're toggling "on" and have < 15 mana
				{
					m.LocalOverheadMessage( MessageType.Emote, 0x3B2, false, "Insufficient mana." );
					m.HasAbilityReady = false;
					return;
				}
				
				
				ISpell i = m.Spell;
				Spell s = (Spell)i;

				if ( !m.HasAbilityReady && i != null && s.State == SpellState.Sequencing )
				{
					s.Disturb( DisturbType.EquipRequest, true, false );
					m.SendMessage( "You break your concentration to ready a technique." );
					m.FixedEffect( 0x3735, 6, 30 );
					m.HasAbilityReady = true;
					return;
				}

				
				if ( m.NextAbilityTime > DateTime.Now )
				{
					m.SendMessage( "You must wait to perform a special ability" );
					m.HasAbilityReady = false;
					return;
				}
				
				m.HasAbilityReady = !m.HasAbilityReady; // toggle ability flag "on" or "off"
				m.SendMessage( m.HasAbilityReady ? "You get ready to use an advanced technique." : "You decide to save yourself the effort." );
			}
			else if ( !HasFreeHands( m ) ) // last problem is skill being too low, sets false and tells player so
			{
				m.HasAbilityReady = false;
				m.SendMessage( "You aren't confident enough to attempt that." );
			}

		}