當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。