/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Jan-01-2012 10:09:15pm
Filepath: scripts\events and scenarios\Thanksgiving 2011\TurkeyLeader.cs
Lines of code: 97

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "the remains of a turkey" )]
	public class TurkeyLeader : BaseCreature
	{
		public override bool CantbeSupreme { get { return true;} }
		
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 6 ) )
			{
				default:
				case 0: return WeaponAbility.BleedAttack;
				case 1: return WeaponAbility.ArmorIgnore;
				case 2: return WeaponAbility.BleedAttack;
				case 3: return WeaponAbility.BleedAttack;
				case 4: return WeaponAbility.BleedAttack;
				case 5: return WeaponAbility.ArmorIgnore;
			}
		}
	
	
		[Constructable]
		public TurkeyLeader() : this( 1.0 )
		{
		}
	
	
		[Constructable]
		public TurkeyLeader(double factor) : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a turkey";
		    Body = 95;
			BaseSoundID = 402;

			SetStr( (int)(200*factor) );
			SetDex( (int)(1000*factor));
			SetInt( (int)(100*factor) );

			SetHits((int)(1000*factor));
			SetMana(2500);

			SetDamage( 6, 18 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 40, 48 );
			SetResistance( ResistanceType.Fire, 30, 36 );
			SetResistance( ResistanceType.Cold, 30, 36 );
			SetResistance( ResistanceType.Poison, 35, 40 );
			SetResistance( ResistanceType.Energy, 25, 30 );
			
			SetSkill( SkillName.MagicResist, 80,90);
			SetSkill( SkillName.Tactics, 110,135);
			SetSkill( SkillName.Anatomy, 110,135);		
			SetSkill( SkillName.Wrestling, 120,160);

			Fame = 7500;
			Karma = -7500;

			VirtualArmor = 28;
		
			if ( 0.01 >= Utility.RandomDouble() ) PackItem( new BronzeToken() );
			else if ( 0.005 >= Utility.RandomDouble() ) PackItem( new SilverToken() );	
		}
		
		public int Stage=5;

		public override bool OnBeforeDeath()
		{				
		
		if(Stage<=0)return base.OnBeforeDeath();
		
			for(int i=1+Utility.Random(3);i>0;i--)
			{
			int x=(this.X-1)+Utility.Random(3);
			int y=(this.Y-1)+Utility.Random(3);
			
			TurkeyLeader mt = new TurkeyLeader(0.1*(double)Stage);
			mt.Stage=Stage-1;
			mt.MoveToWorld(new Point3D(x,y,Z+2),Map);		
			mt.Team=this.Team;
			Effects.SendLocationEffect( new Point3D(x,y,Z+2), Map, 0x3728, 13, 1, 0x461, 4 );			
			}		
			
		
		return base.OnBeforeDeath();
		}
		
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich, 3 );
			AddLoot( LootPack.SuperBoss, 2 );			
		}

		public override int Meat{ get{ return 10; } }
		public override MeatType MeatType{ get{ return MeatType.Bird; } }
		public override int Feathers{ get{ return 100; } }
		public override bool CantbeParagon { get { return true;} }		

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

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
			writer.Write((int)Stage);
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			Stage=reader.ReadInt();
		}
	}
}