class ReactionPresetHitPrereqCondition extends BaseHitPrereqCondition
{
	var m_reactionPreset : String;

	public override function SetData( recordID : TweakDBID )
	{
		m_reactionPreset = TweakDBInterface.GetString( recordID + T".reactionPreset", "" );
		super.SetData( recordID );
	}

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		var result : Bool;
		var objectToCheck : weak< ScriptedPuppet >;
		objectToCheck = ( ( ScriptedPuppet )( hitEvent.target ) );
		if( !( objectToCheck ) )
		{
			return false;
		}
		switch( m_reactionPreset )
		{
			case "Civilian":
				result = objectToCheck.IsCharacterCivilian();
			break;
			case "Police":
				result = objectToCheck.IsCharacterPolice();
			break;
			case "Ganger":
				result = objectToCheck.IsCharacterGanger();
			break;
			default:
				return false;
		}
		if( result )
		{
			result = CheckOnlyOncePerShot( hitEvent );
		}
		return ( ( m_invert ) ? ( !( result ) ) : ( result ) );
	}

}

