class BossStealthComponent extends ScriptableComponent
{
	private var m_owner : weak< NPCPuppet >;
	private var m_owner_id : EntityID;
	private var m_player : weak< PlayerPuppet >;
	private var m_statPoolSystem : StatPoolsSystem;
	private var m_statPoolType : gamedataStatPoolType;
	private var m_targetTrackerComponent : TargetTrackerComponent;

	private export function OnGameAttach()
	{
		m_owner = ( ( NPCPuppet )( GetOwner() ) );
		m_owner_id = m_owner.GetEntityID();
		m_owner.SetDisableRagdoll( true );
		m_player = ( ( PlayerPuppet )( GetPlayerSystem().GetLocalPlayerControlledGameObject() ) );
		m_statPoolSystem = GameInstance.GetStatPoolsSystem( m_owner.GetGame() );
		m_targetTrackerComponent = m_owner.GetTargetTrackerComponent();
	}

	protected event OnStatusEffectApplied( evt : ApplyStatusEffectEvent )
	{
		var tags : array< CName >;
		tags = evt.staticData.GameplayTags();
		if( tags.Contains( 'Quickhack' ) )
		{
			NPCPuppet.ChangeHighLevelState( m_owner, gamedataNPCHighLevelState.Combat );
			AIActionHelper.TryStartCombatWithTarget( m_owner, m_player );
		}
		if( tags.Contains( 'MemoryWipe' ) )
		{
			StatusEffectHelper.ApplyStatusEffect( m_owner, T"BaseStatusEffect.BossNoTakeDown", m_owner.GetEntityID() );
			if( m_targetTrackerComponent )
			{
				m_targetTrackerComponent.ClearThreats();
			}
			ScriptedPuppet.SendActionSignal( m_owner, 'alerted', 0.5 );
			NPCPuppet.ChangeHighLevelState( m_owner, gamedataNPCHighLevelState.Alerted );
		}
	}

	protected event OnNonStealthQuickHackVictimEvent( evt : NonStealthQuickHackVictimEvent )
	{
		NPCStatesComponent.AlertPuppet( m_owner );
	}

}

