Fix up and re-add kill assists (#782)
* Add kill assists * Fix bug * Move to seperate mod * Fix bugs and improve code some more Co-authored-by: LoneWolfHT <lonewolf04361@gmail.com>
This commit is contained in:
parent
c9c2f6c7e0
commit
f8cb85be9f
11 changed files with 138 additions and 39 deletions
|
@ -16,8 +16,10 @@ local function regen_all()
|
|||
local newhp = oldhp + hpregen.amount
|
||||
if newhp > player:get_properties().hp_max then
|
||||
newhp = player:get_properties().hp_max
|
||||
kill_assist.clear_assists(player:get_player_name())
|
||||
end
|
||||
if oldhp ~= newhp then
|
||||
kill_assist.add_heal_assist(player:get_player_name(), hpregen.amount)
|
||||
player:set_hp(newhp)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
name = hpregen
|
||||
depends = kill_assist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue