Add manticore from horror.
This commit is contained in:
parent
e64d458359
commit
232fac6361
5 changed files with 79 additions and 1 deletions
11
dungeon.lua
11
dungeon.lua
|
@ -150,10 +150,19 @@ if fun_caves.register_status then
|
|||
if not player then
|
||||
return
|
||||
end
|
||||
local player_name = player:get_player_name()
|
||||
if not player_name or player_name == '' then
|
||||
return
|
||||
end
|
||||
|
||||
local damage = 1
|
||||
if fun_caves.db.status and fun_caves.db.status[player_name] and fun_caves.db.status[player_name]['poisoned'] and fun_caves.db.status[player_name]['poisoned']['damage'] then
|
||||
damage = tonumber(fun_caves.db.status[player_name]['poisoned']['damage'])
|
||||
end
|
||||
|
||||
local hp = player:get_hp()
|
||||
if hp and type(hp) == 'number' then
|
||||
hp = hp - 1
|
||||
hp = hp - damage
|
||||
player:set_hp(hp)
|
||||
end
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue