diff --git a/code/modules/antagonists/wizard/equipment/spellbook.dm b/code/modules/antagonists/wizard/equipment/spellbook.dm index 66c1441af70..c5a983c8c48 100644 --- a/code/modules/antagonists/wizard/equipment/spellbook.dm +++ b/code/modules/antagonists/wizard/equipment/spellbook.dm @@ -480,6 +480,9 @@ category = "Defensive" cost = 1 +/// How much threat we need to let these rituals happen on dynamic +#define MINIMUM_THREAT_FOR_RITUALS 100 + /datum/spellbook_entry/summon name = "Summon Stuff" category = "Rituals" @@ -507,12 +510,6 @@ desc = "Spook the crew out by making them see dead people. Be warned, ghosts are capricious and occasionally vindicative, and some will use their incredibly minor abilities to frustrate you." cost = 0 -/datum/spellbook_entry/summon/ghosts/IsAvailable() - if(!SSticker.mode) - return FALSE - else - return TRUE - /datum/spellbook_entry/summon/ghosts/Buy(mob/living/carbon/human/user, obj/item/spellbook/book) log_spellbook("[key_name(user)] cast [src] for [cost] points") SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name) @@ -530,7 +527,9 @@ if(!SSticker.mode) // In case spellbook is placed on map return FALSE if(istype(SSticker.mode, /datum/game_mode/dynamic)) // Disable events on dynamic - return FALSE + var/datum/game_mode/dynamic/mode = SSticker.mode + if(mode.threat_level < MINIMUM_THREAT_FOR_RITUALS) + return FALSE return !CONFIG_GET(flag/no_summon_guns) /datum/spellbook_entry/summon/guns/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) @@ -550,7 +549,9 @@ if(!SSticker.mode) // In case spellbook is placed on map return FALSE if(istype(SSticker.mode, /datum/game_mode/dynamic)) // Disable events on dynamic - return FALSE + var/datum/game_mode/dynamic/mode = SSticker.mode + if(mode.threat_level < MINIMUM_THREAT_FOR_RITUALS) + return FALSE return !CONFIG_GET(flag/no_summon_magic) /datum/spellbook_entry/summon/magic/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) @@ -573,7 +574,9 @@ if(!SSticker.mode) // In case spellbook is placed on map return FALSE if(istype(SSticker.mode, /datum/game_mode/dynamic)) // Disable events on dynamic - return FALSE + var/datum/game_mode/dynamic/mode = SSticker.mode + if(mode.threat_level < MINIMUM_THREAT_FOR_RITUALS) + return FALSE return !CONFIG_GET(flag/no_summon_events) /datum/spellbook_entry/summon/events/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) @@ -608,6 +611,8 @@ playsound(user, 'sound/magic/mandswap.ogg', 50, TRUE) return TRUE +#undef MINIMUM_THREAT_FOR_RITUALS + /obj/item/spellbook name = "spell book" desc = "An unearthly tome that glows with power."