Sly 1:Damage

In Sly 1, the player takes damage on contact with ZAP volumes. Taking damage always results in death, unless you have a lucky charm.

Implementation
In, Zap volumes are placed around level hazards and spawned in by guard attacks. The damage type for a zap volume can be one of several values as dictated by the ZAPK enum.

OnJtZap
When Sly touches a zap volume, the function  is called with a pointer to the JT and ZAP structs. This function updates JT’s state and calls  to check if the damage is the damage is fatal.

FCharmAvailable
The function  checks the   value on the current game state to see if it is greater than zero. If so, it returns true, and the charm is used to save JT from dying. If there are no charms available, the routine continues with.

May 2002 Demo
In the May 2002 Demo build there is a debug flag that makes zap volumes visible. The zap volumes are rendered as red wireframe boxes, and Sly takes damage upon coming into contact with them.