/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Oct-13-2011 08:59:12pm
Filepath: scripts\Mobiles\Monsters\Ore Elementals\ValoriteElemental.cs
Lines of code: 106

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "an ore elemental corpse" )]
	public class ValoriteElemental : BaseCreature
	{
		[Constructable]
		public ValoriteElemental() : this( 2 )
		{
		}

		[Constructable]
		public ValoriteElemental( int oreAmount ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			// TODO: Gas attack
			Name = "a valorite elemental";
			Body = 112;
			BaseSoundID = 268;

			SetStr( 226, 255 );
			SetDex( 126, 145 );
			SetInt( 71, 92 );

			SetHits( 136, 153 );

			SetDamage( 28 );

			SetDamageType( ResistanceType.Physical, 25 );
			SetDamageType( ResistanceType.Fire, 25 );
			SetDamageType( ResistanceType.Cold, 25 );
			SetDamageType( ResistanceType.Energy, 25 );

			SetResistance( ResistanceType.Physical, 65, 75 );
			SetResistance( ResistanceType.Fire, 50, 60 );
			SetResistance( ResistanceType.Cold, 50, 60 );
			SetResistance( ResistanceType.Poison, 50, 60 );
			SetResistance( ResistanceType.Energy, 40, 50 );

			SetSkill( SkillName.MagicResist, 50.1, 95.0 );
			SetSkill( SkillName.Tactics, 60.1, 100.0 );
			SetSkill( SkillName.Wrestling, 60.1, 100.0 );

			Fame = 3500;
			Karma = -3500;

			VirtualArmor = 38;

			PackItem( new ValoriteOre( oreAmount ) );
		}
		
		public override void Bleed( Mobile attacker, int damage ) 
		{
			base.Bleed(attacker,damage, new Blood(Utility.RandomList(6007, 6008),2219,"Rocks"));
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich );
			AddLoot( LootPack.Gems, 4 );
		}

		public override bool AutoDispel{ get{ return true; } }
		public override bool BleedImmune{ get{ return true; } }
		public override int TreasureMapLevel{ get{ return 1; } }
		public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
		
		public override int AuraDamageMin {get{return 20;}}		
		public override int AuraDamageMax {get{return 50;}}		
		
		public override double AuraChance {get{return 1;}} 
		public override int AuraDelayMin {get{return 7;}}
		public override int AuraDelayMax {get{return 14;}}
		
		public override int AuraEffectID {get{return 0x3709;}}			//effect item id shown on affected mobiles
		public override int AuraEffectType {get{return 9904;}}		//effect id shown on affected mobiles 9502
		public override int AuraEffectHue {get{return 0x835;}} 			//effect hue to show on affected mobiles 0x835
		public override int AuraEffectRender {get{return 3;}} 			//effect render mode to show on affected mobiles 0x496
		public override int AuraEffectSound {get{return 0x231;}}			//effect sound id to show on affected mobiles		
		
		public override int AuraDamagePhys {get{return 0;}}
		public override int AuraDamageFire {get{return 100;}}
		public override int AuraDamageCold {get{return 0;}}
		public override int AuraDamagePoison {get{return 0;}}
		public override int AuraDamageEnergy {get{return 0;}}
		public override int AuraDamageChaos {get{return 0;}}
		public override int AuraDamageDirect {get{return 0;}} 	
		
		public override TextDefinition AuraEffectText {get{return "The steam burns you!";}}//cliloc/string sent to affected mobiles				
		public override int AuraRange {get{return 4;}}				//the range in tiles, of the aura
		public override bool AuraIgnoreLOS {get{return false;}}

		public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
		{
			if ( from is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)from;

				if ( bc.Controlled || bc.BardTarget == this )
					damage = 0; // Immune to pets and provoked creatures
			}
		}
		
		public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
		{
			scalar = 0.0; // Immune to magic
		}
		
		public override void CheckReflect( Mobile caster, ref bool reflect )
		{
			reflect = true; // Every spell is reflected back to the caster
		}
		
		public ValoriteElemental( 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();
		}
	}
}