[Template AAVehicleRocket Inherit=AAProjectileAttack]
{
	projectile_ids = vehicle_rocket_projectile
	impact_impulse = 6000
	icon = /Properties/AbilityIcons/IconAbilityDamageExplosive.png
	
	area = 10
	attenuation_range_min = 1
	attenuation_factor_max = 0.25
	max_targets = 100

	range = 120
	recharge_time = 100
	reload_time = 0.0
									
	[Effect Template=BlastDamageEffect]
	amount = 400

	[Effect Template=MoraleLossEffect]
	amount = 20.0
	
	[WhenDo template=FXC_PlaySFX]
	audio_ids = rus_rocket_truck
	
} ; end [Template AAVehicleRocket]


[Thing Template=AAUnitRUSVehicleRocketTruck]
{
	IDS = rus_rocket_truck
	name = "#rus_rocket_truck_name"
	editor_name = "#rus_rocket_truck_editor_name"
	category = UNIT

	hide_if_missing_properties = false
		
	[BodyComponent]
	{
		health = 200
		defense = 1
	}

	[ElementComponent]
	{
		required_properties = tech_rocket_truck
		required_structures = rus_brigade_artillery
	}
	
	[PropertiesComponent]
	{		
		[Property]
		property_IDS = support
		
		[Property]
		property_IDS = combat_unit

		[Property]
		property_IDS = artillery
	}

	[MoverComponent]
	{
		speed_max = 2.0
		turn_radius = 1.25
		turn_type = while_moving
	}
	
	[PerformerComponent]
	{		
		[Ability Template=AAAttackLocal]
		{			
			spawn_bone_ids = turret
			turret_ids = turret
				
			[AbilityDefinition Template=AAVehicleRocket]
			{
				IDS = rus_rocket1
				name = "#rus_rocket_truck_AbilityDefinition_name"

				[Flags] 
				bombard = true

				[WhenStart Template=FXC_Equipment]
				{
					action = HIDE
					location = chassis
					equipment_type_ids = rocket01
				}
		
				[WhenEnd Template=FXC_Equipment]
				{
					action = UNHIDE
					location = chassis
					equipment_type_ids = rocket01
				}
			}
		}
		
		[Ability Template=AAAttackLocal]
		{			
			spawn_bone_ids = turret2
			turret_ids = turret2
				
			[AbilityDefinition Template=AAVehicleRocket]
			{
				IDS = rus_rocket2
				name = "#rus_rocket_truck_AbilityDefinition_name_2"

				[Flags] 
				bombard = true
				
				[WhenStart Template=FXC_Equipment]
				{
					action = HIDE
					location = chassis
					equipment_type_ids = rocket02
				}
		
				[WhenEnd Template=FXC_Equipment]
				{
					action = UNHIDE
					location = chassis
					equipment_type_ids = rocket02
				}
			}
		}
		
		[Ability Template=AAAttackLocal]
		{			
			spawn_bone_ids = turret3
			turret_ids = turret3
				
			[AbilityDefinition Template=AAVehicleRocket]
			{
				IDS = rus_rocket3
				name = "#rus_rocket_truck_AbilityDefinition_name_3"

				[Flags] 
				bombard = true

				[WhenStart Template=FXC_Equipment]
				{
					action = HIDE
					location = chassis
					equipment_type_ids = rocket03
				}
		
				[WhenEnd Template=FXC_Equipment]
				{
					action = UNHIDE
					location = chassis
					equipment_type_ids = rocket03
				}
			}
		}
		
		[Ability Template=AAAttackLocal]
		{			
			spawn_bone_ids = turret4
			turret_ids = turret4
				
			[AbilityDefinition Template=AAVehicleRocket]
			{
				IDS = rus_rocket4
				name = "#rus_rocket_truck_AbilityDefinition_name_4"

				[Flags] 
				bombard = true

				[WhenStart Template=FXC_Equipment]
				{
					action = HIDE
					location = chassis
					equipment_type_ids = rocket04
				}
		
				[WhenEnd Template=FXC_Equipment]
				{
					action = UNHIDE
					location = chassis
					equipment_type_ids = rocket04
				}
			}
		}
		
		[Ability Template=AAAttackLocal]
		{			
			spawn_bone_ids = turret5
			turret_ids = turret5
				
			[AbilityDefinition Template=AAVehicleRocket]
			{
				IDS = rus_rocket5
				name = "#rus_rocket_truck_AbilityDefinition_name_5"

				[Flags] 
				bombard = true

				[WhenStart Template=FXC_Equipment]
				{
					action = HIDE
					location = chassis
					equipment_type_ids = rocket05
				}
		
				[WhenEnd Template=FXC_Equipment]
				{
					action = UNHIDE
					location = chassis
					equipment_type_ids = rocket05
				}
			}
		}
		
		[Turret]
		{
			turret_ids = turret
			yaw_rotation_per_sec_degrees = 0
		}
		
		[Turret]
		{
			turret_ids = turret2
			yaw_rotation_per_sec_degrees = 0
		}
		
		[Turret]
		{
			turret_ids = turret3
			yaw_rotation_per_sec_degrees = 0
		}
		
		[Turret]
		{
			turret_ids = turret4
			yaw_rotation_per_sec_degrees = 0
		}
		
		[Turret]
		{
			turret_ids = turret5
			yaw_rotation_per_sec_degrees = 0
		}
		
	}	
	
	[View]
	{
		resource_prefix = RUSRocketTruck/RUSRocketTruck
	}
}