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


C# Fifth.ParalyzeSpell类代码示例

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


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

示例1: ChooseSpell

        public virtual Spell ChooseSpell(Mobile c)
        {
            Spell spell = this.CheckCastHealingSpell();

            if (spell != null)
                return spell;
				
            double damage = ((this.m_Mobile.Skills[SkillName.SpiritSpeak].Value - c.Skills[SkillName.MagicResist].Value) / 10) + (c.Player ? 18 : 30);
			
            if (damage > c.Hits)
                return new PainSpikeSpell(this.m_Mobile, null);

            switch ( Utility.Random(25) )
            {
                case 0:
                case 1:
                case 2:	// Poison them
                    {
                        this.m_Mobile.DebugSay("Attempting to poison");

                        if (!c.Poisoned)
                            spell = new PoisonSpell(this.m_Mobile, null);

                        break;
                    }
                case 3:	// Bless ourselves.
                    {
                        this.m_Mobile.DebugSay("Blessing myself");

                        spell = new BlessSpell(this.m_Mobile, null);
                        break;
                    }
                case 4:
                case 5:
                case 6: // Curse them.
                    {
                        this.m_Mobile.DebugSay("Attempting to curse");

                        spell = this.GetRandomCurseSpell();
                        break;
                    }
                case 7:	// Paralyze them.
                    {
                        this.m_Mobile.DebugSay("Attempting to paralyze");

                        if (this.m_Mobile.Skills[SkillName.Magery].Value > 50.0)
                            spell = new ParalyzeSpell(this.m_Mobile, null);

                        break;
                    }
                case 8: // Drain mana
                    {
                        this.m_Mobile.DebugSay("Attempting to drain mana");

                        spell = this.GetRandomManaDrainSpell();
                        break;
                    }
                case 9:
                case 10: // Blood oath them
                    {
                        this.m_Mobile.DebugSay("Attempting to blood oath");
										
                        if (this.m_Mobile.Skills[SkillName.Necromancy].Value > 30 && BloodOathSpell.GetBloodOath(c) != this.m_Mobile)
                            spell = new BloodOathSpell(this.m_Mobile, null);
						
                        break;
                    }
                case 11:
                case 12: // Animate dead
                    {
                        this.m_Mobile.DebugSay("Attempting to animate dead");

                        if ((this.m_Animated == null || !this.m_Animated.Alive) && this.m_Mobile.Skills[SkillName.Necromancy].Value > 40)
                            spell = new AnimateDeadSpell(this.m_Mobile, null);

                        break;
                    }
                case 13:
                case 14:
                    {
                        this.m_Mobile.DebugSay("Attempting to cast vengeful spirit");

                        if (this.m_Mobile.Skills[SkillName.Necromancy].Value > 80 && (this.m_Mobile.Followers + 3) < this.m_Mobile.FollowersMax)
                            spell = new VengefulSpiritSpell(this.m_Mobile, null);

                        break;
                    }
                default: // Damage them.
                    {
                        this.m_Mobile.DebugSay("Just doing damage");

                        spell = this.GetRandomDamageSpell();
                        break;
                    }
            }

            return spell;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:98,代码来源:NecroMageAI.cs

示例2: ChooseSpell

        public virtual Spell ChooseSpell(IDamageable d)
        {
            if (!(d is Mobile))
            {
                m_Mobile.DebugSay("Just doing damage");
                return GetRandomDamageSpell();
            }

            Mobile c = d as Mobile;
            Spell spell = null;

            if (!this.SmartAI)
            {
                spell = this.CheckCastHealingSpell();

                if (spell == null && m_Mobile.RawInt >= 80)
                    spell = CheckCastDispelField();

                if (spell != null)
                    return spell;

                int maxCircle = GetMaxCircle();

                switch (Utility.Random(15))
                {
                    case 0:
                    case 1:	// Poison them
                        {
                            if (c.Poisoned)
                                goto default;

                            this.m_Mobile.DebugSay("Attempting to poison");

                            spell = new PoisonSpell(this.m_Mobile, null);
                            break;
                        }
                    case 2:	// Bless ourselves
                        {
                            this.m_Mobile.DebugSay("Blessing myself");

                            spell = GetRandomBuffSpell();//new BlessSpell(this.m_Mobile, null);
                            break;
                        }
                    case 3:
                    case 4: // Curse them
                        {
                            this.m_Mobile.DebugSay("Attempting to curse");

                            spell = this.GetRandomCurseSpell();
                            break;
                        }
                    case 5:	// Paralyze them
                        {
                            this.m_Mobile.DebugSay("Attempting to paralyze");

                            if (maxCircle >= 5)
                                spell = new ParalyzeSpell(m_Mobile, null);
                            else
                                spell = GetRandomCurseSpell();
                            break;
                        }
                    case 6: // Drain mana
                        {
                            this.m_Mobile.DebugSay("Attempting to drain mana");

                            spell = this.GetRandomManaDrainSpell();
                            break;
                        }
                    default: // Damage them
                        {
                            this.m_Mobile.DebugSay("Just doing damage");

                            spell = this.GetRandomDamageSpell();
                            break;
                        }
                }

                return spell;
            }

            if (m_Mobile.Hidden)
                return null;

            spell = CheckCastDispelField();

            if (spell == null)
                spell = CheckCastHealingSpell();

            if (spell == null && 0.05 >= Utility.RandomDouble())
                spell = GetRandomBuffSpell();

            else if (spell == null && m_Mobile.Followers + 1 < m_Mobile.FollowersMax && 0.05 >= Utility.RandomDouble())
                spell = GetRandomSummonSpell();

            else if (spell == null && 0.05 >= Utility.RandomDouble())
                spell = GetRandomFieldSpell();

            else if (spell == null && 0.05 >= Utility.RandomDouble())
                spell = GetRandomManaDrainSpell();

//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:ServUO,代码行数:101,代码来源:MageAI.cs

示例3: Think


//.........这里部分代码省略.........
						{
							UseItemByType(typeof(BaseCurePotion));
						}
					}
				}
				else if (IsDamaged && (m_Guard.HitsMax - m_Guard.Hits) > Utility.Random(200))
				{
					if (IsAllowed(GuardAI.Magic) && ((m_Guard.Hits * 100) / Math.Max(m_Guard.HitsMax, 1)) < 10 &&
						m_Guard.Home != Point3D.Zero && !Utility.InRange(m_Guard.Location, m_Guard.Home, 15) && m_Guard.Mana >= 11)
					{
						spell = new RecallSpell(m_Guard, null, new RunebookEntry(m_Guard.Home, m_Guard.Map, "Guard's Home", null), null);
					}
					else if (IsAllowed(GuardAI.Bless))
					{
						if (m_Guard.Mana >= 11 && (m_Guard.Hits + 30) < m_Guard.HitsMax)
						{
							spell = new GreaterHealSpell(m_Guard, null);
						}
						else if ((m_Guard.Hits + 10) < m_Guard.HitsMax &&
								 (m_Guard.Mana < 11 || (m_Guard.NextCombatTime - Core.TickCount) > 2000))
						{
							spell = new HealSpell(m_Guard, null);
						}
					}
					else if (m_Guard.CanBeginAction(typeof(BaseHealPotion)))
					{
						UseItemByType(typeof(BaseHealPotion));
					}
				}
				else if (dispelTarget != null && (IsAllowed(GuardAI.Magic) || IsAllowed(GuardAI.Bless) || IsAllowed(GuardAI.Curse)))
				{
					if (!dispelTarget.Paralyzed && m_Guard.Mana > (ManaReserve + 20) && 40 > Utility.Random(100))
					{
						spell = new ParalyzeSpell(m_Guard, null);
					}
					else
					{
						spell = new DispelSpell(m_Guard, null);
					}
				}

				if (combatant != null)
				{
					if (m_Combo != null)
					{
						if (spell == null)
						{
							spell = SpellCombo.Process(m_Guard, combatant, ref m_Combo, ref m_ComboIndex, ref toRelease);
						}
						else
						{
							m_Combo = null;
							m_ComboIndex = -1;
						}
					}
					else if (20 > Utility.Random(100) && IsAllowed(GuardAI.Magic))
					{
						if (80 > Utility.Random(100))
						{
							m_Combo = (IsAllowed(GuardAI.Smart) ? SpellCombo.Simple : SpellCombo.Strong);
							m_ComboIndex = -1;

							if (m_Guard.Mana >= (ManaReserve + m_Combo.Mana))
							{
								spell = SpellCombo.Process(m_Guard, combatant, ref m_Combo, ref m_ComboIndex, ref toRelease);
							}
开发者ID:zerodowned,项目名称:justuo-with-ec-support,代码行数:67,代码来源:GuardAI.cs

示例4: DoCombo

		public override Spell DoCombo(Mobile c)
		{
			Spell spell = null;

			if (Combo == 0)
			{
				m_Mobile.DebugSay("I am doing combo part 1");
				Map fromMap = m_Mobile.Map;
				Point3D from = m_Mobile.Location;

				Map toMap = c.Map;
				Point3D to = c.Location;

				if (toMap != null)
				{
					for (int i = 0; i < 5; ++i)
					{
						Point3D loc = new Point3D(to.X - 4 + Utility.Random(8), to.Y - 4 + Utility.Random(9), to.Z);

						if (toMap.CanSpawnMobile(loc))
						{
							to = loc;
							break;
						}
						else
						{
							loc.Z = toMap.GetAverageZ(loc.X, loc.Y);

							if (toMap.CanSpawnMobile(loc))
							{
								to = loc;
								break;
							}
						}
					}

					m_Mobile.Map = toMap;
					m_Mobile.Location = to;
					//poof effect
					DoParticleEffect(m_Mobile, from, to, fromMap, toMap);
				}

				spell = new LightningSpell(m_Mobile, null);
				++Combo; // Move to next spell
			}
			else if (Combo == 1)
			{
				spell = new ParalyzeSpell(m_Mobile, null);
				++Combo; // Move to next spell
			}
			else if (Combo == 2)
			{
				m_Mobile.Say("I bet your first wish would be that you had never rubbed the lamp!");
				if (!c.Paralyzed)
				{
					spell = new ParalyzeSpell(m_Mobile, null);
				}
				else
					spell = new LightningSpell(m_Mobile, null);
				++Combo; // Move to next spell
			}

			else if (Combo == 3)
			{
				Map fromMap = m_Mobile.Map;
				Point3D from = m_Mobile.Location;

				Map toMap = c.Map;
				Point3D to = c.Location;

				if (toMap != null)
				{
					for (int i = 0; i < 5; ++i)
					{
						Point3D loc = new Point3D(to.X - 4 + Utility.Random(8), to.Y - 4 + Utility.Random(9), to.Z);

						if (toMap.CanSpawnMobile(loc))
						{
							to = loc;
							break;
						}
						else
						{
							loc.Z = toMap.GetAverageZ(loc.X, loc.Y);

							if (toMap.CanSpawnMobile(loc))
							{
								to = loc;
								break;
							}
						}
					}

					m_Mobile.Map = toMap;
					m_Mobile.Location = to;

					DoParticleEffect(m_Mobile, from, to, fromMap, toMap);
				}
				spell = new LightningSpell(m_Mobile, null);
				++Combo; // Move to next spell
//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:GenieAI.cs

示例5: ChooseSpell


//.........这里部分代码省略.........
					if ( !m_Mobile.Summoned )
					{
						switch( Utility.Random( 2 ) )
						{
							case 0:
								if ( m_Mobile.Hits < (m_Mobile.HitsMax - 50) )
								{
									m_Mobile.UseSkill( SkillName.SpiritSpeak );
								}
								else if ( m_Mobile.Hits < (m_Mobile.HitsMax - 10) )
								{
									m_Mobile.UseSkill( SkillName.SpiritSpeak );
								}
							break;
							case 1:
								if ( m_Mobile.Hits < (m_Mobile.HitsMax - 50) )
								{
									return new GreaterHealSpell( m_Mobile, null );
								}
								else if ( m_Mobile.Hits < (m_Mobile.HitsMax - 10) )
								{
									return new HealSpell( m_Mobile, null );
								}
							break;
						}
					}

					break;
				}
				case 1: // Poison them
				{
					if ( !c.Poisoned )
						spell = new PoisonSpell( m_Mobile, null );

					break;
				}
				case 2: // PoisonStrike them
				{
					if ( !c.Poisoned )
						spell = new PoisonStrikeSpell( m_Mobile, null );

					break;
				}
				case 3: // Deal some damage
				{
					spell = GetRandomDamageSpell();

					break;
				}
				case 4: // Set up a combo
				{
					if ( m_Mobile.Mana < 40 && m_Mobile.Mana > 15 )
					{
						if ( c.Paralyzed && !c.Poisoned )
						{
							m_Mobile.DebugSay( "I am going to meditate" );

							m_Mobile.UseSkill( SkillName.Meditation );
						}
						else if ( !c.Poisoned )
						{
							spell = new ParalyzeSpell( m_Mobile, null );
						}
					}
					else if ( m_Mobile.Mana > 60 )
					{
						if ( Utility.Random( 4 ) == 0 && !c.Paralyzed && !c.Frozen && !c.Poisoned )
						{
							m_Combo = 0;
							spell = new ParalyzeSpell( m_Mobile, null );
						}
						else
						{
							m_Combo = 1;
							spell = new ExplosionSpell( m_Mobile, null );
						}
					}
					break;
				}
				case 5: //Combo to soften our enemies with a powerful attack while we have max mana amounts
				{
					if ( m_Mobile.Mana > 80 )
					{
						if ( Utility.Random( 2 ) == 0 && !c.Paralyzed && !c.Frozen && !c.Poisoned ) 
						{
							m_Combo = 0;
							spell = new VengefulSpiritSpell ( m_Mobile, null );
						}
						else
						{
							m_Combo = 0;
							spell = new ParalyzeSpell( m_Mobile, null );
						}
					}
				    break;
				}
			}

			return spell;
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:101,代码来源:VampireAI.cs

示例6: DoDispel

        public virtual Spell DoDispel(Mobile toDispel)
        {
            if (!SmartAI)
            {
                if (ScaleBySkill(DispelChance, SkillName.Magery) > Utility.RandomDouble())
                    return new DispelSpell(m_Mobile, null);

                return ChooseSpell(toDispel);
            }

            Spell spell = CheckCastHealingSpell();

            if (spell == null)
            {
                if (!m_Mobile.DisallowAllMoves && Utility.Random((int)m_Mobile.GetDistanceToSqrt(toDispel)) == 0)
                    spell = new TeleportSpell(m_Mobile, null);
                else if (Utility.Random(3) == 0 && !m_Mobile.InRange(toDispel, 3) && !toDispel.Paralyzed && !toDispel.Frozen)
                    spell = new ParalyzeSpell(m_Mobile, null);
                else
                    spell = new DispelSpell(m_Mobile, null);
            }

            return spell;
        }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:24,代码来源:MageAI.cs

示例7: ChooseSpell

		public virtual Spell ChooseSpell(Mobile c)
		{
			if (!SmartAI)
			{
				if (!m_Mobile.Summoned && ScaleByMagery(HealChance) > Utility.RandomDouble())
				{
					if (m_Mobile.Hits < (m_Mobile.HitsMax - 50))
						return new GreaterHealSpell(m_Mobile, null);
					else if (m_Mobile.Hits < (m_Mobile.HitsMax - 10))
						return new HealSpell(m_Mobile, null);
				}

				return GetRandomDamageSpell();
			}

			if (c.Int > 70 && m_Mobile.CanBeginAction(typeof(DefensiveSpell)))
				return new MagicReflectSpell(m_Mobile, null);

			if (c.Dex > 60 && m_Mobile.CanBeginAction(typeof(DefensiveSpell)))
				return new ReactiveArmorSpell(m_Mobile, null);


			Spell spell = null;

			int healChance = (m_Mobile.Hits == 0 ? m_Mobile.HitsMax : (m_Mobile.HitsMax / m_Mobile.Hits));

			if (m_Mobile.Summoned)
				healChance = 0;

			switch (Utility.Random(1 + healChance))
			{
				default:
				case 0: // Heal ourself
					{
						if (!m_Mobile.Summoned)
						{
							if (m_Mobile.Hits < (m_Mobile.HitsMax - 50))
								spell = new GreaterHealSpell(m_Mobile, null);
							else if (m_Mobile.Hits < (m_Mobile.HitsMax - 10))
								spell = new HealSpell(m_Mobile, null);
						}

						break;
					}
				//case 1: // Poison them
				//{
				//	if ( !c.Poisoned )
				//		spell = new PoisonSpell( m_Mobile, null );
				//
				//	break;
				//	}
				//case 2: // Deal some damage
				//	{
				//		spell = GetRandomDamageSpell();
				//
				//		break;
				//	}
				case 1: // Set up a combo
					{
						if (m_Mobile.Mana < 50 && m_Mobile.Mana > 15)
						{
							if (c.Paralyzed && !c.Poisoned)
							{
								if (c.Hits < 45)
									spell = new ExplosionSpell(m_Mobile, null);

								if (c.Hits < 30)
									spell = new EnergyBoltSpell(m_Mobile, null);

								m_Mobile.DebugSay("I am going to meditate");

								m_Mobile.UseSkill(SkillName.Meditation);
							}
							else if (!c.Poisoned)
							{
								spell = new ParalyzeSpell(m_Mobile, null);
							}
						}
						else if (m_Mobile.Mana > 80)
						{

							m_Combo = 1;
							spell = new ExplosionSpell(m_Mobile, null);

						}

						break;
					}
			}

			return spell;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:92,代码来源:EvilMageAI.cs

示例8: InternalTarget

 public InternalTarget(ParalyzeSpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     this.m_Owner = owner;
 }
开发者ID:FreeReign,项目名称:forkuo,代码行数:5,代码来源:Paralyze.cs

示例9: ChooseSpell

        public virtual Spell ChooseSpell( Mobile c )
        {
            Spell spell = null;

            if( !SmartAI )
            {
                spell = CheckCastHealingSpell();

                if( spell != null )
                    return spell;

                switch( Utility.Random(16) )
                {
                    case 0:
                        {
                            spell = new FireballSpell(m_Mobile, null);
                            break;
                        }
                    case 1:
                        {
                            m_Mobile.DebugSay("Protecting myself");

                            spell = new ProtectionSpell(m_Mobile, null);
                            break;
                        }
                    case 2:	// Poison them
                        {
                            m_Mobile.DebugSay("Attempting to poison");

                            if( !c.Poisoned )
                                spell = new PoisonSpell(m_Mobile, null);

                            break;
                        }
                    case 3:	// Bless ourselves.
                        {
                            m_Mobile.DebugSay("Blessing myself");

                            spell = new BlessSpell(m_Mobile, null);
                            break;
                        }
                    case 4:
                        {
                            m_Mobile.DebugSay("Summoning FIRE FIELD!!!");

                            spell = new FireFieldSpell(m_Mobile, null);
                            break;
                        }
                    case 5:
                    case 6: // Curse them.
                        {
                            m_Mobile.DebugSay("Attempting to curse");

                            spell = GetRandomCurseSpell();
                            break;
                        }
                    case 7:	// Paralyze them.
                        {
                            m_Mobile.DebugSay("Attempting to paralyze");

                            if( m_Mobile.Skills[SkillName.Magery].Value > 50.0 )
                                spell = new ParalyzeSpell(m_Mobile, null);

                            break;
                        }
                    case 8: // Drain mana
                        {
                            m_Mobile.DebugSay("Attempting to drain mana");

                            spell = GetRandomManaDrainSpell();
                            break;
                        }

                    default: // Damage them.
                        {
                            m_Mobile.DebugSay("Just doing damage");

                            spell = GetRandomDamageSpell();
                            break;
                        }
                }

                return spell;
            }

            spell = CheckCastHealingSpell();

            if( spell != null )
                return spell;

            if( !c.Poisoned && c.Spell != null && c.Mana > (c.ManaMax / 2) )
                return GetRandomManaDrainSpell();

            if( m_Mobile.Hits < (m_Mobile.HitsMax / 2) && 0.30 > Utility.RandomDouble() )
            {
                spell = new ProtectionSpell(m_Mobile, null);

                if( spell == null )
                    spell = new BlessSpell(m_Mobile, null);

//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:hubroot,代码行数:101,代码来源:MageAI.cs

示例10: ChargedAbilityAttack

		public void ChargedAbilityAttack( Mobile attacker, Mobile defender )
		{
			if ( m_AbilityCharges <= 0 )
				return;

			AbilitySpell m_Spell = null;
			Mobile dummy = DummyCaster;

			switch ( m_ChargedAbility )
			{
				case WeaponChargedAbility.Clumsiness: m_Spell = new ClumsySpell( dummy, null ); break;
				case WeaponChargedAbility.Feeblemindedness: m_Spell = new FeeblemindSpell( dummy, null ); break;
				case WeaponChargedAbility.Weakness: m_Spell = new WeakenSpell( dummy, null ); break;
				case WeaponChargedAbility.Burning : m_Spell = new MagicArrowSpell( dummy, null ); break;
				case WeaponChargedAbility.Wounding: m_Spell = new HarmSpell( dummy, null ); break;
				case WeaponChargedAbility.DragonsBreath:
				case WeaponChargedAbility.DaemonsBreath: m_Spell = new FireballSpell( dummy, null ); break;
				case WeaponChargedAbility.Thunder: m_Spell = new LightningSpell( dummy, null ); break;
				case WeaponChargedAbility.MagesBane: m_Spell = new ManaDrainSpell( dummy, null ); break;
				case WeaponChargedAbility.GhoulsTouch: m_Spell = new ParalyzeSpell( dummy, null ); break;
				case WeaponChargedAbility.Evil: m_Spell = new CurseSpell( dummy, null ); break;
			}

			if ( m_Spell != null )
			{
				m_Spell.OnHit( attacker, defender );
				m_AbilityCharges--;
			}

			dummy.Delete();
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:31,代码来源:BaseWeapon.cs

示例11: ChooseSpell

		public override Spell ChooseSpell(Mobile c)
		{

			if (c is PlayerMobile && SmartAI && (c.Spell is MagicTrapSpell || c.Spell is MagicArrowSpell))
			{
				m_EnemyCountersPara = true;
			}

			if (c.Int > 70 && m_Mobile.MagicDamageAbsorb <= 0 && m_Mobile.Mana > 20 && m_Mobile.Hits > 60 && m_Mobile.CanBeginAction(typeof(DefensiveSpell)))
			{
				Spell temp = c.Spell as Spell;

				if (temp == null || (temp != null && temp.IsCasting && (int)temp.Circle <= (int)SpellCircle.Fourth))
					return new MagicReflectSpell(m_Mobile, null);
			}

			if (c.Dex > 60 && m_Mobile.MeleeDamageAbsorb <= 0 && m_Mobile.Mana > 20 && m_Mobile.Hits > 30 && m_Mobile.CanBeginAction(typeof(DefensiveSpell)))
				return new ReactiveArmorSpell(m_Mobile, null);


			Spell spell = null;

			int healChance = (m_Mobile.Hits == 0 ? m_Mobile.HitsMax : (m_Mobile.HitsMax / m_Mobile.Hits));

			switch (Utility.Random(1 + healChance))
			{
				default:
				case 0: // Heal ourself
					{
						if (HealPotCount >= 1 && m_Mobile.Hits < (m_Mobile.HitsMax - 30))
							DrinkHeal(m_Mobile);
						else if (m_Mobile.Hits < (m_Mobile.HitsMax - 35) && m_Mobile.Hits >= 45)
							spell = new GreaterHealSpell(m_Mobile, null);
						else if (m_Mobile.Hits < (m_Mobile.HitsMax - 10))
							spell = new HealSpell(m_Mobile, null);
						break;
					}

				case 1: // Set up a combo
					{
						//para them and med up until we have mana for a dump
						if (m_Mobile.Mana < 85 && m_Mobile.Mana > 2)
						{
							m_RegainingMana = true;
							//if there low on life and we have the mana try an finish them		
							if (m_Mobile.Mana > 20 && c.Hits < 28)
								spell = new EnergyBoltSpell(m_Mobile, null);

							if (m_Mobile.Mana > 12 && c.Hits < 15)
								spell = new LightningSpell(m_Mobile, null);

							if (c.Paralyzed && !c.Poisoned)
							{
								if (c.Hits < 45 && m_Mobile.Mana > 40)
									spell = new ExplosionSpell(m_Mobile, null);

								if (c.Hits < 30)
									spell = new EnergyBoltSpell(m_Mobile, null);

								m_Mobile.DebugSay("I am going to meditate");

								m_Mobile.UseSkill(SkillName.Meditation);
							}
							else if (!c.Poisoned && m_EnemyCountersPara == false && m_Mobile.Mana > 40)
							{
								spell = new ParalyzeSpell(m_Mobile, null);
							}
							else
							{
								if (m_Mobile.InRange(c, 4))
									RunFrom(c);
								if (!m_Mobile.InRange(c, 6))
									RunTo(c, CanRun);

								//m_Mobile.UseSkill( SkillName.Meditation );

							}
						}

						if (m_Mobile.Mana > 85)
						{
							m_RegainingMana = false;
							Combo = 0;

						}

						break;
					}
			}

			return spell;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:92,代码来源:HumanMageAI.cs

示例12: ChooseSpell

		public virtual Spell ChooseSpell(Mobile c)
		{

			// tamable solution ---------------
			Mobile com = m_Mobile.Combatant;
			Spell spell = null;

			if (com != null && com is BaseCreature && DateTime.Now >= m_NextCouncilSpell)
			{
				if (CastRevelationWave())
				{
					m_Mobile.DebugSay("I'm gunna cast Revelation Wave!");
					m_NextCouncilSpell = DateTime.Now + TimeBetweenCouncilSpell;
					return new RevelationWaveSpell(m_Mobile, null);
				}

				if (CastPoisonWave())
				{
					m_Mobile.DebugSay("I'm gunna cast Poison Wave!");
					m_NextCouncilSpell = DateTime.Now + TimeBetweenCouncilSpell;
					return new PoisonWaveSpell(m_Mobile, null);
				}
			}
			// end tamable solution ---------------		

			if (!SmartAI)
			{
				if (!m_Mobile.Summoned && ScaleByMagery(HealChance) > Utility.RandomDouble())
				{
					if (m_Mobile.Hits < (m_Mobile.HitsMax - 50))
						return new GreaterHealSpell(m_Mobile, null);
					else if (m_Mobile.Hits < (m_Mobile.HitsMax - 10))
						return new HealSpell(m_Mobile, null);
				}

				return GetRandomDamageSpell();
			}

			int healChance = (m_Mobile.Hits == 0 ? m_Mobile.HitsMax : (m_Mobile.HitsMax / m_Mobile.Hits));

			if (m_Mobile.Summoned)
				healChance = 0;

			switch (Utility.Random(4 + healChance))
			{
				default:
				case 0: // Heal ourself
					{
						if (!m_Mobile.Summoned)
						{
							if (m_Mobile.Hits < (m_Mobile.HitsMax - 50))
								spell = new GreaterHealSpell(m_Mobile, null);
							else if (m_Mobile.Hits < (m_Mobile.HitsMax - 10))
								spell = new HealSpell(m_Mobile, null);
						}

						break;
					}
				case 1: // Poison them
					{
						if (!c.Poisoned)
							spell = new PoisonSpell(m_Mobile, null);

						break;
					}
				case 2: // Deal some damage
					{
						spell = GetRandomDamageSpell();

						break;
					}
				case 3: // Set up a combo
					{
						if (m_Mobile.Mana < 40 && m_Mobile.Mana > 15)
						{
							if (c.Paralyzed && !c.Poisoned)
							{
								m_Mobile.DebugSay("I am going to meditate");

								m_Mobile.UseSkill(SkillName.Meditation);
							}
							else if (!c.Poisoned)
							{
								spell = new ParalyzeSpell(m_Mobile, null);
							}
						}
						else if (m_Mobile.Mana > 60)
						{
							if (Utility.Random(2) == 0 && !c.Paralyzed && !c.Frozen && !c.Poisoned)
							{
								m_Combo = 0;
								spell = new ParalyzeSpell(m_Mobile, null);
							}
							else
							{
								m_Combo = 1;
								spell = new ExplosionSpell(m_Mobile, null);
							}
						}

//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:CouncilAI.cs

示例13: DoDispel

		public override Spell DoDispel(Mobile toDispel)
		{

			Spell spell = null;

			if (spell == null)
			{
				if (!m_Mobile.DisallowAllMoves && m_Mobile.InRange(toDispel, 4) && !toDispel.Paralyzed)
					spell = new TeleportSpell(m_Mobile, null);
				else if (Utility.Random(1) == 0 && !m_Mobile.InRange(toDispel, 3) && !toDispel.Paralyzed && !toDispel.Frozen)
					spell = new ParalyzeSpell(m_Mobile, null);
				else
				{
					if (toDispel is Daemon)
						return new MassDispelSpell(m_Mobile, null);
					else
						return new DispelSpell(m_Mobile, null);
				}
			}

			return spell;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:22,代码来源:BaseHybridAI.cs

示例14: ChooseSpell

        public virtual Spell ChooseSpell( Mobile c )
        {
            Spell spell = null;

            if ( !SmartAI )
            {
                spell = CheckCastHealingSpell();

                if ( spell != null )
                    return spell;

                switch ( Utility.Random( 16 ) )
                {
                    case 0:
                    case 1:
                    case 2:	// Poison them
                    {
                        m_Mobile.DebugSay( "Attempting to poison" );

                        /*if ( !c.Poisoned )
                            spell = new PoisonSpell( m_Mobile, null );*/
                        goto default;
                    }
                    case 3:	// Bless ourselves.
                    /*
                    {
                        m_Mobile.DebugSay( "Blessing myself" );

                        spell = new BlessSpell( m_Mobile, null );
                        break;
                    }*/
                    case 4:
                    case 5:
                    case 6: // Curse them.
                    {
                        m_Mobile.DebugSay( "Attempting to curse" );

                        spell = GetRandomCurseSpell();
                        goto default;
                    }
                    case 7:	// Paralyze them.
                    {
                        /*m_Mobile.DebugSay( "Attempting to paralyze" );

                        if ( m_Mobile.Skills[SkillName.Magery].Value > 50.0 )
                            spell = new ParalyzeSpell( m_Mobile, null );*/
                        goto default;
                    }
                    case 8: // Drain mana
                    {
                        m_Mobile.DebugSay( "Attempting to drain mana" );

                        spell = GetRandomManaDrainSpell();
                        break;
                    }

                    default: // Damage them.
                    {
                        m_Mobile.DebugSay( "Just doing damage" );

                        spell = GetRandomDamageSpell();
                        break;
                    }
                }

                return spell;
            }

            spell = CheckCastHealingSpell();

            if ( spell != null )
                return spell;

            switch ( Utility.Random( 3 ) )
            {
                default:
                case 0: // Poison them
                {
                    /*if ( !c.Poisoned )
                        spell = new PoisonSpell( m_Mobile, null );*/

                    break;
                }
                case 1: // Deal some damage
                {
                    spell = GetRandomDamageSpell();

                    break;
                }
                case 2: // Set up a combo
                {
                    if ( m_Mobile.Mana < 40 && m_Mobile.Mana > 15 )
                    {
                        if ( c.Paralyzed && !c.Poisoned )
                        {
                            m_Mobile.DebugSay( "I am going to meditate" );

                            m_Mobile.UseSkill( SkillName.Meditation );
                        }
                        else if ( !c.Poisoned )
//.........这里部分代码省略.........
开发者ID:Godkong,项目名称:Origins,代码行数:101,代码来源:MageAI.cs

示例15: ChooseSpell

        public override Spell ChooseSpell( Mobile c )
        {
            Spell spell = CheckCastHealingSpell();

            if ( spell != null )
                return spell;

            switch ( Utility.Random( 16 ) )
            {
                case 0:
                case 1:
                case 2:	// Poison them
                    {
                        m_Mobile.DebugSay( "Attempting to poison" );

                        if ( !c.Poisoned )
                            spell = new PoisonSpell( m_Mobile, null );

                        break;
                    }
                case 3:	// Bless ourselves.
                    {
                        m_Mobile.DebugSay( "Blessing myself" );

                        if ( Utility.RandomBool() && !ArcaneEmpowermentSpell.IsBuffed( m_Mobile ) )
                            spell = new ArcaneEmpowermentSpell( m_Mobile, null );
                        else
                            spell = new BlessSpell( m_Mobile, null );

                        break;
                    }
                case 4: // Wildfire
                    {
                        m_Mobile.DebugSay( "Incendio!" );

                        spell = new WildfireSpell( m_Mobile, null );

                        break;
                    }
                case 5: // Reduce their cast speed
                    {
                        if ( c.InRange( m_Mobile.Location, 6 ) )
                        {
                            if ( m_Mobile.Skills[SkillName.Spellweaving].Value >= 90.0 )
                                spell = new EssenceOfWindSpell( m_Mobile, null );
                            else if ( c.InRange( m_Mobile.Location, 2 ) )
                                spell = new ThunderstormSpell( m_Mobile, null );
                        }

                        m_Mobile.DebugSay( "Attempting to reduce their cast speed" );

                        break;
                    }
                case 6: // Curse them.
                    {
                        m_Mobile.DebugSay( "Attempting to curse" );

                        spell = GetRandomCurseSpell( c );
                        break;
                    }
                case 7:	// Paralyze them.
                    {
                        m_Mobile.DebugSay( "Attempting to paralyze" );

                        if ( m_Mobile.Skills[SkillName.Magery].Value > 50.0 )
                            spell = new ParalyzeSpell( m_Mobile, null );

                        break;
                    }
                case 8: // Drain mana
                    {
                        m_Mobile.DebugSay( "Attempting to drain mana" );

                        spell = GetRandomManaDrainSpell( c );
                        break;
                    }

                default: // Damage them.
                    {
                        m_Mobile.DebugSay( "Just doing damage" );

                        spell = GetRandomDamageSpell( c );
                        break;
                    }
            }

            return spell;
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:88,代码来源:ArcanistAI.cs


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