Fall Damage
Falling damage is calculated at the time the actor lands. Damage increases non-linearly. Since the origin is at the very top left of a map, the height <math>h</math> the actor fell is calculated with <math>h=y_{actor}-y_{fall\_start}\,</math>.
The height of the fall is then mapped to the percentage of HP the actor should lose:
<math>{damage} = \frac{5h^2 - 341h - 110215}{10000}</math>
Quick facts:
- The smallest height to sustain fall damage is 192 pixels, and causes damage equal to 1% of the player's maximum HP.
- Falling anything in excess or equal to 507 pixels will knock you out.
- Falling 451 pixels causes damage equal to 75% of the player's maximum HP.
- Falling 386 pixels causes damage equal to 50% of the player's maximum HP.
- Falling 305 pixels causes damage equal to 25% of the player's maximum HP.
- Only players or monsters that side players sustain fall damage.
- Actors that have the STATUS_FLYING status effect and monsters that are always flying (stat_flies flag) do not sustain fall damage.