From 467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 18 Mar 2015 10:03:51 +0100 Subject: Add a Lua call to do damages / heals --- src/script/lua_api/l_object.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/script/lua_api/l_object.h') diff --git a/src/script/lua_api/l_object.h b/src/script/lua_api/l_object.h index d51ca379f..94b07070c 100644 --- a/src/script/lua_api/l_object.h +++ b/src/script/lua_api/l_object.h @@ -83,6 +83,12 @@ private: // 0 if not applicable to this type of object static int l_get_hp(lua_State *L); + // apply_damage(self, damage) + // damage = amount of damage to apply + // if damage is negative, heal the player + // returns: nil + static int l_apply_damage(lua_State *L); + // get_inventory(self) static int l_get_inventory(lua_State *L); -- cgit v1.2.3