1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Add a Lua call to do damages / heals

This commit is contained in:
Loic Blot 2015-03-18 10:03:51 +01:00
parent 8f2e9bfbc2
commit 467fc0ddc9
3 changed files with 45 additions and 3 deletions

View file

@ -2336,6 +2336,7 @@ This is basically a reference to a C++ `ServerActiveObject`
* `right_click(clicker)`; `clicker` is another `ObjectRef`
* `get_hp()`: returns number of hitpoints (2 * number of hearts)
* `set_hp(hp)`: set number of hitpoints (2 * number of hearts)
* `apply_damage(damage)`: set amount of damage to object. If damage < 0, heal the target
* `get_inventory()`: returns an `InvRef`
* `get_wield_list()`: returns the name of the inventory list the wielded item is in
* `get_wield_index()`: returns the index of the wielded item