Server.Mobiles.MageAI.DoCombo C# (CSharp) Méthode

DoCombo() public méthode

public DoCombo ( Mobile c ) : Spell
c Mobile
Résultat Server.Spells.Spell
		public virtual Spell DoCombo( Mobile c )
		{
			Spell spell = null;

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

				++m_Combo; // Move to next spell
			}

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

							++m_Combo; // Move to next spell

							break;
						}
					case 1:
						{
							spell = new EnergyBoltSpell( m_Mobile, null );
							m_Combo = -1; // Reset combo state
							break;
						}
					default:
						{
							spell = new FlameStrikeSpell( m_Mobile, null );
							m_Combo = -1; // Reset combo state
							break;
						}
				}
			}
			else if( m_Combo == 4 && spell == null )
			{
				spell = new MindBlastSpell( m_Mobile, null );
				m_Combo = -1;
			}

			return spell;
		}