From abcab66a37fd59fb8e704af32d320af4b5b482ed Mon Sep 17 00:00:00 2001 From: datlo Date: Sun, 16 May 2021 12:48:42 +0200 Subject: [PATCH] Fixes buying sacred flame in spellbook, misc spellbook improvements (#15817) * Fix sacred flame, misc spellbook improvements * Update code/game/gamemodes/wizard/spellbook.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * Update code/game/gamemodes/wizard/spellbook.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> --- code/game/gamemodes/wizard/spellbook.dm | 35 +++++++++++++++---------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index b3c84d28ec4..c22a26181ad 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -88,7 +88,7 @@ if(!S) S = new spell_type() var/dat ="" - dat += "[initial(S.name)]" + dat += "[name]" if(S.charge_type == "recharge") dat += " Cooldown:[S.charge_max/10]" dat += " Cost:[cost]
" @@ -172,18 +172,6 @@ log_name = "IG" category = "Offensive" -/datum/spellbook_entry/sacred_flame - name = "Sacred Flame" - spell_type = /obj/effect/proc_holder/spell/targeted/sacred_flame - cost = 1 - log_name = "SF" - refundable = 0 //You get fire immunity out of it, no. - -/datum/spellbook_entry/sacred_flame/LearnSpell(mob/living/carbon/human/user, obj/item/spellbook/book, obj/effect/proc_holder/spell/newspell) - ..() - user.dna.SetSEState(GLOB.coldblock, 1) - singlemutcheck(user, GLOB.coldblock, MUTCHK_FORCED) - //Defensive /datum/spellbook_entry/disabletech name = "Disable Tech" @@ -239,6 +227,25 @@ log_name = "TS" category = "Defensive" +/datum/spellbook_entry/sacred_flame + name = "Sacred Flame and Fire Immunity" + spell_type = /obj/effect/proc_holder/spell/targeted/sacred_flame + cost = 1 + log_name = "SF" + category = "Defensive" + +/datum/spellbook_entry/sacred_flame/LearnSpell(mob/living/carbon/human/user, obj/item/spellbook/book, obj/effect/proc_holder/spell/newspell) + to_chat(user, "You feel fireproof.") + ADD_TRAIT(user, TRAIT_RESISTHEAT, MAGIC_TRAIT) + ADD_TRAIT(user, TRAIT_RESISTHIGHPRESSURE, MAGIC_TRAIT) + return ..() + +/datum/spellbook_entry/sacred_flame/Refund(mob/living/carbon/human/user, obj/item/spellbook/book) + to_chat(user, "You no longer feel fireproof.") + REMOVE_TRAIT(user, TRAIT_RESISTHEAT, MAGIC_TRAIT) + REMOVE_TRAIT(user, TRAIT_RESISTHIGHPRESSURE, MAGIC_TRAIT) + return ..() + //Mobility /datum/spellbook_entry/knock name = "Knock" @@ -431,7 +438,7 @@ category = "Artefacts" /datum/spellbook_entry/item/voice_of_god - name = "Voice of god" + name = "Voice of God" desc = "A magical vocal cord that can be used to yell out with the voice of a god, be it to harm, help, or confuse the target." item_path = /obj/item/organ/internal/vocal_cords/colossus/wizard log_name = "VG"