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

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "a skeletal corpse" )]
	public class LadyMarai : BaseCreature
	{
	
		public override WeaponAbility GetWeaponAbility()
		{
			return WeaponAbility.CrushingBlow;
		}
	
		[Constructable]
		public LadyMarai() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Lady Marai";
			Hue = 33;
			Body = 57;
			BaseSoundID = 451;

			SetStr( 221, 318 );
			SetDex( 109, 138 );
			SetInt( 56, 99 );

			SetStam( 109, 138 );
			SetMana( 56, 99 );
			SetHits( 694, 846 );

			SetDamage( 25, 30 );

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

			SetResistance( ResistanceType.Physical, 57, 65 );
			SetResistance( ResistanceType.Fire, 42, 50 );
			SetResistance( ResistanceType.Cold, 71, 76 );
			SetResistance( ResistanceType.Poison, 40, 48 );
			SetResistance( ResistanceType.Energy, 50, 60 );

			SetSkill( SkillName.MagicResist, 102.2, 119.2 );
			SetSkill( SkillName.Tactics, 128.7, 138.9 );
			SetSkill( SkillName.Wrestling, 126.6, 132.9 );
			SetSkill( SkillName.Anatomy, 129.6, 137.1 );

			Fame = 8000;
			Karma = -8000;

			VirtualArmor = 40;
			
			switch ( Utility.Random( 6 ) )
			{
				case 0: PackItem( new PlateArms() ); break;
				case 1: PackItem( new PlateChest() ); break;
				case 2: PackItem( new PlateGloves() ); break;
				case 3: PackItem( new PlateGorget() ); break;
				case 4: PackItem( new PlateLegs() ); break;
				case 5: PackItem( new PlateHelm() ); break;
			}

			PackSlayer();
			PackItem( new Scimitar() );
			PackItem( new WoodenShield() );
		 

 }

		public override void GenerateLoot()
		{
			AddLoot( LootPack.AosUltraRich );
			AddLoot( LootPack.AosSuperBoss,2 );
		}

		public override bool IsMLBoss { get { return true;} }
		public override int TreasureMapLevel{ get{ return 6; } }
		public override double MLChestChance{ get{ return 0.05; } }
		
		public override bool BleedImmune{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }
        public override bool AutoDispel{ get{ return true; } }
		public override bool IsMLCreature { get { return true;} }

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

		public override void OnDeath( Container c )
		{
			if ( Utility.Random( 4 ) == 0 )
			{
				Item item;

				switch ( Utility.Random( 5 ))
				{
		                        default:
					case 0: item = new CohennNote1(); break;
					case 1: item = new CohennNote2(); break;
					case 2: item = new CohennNote3(); break;
					case 3: item = new CohennNote4(); break;
					case 4: item = new CohennNote5(); break;
				}
				
				c.DropItem( item );
			}
			else if(0.1>Utility.RandomDouble())c.DropItem(new MiscNote());
			

			base.OnDeath( c );
		}
		
		public override void OnDamage( int amount, Mobile attacker, bool willKill ) 
		{
			if(attacker!=null && attacker.Alive && attacker.Weapon is BaseRanged ) 		
			{
				int ReflectedDMG; 
			
				ReflectedDMG = (int)(amount * 2.0);
				AOS.Damage( attacker, this, ReflectedDMG, false, 0, 0, 0, 0, 0, 0, 100, false);
			}
			base.OnDamage(amount, attacker, willKill);	
		}
		
		public override OppositionGroup OppositionGroup
		{
			get{ return OppositionGroup.FeyAndUndead; }
		}

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