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

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "a skeletal corpse" )]
	public class LadyJennifyr : BaseCreature
	{
	
		[Constructable]
		public LadyJennifyr() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Lady Jennifyr";
			Body = 147;
			Hue = 2411;
			BaseSoundID = 451;

			SetStr( 211, 313 );
			SetDex( 93, 135 );
			SetInt( 45, 102 );

			SetHits( 1113, 1285 );
			SetStam( 93, 135);
			SetMana( 45, 102 );
			
			SetDamage( 20, 50 );

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

			SetResistance( ResistanceType.Physical, 58, 65 );
			SetResistance( ResistanceType.Fire, 42, 49 );
			SetResistance( ResistanceType.Cold, 71, 80 );
			SetResistance( ResistanceType.Poison, 41, 50 );
			SetResistance( ResistanceType.Energy, 50, 59 );

			SetSkill( SkillName.Anatomy, 126.9, 137.5 );
			SetSkill( SkillName.MagicResist, 102.4, 119.1 );
			SetSkill( SkillName.Tactics, 128.0, 141.8 );
			SetSkill( SkillName.Wrestling, 127.8, 137.4 );

			Fame = 11000;
			Karma = -11000;

			VirtualArmor = 40;
		}

		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 AutoDispel{ get{ return true; } }
		public override bool Unprovokable{ get{ return true; } }
		public override bool IsMLCreature { get { return true;} }
		public override double BonusPetDamageScalar{ get{ return 6.0; } }

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

		public LadyJennifyr( Serial serial ) : base( serial )
		{
		}
		
		public override void OnDamage( int amount, Mobile attacker, bool willKill ) 
		{
			if(attacker != null && attacker.Alive && (!(attacker.Weapon is BaseRanged)))
			{
				int ReflectedDMG; 
			
				ReflectedDMG = (int)(amount * 0.5);
				AOS.Damage( attacker, this, ReflectedDMG, false, 0, 0, 0, 0, 0, 0, 100, false);
			}
			if (attacker!=null && 0.4 >= Utility.RandomDouble())
			{
				attacker.SendMessage ("Lady Jennifyr calls her bone minions to pursue you"); 
				foreach ( Mobile m in this.GetMobilesInRange( 15 ) )
				{
					if ( m is SkeletalKnight || m is Skeleton || m is BoneKnight || m is BoneMagi || m is SkeletalMage)
					{
						m.Combatant = attacker;
					}
				}
			}

			base.OnDamage(amount, attacker, willKill);	
		}

		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 Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
		}

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