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


C# Spells.Spell类代码示例

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


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


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