From f55434752ca76b91dc9452dc49da5e0aab8a5b32 Mon Sep 17 00:00:00 2001 From: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> Date: Mon, 24 Jul 2023 09:59:42 -0400 Subject: [PATCH] Fixes an umbrae bug (#21748) * got the clamp * minor underscore error --- .../modules/antagonists/vampire/vampire_powers/umbrae_powers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm b/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm index ddfd83028a3..a91f2038ba4 100644 --- a/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm +++ b/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm @@ -184,7 +184,7 @@ var/datum/spell_handler/vampire/V = custom_handler var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire) var/blood_cost = V.calculate_blood_cost(vampire) - vampire.bloodusable -= blood_cost + vampire.bloodusable = clamp(vampire.bloodusable - blood_cost, 0, vampire.bloodusable)// Vampires get a coupon if they have less than the normal blood cost addtimer(VARSET_CALLBACK(src, should_recharge_after_cast, FALSE), 1 SECONDS) // this is needed so that the spell handler knows we casted it properly /proc/shadow_to_animation(turf/start_turf, turf/end_turf, mob/user)