/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\Mobiles\Monsters\Humanoid\Magic\Succubus.cs
Lines of code: 114
***********************************************************/


using System;
using System.Collections;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a demonic corpse" )]
	public class Succubus : BaseCreature
	{
		[Constructable]
		public Succubus () : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			if(Utility.RandomBool()) {
				Name = "a succubus";
				Body = 149;
				Female=true;
				BaseSoundID = 0x4B0;
				SetStr( 388, 520 );
				SetInt( 498, 657 );
			}
			else {
				Name = "an incubus";
				Body = 149;
				Female=false;
				Hue = 1175;
				BaseSoundID = 0x47D;
				SetStr( 488, 620 );
				SetInt( 398, 557 );
			}
			
			SetDex( 121, 170 );

			SetHits( 312, 353 );

			SetDamage( 18, 28 );

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

			SetResistance( ResistanceType.Physical, 80, 90 );
			SetResistance( ResistanceType.Fire, 70, 80 );
			SetResistance( ResistanceType.Cold, 40, 50 );
			SetResistance( ResistanceType.Poison, 50, 60 );
			SetResistance( ResistanceType.Energy, 50, 60 );

			SetSkill( SkillName.EvalInt, 90.1, 100.0 );
			SetSkill( SkillName.Magery, 99.1, 100.0 );
			SetSkill( SkillName.Meditation, 90.1, 100.0 );
			SetSkill( SkillName.MagicResist, 100.5, 150.0 );
			SetSkill( SkillName.Tactics, 80.1, 90.0 );
			SetSkill( SkillName.Wrestling, 80.1, 90.0 );

			Fame = 24000;
			Karma = -24000;

			VirtualArmor = 80;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich, 2 );
			AddLoot( LootPack.MedScrolls, 2 );
		}

		public override int Meat{ get{ return 1; } }
		public override int TreasureMapLevel{ get{ return 5; } }
		
		
		public override int AuraDamageMin {get{return 10;}}		
		public override int AuraDamageMax {get{return 40;}}
		
		public override int AuraEffectID {get{return 0x374A;}}			//effect item id shown on affected mobiles
		public override int AuraEffectType {get{return 9502;}}		//effect id shown on affected mobiles
		public override int AuraEffectHue {get{return 5013;}} 			//effect hue to show on affected mobiles
		public override int AuraEffectRender {get{return 0x496;}} 			//effect render mode to show on affected mobiles
		public override int AuraEffectSound {get{return 0x231;}}			//effect sound id to show on affected mobiles			
		
		public override TextDefinition AuraEffectText {get{return "You feel the life drain out of you!";}}//cliloc/string sent to affected mobiles				
		public override int AuraRange {get{return 2;}}				//the range in tiles, of the aura
		public override bool AuraIgnoreLOS {get{return true;}}		//whether to ignore LOS	


		
		public override bool OnBeforeAuraTo(Mobile todamage,ref int damage)
		{
			if(todamage.Female!=this.Female)damage+=8;
			
			return true;
		}
		
		
		public override void OnAuraTo(Mobile todamage, int damage)
		{
			this.Hits=this.Hits+damage;
		}		
		

		public override void CheckReflect( Mobile caster, ref bool reflect )
		{
			if ( caster.Body.IsMale )
			
			if (caster.Body.IsMale && 0.4 >= Utility.RandomDouble())
				reflect = true; 
			else
				reflect = false;
				
			if (caster.Body.IsFemale && 0.4 >= Utility.RandomDouble())
				reflect = true;
			else
				reflect = false;
		}

		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if ( 0.1 >= Utility.RandomDouble() )
				DoAura();
		}

		public override void OnGotMeleeAttack( Mobile attacker )
		{
			base.OnGotMeleeAttack( attacker );

			if ( 0.1 >= Utility.RandomDouble() )
				DoAura();
		}

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