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


C# Mobile.BoltEffect方法代码示例

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


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

示例1: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {

            if (Parent != from)
                if (from.AccessLevel < AccessLevel.GameMaster)
                    from.SendMessage("When you touch, it vanishes without trace...");
            if (from.AccessLevel < AccessLevel.GameMaster)
                this.Consume();
            if (from.AccessLevel < AccessLevel.GameMaster)
                return;
            {
                if (!IsChildOf(from.Backpack))
                {
                    from.Say("That must be in your pack for you to use it");
                    return;
                }
                if (!from.Hidden == true)
                {
                    from.Emote("*" + from.Name + " goes to ethereal world*");
                    from.BoltEffect(0);
                    from.Hidden = true;

                }
                else
                {
                    from.Hidden = false;
                    from.Emote("*" + from.Name + " strikes the earth*");
                    from.BoltEffect(0);

                }
            }
        }
开发者ID:greeduomacro,项目名称:last-wish,代码行数:32,代码来源:ThunderHide.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 );

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

				double damage = Utility.Random( 12, 9 );

                if (CheckResisted(m))
                {
                    damage *= 0.75;

                    m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
                }

                damage *= GetDamageScalar(m);

                m.BoltEffect( 0 );

				SpellHelper.Damage( this, m, damage, 0, 0, 0, 0, 100 );
			}

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

示例3: Target

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

                SpellHelper.Turn( Caster, m );

                double damage = Caster.Skills[SkillName.SpiritSpeak].Value * ClericDivineFocusSpell.GetScalar( Caster );

                if ( Core.AOS )
                {
                    SpellHelper.Damage( TimeSpan.Zero, m, Caster, damage, 0, 0, 0, 0, 100 );
                }
                else
                {
                    SpellHelper.Damage( TimeSpan.Zero, m, Caster, damage );
                }
            }

            FinishSequence();
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:26,代码来源:SmiteSpell.cs

示例4: OnWeaponHit

		// note that this method will be called when attached to either a mobile or a weapon
		// when attached to a weapon, only that weapon will do additional damage
		// when attached to a mobile, any weapon the mobile wields will do additional damage
		public override void OnWeaponHit(Mobile attacker, Mobile defender, BaseWeapon weapon, int damageGiven)
		{
			// if it is still refractory then return
			if (DateTime.UtcNow < m_EndTime)
			{
				return;
			}

			int damage = 0;

			if (m_Damage > 0)
			{
				damage = Utility.Random(m_Damage);
			}

			if (defender != null && attacker != null && damage > 0)
			{
				defender.BoltEffect(0);

				//SpellHelper.Damage( TimeSpan.Zero, defender, attacker, damage, 0, 0, 0, 0, 100 );
				SpellHelper.Damage(TimeSpan.FromSeconds(1.0), defender, attacker, damage);

				m_EndTime = DateTime.UtcNow + Refractory;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:28,代码来源:XmlLightning.cs

示例5: ExplodeHorn

        private void ExplodeHorn( Mobile target )
        {
            target.SendMessage("One of the eryon's horns seems to glow, erupting violently in a flash!");

            this.FixedEffect(0x36B0, 10, 1);
            target.BoltEffect(0);
            target.BoltEffect(0);

            target.Freeze(TimeSpan.FromSeconds(5));

            this.Direction = this.GetDirectionTo(target.Location);
            this.DoHarmful(target, true);
            target.Damage(Utility.RandomMinMax(15, 45), this);

            Item hornShard = new Item(0x9D1); //grape bunch itemID
            hornShard.Hue = 1109;
            hornShard.Name = "a piece of eryon horn";
            hornShard.MoveToWorld(target.Location, target.Map);
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:19,代码来源:Eryon.cs

示例6: OnHit

        public override void OnHit(Mobile attacker, Mobile defender)
        {
            CustomRegion cR = defender.Region as CustomRegion;

            if (cR == null || cR.Controller.AllowSpecialAttacks)
            {
                if (Utility.Random(20) <= 2) // 10% chance of scoring a critical hit
                {
                    attacker.SendAsciiMessage("You score a critical hit!");
                    defender.PublicOverheadMessage(MessageType.Emote, 34, false, string.Format("*Critical hit!*"));
                    defender.BoltEffect(0);
                    defender.Hits -= 10;
                }
            }

            base.OnHit(attacker, defender);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:17,代码来源:JudgementHammer.cs

示例7: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
            if (IsChildOf(from.Backpack))
            {
                if (from.Kills != 0)
                {
                    from.BoltEffect(0);
                    --from.Kills;
                    from.SendAsciiMessage("A killcount has been removed!");
                    from.SendMessage("Your new killcount is: {0}", from.Kills);
                    Consume();

                }
                else
                    from.SendMessage("You are already at 0 kills!");
            }
            else
                from.SendLocalizedMessage(1060640); // "This item must be in your backpack to use it"
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:19,代码来源:KillRemoveBall.cs

示例8: DoMountAbility

		public override bool DoMountAbility( int damage, Mobile attacker )
		{
			if( Rider == null || attacker == null )	//sanity
				return false;

			if( (Rider.Hits - damage) < 30 && Rider.Map == attacker.Map && Rider.InRange( attacker, 18 ) )	//Range and map checked here instead of other base fuction because of abiliites that don't need to check this
			{
				attacker.BoltEffect( 0 );
				// 35~100 damage, unresistable, by the Ki-rin.
				attacker.Damage( Utility.RandomMinMax( 35, 100 ), this, false );	//Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player.  If changed to player, without the extra bool it'd be an infinite loop

				Rider.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042534 );	// Your mount calls down the forces of nature on your opponent.
				Rider.FixedParticles( 0, 0, 0, 0x13A7, EffectLayer.Waist );
				Rider.PlaySound( 0xA9 );	// Ki-rin's whinny.
				return true;
			}

			return false;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:19,代码来源:Kirin.cs

示例9: OnDoubleClick

        public override void OnDoubleClick(Mobile m)
        {
            if (IsChildOf(m.Backpack))
            {
                if (m.Karma != 0)
                {
                    m.BoltEffect(0);
                    m.Karma = 0;
                    m.SendAsciiMessage("Your karma has been reset!");
                    m.SendMessage("Your new karma is: {0}", m.Karma);
                    Consume();

                }
                else
                    m.SendMessage("You already have 0 karma!");
            }
            else
                m.SendLocalizedMessage(1060640); // "This item must be in your backpack to use it"
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:19,代码来源:KarmaResetBall.cs

示例10: Target

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

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

                double damage;

                if ( Core.AOS )
                {
                    damage = GetNewAosDamage( 23, 1, 4, m );
                }
                else
                {
                    //damage = Utility.Random( 12, 9 );
                    damage = (((3 * Utility.Random(1, 8)) + 5) * (50 + Caster.Skills[SkillName.Magery].Value)) / 100;

                    if ( CheckResisted( m, damage ) )
                    {
                        //damage *= 0.75;
                        damage = (damage + 1) / 2;

                        m.SendAsciiMessage( "You feel yourself resisting magical energy." ); // You feel yourself resisting magical energy.
                    }

                    damage *= GetDamageScalar( m );
                }

                m.BoltEffect( 0 );

                SpellHelper.Damage( this, m, damage, 0, 0, 0, 0, 100 );
            }

            FinishSequence();
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:41,代码来源:Lightning.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 );

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

                double damage = GetDamage( m );

                m.BoltEffect( 0 );

                SpellHelper.Damage( this, m, damage, 0, 0, 0, 0, 100 );
            }

            FinishSequence();
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:21,代码来源:Lightning.cs

示例12: OnDoubleClick

 public override void OnDoubleClick(Mobile from)
 {
     if (DateTime.UtcNow >= LastUsed)
     {
         LastUsed = DateTime.UtcNow + TimeSpan.FromMinutes(20);
         Effects.SendIndividualFlashEffect(from, (FlashType) 2);
         from.SolidHueOverride = 2498;
         Timer.DelayCall(TimeSpan.FromSeconds(1), () =>
         {
             from.BoltEffect(2049);
             from.Say("I HAVE THE POWER!");
             Timer.DelayCall(TimeSpan.FromSeconds(3), () => { from.SolidHueOverride = -1; });
         });
     }
     else
     {
         TimeSpan nextuse = LastUsed - DateTime.UtcNow;
         from.SendMessage("You cannot use this again for another " + nextuse.Minutes + " minutes.");
     }
     base.OnDoubleClick(from);
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:21,代码来源:DecorativeSword.cs

示例13: Target

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

            if ( CheckHSequence( m ) )
			{
				SpellHelper.CheckReflect( (int)Circle, Caster, ref m );

			    double damage = 20 + ((int)(GetDamageSkill(Caster) - GetResistSkill(m)) / 12);

				m.BoltEffect( 0 );

				SpellHelper.Damage( this, m, damage, 0, 0, 0, 0, 100 );
			    m.PlaySound(m.GetHurtSound());
			    m.Animate(!m.Mounted ? 20 : 29, 5, 1, true, false, 0);
			}

			FinishSequence();
		}
开发者ID:rberiot,项目名称:imaginenation,代码行数:22,代码来源:Lightning.cs

示例14: Target

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

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

                double damage;

                if ( Core.AOS )
                {
                    damage = GetNewAosDamage( 22, 1, 4, Caster.Player && m.Player );
                }
                else
                {
                    damage = Utility.Random( 10, 8 );

                    if ( CheckResisted( m ) )
                    {
                        damage *= 0.75;

                        m.SendAsciiMessage( "You feel yourself resisting magical energy." );
                    }

                    damage *= GetDamageScalar( m );
                }

                m.BoltEffect( 0 );

                SpellHelper.Damage( this, m, damage, 0, 0, 0, 0, 100 );
            }

            FinishSequence();
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:39,代码来源:Lightning.cs

示例15: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {

            if (Parent != from)
            {
                from.SendMessage("The Sword must be eqquiped to use.");
            }
            else if (from.Title != "Merlin's Apprentance")
            {
                from.Title = "Merlin's Apprentance";

                from.BoltEffect(0);
                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);

                m_StatMod0 = new StatMod(StatType.Str, "MOD0", 10, TimeSpan.Zero);
                m_StatMod1 = new StatMod(StatType.Int, "MOD1", 10, TimeSpan.Zero);

                from.AddStatMod(m_StatMod0);
                from.AddStatMod(m_StatMod1);

                this.WeaponAttributes.HitLeechHits = 65;
                this.WeaponAttributes.HitLeechMana = 45;
                this.Attributes.WeaponSpeed = 30;
            }
            else
            {
                from.BoltEffect(0);
                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);

                from.Title = null;

                from.RemoveStatMod("MOD0");
                from.RemoveStatMod("MOD1");

                this.WeaponAttributes.HitLeechHits = 25;
                this.WeaponAttributes.HitLeechMana = 25;
                this.Attributes.WeaponSpeed = 15;
            }
        }
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:39,代码来源:BladeofTorment.cs


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