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:
Anthony-De 2021-02-08 19:03:03 -05:00 committed by GitHub
parent c9c2f6c7e0
commit f8cb85be9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 138 additions and 39 deletions

View file

@ -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

View file

@ -1 +1,2 @@
name = hpregen
depends = kill_assist