/**********************************************************
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\Christmas\mobiles\PossessedFactoryBlade.cs
Lines of code: 84

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "a machine corpse" )]
	public class PossessedFactoryBlade : BaseCreature
	{

		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 4 ) )
			{
				default:
				case 1: return WeaponAbility.CrushingBlow;
				case 2: return WeaponAbility.ConcussionBlow;
				case 3: return WeaponAbility.BleedAttack;
			}
		}

		[Constructable]
		public PossessedFactoryBlade() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.1, 0.2 )
		{
			Name = "a Possessed Factory Blade";
			Body = 574;
			Hue=0x19B9;

			SetStr( 150 );
			SetDex( 150 );
			SetInt( 100 );

			SetHits( 1000 );
			SetStam( 250 );
			SetMana( 0 );

			SetDamage( 40, 60 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 90 );
			SetResistance( ResistanceType.Fire, 80 );
			SetResistance( ResistanceType.Cold, 90 );
			SetResistance( ResistanceType.Poison, 100 );
			SetResistance( ResistanceType.Energy, 10 );

			SetSkill( SkillName.MagicResist,200 );
			SetSkill( SkillName.Tactics, 100.0 );
			SetSkill( SkillName.Wrestling, 100.0 );

			Fame = 31000;
			Karma = 0;

			VirtualArmor = 40;
			ControlSlots = ( Core.SE ) ? 2 : 1;
		}
		
		public override void OnDeath( Container c )
 		{
			base.OnDeath( c );
	 		c.DropItem( new CoalOre(2,5) );
			if(0.07>Utility.RandomDouble())c.DropItem(new SurpriseStocking());
			
			for(int i=0;i<5;i++)c.DropItem(new WrappedChristmasGift());
 		}		

		public override bool BleedImmune{ get{ return true; } }
		public override Poison PoisonImmune { get { return Poison.Lethal; } }
		public override bool BardImmune{ get{ return true; } }
		public override bool AlwaysMurderer{ get{ return true; } }			

		public override int GetAngerSound()
		{
			return 0x23A;
		}

		public override int GetAttackSound()
		{
			return 0x3B8;
		}

		public override int GetHurtSound()
		{
			return 0x23A;
		}


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