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

GetRandomDamageSpell() public méthode

public GetRandomDamageSpell ( ) : Spell
Résultat Server.Spells.Spell
		public virtual Spell GetRandomDamageSpell()
		{
			int maxCircle = (int)( ( m_Mobile.Skills[ SkillName.Magery ].Value + 20.0 ) / ( 100.0 / 7.0 ) );

			if( maxCircle < 1 )
				maxCircle = 1;
			else if( maxCircle > 8 )
				maxCircle = 8;

			switch( Utility.Random( maxCircle * 2 ) )
			{
				case 0:
				case 1: return new MagicArrowSpell( m_Mobile, null );
				case 2:
				case 3: return new HarmSpell( m_Mobile, null );
				case 4:
				case 5: return new FireballSpell( m_Mobile, null );
				case 6:
				case 7: return new LightningSpell( m_Mobile, null );
				case 8:
				case 9: return new MindBlastSpell( m_Mobile, null );
				case 10: return new EnergyBoltSpell( m_Mobile, null );
				case 11: return new ExplosionSpell( m_Mobile, null );
				default: return new FlameStrikeSpell( m_Mobile, null );
			}
		}