[VFX Template=AAVFXModelTemporary]
{
	IDS = parachute_close_agent
	name = "#saboteur_parachute_close_saboteur_name"
	model = Saboteur/ParachuteClose.nif
	critical = true
}

[Property Template=SharedProperty]
{
	IDS = agent_decay
	name = "#saboteur_decay_name"
	icon = /Properties/PropertyIcons/IconPropertyHealth.png
	
	[Modifier template=PeriodicDamageModifier]
	damage_type = gunfire
	amount = 2
	
	[Modifier template=FlagModifier]
	modifier_flag = NO_UPKEEP
}

[Thing Template=AAUnitGBRProne]
{
	IDS = secret_agent
	name = "#secret_agent_name"
	editor_name = "#secret_agent_editor_name"
	
	[Flags]
	invulnerable = true
	
	[Stance template = StanceFalling]
	
	[View]
	{
		resource_prefix = Saboteur/Saboteur

		[Aspect Template=AspectFalling]

		[WhenCreated Template=FXC_PlaySFX]
		audio_ids = parachute_drop_sfx
	}

	[BodyComponent]
	{
		health = 200
		defense = 1
	}
		
	[EconomyComponent]
	{
		[Upkeep]
		unit_limit_consumed = 0
	}
	
	[ElementComponent]
	{
		morale_value = 50
		resupply_rate = 0
	}
	
	[MoverComponent]
	{
		speed_max = 2.5
	}
	
	[PropertiesComponent]
	{
		[Property]
		property_IDS = captain
		
		[Property]
		property_IDS = agent_decay
	}
	
	[WhenLeave Template=FXC_CreateVFX]
	{
		vfx_ids = parachute_close_agent
		actor_state = falling
		location = neck
	}
	
	[PerformerComponent]
	
	
;; --------------------- SABOTEUR CHARACTER COMPONENT ------------------------
	
	[CharacterComponent]
	{
		[Animation Template=AttackAnimation]
		IDS = attack1
		key_ratio = 1.0
		kf = Saboteur/Sabotage.kf
	
		[Animation Template=DieAnimation]
		IDS = die1
		kf = Saboteur/Die1.kf
		damage_threshold = 0
		damage_filter = 0

	[Animation Template=DieAnimation]
	{	
		IDS = die2
		kf = Saboteur/Die1.kf
		damage_threshold = 0
		length = 1 
		damage_filter = 0
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die3
		kf = /Shared/Animations/Units/Infantry/Die4.kf
		damage_threshold = 25
		length = 4
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die4
		kf = /Shared/Animations/Units/Infantry/Die4.kf
		damage_threshold = 25
		length = 4
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die5
		kf = /Shared/Animations/Units/Infantry/Die5.kf
		damage_threshold = 25
		length = 5
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die6
		kf = /Shared/Animations/Units/Infantry/Die6.kf
		damage_threshold = 25
		length = 3.5
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die7
		kf = /Shared/Animations/Units/Infantry/Die7.kf
		damage_threshold = 25
		length = 3.3
		damage_filter = 2
		
	}
		

	[Animation Template=DieAnimation]
	{	
		IDS = die8
		kf = /Shared/Animations/Units/Infantry/Die8.kf
		damage_threshold = 5
		length = 1.6
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die9
		kf = /Shared/Animations/Units/Infantry/Die9.kf
		damage_threshold = 5
		length = 2
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die10
		kf = /Shared/Animations/Units/Infantry/Die10.kf
		damage_threshold = 5
		length = 3
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die11
		kf = /Shared/Animations/Units/Infantry/Die11.kf
		damage_threshold = 5
		length = 3
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die12
		kf = /Shared/Animations/Units/Infantry/Die12.kf
		damage_threshold = 5
		length = 3
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die13
		kf = /Shared/Animations/Units/Infantry/Die5.kf
		damage_threshold = 25
		length = 5
		damage_filter = 2
		
	}
		

	[Animation Template=DieAnimation]
	{	
		IDS = die14
		kf = /Shared/Animations/Units/Infantry/Die6.kf
		damage_threshold = 25
		length = 3.5
		damage_filter = 2
		
	}
		

	[Animation Template=DieAnimation]
	{	
		IDS = die15
		kf = /Shared/Animations/Units/Infantry/Die8.kf
		damage_threshold = 5
		length = 1.6
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die16
		kf = /Shared/Animations/Units/Infantry/Die9.kf
		damage_threshold = 5
		length = 2
		damage_filter = 2
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die17
		kf = Saboteur/Die1.kf
		damage_threshold = 20
		length = 1
		damage_filter = 0
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die18
		kf = Saboteur/Die1.kf
		damage_threshold = 20
		length = 1
		damage_filter = 0
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die19
		kf = /Shared/Animations/Units/Infantry/Die19.kf
		damage_threshold = 0
		length = 5
		damage_filter = 1
		
		[WhenStart template=FXC_CreateVFX]
  		VFX_IDS = body_flame
  		at = self
		location = spine
		attached = true
  		delay = 0.0
			
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die20
		kf = /Shared/Animations/Units/Infantry/Die20.kf
		damage_threshold = 0
		length = 3
		damage_filter = 1
		
		[WhenStart template=FXC_CreateVFX]
  		VFX_IDS = body_flame
  		at = self
		location = spine
		attached = true
  		delay = 0.0
			
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die21
		kf = Saboteur/Die1.kf
		damage_threshold = 80
		length = 1.5 
		damage_filter = 0
		
	}
		
	[Animation Template=DieAnimation]
	{	
		IDS = die22
		kf = Saboteur/Die1.kf
		damage_threshold = 0
		length = 1 
		damage_filter = 666
		
	}
		
		[Animation Template=FidgetAnimation]
		IDS = fidget1
		kf = Saboteur/Fidget1.kf
		weight = 5			
				
		[Animation Template=FidgetAnimation]
		IDS = fidget2
		kf = Saboteur/Fidget2.kf
		weight = 4			
				
		[Animation Template=FidgetAnimation]
		IDS = fidget3
		kf = Saboteur/Fidget3.kf
		weight = 3			
				
		[Animation Template=FidgetAnimation]
		IDS = fidget4
		kf = Saboteur/Fidget4.kf
		weight = 2
		length = 7			
				
		[Animation Template=FidgetAnimation]
		IDS = fidget5
		kf = Saboteur/Fidget5.kf
		weight = 1			
		length = 10			
					
		[Animation Template=IdleAnimation]
		IDS = idle
		kf = Saboteur/Idle.kf
	
		[Animation Template=IdleAnimation]
		IDS = idleattack
		kf = Saboteur/IdleSabotage.kf

		[Animation Template=MoveAnimation]
		IDS = walk
		walk_distance = 1.5
		kf = Saboteur/Walk.kf
		
		;; Paratroopers will apply this animation to AspectFalling instead of AspectNormal - contact Guy if any problems arise
		[Animation Template=SummonAnimation] 
		{
			IDS = summon1
			kf = Saboteur/Landing.kf
		}
	}
}

	