Esempio n. 1
0
		public virtual Spell ChooseSpell( Mobile c )
		{			
			Spell spell = CheckCastHealingSpell();
			
			if ( spell != null )
				return spell;
			
			switch ( Utility.Random( 5 ) )
			{
				case 0:
				case 1:				
					BaseWeapon weapon = m_Mobile.Weapon as BaseWeapon;
					
					if ( weapon != null && !weapon.Consecrated )
						spell = new ConsecrateWeaponSpell( m_Mobile, null );				
					
					break;
				case 2:
				case 3:				
					if ( !DivineFurySpell.UnderEffect( m_Mobile ) )
						spell = new DivineFurySpell( m_Mobile, null );		
						
					break;	
				case 4:
					spell = new HolyLightSpell( m_Mobile, null );							
					break;	
			}
			
			return spell;
		}
        public virtual Spell DoCombo( Mobile c )
        {
            Spell spell = null;

            if ( m_Combo == 0 )
            {
                spell = new RemoveCurseSpell( m_Mobile, null );
                ++m_Combo; // Move to next spell
            }
            else if ( m_Combo == 1 )
            {
                spell = new DivineFurySpell( m_Mobile, null );
                ++m_Combo; // Move to next spell
            }
            else if ( m_Combo == 2 )
            {
                spell = new ConsecrateWeaponSpell( 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 DivineFurySpell( m_Mobile, null );
                        else
                            spell = new EnemyOfOneSpell( m_Mobile, null );

                        ++m_Combo; // Move to next spell

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

            return spell;
        }