diff --git a/code/game/objects/items/implants/implant_spell.dm b/code/game/objects/items/implants/implant_spell.dm new file mode 100644 index 0000000000..5db7dc761c --- /dev/null +++ b/code/game/objects/items/implants/implant_spell.dm @@ -0,0 +1,42 @@ +/obj/item/implant/spell + name = "spell implant" + desc = "Allows you to cast a spell as if you were a wizard." + activated = FALSE + + var/autorobeless = TRUE // Whether to automagically make the spell robeless on implant + var/obj/effect/proc_holder/spell/spell + + +/obj/item/implant/spell/get_data() + var/dat = {"Implant Specifications:
+ Name: Spell Implant
+ Life: 4 hours after death of host
+ Implant Details:
+ Function: [spell ? "Allows a non-wizard to cast [spell] as if they were a wizard." : "None"]"} + return dat + +/obj/item/implant/spell/implant(mob/living/target, mob/user, silent = FALSE) + . = ..() + if (.) + if (!spell) + return FALSE + if (autorobeless && spell.clothes_req) + spell.clothes_req = FALSE + target.AddSpell(spell) + return TRUE + +/obj/item/implant/spell/removed(mob/target, silent = FALSE, special = 0) + . = ..() + if (.) + target.RemoveSpell(spell) + if(target.stat != DEAD && !silent) + to_chat(target, "The knowledge of how to cast [spell] slips out from your mind.") + +/obj/item/implanter/spell + name = "implanter (spell)" + imp_type = /obj/item/implant/spell + +/obj/item/implantcase/spell + name = "implant case - 'Wizardry'" + desc = "A glass case containing an implant that can teach the user the arts of Wizardry." + imp_type = /obj/item/implant/spell diff --git a/tgstation.dme b/tgstation.dme index 87e81d16b7..599178f062 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -857,6 +857,7 @@ #include "code\game\objects\items\implants\implant_krav_maga.dm" #include "code\game\objects\items\implants\implant_loyality.dm" #include "code\game\objects\items\implants\implant_misc.dm" +#include "code\game\objects\items\implants\implant_spell.dm" #include "code\game\objects\items\implants\implant_storage.dm" #include "code\game\objects\items\implants\implant_track.dm" #include "code\game\objects\items\implants\implantcase.dm"