Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

[MIRROR] you can now cast rituals on 100 threat dynamic #1044

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions code/modules/antagonists/wizard/equipment/spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,19 @@
category = "Mobility"
cost = 1

<<<<<<< HEAD
=======
/datum/spellbook_entry/duffelbag
name = "Bestow Cursed Duffel Bag"
desc = "A curse that firmly attaches a demonic duffel bag to the target's back. The duffel bag will make the person it's attached to take periodical damage if it is not fed regularly, and regardless of whether or not it's been fed, it will slow the person wearing it down significantly."
spell_type = /obj/effect/proc_holder/spell/targeted/touch/duffelbag
category = "Defensive"
cost = 1

/// How much threat we need to let these rituals happen on dynamic
#define MINIMUM_THREAT_FOR_RITUALS 100

>>>>>>> bc02039... you can now cast rituals on 100 threat dynamic (#56961)
/datum/spellbook_entry/summon
name = "Summon Stuff"
category = "Rituals"
Expand Down Expand Up @@ -495,12 +508,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)
SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name)
new /datum/round_event/wizard/ghost()
Expand All @@ -517,7 +524,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)
Expand All @@ -536,7 +545,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)
Expand All @@ -558,7 +569,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)
Expand Down Expand Up @@ -591,6 +604,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."
Expand Down