From a85142053dff9721447754c378e2babfa7aa0781 Mon Sep 17 00:00:00 2001 From: Putnam Date: Sat, 16 Nov 2019 00:43:44 -0800 Subject: [PATCH] Makes it refund threat too (wow, didn't even think about it!) --- code/modules/antagonists/wizard/equipment/spellbook.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/antagonists/wizard/equipment/spellbook.dm b/code/modules/antagonists/wizard/equipment/spellbook.dm index b717aa7766..a5917f4b96 100644 --- a/code/modules/antagonists/wizard/equipment/spellbook.dm +++ b/code/modules/antagonists/wizard/equipment/spellbook.dm @@ -97,6 +97,10 @@ if(!S) S = new spell_type() var/spell_levels = 0 + if(dynamic_cost > 0 && istype(SSticker.mode,/datum/game_mode/dynamic)) + var/datum/game_mode/dynamic/mode = SSticker.mode + mode.refund_threat(dynamic_cost) + mode.log_threat("Wizard refunded [dynamic_cost] on [name].") for(var/obj/effect/proc_holder/spell/aspell in user.mind.spell_list) if(initial(S.name) == initial(aspell.name)) spell_levels = aspell.spell_level