Fix Ailment Buildup UI

This commit is contained in:
GreenComfyTea
2022-11-23 13:35:16 +02:00
parent 2dde202501
commit 673bf28451
4 changed files with 27 additions and 17 deletions

View File

@@ -116,7 +116,6 @@ function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailmen
};
ailment_buildup_UI_entity.draw(_player, ailment_buildup_UI, cached_config, ailment_buildup_position_on_screen, opacity_scale, top_buildup);
last_j = j;
end

View File

@@ -595,11 +595,15 @@ end
function ailments.apply_ailment_buildup(monster, attacker_id, ailment_type, ailment_buildup)
if monster == nil or player == nil or
if monster == nil or
(ailment_type ~= ailments.poison_id and ailment_type ~= ailments.blast_id and ailment_type ~= ailments.stun_id) then
return;
end
if ailment_buildup == 0 or ailment_buildup == nil then
return;
end
-- get the buildup accumulator for this type
if monster.ailments[ailment_type].buildup == nil then
monster.ailments[ailment_type].buildup = {};