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

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "an undead horse corpse" )]
	public class RedDeath : BaseMount
	{
		public static int AbilityRange { get { return 10; } }

		private static int m_MinTime = 10;
		private static int m_MaxTime = 30;

		private DateTime m_NextAbilityTime;
		
		public override WeaponAbility GetWeaponAbility()
		{
			return WeaponAbility.WhirlwindAttack;
		}
		
		[Constructable] 
		public RedDeath() : this( "Red Death" )
		{
		}

		[Constructable]
		public RedDeath( string name ) : base( name, 793, 0x3EBB, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Hue = 33;
            BaseSoundID = 0x488;

			SetStr( 317, 325 );
			SetDex( 241, 252 );
			SetInt( 241, 255 );

			SetHits( 1520, 1615 );

			SetDamage( 25, 25 );

			SetDamageType( ResistanceType.Physical, 25 );
			SetDamageType( ResistanceType.Fire, 75 );

			SetResistance( ResistanceType.Physical, 60, 70 );
			SetResistance( ResistanceType.Fire, 90 );
			SetResistance( ResistanceType.Poison, 100 );

			SetSkill( SkillName.MagicResist, 123.6, 143.0 );
			SetSkill( SkillName.Tactics, 120.4, 141.8 );
			SetSkill( SkillName.Wrestling, 122.5, 143.6 );
			SetSkill( SkillName.Anatomy, 120.8, 142.9 );
			
			Fame = 10000;
			Karma = -10000;
			
			Tamable = false;
			MinTameSkill = 0.0;
			ControlSlots = 0;
			
			AddItem( new ResolvesBridle() );
			
		}
		
		public override void GenerateLoot()
		{
			AddLoot( LootPack.AosUltraRich );
			AddLoot( LootPack.AosSuperBoss );
		}

		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.Lethal; } }
		public override bool BardImmune{ get{ return true; } }
		public override bool Unprovokable{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }
		public override bool BleedImmune { get { return true; } }
		public override bool AlwaysMurderer{ get{ return true; } }
		public override bool HasBreath{ get{ return true; } } // fire breath enabled
		public override bool IsMLCreature { get { return true;} }
 
		public override void OnDamage( int amount, Mobile attacker, bool willKill ) 
		{
		
		if (attacker!=null && 0.2 >= Utility.RandomDouble())
		{
			attacker.SendMessage ("Red Death's roar alerts the other undead of your presence"); 
			foreach ( Mobile m in this.GetMobilesInRange( 10 ) )
			{
				if ( m is SkeletalKnight || m is Skeleton || m is Wight || m is GoreFiend || m is Spectre || m is Shade || m is Bogle || m is Lich || m is LichLord || m is RottingCorpse)
				{
					m.Combatant = attacker;
				}
			}
		}

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


		public RedDeath( Serial serial ) : base( serial )
		{
		}
		
		public override void OnDeath( Container c )
		{
	

		base.OnDeath( c );
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			
		}
	}
}
