The LSM303 library does not have a function that specifically indicates the direction of an impact. However, you can read and interpret the raw accelerometer data to program that reversal behavior, but it will require in-depth modifications to the SumoCollisionDetect.ino example in the Arduino library for the Zumo Shield.
Changing the XY_ACCELERATION_THRESHOLD value to a negative will not work, because the program computes the magnitude of the acceleration of the XY plane, ignoring direction, and compares it to that threshold.
Since it sounds like you are not familiar with how the SumoCollisionDetect example and the LSM303 library work, I suggest that you first try to understand how the collision detection behavior works by looking at the relevant parts in the code (e.g.
check_for_contact) before looking at the available functions in the LSM303 library. Once you do that, you should have a general idea of how to modify the example to execute specific actions based on the impact direction.