Ejemplo n.º 1
0
 protected override void OnTick()
 {
     if (this.m_Target.Deleted || !this.m_Target.Alive || DateTime.Now >= this.m_End)
     {
         MindRotSpell.ClearMindRotScalar(this.m_Target);
         this.Stop();
     }
 }
Ejemplo n.º 2
0
 protected override void OnTick()
 {
     if (m_Target.Deleted || !m_Target.Alive || DateTime.UtcNow >= m_End)
     {
         MindRotSpell.ClearMindRotScalar(m_Target);
         Stop();
     }
 }
Ejemplo n.º 3
0
 public InternalTarget(MindRotSpell owner) : base(12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }
Ejemplo n.º 4
0
 public InternalTarget( MindRotSpell owner )
     : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }
Ejemplo n.º 5
0
        public virtual Spell ChooseSpell( Mobile c )
        {
            Spell spell = null;

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

                if ( spell != null )
                    return spell;

                switch ( Utility.Random( 10 ) )
                {
                    case 0: // Curse them.
                    {
                        m_Mobile.DebugSay( "Attempting to curse" );
                        spell = GetRandomCurseSpell();
                        break;
                    }
                    default: // Damage them.
                    {
                        m_Mobile.DebugSay( "Just doing damage" );
                        spell = GetRandomDamageSpell(c);
                        break;
                    }
                }

                return spell;
            }

            spell = CheckUseSpiritSpeak();

            if ( spell != null )
                return spell;

            switch (Utility.Random(3))
            {
                default:
                case 0:
                case 1: // Deal some damage
                    {
                        spell = GetRandomDamageSpell(c);

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

                                m_Mobile.UseSkill(SkillName.Meditation);
                            }

                        }
                        else if (m_Mobile.Mana > 30 && m_Mobile.Mana < 80)
                        {
                            if (Utility.Random(2) == 0 && !c.Paralyzed && !c.Frozen && !c.Poisoned)
                            {
                                m_Combo = 0;
                                spell = new PainSpikeSpell(m_Mobile, null);
                            }
                            else
                            {
                                m_Combo = 1;
                                spell = new MindRotSpell(m_Mobile, null);
                            }

                        }
                        break;
                    }
            }

            return spell;
        }
Ejemplo n.º 6
0
        public virtual Spell DoCombo(Mobile c)
        {
            Spell spell = null;

            if (m_Combo == 0)
            {
                spell = new PoisonStrikeSpell(m_Mobile, null);
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 1)
            {
                spell = new BloodOathSpell(m_Mobile, null);
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 2)
            {
                if (!c.Poisoned)
                    spell = new MindRotSpell(m_Mobile, null);

                ++m_Combo; // Move to next spell
            }

            if (m_Combo == 3 && spell == null)
            {
                switch (Utility.Random(3))
                {
                    default:
                    case 0:
                        {
                            if (c.Int < c.Dex)
                                spell = new StrangleSpell(m_Mobile, null);
                            else
                                spell = new EvilOmenSpell(m_Mobile, null);

                            ++m_Combo; // Move to next spell

                            break;
                        }
                    case 1:
                        {
                            spell = new PoisonStrikeSpell(m_Mobile, null);
                            m_Combo = -1; // Reset combo state
                            break;
                        }
                    case 2:
                        {
                            spell = new BloodOathSpell(m_Mobile, null);
                            m_Combo = -1; // Reset combo state
                            break;
                        }
                }
            }
            else if (m_Combo == 4 && spell == null)
            {
                spell = new VengefulSpiritSpell(m_Mobile, null);
                m_Combo = -1;
            }

            return spell;
        }
Ejemplo n.º 7
0
		public virtual Spell ChooseSpell( Mobile c )
		{
			if ( !SmartAI )
			{
				if ( !m_Mobile.Summoned && ScaleByNecromancy( HealChance ) > Utility.RandomDouble() )
				{
					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 );
				}

				return GetRandomDamageSpell();
			}

			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( 5 + healChance ) )
			{
				case 0: // Heal  myself
				{
					if ( !m_Mobile.Summoned )
					{
						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: // PoisonStrike them
				{
					if ( !c.Poisoned )
						spell = new PoisonStrikeSpell( m_Mobile, null );

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

					break;
				}
				case 3: // Set up a combo of attacks
				{
					if ( m_Mobile.Mana < 30 && 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 PoisonStrikeSpell( m_Mobile, null );
						}
					}
					else if ( m_Mobile.Mana > 30 && m_Mobile.Mana < 80 )
					{
						if ( Utility.Random( 2 ) == 0 && !c.Paralyzed && !c.Frozen && !c.Poisoned )
						{
							m_Combo = 0;
							spell = new PainSpikeSpell( m_Mobile, null );
						}
						else
						{
							m_Combo = 1;
							spell = new MindRotSpell( m_Mobile, null );
						}
					     
					}
				     break;
				}
				case 4: //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 = 1;
							spell = new PoisonStrikeSpell ( m_Mobile, null );
						}
					}
				    break;
				}
			
			}

			return spell;
		}
Ejemplo n.º 8
0
 public InternalTarget(MindRotSpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     this.m_Owner = owner;
 }