Falling damage (DX)

In Deus Ex, falling damage is the damage that the player or other object takes as a result of landing on the ground after falling from a sufficient height. 
== Player character ==
The player character takes falling damage according to the following formula:DeusExPlayer.Landed in DeusEx.u.
* Falling Damage = (coefficient) × (excess downward velocity above 700) – (damage reduction)
** "Downward velocity" refers to the negative value of "Velocity.Z", which is the Z-axis component of the object's velocity vector. For example, if Velocity.Z is "-800", then the value of the excess downward velocity term is 100.
** "Damage reduction" refers to the reduction value from the Speed Enhancement augmentation, if activated. This value is 15, 30, 45, or 60, depending on the tech level of the augmentation.
Falling damage is applied to the left leg and right leg (with a coefficient of 0.16), and also to the torso (with coefficient of 0.06). Since the player's torso also has a multiplier of 2 for receiving incoming damage, torso damage will be 75% of leg damage, assuming that there is no damage reduction. 
The threshold value 700 means no damage is incurred when falling from low heights, in which case the player's downward velocity would not reach the threshold of 700. According to comments written in the game script, the developers designed the falling damage function with the intention that the player would take falling damage in the following manner (assuming that there is no damage reduction): 
* No damage if falling from 15 feet or less 
* A scaled amounting of damage if falling from 15 to 60 feet
* Automatic death when falling from over 60 feet
Note that the above description describe only the developers' intentions. Actual damage is implemented in accordance with the formula described above.
== NPCs, robots, and animals ==
A similar system for falling damage exists for non-player entities (i.e., NPCs, robots, and animals).See Landed() in FallingState for ScriptedPawn in DeusEx.u. However, non-player entities almost never incur falling damage because non-player entities typically do not move off of elevated platforms. 
Additionally, falling damage only applies when the internal "state" of the non-player entity is currently set to "FallingState." Due to how states are handled in the game script, non-player entities are not necessarily in FallingState when actually falling in the game environment. For this reason, non-player entities do not incur falling damage when summoned in mid-air, or when falling while on fire.
== Destructible world objects ==
Destructible world objects of the DeusExDecoration class take falling damage in accordance with the following rules.DeusExDecoration.landed() in DeusEx.u.
First, whether the object is eligible for falling damage is determined depending on whether it is explosive or non-explosive.Whether an object is explosive or not, for purposes of this rule is based on the bExplosive internal attribute. An object is eligible to incur falling damage if one of the following applies:
* Explosive objects – The object is explosive and has landed with a speed of greater than 425. "Speed" refers to the magnitude of the entire velocity vector, with the X, Y, and Z-axis components all taken into account. Therefore, if the object is explosive, its horizontal velocity contributes to eligibility for falling damage.
* Non-explosive objects – The object is non-explosive and has landed with a downward velocity greater than 500. "Downward velocity" refers to Velocity.Z only, without accounting for the X and Y-axis components of the velocity vector.
If the object is eligible for falling damage, then falling damage is incurred in the amount of (1-Velocity.Z/30).
One consequence of the threshold for falling damage eligibility is that the TNT Crate, which is explosive, lightweight, fragile (having only 4HP), will very easily take falling damage when thrown by the player, since the throwing action imparts an amount of horizontal velocity on the thrown object when the player is looking forward. By contrast, lightweight non-explosive objects will typically break on landing only if thrown at an upward angle. 
== Notes ==
* Internally, falling damage is labeled with the "fell" damage type, but this designation serves only as an internal label when falling damage is incurred, and is not used to control any further game mechanics. 
==References==
Category:Deus Ex gameplay