/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\engines\ML Peerless + misc areas\shimering effusion\mobiles\CrystalVortex.cs
Lines of code: 77
***********************************************************/


using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "an crystal vortex corpse" )]
	public class CrystalVortex : BaseCreature
	{
		[Constructable]
		public CrystalVortex () : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a crystal vortex";
			Body = 13;
			Hue = Utility.RandomList(1150, 1151, 1153, 1154, 587);
			BaseSoundID = 655;

			SetStr( 831, 896 );
			SetDex( 542, 595 );
			SetInt( 200 );

			SetHits( 359, 395 );
			SetStam( 450 );
			SetMana( 0 );

			SetDamage( 15, 40 );

			SetDamageType( ResistanceType.Physical, 0 );
			SetDamageType( ResistanceType.Cold, 50 );
			SetDamageType( ResistanceType.Energy, 50 );

			SetResistance( ResistanceType.Physical, 35, 45 );
			SetResistance( ResistanceType.Fire, 15, 25 );
			SetResistance( ResistanceType.Cold, 10, 20 );
			SetResistance( ResistanceType.Poison, 10, 20 );
			SetResistance( ResistanceType.Energy, 25, 35 );

			SetSkill( SkillName.MagicResist, 120, 140);
			SetSkill( SkillName.Tactics, 120, 140);
			SetSkill( SkillName.Wrestling, 120, 140 );

			Fame = 7500;
			Karma = -7500;

			VirtualArmor = 40;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average, 3 );
			AddLoot( LootPack.Meager, 4 );
			AddLoot( LootPack.LowScrolls );
			AddLoot( LootPack.MedScrolls );
		}

		public override bool BleedImmune{ get{ return true; } }
		public override bool IsMLCreature { get { return true;} }		
		
		public CrystalVortex( Serial serial ) : base( serial )
		{
		}
		
		public override void OnDeath( Container c )
		{
			if ( Utility.Random( 10 ) == 0 )
			{		
				Item item;

				switch ( Utility.Random( 1 ))
				{
					default:
					case 1: item = new jaggedcrystals(); break;
				}

				c.DropItem( item );
			}

			base.OnDeath( c );
		}

		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();

			if ( BaseSoundID == 263 )
				BaseSoundID = 655;
		}
	}
}
