/**********************************************************
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\demitel\MirageDesert\ElementalLordMirage.cs
Lines of code: 100
***********************************************************/


using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
using System.Collections.Generic;


namespace Server.Mobiles
{
	[CorpseName( "the remains of an elemental lord" )]
	public class ElementalLordMirage : basedemitel
	{
		public override bool DeleteCorpseOnDeath{ get{ return true; } }
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 6 ) )
			{
				default:
				case 1: return WeaponAbility.CrushingBlow;
				case 2: return WeaponAbility.NerveStrike;
				case 3: return WeaponAbility.ParalyzingBlow;
				case 4: return WeaponAbility.DualWield;
				case 5: return WeaponAbility.TalonStrike;
				case 6: return WeaponAbility.WhirlwindAttack;
			}
		}

		[Constructable]
		public ElementalLordMirage() : base( AIType.AI_Super, FightMode.Closest, 0.1, 0.2 )
		{
			Name = "an elemental lord";
			Body = 102;
			Hue = 16385;
			BaseSoundID = 655;

			SetStr( 1310, 1500 );
			SetDex( 260, 450 );
			SetInt( 3010, 3500 );

			SetHits( 1000 );

			SetDamage( 30, 40 );

			SetDamageType( ResistanceType.Physical, 20 );
			SetDamageType( ResistanceType.Fire, 20 );
			SetDamageType( ResistanceType.Cold, 20 );
			SetDamageType( ResistanceType.Energy, 20 );
			SetDamageType( ResistanceType.Poison, 20 );

			SetResistance( ResistanceType.Physical, 30, 75 );
			SetResistance( ResistanceType.Fire, 65, 80 );
			SetResistance( ResistanceType.Cold, 65, 80 );
			SetResistance( ResistanceType.Poison, 65, 70 );
			SetResistance( ResistanceType.Energy, 65, 70 );

			SetSkill( SkillName.MagicResist, 100.1, 115.0 );
			SetSkill( SkillName.Tactics, 120, 180.0 );
			SetSkill( SkillName.Wrestling, 200, 220.0 );
			SetSkill( SkillName.Magery, 215, 220.0 );
			SetSkill( SkillName.EvalInt, 115, 120.0 );
			SetSkill( SkillName.Meditation, 80.1, 120 );
			SetSkill(SkillName.Archery, 90, 180 );

			Fame = 105000;
			Karma = -55000;
			
			Bow wep = new Bow();
			wep.Attributes.SpellChanneling = 1;
			wep.MaxDamage=30;
			wep.Movable=false;
			wep.MaxRange=40;
			wep.Attributes.WeaponSpeed=-50;
			AddItem( wep );
			
			
		}

		
		public override bool OnBeforeDeath()
		{
			Gold gold = new Gold( Utility.RandomMinMax( 5400, 8750 ) );
			gold.MoveToWorld( Location, Map );

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}

		public override void OnDamage( int amount, Mobile attacker, bool willKill )
		{

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

		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
		public override bool BardImmune{ get{ return !Core.SE; } }
		public override bool Unprovokable{ get{ return Core.SE; } }
		public override bool Uncalmable{ get{ return Core.SE; } }
		public override double BonusPetDamageScalar{ get{ return (Core.SE) ? 2.0 : 1.0; } }

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

		public override void AddNameProperties( ObjectPropertyList list )
		{
			base.AddNameProperties( list );

			list.Add("Mirage");
		}

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