/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\mobiles\Berserker.cs
Lines of code: 91
***********************************************************/


using System;
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;
using Server.Mobiles;

//Abilities:
//Can do 1 of 5 special shots (Including dismount)
//Anti-disarm
//Very quick. High dex
//Red hued, attacks instantly
//Can drop red mushrooms (Dex 50 for 3 min)

namespace Server.Mobiles
{
	public class Berserker : BaseCreature
	{
		public override bool ClickTitle{ get{ return false; } }
		
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 6 ) )
			{
				default:
				case 0: return WeaponAbility.Dismount;
				case 1: return WeaponAbility.ConcussionBlow;
				case 2: return WeaponAbility.DoubleShot;
				case 3: return WeaponAbility.ArmorIgnore;
				case 4: return WeaponAbility.Dismount;
				case 5: return WeaponAbility.CrushingBlow;
			}
		}

		[Constructable]
		public Berserker() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			SpeechHue = Utility.RandomDyedHue();

			Body = 0x190;
			Name = "a berserker";
			Hue = 33;

			SetStr( 86, 100 );
			SetDex( 600, 622 );
			SetInt( 100, 120 );
			
			SetHits (200, 220); 			
			SetStam (600, 622);


			SetDamage( 15, 25 );
			ActiveSpeed = 0.001;
			CurrentSpeed = 0.001;
			PassiveSpeed = 0.001;


			SetResistance( ResistanceType.Physical, 40, 60 );
			SetResistance( ResistanceType.Fire, 50, 70 );
			SetResistance( ResistanceType.Cold, 100);
			SetResistance( ResistanceType.Poison, 30, 40 );
			SetResistance( ResistanceType.Energy, 50, 60 );
			
			SetSkill( SkillName.Fencing, 120 );
			SetSkill( SkillName.Macing, 120 );
			SetSkill( SkillName.MagicResist, 25.0, 47.5 );
			SetSkill( SkillName.Swords, 120 );
			SetSkill( SkillName.Tactics, 90, 110 );
			SetSkill( SkillName.Wrestling, 120 );

			Fame = 4000;
			Karma = -4000;

			AddItem( new Boots( 1 ) );
			AddItem( new ShortPants( 1) );

			switch ( Utility.Random( 7 ))
			{
				case 0: AddItem( new Longsword() ); break;
				case 1: AddItem( new Cutlass() ); break;
				case 2: AddItem( new Broadsword() ); break;
				case 3: AddItem( new Axe() ); break;
				case 4: AddItem( new Club() ); break;
				case 5: AddItem( new Dagger() ); break;
				case 6: AddItem( new Spear() ); break;
			}

			if ( 0.1 >= Utility.RandomDouble() )
				PackItem( new RedMushroom() );
				
			Utility.AssignRandomHair( this );
		}

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

		public override bool ReacquireOnMovement{ get{ return true; } } 
		public override bool AlwaysMurderer{ get{ return true; } }

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