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

Description: 

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


using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a treefellow corpse" )]
	public class Treefellow : BaseCreature
	{
		public override WeaponAbility GetWeaponAbility()
		{
			return WeaponAbility.Dismount;
		}
		
		public string bloodName;
		public int bloodHue;
		public int bloodID;

		[Constructable]
		public Treefellow() : base( AIType.AI_Melee, FightMode.Evil, 10, 1, 0.2, 0.4 )
		{
			Name = "a treefellow";
			Body = 301;

			SetStr( 196, 220 );
			SetDex( 31, 55 );
			SetInt( 66, 90 );

			SetHits( 118, 132 );

			SetDamage( 12, 16 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 20, 25 );
			SetResistance( ResistanceType.Cold, 50, 60 );
			SetResistance( ResistanceType.Poison, 30, 35 );
			SetResistance( ResistanceType.Energy, 20, 30 );

			SetSkill( SkillName.MagicResist, 40.1, 55.0 );
			SetSkill( SkillName.Tactics, 65.1, 90.0 );
			SetSkill( SkillName.Wrestling, 65.1, 85.0 );

			Fame = 500;
			Karma = 1500;

			VirtualArmor = 24;
			PackItem( new Log( Utility.RandomMinMax( 23, 34 ) ) );
		}
		
		public override void Bleed( Mobile attacker, int damage ) 
		{
			switch (Utility.Random( 7 ))
            {       
				case 0: 
					//Leaves
					bloodID = Utility.RandomMinMax(4334,4337);
					bloodHue = Utility.RandomMinMax(62, 66);
					bloodName = "leaves";
					break;	
            	case 1: 
					//Leaves
					bloodID = Utility.RandomMinMax(4334,4337);
					bloodHue = Utility.RandomMinMax(62, 66);
					bloodName = "leaves";
					break;
				case 2: 
					//Twigs
					bloodID = Utility.RandomList(5380, 5382);
					bloodHue = 0;
					bloodName = "twigs";
					break;	
				case 3: 
					//Leaves
					bloodID = Utility.RandomMinMax(4334,4337);
					bloodHue = Utility.RandomMinMax(62, 66);
					bloodName = "leaves";
					break;		
            	case 4: 
					//Leaves
					bloodID = Utility.RandomMinMax(4334,4337);
					bloodHue = Utility.RandomMinMax(62, 66);
					bloodName = "leaves";
					break;
				case 5: 
					//Leaves
					bloodID = Utility.RandomMinMax(4334,4337);
					bloodHue = Utility.RandomMinMax(62, 66);
					bloodName = "leaves";
					break;
				case 6: 
					//Twigs
					bloodID = Utility.RandomList(5380, 5382);
					bloodHue = 0;
					bloodName = "twigs";
					break;			
		    }

			base.Bleed(attacker,damage, new Blood(bloodID,bloodHue,bloodName));
		}

		public override OppositionGroup OppositionGroup
		{
			get{ return OppositionGroup.FeyAndUndead; }
		}

		public override int GetIdleSound()
		{
			return 443;
		}

		public override int GetDeathSound()
		{
			return 31;
		}

		public override int GetAttackSound()
		{
			return 672;
		}

		public override bool BleedImmune{ get{ return true; } }

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average );
		}

		public Treefellow( 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();

			if ( BaseSoundID == 442 )
				BaseSoundID = -1;
		}
	}
}