/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Jan-01-2012 10:09:12pm
Filepath: scripts\events and scenarios\Halloween2011\Bosses\Herpekitus\HerpekitusRootBarbed.cs
Lines of code: 69

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "a root corpse" )]
	public class HerpekitusRootBarbed : BaseCreature
	{
	
		public override bool DeleteCorpseOnDeath{ get{ return true; } }
		
		[Constructable]
		public HerpekitusRootBarbed() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a root";
			Body = 1245;
			Hue = 2075;
			BaseSoundID = 684;

			SetStr( 151, 225 );
			SetDex( 1000, 1500 );
			SetInt( 176, 180 );

			SetHits( 200, 250 );

			SetDamage( 10, 15 );

			SetDamageType( ResistanceType.Physical, 30 );
			SetDamageType( ResistanceType.Poison, 70 );

			SetResistance( ResistanceType.Physical, 55, 60 );
			SetResistance( ResistanceType.Fire, 20, 30 );
			SetResistance( ResistanceType.Cold, 20, 30 );
			SetResistance( ResistanceType.Poison, 60, 80 );
			SetResistance( ResistanceType.Energy, 40, 50);

			SetSkill( SkillName.Wrestling, 120 );
			SetSkill( SkillName.Tactics, 80, 100 );
			SetSkill( SkillName.MagicResist, 110.1, 125.0 );
			SetSkill( SkillName.Anatomy, 75, 100);
		
			Fame = 7500;
			Karma = -7500;
			
			CantWalk = true;
		}
		
		public override bool BleedImmune{ get{ return true; } }
		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
		public override bool Unprovokable{ get{ return true; } }
		
		public override void OnDamage( int amount, Mobile attacker, bool willKill ) 
		{	
			if (!attacker.InRange( this, 1 ) && this.InLOS( attacker ) && attacker.Alive && attacker != null)
			{
				attacker.SendMessage( "The root launches a poisonous barb at you!");
				attacker.ApplyPoison( this, Poison.Lethal );
				Effects.SendPacket( attacker, attacker.Map, new HuedEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0xC7B, this.Location, attacker.Location, 10, 0, false, false, 2075, 0 ) );
				AOS.Damage( attacker, this, Utility.RandomMinMax( 20, 40 ), 0, 0, 0, 100, 0 );
			}	
			
			base.OnDamage(amount, attacker, willKill );
			
		}

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

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