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


C# Mobile.Paralyze方法代码示例

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


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

示例1: Target

        public void Target( Mobile m )
        {
            if ( !Caster.CanSee( m ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( m.Frozen || m.Paralyzed )
            {
                Caster.SendLocalizedMessage( 1061923 ); // The target is already frozen.
            }
            else if ( CheckHSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                SpellHelper.CheckReflect( (int) this.Circle, Caster, ref m );

                int secs = (int) ( ( GetDamageSkill( Caster ) / 10 ) - ( GetResistSkill( m ) / 10 ) );

                if ( !m.IsPlayer )
                    secs *= 3;

                if ( secs < 0 )
                    secs = 0;

                double duration = secs;

                m.Paralyze( TimeSpan.FromSeconds( duration ) );

                m.PlaySound( 0x204 );
                m.FixedEffect( 0x376A, 6, 1 );
            }

            FinishSequence();
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:34,代码来源:Paralyze.cs

示例2: Target

      public void Target( Mobile m ) 
      { 
         if ( !Caster.CanSee( m ) ) 
         { 
            Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. 
         } 
         else if ( CheckHSequence( m ) ) 
         { 
            SpellHelper.Turn( Caster, m ); 

           speak=m.Squelched;

            m.PlaySound( 0x19 ); 
       m.Paralyze( TimeSpan.FromSeconds( 20.0 ) ); 
            m.FixedParticles( 0x375A, 2, 10, 5027, 0x3D, 2, EffectLayer.Waist ); 
       m.Hidden = true; 
         	m.Squelched = true;

            { 
               Point3D loc = new Point3D( m.X, m.Y, m.Z ); 

               Item item = new InternalItem( loc, Caster.Map, Caster,m , speak ); 

            } 


         } 

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

示例3: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			if( IsImmune( defender ) )	//Intentionally going after Mana consumption
			{
				attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
				defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
				return;
			}

			defender.FixedEffect( 0x376A, 9, 32 );
			defender.PlaySound( 0x204 );

			attacker.SendLocalizedMessage( 1060163 ); // You deliver a paralyzing blow!
			defender.SendLocalizedMessage( 1060164 ); // The attack has temporarily paralyzed you!

			TimeSpan duration = defender.Player ? PlayerFreezeDuration : NPCFreezeDuration;

			// Treat it as paralyze not as freeze, effect must be removed when damaged.
			defender.Paralyze( duration );

			BeginImmunity( defender, duration + FreezeDelayDuration );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:27,代码来源:ParalyzingBlow.cs

示例4: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( CheckHSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				SpellHelper.CheckReflect( (int)this.Circle, Caster, ref m );

                double duration;

                // Algorithm: ((20% of magery) + 7) seconds [- 50% if resisted]

                duration = 7.0 + (Caster.Skills[SkillName.Magery].Value * 0.2);

                if (CheckResisted(m))
                    duration *= 0.75;

				m.Paralyze( TimeSpan.FromSeconds( duration ) );

				m.PlaySound( 0x204 );
				m.FixedEffect( 0x376A, 6, 1 );

				HarmfulSpell( m );
			}

			FinishSequence();
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:31,代码来源:Paralyze.cs

示例5: Target

        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendAsciiMessage("Target can not be seen."); // Target can not be seen.
            }
            else if (Core.AOS && (m.Frozen || m.Paralyzed || (m.Spell != null && m.Spell.IsCasting)))
            {
                Caster.SendAsciiMessage("The target is already frozen."); // The target is already frozen.
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.CheckReflect((int)this.Circle, Caster, ref m);

                double duration;
                duration = (((Caster.Skills[SkillName.Magery].Value / 10) + 1) * 2) + 5;

                if (CheckResisted(m, 5))
                    duration /= 2;

                m.Paralyze(TimeSpan.FromSeconds(duration));

                if (m.Spell != null && m.Spell is Spell)
                    ((Spell)m.Spell).Disturb(DisturbType.Hurt);

                m.PlaySound(0x204);
                m.FixedEffect(0x376A, 6, 1);
            }

            FinishSequence();
        }
开发者ID:Godkong,项目名称:Origins,代码行数:33,代码来源:Paralyze.cs

示例6: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( Core.AOS && (m.Frozen || m.Paralyzed || (m.Spell != null && m.Spell.IsCasting && !(m.Spell is PaladinSpell))) )
			{
				Caster.SendLocalizedMessage( 1061923 ); // The target is already frozen.
			}
			else if ( CheckHSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				SpellHelper.CheckReflect( (int)this.Circle, Caster, ref m );

				double duration;
				
				if ( Core.AOS )
				{
					int secs = (int)((GetDamageSkill( Caster ) / 10) - (GetResistSkill( m ) / 10));
					
					if( !Core.SE )
						secs += 2;

					if ( !m.Player )
						secs *= 3;

					if ( secs < 0 )
						secs = 0;

					duration = secs;
				}
				else
				{
					// Algorithm: ((20% of magery) + 7) seconds [- 50% if resisted]

					duration = 7.0 + (Caster.Skills[SkillName.Magery].Value * 0.2);

					if ( CheckResisted( m ) )
						duration *= 0.75;
				}

				if ( m is PlagueBeastLord )
				{
					( (PlagueBeastLord) m ).OnParalyzed( Caster );
					duration = 120;
				}

				m.Paralyze( TimeSpan.FromSeconds( duration ) );

				m.PlaySound( 0x204 );
				m.FixedEffect( 0x376A, 6, 1 );

				HarmfulSpell( m );
			}

			FinishSequence();
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:59,代码来源:Paralyze.cs

示例7: FreezeAttack

 public void FreezeAttack(Mobile m)
 {
     m.Paralyze(TimeSpan.FromSeconds(10));
     m.PlaySound(541);
     m.FixedEffect(0x376A, 6, 1);
     m.HueMod = 1152;
     m.SendMessage("The white falcon's breath turns you to ice!");
     new FreezeAttackTimer(m).Start();
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:9,代码来源:WhiteFalcon.cs

示例8: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;

			if ( pack != null && pack.ConsumeTotal( typeof( Opium ), 1 ) )
			{
				Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y, from.Z + 19 ), from.Map, 0x3735, 13 );
				from.Animate( 34, 5, 1, true, false, 0 );
				from.PlaySound( 0x21 );
				from.Paralyze( TimeSpan.FromSeconds( 5 ) );
				from.FixedParticles( 0x373A, 10, 15, 5018, EffectLayer.Head );
			}
			else
			{
				from.SendMessage(37, "You are out of opium!");
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:17,代码来源:DrugRelated.cs

示例9: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !defender.Mounted )
			{
				attacker.SendLocalizedMessage( 1060848 ); // This attack only works on mounted targets
				ClearCurrentAbility( attacker );
				return;
			}

			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			if( !attacker.Mounted )
			{
				Mobile mount = defender.Mount as Mobile;
				BaseMount.Dismount( defender );

				if( mount != null )	//Ethy mounts don't take damage
				{
					int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 5);
										
					AOS.Damage( mount, null, amount, 100, 0, 0, 0, 0 );	//The mount just takes damage, there's no flagging as if it was attacking the mount directly
					
					//TODO: Mount prevention until mount healed
				}
			}
			else
			{
				int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 5);
				
				AOS.Damage( defender, attacker, amount, 100, 0, 0, 0, 0 );                     			    

				if( Server.Items.ParalyzingBlow.IsImmune( defender ) )	//Does it still do damage?
				{
					attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
					defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
				}
				else
				{
				defender.Paralyze( TimeSpan.FromSeconds( 3.0 ) );
					Server.Items.ParalyzingBlow.BeginImmunity( defender, Server.Items.ParalyzingBlow.FreezeDelayDuration );
				}
			}
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:46,代码来源:RidingSwipe.cs

示例10: SpellEffect

		public override void SpellEffect( Mobile m )
		{
			m.Paralyze( TimeSpan.FromSeconds( ScaleBySkill( Caster, DamageSkill ) ) );

			NetState ns = m.NetState;

			if ( ns != null )
			{
				if ( m.Race == Race.Elf )
					ns.Send( new PersonalLightLevel( m, -66 ) );
				else
					ns.Send( new PersonalLightLevel( m, -56 ) );
			}

			Timer timer = new InternalTimer( m, (int)ScaleBySkill( Caster, DamageSkill ) );
			timer.Start();

			BlueMageControl.CheckKnown( m, this, CanTeach( m ) );
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:19,代码来源:Night.cs

示例11: Target

      public void Target( Mobile m )
      {
         if ( !Caster.CanSee( m ) )
         {
            Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
         }
         else if ( CheckHSequence( m ) )
         {
            SpellHelper.Turn( Caster, m );

            double duration;

            // Algorithm: ((20% of AnimalTamin) + 7) seconds [- 50% if resisted] seems to work??
            duration = 7.0 + (Caster.Skills[DamageSkill].Value * 0.2);

            // Resist if Str + Dex / 2 is greater than CastSkill eg. AnimalLore seems to work??
            if ( ( Caster.Skills[CastSkill].Value ) < ( ( m.Str + m.Dex ) * 0.5 ) )
               duration *= 0.5;

            // no less than 0 seconds no more than 9 seconds
            if ( duration < 0.0 )
               duration = 0.0;
            if ( duration > 9.0 )
               duration = 9.0;

            m.PlaySound( 0x2A1 );

            m.Paralyze( TimeSpan.FromSeconds( duration ) );
            m.FixedParticles( 0x375A, 2, 10, 5027, 0x3D, 2, EffectLayer.Waist );

            {
               Point3D loc = new Point3D( m.X, m.Y, m.Z );

               Item item = new InternalItem( loc, Caster.Map, Caster );

            }


         }

         FinishSequence();
      }
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:42,代码来源:GraspingRootsSpell.cs

示例12: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			bool cantpara = Server.Items.ParalyzingBlow.IsImmune(defender);

			if ( cantpara )
			{
				attacker.SendLocalizedMessage(1070804); // Your target resists paralysis.
				defender.SendLocalizedMessage(1070813); // You resist paralysis.
			}
			else
			{
				attacker.SendLocalizedMessage(1063356); // You cripple your target with a nerve strike!
				defender.SendLocalizedMessage(1063357); // Your attacker dealt a crippling nerve strike!
			}

			attacker.PlaySound(0x204);
			defender.FixedEffect(0x376A, 9, 32);
			defender.FixedParticles(0x37C4, 1, 8, 0x13AF, 0, 0, EffectLayer.Waist);

			if ( Core.ML )
			{
				AOS.Damage( defender, attacker, (int)( 15.0 * ( attacker.Skills[SkillName.Bushido].Value - 50.0 ) / 70.0 + Utility.Random( 10 ) ), true, 100, 0, 0, 0, 0 );	//0-25

				if (!cantpara && ((150.0 / 7.0 + (4.0 * attacker.Skills[SkillName.Bushido].Value) / 7.0) / 100.0) > Utility.RandomDouble())
				{
					defender.Paralyze( TimeSpan.FromSeconds( 2.0 ) );
					Server.Items.ParalyzingBlow.BeginImmunity( defender, Server.Items.ParalyzingBlow.FreezeDelayDuration );				
				}
			}
			else if( !cantpara )
			{
				AOS.Damage( defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 10), true, 100, 0, 0, 0, 0 ); //10-25
				defender.Freeze(TimeSpan.FromSeconds(2.0));
				Server.Items.ParalyzingBlow.BeginImmunity(defender, Server.Items.ParalyzingBlow.FreezeDelayDuration);
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:41,代码来源:NerveStrike.cs

示例13: OnHit

        public override void OnHit( Mobile attacker, Mobile defender, int damage )
        {
            if( !defender.Mounted )
            {
                attacker.SendLocalizedMessage( 1060848 ); // This attack only works on mounted targets
                ClearCurrentAbility( attacker );
                return;
            }

            if( !Validate( attacker ) || !CheckMana( attacker, true ) )
                return;

            ClearCurrentAbility( attacker );

            if( !attacker.Mounted )
            {
                Mobile mount = defender.Mount as Mobile;
                BaseMount.Dismount( defender );

                if( mount != null )	//Ethy mounts don't take damage
                {
                    int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Leadership].Value - 50.0) / 70.0 + 5);

                    AOS.Damage( mount, null, amount, 100, 0, 0, 0, 0, 0, 0, 0 );	//The mount just takes damage, there's no flagging as if it was attacking the mount directly

                    //TODO: Mount prevention until mount healed
                }
            }
            else
            {
                int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Leadership].Value - 50.0) / 70.0 + 5);

                AOS.Damage( defender, attacker, amount, 100, 0, 0, 0, 0, 0, 0, 0 );

                defender.Paralyze( TimeSpan.FromSeconds( 3.0 ) );
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:37,代码来源:RidingSwipe.cs

示例14: OnMoveOver

            public override bool OnMoveOver( Mobile m )
            {
                if ( Visible && m_Caster != null && (!Core.AOS || m != m_Caster) && SpellHelper.ValidIndirectTarget( m_Caster, m ) && m_Caster.CanBeHarmful( m, false ) )
                {
                    m_Caster.DoHarmful( m );

                    double duration;

                    if ( Core.AOS )
                    {
                        duration = 2.0 + ((int)(m_Caster.Skills[SkillName.EvalInt].Value / 10) - (int)(m.Skills[SkillName.MagicResist].Value / 10));

                        if ( !m.Player )
                            duration *= 3.0;

                        if ( duration < 0.0 )
                            duration = 0.0;
                    }
                    else
                    {
                        duration = 7.0 + (m_Caster.Skills[SkillName.Magery].Value * 0.1);

                        bool guarded = (m.Region is Regions.GuardedRegion && !((Regions.GuardedRegion)m.Region).IsDisabled());

                        //if ( !m.CheckSkill( SkillName.MagicResist, 10.0, 50.0 ) ) // CheckResistedEasy
                        //if ( !guarded && !m.CheckSkill( SkillName.MagicResist, 45.0, 105.0 ) ) // CheckResisted
                        if (!guarded && MagerySpell.CheckResistedStatic(m, m_Caster, (int)SpellCircle.Fifth)) // Para Field is 6th circle, but para itself is 5th
                        {
                            m.Paralyze(TimeSpan.FromSeconds(duration));
                        }
                        else
                        {
                            duration *= 0.25;
                            m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
                        }
                    }

                    if ( duration > 0 )
                        m.Paralyze( TimeSpan.FromSeconds( duration ) );

                    m.PlaySound( 0x204 );
                    m.FixedEffect( 0x376A, 10, 16 );
                }

                return true;
            }
开发者ID:greeduomacro,项目名称:divinity,代码行数:46,代码来源:ParalyzeField.cs

示例15: OnGaveMeleeAttack

        // TODO: Axe Throw
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.1 > Utility.RandomDouble())
            {
                /* Maniacal laugh
                * Cliloc: 1070840
                * 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"
                * Paralyzes for 4 seconds, or until hit
                */
                defender.FixedEffect(0x37B9, 10, 5);
                defender.SendLocalizedMessage(1070840); // You are frozen as the creature laughs maniacally.

                defender.Paralyze(TimeSpan.FromSeconds(4.0));
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:18,代码来源:YomotsuElder.cs


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