diff --git a/baystation12.dme b/baystation12.dme
index 62fac6573e5..b391ac11c31 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -3116,7 +3116,6 @@
#include "code\modules\species\station\unathi.dm"
#include "code\modules\species\station\unathi_subspecies.dm"
#include "code\modules\spellbook\_spellbook.dm"
-#include "code\modules\spellbook\apprentice.dm"
#include "code\modules\spells\_spell.dm"
#include "code\modules\spells\_spell_procs.dm"
#include "code\modules\spells\artifacts.dm"
diff --git a/code/datums/outfits/wizardry.dm b/code/datums/outfits/wizardry.dm
index 218fa20b5f2..2d872630744 100644
--- a/code/datums/outfits/wizardry.dm
+++ b/code/datums/outfits/wizardry.dm
@@ -4,7 +4,7 @@
l_ear = /obj/item/device/radio/headset
r_pocket = /obj/item/teleportation_scroll
l_hand = /obj/item/staff
- r_hand = /obj/item/spellbook
+ r_hand = /obj/item/spellbook/all_book_spells
back = /obj/item/storage/backpack
backpack_contents = list(/obj/item/storage/box = 1)
hierarchy_type = /decl/hierarchy/outfit/wizard
diff --git a/code/game/antagonist/outsider/wizard.dm b/code/game/antagonist/outsider/wizard.dm
index 1808d33a65a..9638e0b6dc7 100644
--- a/code/game/antagonist/outsider/wizard.dm
+++ b/code/game/antagonist/outsider/wizard.dm
@@ -76,6 +76,12 @@ GLOBAL_DATUM_INIT(wizards, /datum/antagonist/wizard, new)
var/decl/hierarchy/outfit/wizard_outfit = outfit_by_type(outfit_type)
wizard_outfit.equip(wizard_mob)
+ // Gives high mana & spell points
+ wizard_mob.mana.mana_level_max = 100
+ wizard_mob.mana.mana_level = 100
+ wizard_mob.mana.mana_recharge_speed = 2
+ wizard_mob.mana.spell_points = 15 // Should allow wizard to buy 2-3 dangerous spells, or a bunch of small stuff
+
return 1
/datum/antagonist/wizard/print_player_summary()
diff --git a/code/modules/mana/mana.dm b/code/modules/mana/mana.dm
index 3659a95d938..7a144f65e7a 100644
--- a/code/modules/mana/mana.dm
+++ b/code/modules/mana/mana.dm
@@ -1,9 +1,12 @@
+// Stores a lot of things related to magic, not just mana
/datum/mana
var/mana_level = 10
var/mana_level_max = 10
/// Amount of mana restored per second
var/mana_recharge_speed = 0.25
var/recharging = FALSE
+ /// Personal spell points used for purchasing spells
+ var/spell_points = 2
/datum/mana/proc/UseMana(mob/user, amount = 0, silent = TRUE)
if(mana_level < amount)
diff --git a/code/modules/spellbook/_spellbook.dm b/code/modules/spellbook/_spellbook.dm
index 29dc2b95160..c875b46ec90 100644
--- a/code/modules/spellbook/_spellbook.dm
+++ b/code/modules/spellbook/_spellbook.dm
@@ -1,6 +1,4 @@
-// Assoc list of category = spell type
-GLOBAL_LIST_EMPTY(categories_to_spells)
-// Reverse assoc list for "reasons"
+// Assoc list of spell types and their categories
GLOBAL_LIST_EMPTY(spells_by_categories)
// Does exactly what it says: Unless dispelled, only wizards can use it.
@@ -22,16 +20,30 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
var/book_flags = 0
/// Current owner of the book, none other than them can use it; Can be dispelled to remove that and other locks.
var/mob/owner = null
+ /// List of shown spells.
+ var/list/allowed_spells = list()
/// Currently applied spell categories that will be shown; If none - all spells are shown.
var/list/spell_categories = list()
+/obj/item/spellbook/Initialize()
+ . = ..()
+ // Create the global list if empty
+ if(!LAZYLEN(GLOB.spells_by_categories))
+ for(var/spell_type in subtypesof(/datum/spell))
+ var/datum/spell/S = new spell_type()
+ GLOB.spells_by_categories[S.type] = S.categories
+ qdel(S)
+
/obj/item/spellbook/Destroy()
RemoveOwner()
return ..()
-/obj/item/spellbook/attack_self(mob/user)
+/obj/item/spellbook/attack_self(mob/living/user)
if(!user.mind)
return
+ if(!user.mana)
+ to_chat(user, SPAN_WARNING("You cannot see anything in the book..."))
+ return
if(user.mind.special_role != ANTAG_WIZARD && (book_flags & WIZARD_ONLY))
to_chat(user, SPAN_WARNING("The book refuses to open for you!"))
return
@@ -52,26 +64,15 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
interact(user)
-/obj/item/spellbook/interact(mob/user)
+/obj/item/spellbook/interact(mob/living/user)
var/dat = null
-
- // Create the global lists if empty
- if(!LAZYLEN(GLOB.categories_to_spells) || !LAZYLEN(GLOB.spells_by_categories))
- for(var/spell_type in subtypesof(/datum/spell))
- var/datum/spell/S = new spell_type()
- for(var/category in S.categories)
- if(!(category in GLOB.categories_to_spells))
- GLOB.categories_to_spells[category] = list()
- GLOB.categories_to_spells[category] += S.type
- GLOB.spells_by_categories[S.type] = S.categories
- qdel(S)
-
- for(var/spell_type in GLOB.spells_by_categories)
+ dat += "Your spell points: [user.mana.spell_points].
"
+ dat += "Applied categories: [english_list(spell_categories, "None")].
"
+ dat += "
"
+ for(var/spell_type in allowed_spells)
var/datum/spell/S = spell_type
if(LAZYLEN(spell_categories) && !(GLOB.spells_by_categories[spell_type] & spell_categories))
continue
- if(!initial(S.spell_book_visible))
- continue
dat += "[initial(S.name)]
"
@@ -98,32 +99,53 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
return ..()
/obj/item/spellbook/OnTopic(mob/user, href_list)
- if(href_list["temp"])
- temp = null
- . = TOPIC_REFRESH
-
- else if(href_list["path"])
- var/path = text2path(href_list["path"])
+ if(href_list["spell"])
+ var/datum/spell/S = text2path(href_list["spell"])
+ if(!ispath(S))
+ return TOPIC_REFRESH
+ var/dat = null
+ dat += "Purchase ([initial(S.spell_cost)] points) "
+ dat += "
"
+ dat += "[initial(S.name)]
"
+ dat += "[initial(S.desc)]
"
+ dat += "
"
+ dat += "Mana cost: [initial(S.mana_cost)].
"
+ dat += "Categories: [english_list(GLOB.spells_by_categories[S], "None")].
"
+
+ var/datum/browser/popup = new(user, "spellbook_[S]", "Spell Book - [initial(S.name)]")
+ popup.set_content(dat)
+ popup.open()
+ return TOPIC_NOACTION
+
+ else if(href_list["purchase"])
+ var/path = text2path(href_list["purchase"])
if(!path)
- return TOPIC_HANDLED
+ return TOPIC_NOACTION
SendFeedback(path) //feedback stuff
if(ispath(path, /datum/spell))
- temp = AddSpell(user, path)
+ to_chat(user, AddSpell(user, path))
else
var/obj/O = new path(get_turf(user))
- temp = "You have purchased \a [O]."
+ to_chat(user, SPAN_NOTICE("You have purchased \a [O]."))
//finally give it a bit of an oomf
playsound(get_turf(user),'sound/effects/phasein.ogg',50,1)
. = TOPIC_REFRESH
- else if(href_list["reset"])
- var/area/map_template/wizard_station/A = get_area(user)
- if(istype(A))
- user.spellremove()
- temp = "All spells and investments have been removed. You may now memorize a new set of spells."
- SSstatistics.add_field_details("wizard_spell_learned","UM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
- else
- to_chat(user, "You must be in the wizard academy to re-memorize your spells.")
+ else if(href_list["categories"])
+ var/option = "Add"
+ if(LAZYLEN(spell_categories))
+ option = input(user, "What do you want to do?", "Options") as anything in list("Add", "Remove", "Clear")
+ switch(option)
+ if("Add")
+ var/cat = input(user, "What category do you want to add?", "Add Category") as anything in (GLOB.spell_categories - spell_categories)
+ if(cat && !(cat in spell_categories) && (cat in GLOB.spell_categories))
+ spell_categories |= cat
+ if("Remove")
+ var/cat = input(user, "What category do you want to remove?", "Remove Category") as anything in spell_categories
+ if(cat && (cat in spell_categories))
+ spell_categories -= cat
+ if("Clear")
+ spell_categories = list()
. = TOPIC_REFRESH
interact(user)
@@ -158,7 +180,7 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
var/obj/O = path
SSstatistics.add_field_details("wizard_spell_learned","[initial(O.name)]")
-/obj/item/spellbook/proc/AddSpell(mob/user, spell_path)
+/obj/item/spellbook/proc/AddSpell(mob/living/user, spell_path)
for(var/datum/spell/S in user.mind.learned_spells)
if(istype(S,spell_path))
if(!S.can_improve())
@@ -176,6 +198,51 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
else if(S.can_improve(UPGRADE_SPEED))
return S.quicken_spell()
+ var/datum/spell/SP = spell_path
+ if(user.mana.spell_points < initial(SP.spell_cost))
+ return SPAN_WARNING("Not enough points!")
+
var/datum/spell/S = new spell_path()
user.add_spell(S)
- return "You learn the spell [S]"
+ user.mana.spell_points -= S.spell_cost
+ return SPAN_NOTICE("You learn the spell [S]")
+
+/* Subtypes */
+// A spell book with EVERY spell available
+/obj/item/spellbook/all_spells/Initialize()
+ . = ..()
+ for(var/spell_type in subtypesof(/datum/spell))
+ var/datum/spell/S = spell_type
+ if(isnull(initial(S.name)))
+ continue
+ allowed_spells |= S
+
+// All spells available via spell book
+/obj/item/spellbook/all_book_spells/Initialize()
+ . = ..()
+ for(var/spell_type in GLOB.spells_by_categories)
+ var/datum/spell/S = spell_type
+ if(isnull(initial(S.name)))
+ continue
+ if(initial(S.spell_book_visible))
+ allowed_spells |= spell_type
+
+// A book spawned to wizard apprentices
+/obj/item/spellbook/apprentice
+ allowed_spells = list(
+ /datum/spell/aoe_turf/knock,
+ /datum/spell/targeted/ethereal_jaunt,
+ /datum/spell/targeted/projectile/magic_missile,
+ )
+
+// Free for all spell book!
+/obj/item/spellbook/minor_free
+ book_flags = NO_OWNER
+ allowed_spells = list(
+ /datum/spell/noclothes,
+ /datum/spell/aimed/passage,
+ /datum/spell/aoe_turf/knock,
+ /datum/spell/targeted/ethereal_jaunt,
+ /datum/spell/targeted/heal_target/touch,
+ /datum/spell/area_teleport,
+ )
diff --git a/code/modules/spellbook/apprentice.dm b/code/modules/spellbook/apprentice.dm
deleted file mode 100644
index e4713526a09..00000000000
--- a/code/modules/spellbook/apprentice.dm
+++ /dev/null
@@ -1 +0,0 @@
-/obj/item/spellbook/apprentice
diff --git a/code/modules/spells/_spell.dm b/code/modules/spells/_spell.dm
index e45ddbe13d2..bc1ade118c8 100644
--- a/code/modules/spells/_spell.dm
+++ b/code/modules/spells/_spell.dm
@@ -1,15 +1,33 @@
+// All possible categories. Please follow them.
+#define SPELL_CATEGORY_FIRE "Fire"
+#define SPELL_CATEGORY_EXPLOSIVE "Explosive"
+#define SPELL_CATEGORY_HEALING "Healing"
+#define SPELL_CATEGORY_PASSIVE "Passive"
+#define SPELL_CATEGORY_FORBIDDEN "Forbidden arts"
+
+// A global list of them
+GLOBAL_LIST_INIT(spell_categories, list(
+ SPELL_CATEGORY_FIRE,
+ SPELL_CATEGORY_EXPLOSIVE,
+ SPELL_CATEGORY_HEALING,
+ SPELL_CATEGORY_PASSIVE,
+ SPELL_CATEGORY_FORBIDDEN,
+ ))
+
/datum/spell
parent_type = /datum
- var/name = "Spell"
+ var/name = null
var/desc = "A spell."
/// What panel the proc holder needs to go on.
var/panel = "Spells"
- // Spell book representation
+ // Spell book variables
/// List of categories for the spellbook
var/list/categories = list()
/// If TRUE - will be available via spell book
var/spell_book_visible = TRUE
+ /// Amount of points required to purchase the spell
+ var/spell_cost = 1
/// Can be recharge or charges, see charge_max and charge_counter descriptions; can also be based on the holder's vars now, use "holder_var" for that
var/charge_type = SPELL_RECHARGE
diff --git a/code/modules/spells/aimed/_aimed.dm b/code/modules/spells/aimed/_aimed.dm
index b488ad86506..1bbecc20645 100644
--- a/code/modules/spells/aimed/_aimed.dm
+++ b/code/modules/spells/aimed/_aimed.dm
@@ -1,5 +1,4 @@
/datum/spell/aimed
- name = "aimed projectile spell"
hud_state = "projectile"
var/projectile_type = /obj/item/projectile
diff --git a/code/modules/spells/aimed/fireball.dm b/code/modules/spells/aimed/fireball.dm
index b14a7a67c0c..5c8e2e5b529 100644
--- a/code/modules/spells/aimed/fireball.dm
+++ b/code/modules/spells/aimed/fireball.dm
@@ -14,6 +14,10 @@
level_max = list(UPGRADE_TOTAL = 5, UPGRADE_SPEED = 0, UPGRADE_POWER = 5)
+ categories = list(SPELL_CATEGORY_EXPLOSIVE)
+ spell_cost = 5
+ mana_cost = 20
+
var/ex_severe = -1
var/ex_heavy = 1
var/ex_light = 2
diff --git a/code/modules/spells/aimed/passage.dm b/code/modules/spells/aimed/passage.dm
index f35154b9720..a852be44d53 100644
--- a/code/modules/spells/aimed/passage.dm
+++ b/code/modules/spells/aimed/passage.dm
@@ -18,6 +18,9 @@
hud_state = "gen_project"
cast_sound = 'sound/magic/lightning_bolt.ogg'
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/aimed/passage/prox_cast(list/targets, atom/spell_holder)
for(var/mob/living/L in targets)
L.Paralyse(amt_paralysis)
diff --git a/code/modules/spells/aoe_turf/blink.dm b/code/modules/spells/aoe_turf/blink.dm
index 098ecf7c775..b871179bc73 100644
--- a/code/modules/spells/aoe_turf/blink.dm
+++ b/code/modules/spells/aoe_turf/blink.dm
@@ -1,5 +1,5 @@
/datum/spell/aoe_turf/blink
- name = "Blink"
+ name = "Random blink"
desc = "This spell randomly teleports you a short distance."
charge_max = 20
spell_flags = Z2NOCAST | IGNOREDENSE | IGNORESPACE
@@ -13,6 +13,9 @@
hud_state = "wiz_blink"
cast_sound = 'sound/magic/blink.ogg'
+ spell_cost = 1
+ mana_cost = 2
+
/datum/spell/aoe_turf/blink/cast(var/list/targets, mob/user)
if(!targets.len)
return
diff --git a/code/modules/spells/aoe_turf/charge.dm b/code/modules/spells/aoe_turf/charge.dm
index 5aa56bdc927..01bfc5931e6 100644
--- a/code/modules/spells/aoe_turf/charge.dm
+++ b/code/modules/spells/aoe_turf/charge.dm
@@ -12,6 +12,9 @@
hud_state = "wiz_charge"
cast_sound = 'sound/magic/charge.ogg'
+ spell_cost = 2
+ mana_cost = 25
+
/datum/spell/aoe_turf/charge/cast(var/list/targets, mob/user)
for(var/turf/T in targets)
depth_cast(T)
@@ -68,4 +71,4 @@
charge_type = SPELL_HOLDVAR
holder_var_type = "bruteloss"
- holder_var_amount = 30
\ No newline at end of file
+ holder_var_amount = 30
diff --git a/code/modules/spells/aoe_turf/conjure/conjure.dm b/code/modules/spells/aoe_turf/conjure/conjure.dm
index 8ef75f057ef..26187ab506e 100644
--- a/code/modules/spells/aoe_turf/conjure/conjure.dm
+++ b/code/modules/spells/aoe_turf/conjure/conjure.dm
@@ -4,7 +4,6 @@ How they spawn stuff is decided by behaviour vars, which are explained below
*/
/datum/spell/aoe_turf/conjure
- name = "Conjure"
desc = "This spell conjures objs of the specified types in range."
var/list/summon_type = list() //determines what exactly will be summoned
diff --git a/code/modules/spells/aoe_turf/conjure/druidic_spells.dm b/code/modules/spells/aoe_turf/conjure/druidic_spells.dm
index c04e460ef88..a2bedcf8ed5 100644
--- a/code/modules/spells/aoe_turf/conjure/druidic_spells.dm
+++ b/code/modules/spells/aoe_turf/conjure/druidic_spells.dm
@@ -34,6 +34,9 @@
hud_state = "wiz_bats"
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/aoe_turf/conjure/summon/bats/empower_spell()
if(!..())
return 0
diff --git a/code/modules/spells/aoe_turf/conjure/faithful_hound.dm b/code/modules/spells/aoe_turf/conjure/faithful_hound.dm
index 1be0a279ae6..816cdb2ee8f 100644
--- a/code/modules/spells/aoe_turf/conjure/faithful_hound.dm
+++ b/code/modules/spells/aoe_turf/conjure/faithful_hound.dm
@@ -12,6 +12,9 @@
summon_type = list(/mob/living/simple_animal/faithful_hound)
hud_state = "wiz_hound"
+ spell_cost = 3
+ mana_cost = 10
+
/datum/spell/aoe_turf/conjure/faithful_hound/before_cast()
..()
var/password = sanitize(input("What password will this beast listen to?") as text, MAX_NAME_LEN)
diff --git a/code/modules/spells/aoe_turf/conjure/force_portal.dm b/code/modules/spells/aoe_turf/conjure/force_portal.dm
index 5e5ad912963..9fff01a02ea 100644
--- a/code/modules/spells/aoe_turf/conjure/force_portal.dm
+++ b/code/modules/spells/aoe_turf/conjure/force_portal.dm
@@ -9,6 +9,9 @@
hud_state = "wiz_force"
+ spell_cost = 2
+ mana_cost = 20
+
/datum/spell/aoe_turf/conjure/force_portal/tower
charge_max = 2
- spell_flags = 0
\ No newline at end of file
+ spell_flags = 0
diff --git a/code/modules/spells/aoe_turf/conjure/forcewall.dm b/code/modules/spells/aoe_turf/conjure/forcewall.dm
index 9b627aa9b8c..ced9c889494 100644
--- a/code/modules/spells/aoe_turf/conjure/forcewall.dm
+++ b/code/modules/spells/aoe_turf/conjure/forcewall.dm
@@ -10,6 +10,9 @@
hud_state = "wiz_shield"
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/aoe_turf/conjure/forcewall/mime
name = "Invisible wall"
desc = "Create an invisible wall on your location."
@@ -23,6 +26,8 @@
override_base = "grey"
hud_state = "mime_wall"
+ mana_cost = 0
+
/obj/effect/forcefield
desc = "A space wizard's magic wall."
name = "FORCEWALL"
diff --git a/code/modules/spells/aoe_turf/conjure/grove.dm b/code/modules/spells/aoe_turf/conjure/grove.dm
index 6e2d87e6e6f..a421a446387 100644
--- a/code/modules/spells/aoe_turf/conjure/grove.dm
+++ b/code/modules/spells/aoe_turf/conjure/grove.dm
@@ -17,6 +17,9 @@
var/seed_type = /datum/seed/merlin_tear
cast_sound = 'sound/magic/repulse.ogg'
+ spell_cost = 2
+ mana_cost = 15
+
/datum/spell/aoe_turf/conjure/grove/New()
..()
if(seed_type)
@@ -45,6 +48,9 @@
hud_state = "wiz_grove"
+ spell_cost = 4
+ mana_cost = 30
+
/datum/spell/aoe_turf/conjure/grove/sanctuary/empower_spell()
if(!..())
return 0
diff --git a/code/modules/spells/aoe_turf/disable_tech.dm b/code/modules/spells/aoe_turf/disable_tech.dm
index a4ab67f753d..b0b53d8158d 100644
--- a/code/modules/spells/aoe_turf/disable_tech.dm
+++ b/code/modules/spells/aoe_turf/disable_tech.dm
@@ -17,6 +17,9 @@
hud_state = "wiz_tech"
cast_sound = 'sound/magic/disable_tech.ogg'
+ spell_cost = 3
+ mana_cost = 15
+
/datum/spell/aoe_turf/disable_tech/cast(list/targets)
for(var/turf/target in targets)
diff --git a/code/modules/spells/aoe_turf/drain_blood.dm b/code/modules/spells/aoe_turf/drain_blood.dm
index 3b77183bbef..1c0725a1394 100644
--- a/code/modules/spells/aoe_turf/drain_blood.dm
+++ b/code/modules/spells/aoe_turf/drain_blood.dm
@@ -12,6 +12,9 @@
cast_sound = 'sound/effects/squelch2.ogg'
hud_state = "const_rune"
+ spell_cost = 3
+ mana_cost = 20
+
/datum/spell/aoe_turf/drain_blood/cast(var/list/targets, var/mob/user)
for(var/t in targets)
for(var/mob/living/L in t)
@@ -61,4 +64,4 @@
/obj/effect/projectile/blood
- icon_state = "blood"
\ No newline at end of file
+ icon_state = "blood"
diff --git a/code/modules/spells/aoe_turf/exchange_wounds.dm b/code/modules/spells/aoe_turf/exchange_wounds.dm
index 3cb9278e6e9..f71dcd2e0e6 100644
--- a/code/modules/spells/aoe_turf/exchange_wounds.dm
+++ b/code/modules/spells/aoe_turf/exchange_wounds.dm
@@ -15,6 +15,9 @@
hud_state = "wiz_exchange"
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/aoe_turf/exchange_wounds/perform()
amt_healed = 0
..()
diff --git a/code/modules/spells/aoe_turf/knock.dm b/code/modules/spells/aoe_turf/knock.dm
index 2b255ecc1fd..16f01a1100b 100644
--- a/code/modules/spells/aoe_turf/knock.dm
+++ b/code/modules/spells/aoe_turf/knock.dm
@@ -12,6 +12,9 @@
hud_state = "wiz_knock"
cast_sound = 'sound/magic/knock.ogg'
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/aoe_turf/knock/cast(list/targets)
for(var/turf/T in targets)
for(var/obj/machinery/door/door in T.contents)
diff --git a/code/modules/spells/aoe_turf/smoke.dm b/code/modules/spells/aoe_turf/smoke.dm
index 4c844762a8a..648e58b89e5 100644
--- a/code/modules/spells/aoe_turf/smoke.dm
+++ b/code/modules/spells/aoe_turf/smoke.dm
@@ -16,6 +16,9 @@
hud_state = "wiz_smoke"
cast_sound = 'sound/magic/smoke.ogg'
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/aoe_turf/smoke/empower_spell()
if(!..())
return 0
@@ -24,4 +27,4 @@
return "[src] will now create more smoke."
/datum/spell/aoe_turf/smoke/tower
- charge_max = 2
\ No newline at end of file
+ charge_max = 2
diff --git a/code/modules/spells/aoe_turf/summons.dm b/code/modules/spells/aoe_turf/summons.dm
index 7ad0f2fc701..f36e52b8618 100644
--- a/code/modules/spells/aoe_turf/summons.dm
+++ b/code/modules/spells/aoe_turf/summons.dm
@@ -9,6 +9,9 @@
hud_state = "wiz_ed"
+ spell_cost = 5
+ mana_cost = 100
+
/datum/spell/aoe_turf/conjure/carp
name = "Summon Carp"
desc = "This spell conjures a simple carp."
@@ -24,6 +27,9 @@
hud_state = "wiz_carp"
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/aoe_turf/conjure/creature
name = "Summon Creature Swarm"
desc = "This spell tears the fabric of reality, allowing horrific daemons to spill forth"
@@ -39,6 +45,9 @@
hud_state = "wiz_creature"
+ spell_cost = 5
+ mana_cost = 50
+
/datum/spell/aoe_turf/conjure/mirage
name = "Summon Mirage"
desc = "This spell summons a harmless carp mirage for a few seconds."
@@ -59,10 +68,13 @@
newVars = list("melee_damage_lower" = 0, "melee_damage_upper" = 0, "break_stuff_probability" = 0)
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/aoe_turf/conjure/mirage/empower_spell()
if(!..())
return 0
summon_amt++
- return "You now summon [summon_amt] mirages per spellcast."
\ No newline at end of file
+ return "You now summon [summon_amt] mirages per spellcast."
diff --git a/code/modules/spells/general/acid_spray.dm b/code/modules/spells/general/acid_spray.dm
index 6a2c54abd5d..0c8d4147faa 100644
--- a/code/modules/spells/general/acid_spray.dm
+++ b/code/modules/spells/general/acid_spray.dm
@@ -10,6 +10,9 @@
hud_state = "wiz_acid"
cast_sound = 'sound/magic/disintegrate.ogg'
+ spell_cost = 3
+ mana_cost = 10
+
/datum/spell/acid_spray/choose_targets(mob/user = usr)
perform(user, list(holder))
diff --git a/code/modules/spells/general/area_teleport.dm b/code/modules/spells/general/area_teleport.dm
index 05e35848a14..b995c7833e8 100644
--- a/code/modules/spells/general/area_teleport.dm
+++ b/code/modules/spells/general/area_teleport.dm
@@ -17,6 +17,9 @@
hud_state = "wiz_tele"
+ spell_cost = 3
+ mana_cost = 5
+
/datum/spell/area_teleport/before_cast()
return
diff --git a/code/modules/spells/general/create_air.dm b/code/modules/spells/general/create_air.dm
index 48ff61779ff..4bdb173a414 100644
--- a/code/modules/spells/general/create_air.dm
+++ b/code/modules/spells/general/create_air.dm
@@ -13,6 +13,9 @@
var/list/air_change = list(GAS_OXYGEN = ONE_ATMOSPHERE)
number_of_channels = 0
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/create_air/choose_targets(mob/user = usr)
var/air = holder.return_air()
if(air)
diff --git a/code/modules/spells/general/invisibility.dm b/code/modules/spells/general/invisibility.dm
index 7c02b534f4b..de6388a1f5a 100644
--- a/code/modules/spells/general/invisibility.dm
+++ b/code/modules/spells/general/invisibility.dm
@@ -8,6 +8,9 @@
var/on = 0
hud_state = "invisibility"
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/invisibility/choose_targets(mob/user = usr)
if(istype(holder, /mob/living/carbon/human))
perform(user, holder)
diff --git a/code/modules/spells/general/mark_recall.dm b/code/modules/spells/general/mark_recall.dm
index bc785d5b8b2..0904c3ab164 100644
--- a/code/modules/spells/general/mark_recall.dm
+++ b/code/modules/spells/general/mark_recall.dm
@@ -16,6 +16,9 @@
hud_state = "wiz_mark"
var/mark = null
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/mark_recall/choose_targets(mob/user = usr)
if(!mark)
perform(user, list("magical fairy dust")) //because why not
@@ -78,4 +81,4 @@
src.visible_message("\The [src] fades away!")
qdel(src)
return
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/spells/general/portal_teleport.dm b/code/modules/spells/general/portal_teleport.dm
index 93c50378b2d..b614a2537a0 100644
--- a/code/modules/spells/general/portal_teleport.dm
+++ b/code/modules/spells/general/portal_teleport.dm
@@ -17,6 +17,9 @@
hud_state = "wiz_tele"
+ spell_cost = 4
+ mana_cost = 25
+
/datum/spell/portal_teleport/before_cast()
return
diff --git a/code/modules/spells/general/radiant_aura.dm b/code/modules/spells/general/radiant_aura.dm
index 4aba21f28fb..2482d6cc35a 100644
--- a/code/modules/spells/general/radiant_aura.dm
+++ b/code/modules/spells/general/radiant_aura.dm
@@ -11,6 +11,9 @@
duration = 40
hud_state = "gen_immolate"
+ spell_cost = 3
+ mana_cost = 10
+
/datum/spell/radiant_aura/choose_targets(mob/user = usr)
perform(user, list(holder))
@@ -21,3 +24,5 @@
/datum/spell/radiant_aura/starlight
spell_flags = 0
charge_max = 400
+
+ mana_cost = 0
diff --git a/code/modules/spells/general/return_master.dm b/code/modules/spells/general/return_master.dm
index 87ec1a604cf..e0bafd0757d 100644
--- a/code/modules/spells/general/return_master.dm
+++ b/code/modules/spells/general/return_master.dm
@@ -13,6 +13,7 @@
hud_state = "wiz_tele"
+ mana_cost = 2
/datum/spell/contract/return_master/cast(mob/target,mob/user)
target = ..(target,user)
diff --git a/code/modules/spells/general/tear_veil.dm b/code/modules/spells/general/tear_veil.dm
index 24d5c153a82..f1dae87a1eb 100644
--- a/code/modules/spells/general/tear_veil.dm
+++ b/code/modules/spells/general/tear_veil.dm
@@ -17,6 +17,9 @@
/mob/living/simple_animal/hostile/faithless/cult
)
+ spell_cost = 5
+ mana_cost = 35
+
/datum/spell/tear_veil/choose_targets(mob/user = usr)
var/turf/T = get_turf(holder)
holder.visible_message("A strange portal rips open underneath \the [holder]!")
@@ -34,4 +37,4 @@
/datum/spell/tear_veil/after_spell(var/list/targets)
qdel(targets[1])
- return
\ No newline at end of file
+ return
diff --git a/code/modules/spells/general/toggle_armor.dm b/code/modules/spells/general/toggle_armor.dm
index d6ef4f092e3..08afa8abffa 100644
--- a/code/modules/spells/general/toggle_armor.dm
+++ b/code/modules/spells/general/toggle_armor.dm
@@ -1,5 +1,4 @@
/datum/spell/toggle_armor
- name = "Toggle Armor"
spell_flags = 0
charge_max = 10
var/list/armor_pieces
diff --git a/code/modules/spells/general/veil_of_shadows.dm b/code/modules/spells/general/veil_of_shadows.dm
index aca7b477b09..57d18e7544d 100644
--- a/code/modules/spells/general/veil_of_shadows.dm
+++ b/code/modules/spells/general/veil_of_shadows.dm
@@ -11,6 +11,9 @@
hud_state = "wiz_statue"
+ spell_cost = 3
+ mana_cost = 20
+
/datum/spell/veil_of_shadows/choose_targets(mob/user = usr)
if(!timer_id && istype(holder, /mob/living/carbon/human))
perform(user, list(holder))
diff --git a/code/modules/spells/hand/blood_shards.dm b/code/modules/spells/hand/blood_shards.dm
index b6c259ec4a0..9822613a45f 100644
--- a/code/modules/spells/hand/blood_shards.dm
+++ b/code/modules/spells/hand/blood_shards.dm
@@ -13,6 +13,9 @@
hud_state = "wiz_bshard"
cast_sound = 'sound/magic/demon_attack1.ogg'
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/hand/charges/blood_shard/cast_hand(var/atom/A,var/mob/user)
var/obj/item/projectile/blood_shard/B = new(get_turf(user))
B.firer = user
diff --git a/code/modules/spells/hand/burning_grip.dm b/code/modules/spells/hand/burning_grip.dm
index ec4d3e2f9bf..a7be5059591 100644
--- a/code/modules/spells/hand/burning_grip.dm
+++ b/code/modules/spells/hand/burning_grip.dm
@@ -10,6 +10,9 @@
cast_sound = 'sound/magic/fireball.ogg'
compatible_targets = list(/mob/living/carbon/human)
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/hand/burning_grip/valid_target(var/mob/living/L, var/mob/user)
if(!..())
return 0
diff --git a/code/modules/spells/hand/entangle.dm b/code/modules/spells/hand/entangle.dm
index 53e04785238..5526f547f0b 100644
--- a/code/modules/spells/hand/entangle.dm
+++ b/code/modules/spells/hand/entangle.dm
@@ -18,6 +18,9 @@
show_message = " points towards the ground, causing plants to erupt"
var/datum/seed/seed
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/hand/charges/entangle/New()
..()
seed = new()
diff --git a/code/modules/spells/hand/slippery_surface.dm b/code/modules/spells/hand/slippery_surface.dm
index 40a00380242..e94d2c758b8 100644
--- a/code/modules/spells/hand/slippery_surface.dm
+++ b/code/modules/spells/hand/slippery_surface.dm
@@ -9,6 +9,9 @@
hud_state = "gen_ice"
cast_sound = 'sound/magic/summonitems_generic.ogg'
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/hand/slippery_surface/cast_hand(var/atom/a, var/mob/user)
for(var/turf/simulated/T in view(1,a))
T.wet_floor(50)
diff --git a/code/modules/spells/hand/sunwrath.dm b/code/modules/spells/hand/sunwrath.dm
index 9eea789dc2d..e9f7b55731f 100644
--- a/code/modules/spells/hand/sunwrath.dm
+++ b/code/modules/spells/hand/sunwrath.dm
@@ -12,6 +12,9 @@
hud_state = "wiz_immolate"
+ spell_cost = 5
+ mana_cost = 30
+
/datum/spell/hand/duration/sunwrath/cast_hand(var/atom/A, var/mob/user)
var/turf/T = get_turf(user)
var/list/turfs = getline(T,A) - T
@@ -29,4 +32,4 @@
/obj/effect/fake_fire/sunwrath/Process() //Override, so we burn mobs only
for(var/mob/living/L in loc)
- L.FireBurn(firelevel,last_temperature,pressure)
\ No newline at end of file
+ L.FireBurn(firelevel,last_temperature,pressure)
diff --git a/code/modules/spells/no_clothes.dm b/code/modules/spells/no_clothes.dm
index 9dce079cff0..f124ac46a3c 100644
--- a/code/modules/spells/no_clothes.dm
+++ b/code/modules/spells/no_clothes.dm
@@ -2,3 +2,5 @@
name = "No Clothes"
desc = "Learn the ancient art of not wearing fancy robes while casting spells."
spell_flags = NO_BUTTON
+ spell_cost = 5
+ categories = list(SPELL_CATEGORY_PASSIVE)
diff --git a/code/modules/spells/targeted/analyze.dm b/code/modules/spells/targeted/analyze.dm
index d6ef29ca25b..fc19e2f19ad 100644
--- a/code/modules/spells/targeted/analyze.dm
+++ b/code/modules/spells/targeted/analyze.dm
@@ -10,6 +10,9 @@
compatible_mobs = list(/mob/living/carbon/human)
hud_state = "analyze"
+ spell_cost = 1
+ mana_cost = 3
+
/datum/spell/targeted/analyze/cast(var/list/targets, var/mob/user)
for(var/a in targets)
var/mob/living/carbon/human/H = a
diff --git a/code/modules/spells/targeted/blood_boil.dm b/code/modules/spells/targeted/blood_boil.dm
index ea97aba6065..0a3c1178790 100644
--- a/code/modules/spells/targeted/blood_boil.dm
+++ b/code/modules/spells/targeted/blood_boil.dm
@@ -13,6 +13,9 @@
hud_state = "wiz_boilblood"
+ spell_cost = 2
+ mana_cost = 8
+
/datum/spell/targeted/blood_boil/cast(list/targets, mob/user)
for(var/mob/living/carbon/human/H in targets)
H.bodytemperature += 80
diff --git a/code/modules/spells/targeted/cleric_spells.dm b/code/modules/spells/targeted/cleric_spells.dm
index c2e568fa844..09c33bb587c 100644
--- a/code/modules/spells/targeted/cleric_spells.dm
+++ b/code/modules/spells/targeted/cleric_spells.dm
@@ -22,6 +22,10 @@
// Vars expect a constant at compile time, so we can't use macros for spans here
message = "You feel a pleasant rush of heat move through your body."
+ categories = list(SPELL_CATEGORY_HEALING)
+ spell_cost = 1
+ mana_cost = 3
+
/datum/spell/targeted/heal_target/empower_spell()
if(!..())
return 0
@@ -64,6 +68,9 @@
message = "Your body feels like a warm, cozy fire."
+ spell_cost = 2
+ mana_cost = 12
+
/datum/spell/targeted/heal_target/major/empower_spell()
if(!..())
return 0
@@ -98,6 +105,9 @@
amt_dam_brute = -25
amt_dam_fire = -25
+ spell_cost = 3
+ mana_cost = 25
+
/datum/spell/targeted/heal_target/area/empower_spell()
if(!..())
return 0
@@ -135,6 +145,9 @@
hud_state = "gen_dissolve"
cast_sound = 'sound/magic/disintegrate.ogg'
+ spell_cost = 3
+ mana_cost = 20
+
/datum/spell/targeted/heal_target/sacrifice/empower_spell()
if(!..())
return 0
@@ -162,6 +175,9 @@
hud_state = "trance"
var/obj/effect/effect
+ spell_cost = 3
+ mana_cost = 20
+
/datum/spell/targeted/heal_target/trance/cast(var/list/targets, var/mob/user)
for(var/t in targets)
var/mob/living/L = t
@@ -215,6 +231,10 @@
range = 1
hud_state = "heal_revoke"
+ categories = list(SPELL_CATEGORY_HEALING)
+ spell_cost = 3
+ mana_cost = 25
+
/datum/spell/targeted/revoke/cast(var/list/targets, var/mob/living/user)
if(alert(user, "Are you sure?", "Alert", "Yes", "No") == "Yes" && alert(user, "Are you ABSOLUTELY SURE?", "Alert", "Absolutely!", "No") == "Absolutely!")
var/should_wait = 1
@@ -249,4 +269,4 @@
continue
M.remove_spell(s)
for(var/a in M.auras)
- M.remove_aura(a)
\ No newline at end of file
+ M.remove_aura(a)
diff --git a/code/modules/spells/targeted/ethereal_jaunt.dm b/code/modules/spells/targeted/ethereal_jaunt.dm
index f0451f45498..4fcddae5d78 100644
--- a/code/modules/spells/targeted/ethereal_jaunt.dm
+++ b/code/modules/spells/targeted/ethereal_jaunt.dm
@@ -13,6 +13,9 @@
hud_state = "wiz_jaunt"
+ spell_cost = 2
+ mana_cost = 5
+
var/reappear_duration = 5
var/obj/effect/dummy/spell_jaunt/jaunt_holder
var/atom/movable/overlay/animation
diff --git a/code/modules/spells/targeted/exhude_pleasantness.dm b/code/modules/spells/targeted/exhude_pleasantness.dm
index 9ebc6077b64..8e8272cc965 100644
--- a/code/modules/spells/targeted/exhude_pleasantness.dm
+++ b/code/modules/spells/targeted/exhude_pleasantness.dm
@@ -8,6 +8,9 @@
var/list/possible_messages = list("seems pretty trustworthy!", "makes you feel appreciated.", "looks pretty cool.", "feels like the only decent person here!", "makes you feel safe.")
hud_state = "friendly"
+ spell_cost = 1
+ mana_cost = 1
+
/datum/spell/targeted/exhude_pleasantness/cast(var/list/targets, var/mob/user)
for(var/m in targets)
var/mob/living/L = m
diff --git a/code/modules/spells/targeted/glimpse_of_eternity.dm b/code/modules/spells/targeted/glimpse_of_eternity.dm
index 72449dad515..478465ad979 100644
--- a/code/modules/spells/targeted/glimpse_of_eternity.dm
+++ b/code/modules/spells/targeted/glimpse_of_eternity.dm
@@ -10,6 +10,9 @@
hud_state = "wiz_glimpse"
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/targeted/glimpse_of_eternity/cast(var/list/targets, var/mob/user)
for(var/t in targets)
var/mob/living/L = t
@@ -21,4 +24,4 @@
L.eye_blind += 2
L.adjustBruteLoss(-10)
L.adjustFireLoss(-10)
- new /obj/effect/temp_visual/temporary(get_turf(L), 5, 'icons/effects/effects.dmi', "green_sparkles")
\ No newline at end of file
+ new /obj/effect/temp_visual/temporary(get_turf(L), 5, 'icons/effects/effects.dmi', "green_sparkles")
diff --git a/code/modules/spells/targeted/harvest.dm b/code/modules/spells/targeted/harvest.dm
index 48a6cab1f8d..f20db899a04 100644
--- a/code/modules/spells/targeted/harvest.dm
+++ b/code/modules/spells/targeted/harvest.dm
@@ -33,4 +33,3 @@
to_chat(user, "You warp back to Nar-Sie[prey ? " along with your prey":""].")
else
to_chat(user, "...something's wrong!")//There shouldn't be an instance of Harvesters when Nar-Sie isn't in the world.
-
diff --git a/code/modules/spells/targeted/projectile/magic_missile.dm b/code/modules/spells/targeted/projectile/magic_missile.dm
index 0342699ed56..5fac96a0e69 100644
--- a/code/modules/spells/targeted/projectile/magic_missile.dm
+++ b/code/modules/spells/targeted/projectile/magic_missile.dm
@@ -22,6 +22,9 @@
amt_dam_fire = 10
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/targeted/projectile/magic_missile/prox_cast(var/list/targets, atom/spell_holder)
spell_holder.visible_message("\The [spell_holder] pops with a flash!")
playsound(src, 'sound/magic/mm_hit.ogg', 40)
diff --git a/code/modules/spells/targeted/projectile/projectile.dm b/code/modules/spells/targeted/projectile/projectile.dm
index 88c14664d96..5ffb6a4d8b0 100644
--- a/code/modules/spells/targeted/projectile/projectile.dm
+++ b/code/modules/spells/targeted/projectile/projectile.dm
@@ -6,8 +6,6 @@ If the spell_projectile is seeking, it will update its target every process and
*/
/datum/spell/targeted/projectile
- name = "projectile spell"
-
range = 7
var/proj_type = /obj/item/projectile/spell_projectile //use these. They are very nice
@@ -46,4 +44,4 @@ If the spell_projectile is seeking, it will update its target every process and
return targets
/datum/spell/targeted/projectile/proc/prox_cast(var/list/targets, var/atom/movable/spell_holder)
- return targets
\ No newline at end of file
+ return targets
diff --git a/code/modules/spells/targeted/projectile/stuncuff.dm b/code/modules/spells/targeted/projectile/stuncuff.dm
index 7164674e444..0e22e3f9c95 100644
--- a/code/modules/spells/targeted/projectile/stuncuff.dm
+++ b/code/modules/spells/targeted/projectile/stuncuff.dm
@@ -21,6 +21,9 @@
hud_state = "wiz_cuff"
cast_sound = 'sound/magic/wandodeath.ogg'
+ spell_cost = 3
+ mana_cost = 15
+
/datum/spell/targeted/projectile/dumbfire/stuncuff/prox_cast(var/list/targets, spell_holder)
for(var/mob/living/M in targets)
if(istype(M,/mob/living/carbon/human))
diff --git a/code/modules/spells/targeted/shapeshift.dm b/code/modules/spells/targeted/shapeshift.dm
index 9641de9e740..75511f3e6e4 100644
--- a/code/modules/spells/targeted/shapeshift.dm
+++ b/code/modules/spells/targeted/shapeshift.dm
@@ -1,7 +1,6 @@
//basic transformation spell. Should work for most simple_animals
/datum/spell/targeted/shapeshift
- name = "Shapeshift"
desc = "This spell transforms the target into something else for a short while."
@@ -113,6 +112,8 @@
hud_state = "wiz_poly"
+ spell_cost = 1
+ mana_cost = 3
/datum/spell/targeted/shapeshift/baleful_polymorph/empower_spell()
if(!..())
@@ -139,6 +140,9 @@
level_max = list(UPGRADE_TOTAL = 1, UPGRADE_SPEED = 1, UPGRADE_POWER = 0)
hud_state = "wiz_parrot"
+ spell_cost = 1
+ mana_cost = 3
+
/datum/spell/targeted/shapeshift/corrupt_form
name = "Corrupt Form"
desc = "This spell shapes the wizard into a terrible, terrible beast."
@@ -161,6 +165,9 @@
hud_state = "wiz_corrupt"
cast_sound = 'sound/magic/disintegrate.ogg'
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/targeted/shapeshift/corrupt_form/empower_spell()
if(!..())
return 0
@@ -191,4 +198,7 @@
charge_max = 2 MINUTES
toggle = 1
- hud_state = "wiz_carp"
\ No newline at end of file
+ hud_state = "wiz_carp"
+
+ spell_cost = 2
+ mana_cost = 5
diff --git a/code/modules/spells/targeted/shatter_mind.dm b/code/modules/spells/targeted/shatter_mind.dm
index 231a21be47c..ae486445573 100644
--- a/code/modules/spells/targeted/shatter_mind.dm
+++ b/code/modules/spells/targeted/shatter_mind.dm
@@ -1,6 +1,6 @@
/datum/spell/targeted/shatter
name = "Shatter Mind"
- desc = "this spell allows the caster to literally break an enemy's mind. Permanently."
+ desc = "this spell allows the caster to literally break an enemy's mind."
charge_max = 300
spell_flags = 0
invocation_type = INVOKE_NONE
@@ -13,6 +13,9 @@
hud_state = "wiz_statue"
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/targeted/shatter/cast(var/list/targets, var/mob/user)
var/mob/living/carbon/human/H = targets[1]
if(prob(50))
diff --git a/code/modules/spells/targeted/shift.dm b/code/modules/spells/targeted/shift.dm
index 7c24a4f34c1..b971aa3f7d4 100644
--- a/code/modules/spells/targeted/shift.dm
+++ b/code/modules/spells/targeted/shift.dm
@@ -10,6 +10,9 @@
hud_state = "const_shift"
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/targeted/ethereal_jaunt/shift/jaunt_disappear(var/atom/movable/overlay/animation, var/mob/living/target)
to_chat(target, SPAN_DANGER("You silently phase out.")) // no visible message - phase shift is silent
animation.icon_state = "phase_shift"
diff --git a/code/modules/spells/targeted/subjugate.dm b/code/modules/spells/targeted/subjugate.dm
index 85713a41195..498e45d5e57 100644
--- a/code/modules/spells/targeted/subjugate.dm
+++ b/code/modules/spells/targeted/subjugate.dm
@@ -20,6 +20,9 @@
hud_state = "wiz_subj"
+ spell_cost = 3
+ mana_cost = 25
+
/datum/spell/targeted/subjugation/empower_spell()
if(!..())
return 0
@@ -30,4 +33,4 @@
return "[src] will now effect everyone in the area."
else
max_targets++
- return "[src] will now effect [max_targets] people."
\ No newline at end of file
+ return "[src] will now effect [max_targets] people."
diff --git a/code/modules/spells/targeted/swap.dm b/code/modules/spells/targeted/swap.dm
index 7abe7171d46..a281d681a90 100644
--- a/code/modules/spells/targeted/swap.dm
+++ b/code/modules/spells/targeted/swap.dm
@@ -1,6 +1,6 @@
/datum/spell/targeted/swap
- name = "swap"
- desc = "This spell swaps the positions of the wizard and a target. Causes brain damage."
+ name = "Swap"
+ desc = "This spell swaps the positions of the wizard and a target."
charge_type = SPELL_HOLDVAR
holder_var_type = "brainloss"
@@ -20,6 +20,9 @@
cast_sound = 'sound/magic/mandswap.ogg'
+ spell_cost = 1
+ mana_cost = 5
+
/datum/spell/targeted/swap/cast(var/list/targets, mob/user)
for(var/mob/T in targets)
var/turf/aT = get_turf(T)
diff --git a/code/modules/spells/targeted/torment.dm b/code/modules/spells/targeted/torment.dm
index 44a020547d8..147ad35a4bf 100644
--- a/code/modules/spells/targeted/torment.dm
+++ b/code/modules/spells/targeted/torment.dm
@@ -18,6 +18,9 @@
hud_state = "wiz_horse"
cast_sound = 'sound/magic/cowhead_curse.ogg'
+ spell_cost = 2
+ mana_cost = 10
+
/datum/spell/targeted/torment/cast(var/list/targets, var/mob/user)
gibs(user.loc)
for(var/mob/living/carbon/human/H in targets)