当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.AddSkillMod方法代码示例

本文整理汇总了C#中Mobile.AddSkillMod方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.AddSkillMod方法的具体用法?C# Mobile.AddSkillMod怎么用?C# Mobile.AddSkillMod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.AddSkillMod方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetMods

		private void SetMods( Mobile wearer )
		{			
			wearer.AddSkillMod( m_SkillMod0 ); 
			wearer.AddSkillMod( m_SkillMod1 ); 
			wearer.AddSkillMod( m_SkillMod2 ); 
			wearer.AddStatMod( m_StatMod0 ); 
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:7,代码来源:CloakOfTheNecromancer.cs

示例2: OnEquip

 public override bool OnEquip(Mobile from)
 {
     if (UseSkillMod)
     {
         if (from.FindItemOnLayer(Layer.TwoHanded) != this && m_ARCHERYMod == null && m_TACTICSMod == null)
         {
             m_TACTICSMod = new DefaultSkillMod(SkillName.Tactics, true, 15);
             from.AddSkillMod(m_TACTICSMod);
             m_ARCHERYMod = new DefaultSkillMod(SkillName.Archery, true, 10);
             from.AddSkillMod(m_ARCHERYMod);
         }
     }
     return base.OnEquip(from);
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:14,代码来源:ElvenBow.cs

示例3: ApplyBonus

        public static void ApplyBonus( Mobile m )
        {
            ApplyBonus( m.FindItemOnLayer( Layer.Neck ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Helm ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Pants ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Arms ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Gloves ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor );

            List<AttributeMod> mods = new List<AttributeMod>();

            mods.Add( new AttributeMod( MagicalAttribute.ReflectPhysical, 25 ) );

            ApplyMods( m, mods );

            m_Bonus[m] = mods;

            // +10 chivalry (total)
            SkillMod skillmod = new DefaultSkillMod( SkillName.Chivalry, true, 10.0 );
            skillmod.ObeyCap = true;
            m_Table.Add( m, skillmod );
            m.AddSkillMod( skillmod );

            m.SendLocalizedMessage( 1072391 ); // The magic of your armor combines to assist you!

            Effects.PlaySound( m.Location, m.Map, 503 );
            m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:28,代码来源:PaladinSet.cs

示例4: AddSkillModTo

		public void AddSkillModTo( Mobile to )
		{
			m_SkillMod = new DefaultSkillMod( SkillName.Cooking, true, m_Bonus );
			m_SkillMod.ObeyCap = true;
			to.AddSkillMod( m_SkillMod );
			m_Active = true;

			to.SendLocalizedMessage( 1075540 ); //The scent of fresh herbs begins to fill your home...
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:9,代码来源:BasketOfHerbs.cs

示例5: SetMods

		private void SetMods( Mobile wearer )
		{
	wearer.AddSkillMod(m_SkillMod0);
	wearer.AddSkillMod(m_SkillMod1);
	wearer.AddSkillMod(m_SkillMod2);
	wearer.AddSkillMod(m_SkillMod3);
	wearer.AddSkillMod(m_SkillMod4);
	wearer.AddSkillMod(m_SkillMod5);
	wearer.AddSkillMod(m_SkillMod6);
	wearer.AddSkillMod(m_SkillMod7);
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:11,代码来源:CloakOfTheGodlySmith.cs

示例6: OnEquip

		public override bool OnEquip( Mobile from )
		{
			if( UseSkillMod )
			{
                if (m_BSMod != null)
                    m_BSMod.Remove();

			    m_BSMod = new DefaultSkillMod( SkillName.Blacksmith, true, 20 );
                    from.AddSkillMod( m_BSMod );
			}
			return base.OnEquip( from );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:12,代码来源:GMSmithHammer.cs

示例7: OnTarget

		public override void OnTarget( Mobile target )
		{
			if ( CheckHSequence( target ) )
			{
				if ( target.GetStatMod( "MindBlast" ) == null )
				{
					int offset = (int)(target.Skills[SkillName.Magery].Value / 2);
					offset += (int)(target.Skills[SkillName.Necromancy].Value / 2);
					offset += (int)(target.Skills[SkillName.EvalInt].Value / 4);
					offset += (int)(target.Skills[SkillName.SpiritSpeak].Value / 4);

					if ( target is PlayerMobile )
						offset /= 2;

					offset -= ((int)ScaleBySkill( target, SkillName.MagicResist )) -5;

					if ( offset < 15 )
						offset = 15;

					int duration = (int)(Caster.Skills[CastSkill].Value * 2);

					target.AddStatMod( new StatMod( StatType.Int, "MindBlast", -offset, TimeSpan.FromSeconds( duration ) ) );
					target.AddSkillMod( new TimedSkillMod( SkillName.Meditation, true, -offset, TimeSpan.FromSeconds( duration ) ) );
					target.AddSkillMod( new TimedSkillMod( SkillName.Focus, true, -offset, TimeSpan.FromSeconds( duration ) ) );

					target.SendMessage("Your mind has been blown!");

					SpellHelper.Damage( this, target, offset * 2, 0, 0, 100, 0, 0 );
				}

				target.FixedParticles( 0x374A, 10, 15, 5038, 1181, 2, EffectLayer.Head );
				target.PlaySound( 0x213 );
				BlueMageControl.CheckKnown( target, this, CanTeach( target ) );
			}

			FinishSequence();
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:37,代码来源:MindBlast.cs

示例8: Toggle

        public static void Toggle( Mobile caster, Mobile target )
        {
            /* Players under the protection spell effect can no longer have their spells "disrupted" when hit.
             * Players under the protection spell have decreased physical resistance stat value (-15 + (Inscription/20),
             * a decreased "resisting spells" skill value by -35 + (Inscription/20),
             * and a slower casting speed modifier (technically, a negative "faster cast speed") of 2 points.
             * The protection spell has an indefinite duration, becoming active when cast, and deactivated when re-cast.
             * Reactive Armor, Protection, and Magic Reflection will stay on—even after logging out,
             * even after dying—until you “turn them off” by casting them again.
             */

            object[] mods = (object[])m_Table[target];

            if ( mods == null )
            {
                target.PlaySound( 0x1E9 );
                target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );

                mods = new object[2]
                    {
                        new ResistanceMod( ResistanceType.Physical, -15 + Math.Min( (int)(caster.Skills[SkillName.Inscribe].Value / 20), 15 ) ),
                        new DefaultSkillMod( SkillName.MagicResist, true, -35 + Math.Min( (int)(caster.Skills[SkillName.Inscribe].Value / 20), 35 ) )
                    };

                m_Table[target] = mods;
                Registry[target] = 100.0;

                target.AddResistanceMod( (ResistanceMod)mods[0] );
                target.AddSkillMod( (SkillMod)mods[1] );

                int physloss = -15 + (int) (caster.Skills[SkillName.Inscribe].Value / 20);
                int resistloss = -35 + (int) (caster.Skills[SkillName.Inscribe].Value / 20);
                string args = String.Format("{0}\t{1}", physloss, resistloss);
                BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Protection, 1075814, 1075815, args.ToString()));
            }
            else
            {
                target.PlaySound( 0x1ED );
                target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );

                m_Table.Remove( target );
                Registry.Remove( target );

                target.RemoveResistanceMod( (ResistanceMod)mods[0] );
                target.RemoveSkillMod( (SkillMod)mods[1] );

                BuffInfo.RemoveBuff(target, BuffIcon.Protection);
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:49,代码来源:Protection.cs

示例9: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {
            Fishing.System.BeginHarvesting(from, this);

            if (Charges >= 1 && m_SkillMod == null && from.FindItemOnLayer(Layer.OneHanded) is DeepSeaFishingPole)
            {
                m_SkillMod = new DefaultSkillMod(SkillName.Fishing, true, 1);
                from.AddSkillMod(m_SkillMod);
            }

            if (!Sphere.EquipOnDouble(from, this))
                return;


            base.OnDoubleClick(from);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:16,代码来源:DeepSeaFishingPole.cs

示例10: Target

		public void Target( Mobile m )
		{
			if ( !(m is BaseCreature || m is PlayerMobile) )
			{
				Caster.SendLocalizedMessage( 1060508 ); // You can't curse that.
			}
			else if ( CheckHSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				/* Curses the target so that the next harmful event that affects them is magnified.
				 * Damage to the target's hit points is increased 25%,
				 * the poison level of the attack will be 1 higher
				 * and the Resist Magic skill of the target will be fixed on 50.
				 * 
				 * The effect lasts for one harmful event only.
				 */

				if ( m.Spell != null )
					m.Spell.OnCasterHurt();

				m.PlaySound( 0xFC );
				m.FixedParticles( 0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head );
				m.FixedParticles( 0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head );

				if ( !m_Table.Contains( m ) )
				{
					SkillMod mod = new DefaultSkillMod( SkillName.MagicResist, false, 50.0 );

					if ( m.Skills[SkillName.MagicResist].Base > 50.0 )
						m.AddSkillMod( mod );

					m_Table[m] = mod;
				}

				TimeSpan duration = TimeSpan.FromSeconds( (Caster.Skills[SkillName.SpiritSpeak].Value / 12) + 1.0 );

				Timer.DelayCall( duration, new TimerStateCallback( EffectExpire_Callback ), m );

				HarmfulSpell( m );

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.EvilOmen, 1075647, 1075648, duration, m));

			}

			FinishSequence();
		}
开发者ID:suiy187,项目名称:runuocustom,代码行数:47,代码来源:EvilOmen.cs

示例11: Toggle

        public static void Toggle( Mobile caster, Mobile target )
        {
            /* Players under the protection spell effect can no longer have their spells "disrupted" when hit.
             * Players under the protection spell have decreased physical resistance stat value,
             * a decreased "resisting spells" skill value by -35,
             * and a slower casting speed modifier (technically, a negative "faster cast speed") of 2 points.
             * The protection spell has an indefinite duration, becoming active when cast, and deactivated when re-cast.
             * Reactive Armor, Protection, and Magic Reflection will stay on�even after logging out,
             * even after dying�until you �turn them off� by casting them again.
             */

            object[] mods = (object[])m_Table[target];

            if ( mods == null )
            {
                target.PlaySound( 0x1E9 );
                target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );

                mods = new object[2]
                    {
                        new ResistanceMod( ResistanceType.Physical, -15 + (int)(caster.Skills[SkillName.Inscribe].Value / 20) ),
                        new DefaultSkillMod( SkillName.MagicResist, true, -35 + (int)(caster.Skills[SkillName.Inscribe].Value / 20) )
                    };

                m_Table[target] = mods;
                Registry[target] = 100.0;

                target.AddResistanceMod( (ResistanceMod)mods[0] );
                target.AddSkillMod( (SkillMod)mods[1] );
            }
            else
            {
                target.PlaySound( 0x1ED );
                target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );

                m_Table.Remove( target );
                Registry.Remove( target );

                target.RemoveResistanceMod( (ResistanceMod)mods[0] );
                target.RemoveSkillMod( (SkillMod)mods[1] );
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:42,代码来源:Protection.cs

示例12: ApplyBonus

        public static void ApplyBonus( Mobile m )
        {
            ApplyBonus( m.FindItemOnLayer( Layer.Gloves ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Pants ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.Arms ) as BaseArmor );
            ApplyBonus( m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor );

            // +10 dex (total)
            m.AddStatMod( new StatMod( StatType.Dex, "AssassinSetDex", 12, TimeSpan.Zero ) );

            // +30 stealth (total)
            SkillMod skillmod = new DefaultSkillMod( SkillName.Stealth, true, 30.0 );
            skillmod.ObeyCap = true;
            m_Table.Add( m, skillmod );
            m.AddSkillMod( skillmod );

            m.SendLocalizedMessage( 1072391 ); // The magic of your armor combines to assist you!

            Effects.PlaySound( m.Location, m.Map, 503 );
            m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:21,代码来源:AssassinSet.cs

示例13: ApplySkillLoss

        public static void ApplySkillLoss(Mobile mob)
        {
            if (InSkillLoss(mob))
                return;

            SkillLossContext context = new SkillLossContext();
            m_SkillLoss[mob] = context;

            List<SkillMod> mods = context.m_Mods = new List<SkillMod>();

            for (int i = 0; i < mob.Skills.Length; ++i)
            {
                Skill sk = mob.Skills[i];
                double baseValue = sk.Base;

                if (baseValue > 0)
                {
                    SkillMod mod = new DefaultSkillMod(sk.SkillName, true, -(baseValue * SkillLossFactor));

                    mods.Add(mod);
                    mob.AddSkillMod(mod);
                }
            }

            context.m_Timer = Timer.DelayCall(SkillLossPeriod, new TimerStateCallback(ClearSkillLoss_Callback), mob);
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:26,代码来源:Faction.cs

示例14: Suppress

        public void Suppress( Mobile target )
        {
            if ( target == null || m_Suppressed.ContainsKey( target ) || Deleted || !Alive || m_NextSuppress > DateTime.Now || 0.1 < Utility.RandomDouble() )
                return;

            TimeSpan delay = TimeSpan.FromSeconds( Utility.RandomMinMax( 20, 80 ) );

            if ( !target.Hidden && CanBeHarmful( target ) )
            {
                target.SendLocalizedMessage( 1072061 ); // You hear jarring music, suppressing your strength.

                for ( int i = 0; i < target.Skills.Length; i++ )
                {
                    Skill s = target.Skills[ i ];

                    target.AddSkillMod( new TimedSkillMod( s.SkillName, true, s.Base * -0.28, delay ) );
                }

                int count = (int) Math.Round( delay.TotalSeconds / 1.25 );
                Timer timer = new AnimateTimer( target, count );
                m_Suppressed.Add( target, timer );
                timer.Start();

                PlaySound( 0x58C );
            }

            m_NextSuppress = DateTime.Now + TimeSpan.FromSeconds( 10 );
        }
开发者ID:Leodinas,项目名称:uolite,代码行数:28,代码来源:Satyr.cs

示例15: OnEquip

 public override bool OnEquip(Mobile m)
 {
     base.OnEquip(m);
     if (Charges >= 1 && m_SkillMod == null)
     {
         m_SkillMod = new DefaultSkillMod(SkillName.Fishing, true, 1);
         m.AddSkillMod(m_SkillMod);
     }
     return true;
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:10,代码来源:DeepSeaFishingPole.cs


注:本文中的Mobile.AddSkillMod方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。