/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Mar-09-2012 08:19:35pm
Filepath: scripts\Mobiles\custom mobiles - to sort\ML Named\Tempest.cs
Lines of code: 86

Description: 

***********************************************************/


using System;
using Server.Items;
using Server.Targeting;
using System.Collections;

namespace Server.Mobiles
{
	[CorpseName( "a tempest corpse" )] 
	public class Tempest : BaseCreature
	{		
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 2 ) )
			{
				default:
				case 0: return WeaponAbility.Block;
				case 1: return WeaponAbility.FrenziedWhirlwind;
			}
		}
	
		[Constructable]
		public Tempest() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Tempest";
			Body = 13;
			Hue = 1175;
			BaseSoundID = 655;

			SetStr( 149, 201 );
			SetDex( 226, 240 );
			SetInt( 130, 134 );

			SetHits( 606, 822 );
			SetStam( 236, 274 );
			SetMana( 175, 210 ); 

			SetDamage( 22, 45 );

			SetDamageType( ResistanceType.Physical, 0 );
			SetDamageType( ResistanceType.Cold, 20 );
			SetDamageType( ResistanceType.Energy, 80 );

			SetResistance( ResistanceType.Physical, 46, 57 );
			SetResistance( ResistanceType.Fire, 39, 44 );
			SetResistance( ResistanceType.Cold, 33, 42 );
			SetResistance( ResistanceType.Poison, 36, 50 );
			SetResistance( ResistanceType.Energy, 58, 78 );

			SetSkill( SkillName.MagicResist, 106.2, 110.8 );
			SetSkill( SkillName.Tactics, 111.1, 129.8 );
			SetSkill( SkillName.Meditation, 113.1, 119.8 );
			SetSkill( SkillName.Wrestling, 116.6, 128.4 );
			SetSkill( SkillName.Magery, 101.8, 113.8 );
			SetSkill( SkillName.EvalInt, 99.7, 103.5 );

			Fame = 7500;
			Karma = -7500;

			VirtualArmor = 32;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich, 3 );
			AddLoot( LootPack.UltraRich, 1 );
		}

		public override bool IsMLBoss { get { return true;} }
		public override int TreasureMapLevel{ get{ return 6; } }
		public override double MLChestChance{ get{ return 0.05; } }
		
		public override Poison PoisonImmune{ get{ return Poison.Greater; } }
		public override bool IsMLCreature { get { return true;} }

		public Tempest( Serial serial ) : base( serial )
		{
		}
		
		public override void OnDamage( int amount, Mobile attacker, bool willKill ) 
		{
			if (attacker!=null && attacker.Alive &&  !attacker.InRange( this, 2 ) && this.InLOS( attacker ) )
			{
				this.Combatant = attacker;
				this.Location = attacker.Location; 
				this.FixedParticles( 0x376A, 9, 32, 0x13AF, EffectLayer.Waist );
				attacker.PlaySound( 0x1FE );
			}
			
			base.OnDamage(amount, attacker, willKill);	
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}
	}
}