• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Spells.Spell类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Server.Spells.Spell的典型用法代码示例。如果您正苦于以下问题:C# Spell类的具体用法?C# Spell怎么用?C# Spell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Spell类属于Server.Spells命名空间,在下文中一共展示了Spell类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetDamageDelayForSpell

		public static TimeSpan GetDamageDelayForSpell( Spell sp )
		{
			if( !sp.DelayedDamage )
				return TimeSpan.Zero;

			return OldDamageDelay;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:7,代码来源:SpellHelper.cs


示例2: GetDamageDelayForSpell

		public static TimeSpan GetDamageDelayForSpell( Spell sp )
		{
			if( !sp.DelayedDamage )
				return TimeSpan.Zero;

			return (Core.AOS ? AosDamageDelay : OldDamageDelay);
		}
开发者ID:brodock,项目名称:genova-project,代码行数:7,代码来源:SpellHelper.cs


示例3: AllowSpellCast

		public bool AllowSpellCast( Mobile from, Spell spell )
		{
			if ( !m_StartedBeginCountdown )
				return true;

            if (spell == null) return false;

            Type spellType = spell.GetType();
            foreach (Type alwaysdisallowed in m_AlwaysDisallowedSpells)
            {
                if (alwaysdisallowed == spellType)
                    return false;
            }

			DuelPlayer pl = Find( from );

			if ( pl == null || pl.Eliminated )
				return true;

			if ( CantDoAnything( from ) )
				return false;

			string title = null, option = null;

            if( spell is MagerySpell )
			{
				switch( ((MagerySpell)spell).Circle )
				{
					case SpellCircle.First: title = "1st Circle"; break;
					case SpellCircle.Second: title = "2nd Circle"; break;
					case SpellCircle.Third: title = "3rd Circle"; break;
					case SpellCircle.Fourth: title = "4th Circle"; break;
					case SpellCircle.Fifth: title = "5th Circle"; break;
					case SpellCircle.Sixth: title = "6th Circle"; break;
					case SpellCircle.Seventh: title = "7th Circle"; break;
					case SpellCircle.Eighth: title = "8th Circle"; break;
				}

				option = spell.Name;
			}
			else
			{
				title = "Other Spell";
				option = spell.Name;
			}

			if ( title == null || option == null || m_Ruleset.GetOption( title, option ) )
				return true;

			from.SendMessage( "The dueling ruleset prevents you from casting this spell." );
			return false;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:52,代码来源:DuelContext.cs


示例4: GetDamageDelayForSpell

		public static TimeSpan GetDamageDelayForSpell(Spell sp)
		{
			if (sp == null)
			{
				return TimeSpan.Zero;
			}

			if (!sp.DelayedDamage)
			{
				return TimeSpan.Zero;
			}

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


示例5: Cast

		public void Cast( Spell spell )
		{
			bool m = Movable;

			Movable = false;
			spell.Cast();
			Movable = m;
		}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:8,代码来源:BaseWand.cs


示例6: AnimTimer

			public AnimTimer( Spell spell, int count ) : base( TimeSpan.Zero, AnimateDelay, count )
			{
				m_Spell = spell;

				Priority = TimerPriority.FiftyMS;
			}
开发者ID:greeduomacro,项目名称:uodarktimes-1,代码行数:6,代码来源:Spell.cs


示例7: HailstormTimer

 public HailstormTimer(Mobile caster, Spell spell, List<Mobile> toEffect, Rectangle2D area)
     : base(TimeSpan.FromMilliseconds(100.0), TimeSpan.FromMilliseconds(100.0))
 {
     m_ToEffect = toEffect;
     m_EffectArea = area;
     m_Caster = caster;
     m_Map = caster.Map;
     m_Spell = spell;
     Start();
 }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:10,代码来源:HailStormSpell.cs


示例8: SpellDamageTimer

            public SpellDamageTimer(Spell s, Mobile target, Mobile from, int damage, TimeSpan delay)
                : base(delay)
            {
                this.m_Target = target;
                this.m_From = from;
                this.m_Damage = damage;
                this.m_Spell = s;

                if (this.m_Spell != null && this.m_Spell.DelayedDamage && !this.m_Spell.DelayedDamageStacking)
                    this.m_Spell.StartDelayedDamageContext(target, this);

                this.Priority = TimerPriority.TwentyFiveMS;
            }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:13,代码来源:SpellHelper.cs


示例9: ISOFFENSIVESPELL

			public static bool ISOFFENSIVESPELL(TriggerObject trigObject, Spell spell)
			{
				if (spell == null)
				{
					return false;
				}

				return spell is MagicArrowSpell || spell is ClumsySpell || spell is FeeblemindSpell || spell is WeakenSpell ||
					   spell is HarmSpell || spell is FireballSpell || spell is PoisonSpell || spell is LightningSpell ||
					   spell is ManaDrainSpell || spell is MindBlastSpell || spell is ParalyzeSpell || spell is EnergyBoltSpell ||
					   spell is ExplosionSpell || spell is MassCurseSpell || spell is FlameStrikeSpell || spell is MeteorSwarmSpell ||
					   spell is ChainLightningSpell;
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:13,代码来源:UberScriptFunctions.cs


示例10: Damage

        public static void Damage(Spell spell, Mobile target, double damage)
        {
            TimeSpan ts = GetDamageDelayForSpell(spell);

            Damage(spell, ts, target, spell.Caster, damage);
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:6,代码来源:SpellHelper.cs


示例11: NightSightTarget

 public NightSightTarget( Spell spell )
     : base(12, false, TargetFlags.Beneficial)
 {
     m_Spell = spell;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:5,代码来源:VisaoNoturna.cs


示例12: HordeMinionsEyesSpellTarget

 public HordeMinionsEyesSpellTarget( Spell spell )
     : base(10, false, TargetFlags.None)
 {
     m_Spell = spell;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:5,代码来源:HordeMinionsEyes.cs


示例13: Damage

        public static void Damage( Spell spell, Mobile target, double damage, int phys, int fire, int cold, int pois, int nrgy )
        {
            TimeSpan ts = GetDamageDelayForSpell(spell);

            if (target is Player)
            {
                Monk mk = Perk.GetByType<Monk>((Player)target);
                if (mk != null && mk.ParrySpell())
                {
                    return;
                }

                Warlock wlk = Perk.GetByType<Warlock>((Player)target);
                if (wlk != null && wlk.ParrySpell())
                {
                    return;
                }
            }

            if (spell.Caster is Player)
            {
                Warlock wlk = Perk.GetByType<Warlock>((Player)spell.Caster);
                if (wlk != null && wlk.Overclock())
                {
                    damage += (int)(damage * .33);
                }
            }

            Damage(spell, ts, target, spell.Caster, damage, phys, fire, cold, pois, nrgy, DFAlgorithm.Standard);
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:30,代码来源:SpellHelper.cs


示例14: Cast

        public void Cast(Spell spell)
        {
            bool m = this.Movable;

            this.Movable = false;
            spell.Cast();
            this.Movable = m;
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:8,代码来源:BaseWand.cs


示例15: CheckCast

        public static bool CheckCast( Mobile caster, Spell spell )
        {
            if( !caster.CanBeginAction(typeof(Spells.Seventh.PolymorphSpell)) )
            {
                caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
                return false;
            }

            return true;
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:10,代码来源:SpellHelper.cs


示例16: CHECKSPELLSEQUENCE

			public static bool CHECKSPELLSEQUENCE(TriggerObject trigObject, Spell spell)
			{
				return spell != null && spell.CheckSequence();
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:4,代码来源:UberScriptFunctions.cs


示例17: CHECKBSPELLSEQUENCE

			public static bool CHECKBSPELLSEQUENCE(TriggerObject trigObject, Spell spell, Mobile target, bool allowDead)
			{
				return spell != null && spell.CheckBSequence(target, allowDead);
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:4,代码来源:UberScriptFunctions.cs


示例18: AnimTimer

            public AnimTimer( Spell spell, int count )
                : base(TimeSpan.Zero, AnimateDelay - TimeSpan.FromSeconds(0.25), count)
            {
                m_Spell = spell;

                Priority = TimerPriority.FiftyMS;
            }
开发者ID:Ravenwolfe,项目名称:Origins,代码行数:7,代码来源:Spell.cs


示例19: OnCast

		public static bool OnCast( Mobile caster, Spell spell )
		{
			ITransformationSpell transformSpell = spell as ITransformationSpell;

			if( transformSpell == null )
				return false;

			if( !caster.CanBeginAction( typeof( PolymorphSpell ) ) )
			{
				caster.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
			}
			else if ( DisguiseTimers.IsDisguised( caster ) )
			{
				caster.SendLocalizedMessage( 1061631 ); // You can't do that while disguised.
				return false;
			}
			else if( !caster.CanBeginAction( typeof( IncognitoSpell ) ) || (caster.IsBodyMod && GetContext( caster ) == null) )
			{
				spell.DoFizzle();
			}
			else if( spell.CheckSequence() )
			{
				TransformContext context = GetContext( caster );
				Type ourType = spell.GetType();

				bool wasTransformed = (context != null);
				bool ourTransform = (wasTransformed && context.Type == ourType);

				if( wasTransformed )
				{
					RemoveContext( caster, context, ourTransform );

					if( ourTransform )
					{
						caster.PlaySound( 0xFA );
						caster.FixedParticles( 0x3728, 1, 13, 5042, EffectLayer.Waist );
					}
				}

				if( !ourTransform )
				{
					if( !((Body)transformSpell.Body).IsHuman )
					{
						Mobiles.IMount mt = caster.Mount;

						if( mt != null )
							mt.Rider = null;
					}

					caster.BodyMod = transformSpell.Body;
					caster.HueMod = transformSpell.Hue;

					transformSpell.DoEffect( caster );

					Timer timer = new TransformTimer( caster, transformSpell );
					timer.Start();

					AddContext( caster, new TransformContext( timer, ourType, transformSpell ) );
					return true;
				}
			}

			return false;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:64,代码来源:SpellHelper.cs


示例20: CastTimer

            public CastTimer( Spell spell, TimeSpan castDelay )
                : base(castDelay)
            {
                m_Spell = spell;

                Priority = TimerPriority.TwentyFiveMS;
            }
开发者ID:Ravenwolfe,项目名称:Origins,代码行数:7,代码来源:Spell.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Fifth.ParalyzeSpell类代码示例发布时间:2022-05-26
下一篇:
C# Network.PacketWriter类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap