diff options
author | Wuzzy <wuzzy2@mail.ru> | 2021-04-11 15:09:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 17:09:37 +0200 |
commit | 4b8209d9a44425156ba89a4763f63ea088daccb3 (patch) | |
tree | 62c0553a778b53b7a36535adc3ac2b8145b3ca69 /doc/lua_api.txt | |
parent | 0abc1e98edb87b2e23eecccfd6b1393ac7fb4f56 (diff) | |
download | minetest-4b8209d9a44425156ba89a4763f63ea088daccb3.tar.gz minetest-4b8209d9a44425156ba89a4763f63ea088daccb3.tar.bz2 minetest-4b8209d9a44425156ba89a4763f63ea088daccb3.zip |
Modifying fall damage via armor group (#11080)
Adds a new fall_damage_add_percent armor group which influences the fall damage in addition to the existing node group.
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 6c1e46c7e..7d413a9e9 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1730,7 +1730,15 @@ to games. * `3`: the node always gets the digging time 0 seconds (torch) * `disable_jump`: Player (and possibly other things) cannot jump from node or if their feet are in the node. Note: not supported for `new_move = false` -* `fall_damage_add_percent`: damage speed = `speed * (1 + value/100)` +* `fall_damage_add_percent`: modifies the fall damage suffered when hitting + the top of this node. There's also an armor group with the same name. + The final player damage is determined by the following formula: + damage = + collision speed + * ((node_fall_damage_add_percent + 100) / 100) -- node group + * ((player_fall_damage_add_percent + 100) / 100) -- player armor group + - (14) -- constant tolerance + Negative damage values are discarded as no damage. * `falling_node`: if there is no walkable block under the node it will fall * `float`: the node will not fall through liquids * `level`: Can be used to give an additional sense of progression in the game. @@ -1750,12 +1758,15 @@ to games. `"toolrepair"` crafting recipe -### `ObjectRef` groups +### `ObjectRef` armor groups * `immortal`: Skips all damage and breath handling for an object. This group will also hide the integrated HUD status bars for players. It is automatically set to all players when damage is disabled on the server and cannot be reset (subject to change). +* `fall_damage_add_percent`: Modifies the fall damage suffered by players + when they hit the ground. It is analog to the node group with the same + name. See the node group above for the exact calculation. * `punch_operable`: For entities; disables the regular damage mechanism for players punching it by hand or a non-tool item, so that it can do something else than take damage. |