;;---------------------------------------------- GBRTankCO Portrait --------
[Thing Template=Portrait]
{
	ids = gbr_tank_co_portrait
	name = "#gbr_tank_co_portrait_name"

	[View]
	{
		resource_prefix = GBRTankCo/GBRTankCOPortrait

		[TextureSearchPath]
		path = /Shared/SharedTextures

		[AspectNormal]
		{
			[Animation Template=ObjectAnimationIdle]
			{
				ids = idle
			}

			[Animation Template=ObjectAnimationFidget]
			{
				ids = fidget1
			}
			
			[Animation Template=ObjectAnimationFidget]
			{
				ids = fidget2
			}
			[Animation Template=ObjectAnimationFidget]
			{
				ids = talk1
			}

		}
	}
}


;;---------------------------------------------- GBRTankCO Unit --------


[Thing Template=AAUnitGBRVehicleMediumTank]
{
	IDS = gbr_tank_co
	name = "#gbr_tank_co_Thing_name"
	editor_name = "#gbr_tank_co_Thing_editor_name"

	[BodyComponent]
	{
		health = 1000
		defense = 900
	}
	
	[MoverComponent]
	{
		speed_max = 2.4
		acceleration = 3
		
		[WhenStartMoving template=FXC_CreateVFX]
		{
			VFX_IDS = start_exhaust_02
			location = exhaust_point_01	
	  	}
	  	
	  	[WhenStartMoving template=FXC_CreateVFX]
		{
			VFX_IDS = start_exhaust_02
			location = exhaust_point_02	
	  	}
	}

	[ElementComponent]
	{
		required_structures = gbr_motor_pool
	}

	[PerformerComponent]
	{
		check_damage_resistance = true

		[Ability template=AATurretAttackLocal]
		{
			
			[AbilityDefinition Template=AAMediumTankGun]
			{				
				name = "#gbr_tank_co_AbilityDefinition_name"
				recharge_time = 7
				area = 1
				range = 48
				
				[WhenDo Template=FXC_PlayObjectAnimation]
				object_animation_IDS = Recoil1				
				
				[Effect Template=APDamageEffect]
				amount = 1600

				[Effect Template=AddDamageEffect]
				damage_type_IDS = gunfire
				targets = infantry
				amount = 5

			
			  	[WhenDo template=FXC_PlaySFX]
				audio_ids = gbr_cannon_medium
			}
		}
	}

	[PropertiesComponent]
	{
		[Property]
		property_IDS = captain

		[Property]
		property_IDS = front
		
		[Property]
		property_IDS = combat_unit
	}
	
	[View]
	{
		resource_prefix = GBRTankCO/GBRTankCO

		portrait_ids = gbr_tank_co_portrait
		
		[AspectNormal]
		{						
			[Animation Template=ObjectAnimationCustomPlay]
			ids = Recoil1
			length = 1
			kf = GBRTankCO/GBRTankCORecoil1.kf
		}
	}
}
