/**********************************************************
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\PrismCrystalDaemon.cs
Lines of code: 79
***********************************************************/


using System;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a crystal daemon corpse" )]
	public class PrismCrystalDaemon : BaseCreature
	{
		public override WeaponAbility GetWeaponAbility()
		{
			return WeaponAbility.ConcussionBlow;
		}

		[Constructable]
		public PrismCrystalDaemon() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a crystal daemon";
			Body = 0x310;
			Hue = Utility.RandomList(1150, 1151, 1153, 1154, 587);
			BaseSoundID = 0x47D;

			SetStr( 142, 190 );
			SetDex( 128, 145 );
			SetInt( 801, 850 );

			SetHits( 302, 315 );
			SetStam( 128, 145 );
			SetMana( 801, 850 );

			SetDamage( 24, 30 );

			SetDamageType( ResistanceType.Cold, 40 );
			SetDamageType( ResistanceType.Energy, 60 );

			SetResistance( ResistanceType.Physical, 20, 35 );
			SetResistance( ResistanceType.Fire, 6, 18 );
			SetResistance( ResistanceType.Cold, 70, 80 );
			SetResistance( ResistanceType.Poison, 31, 40 );
			SetResistance( ResistanceType.Energy, 65, 74 );

			SetSkill( SkillName.MagicResist, 100.6, 108.4 );
			SetSkill( SkillName.Tactics, 71.2, 79.6 );
			SetSkill( SkillName.Wrestling, 63.1, 80.0 );
			SetSkill( SkillName.Magery, 120.9, 128.5 );
			SetSkill( SkillName.EvalInt, 101.5, 108.7 );
			SetSkill( SkillName.Meditation, 100.2, 109.1 );

			Fame = 8000;
			Karma = -10000;

			VirtualArmor = 55;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich, 2 );
			AddLoot( LootPack.Average, 2 );
		}
		
		public override void OnDeath( Container c )
		{
			if ( Utility.Random( 10 ) == 0 )
			{		
				Item item;

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

				c.DropItem( item );
			}

			base.OnDeath( c );
		}

		public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
		public override bool IsMLCreature { get { return true;} }
		public override bool BardImmune{ get{ return true; } }		

		public PrismCrystalDaemon( Serial serial ) : base( serial )
		{
		}

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