Adds in Lichdom Spell
@@ -0,0 +1,129 @@
|
||||
/obj/effect/proc_holder/spell/targeted/lichdom
|
||||
name = "Bind Soul"
|
||||
desc = "A dark necromantic pact that can forever bind your soul to an item of your choosing. So long as both your body and the item remain intact and on the same plane you can revive from death, though the time between reincarnations grows steadily with use."
|
||||
school = "necromancy"
|
||||
charge_max = 10
|
||||
clothes_req = 0
|
||||
centcom_cancast = 0
|
||||
invocation = "NECREM IMORTIUM!"
|
||||
invocation_type = "shout"
|
||||
range = -1
|
||||
level_max = 0 //cannot be improved
|
||||
cooldown_min = 10
|
||||
include_user = 1
|
||||
|
||||
var/obj/marked_item
|
||||
var/mob/living/current_body
|
||||
var/resurrections = 0
|
||||
var/existence_stops_round_end = 0
|
||||
|
||||
action_icon_state = "skeleton"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lichdom/New()
|
||||
if(!config.continous_rounds)
|
||||
existence_stops_round_end = 1
|
||||
config.continous_rounds = 1
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lichdom/Destroy()
|
||||
for(var/datum/mind/M in ticker.mode.wizards) //Make sure no other bones are about
|
||||
for(var/obj/effect/proc_holder/spell/S in M.spell_list)
|
||||
if(istype(S,/obj/effect/proc_holder/spell/targeted/lichdom) && S != src)
|
||||
return ..()
|
||||
if(existence_stops_round_end)
|
||||
config.continous_rounds = 0
|
||||
return ..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets,mob/user = usr)
|
||||
for(var/mob/M in targets)
|
||||
var/list/hand_items = list()
|
||||
if(iscarbon(M))
|
||||
hand_items = list(M.get_active_hand(),M.get_inactive_hand())
|
||||
|
||||
if(marked_item && !stat_allowed) //sanity, shouldn't happen without badminry
|
||||
marked_item = null
|
||||
return
|
||||
|
||||
if(stat_allowed) //Death is not my end!
|
||||
if(M.stat == CONSCIOUS && iscarbon(M))
|
||||
M << "<span class='notice'>You aren't dead enough to revive!</span>" //Usually a good problem to have
|
||||
charge_counter = charge_max
|
||||
return
|
||||
|
||||
if(!marked_item || qdeleted(marked_item)) //Wait nevermind
|
||||
M << "<span class='warning'>Your phylactery is gone!</span>"
|
||||
return
|
||||
|
||||
var/turf/user_turf = get_turf(M)
|
||||
var/turf/item_turf = get_turf(marked_item)
|
||||
|
||||
if(user_turf.z != item_turf.z)
|
||||
M << "<span class='warning'>Your phylactery is out of range!</span>"
|
||||
return
|
||||
|
||||
if(isobserver(M))
|
||||
var/mob/dead/observer/O = M
|
||||
O.reenter_corpse()
|
||||
|
||||
var/mob/living/carbon/human/lich = new /mob/living/carbon/human(item_turf)
|
||||
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(lich), slot_shoes)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(lich), slot_w_uniform)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(lich), slot_wear_suit)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(lich), slot_head)
|
||||
|
||||
lich.real_name = M.mind.name
|
||||
M.mind.transfer_to(lich)
|
||||
lich.set_species("Skeleton")
|
||||
lich << "<span class='warning'>Your bones clatter and shutter as they're pulled back into this world!</span>"
|
||||
charge_max += 600
|
||||
var/mob/old_body = current_body
|
||||
var/turf/body_turf = get_turf(old_body)
|
||||
current_body = lich
|
||||
lich.Weaken(10+10*resurrections)
|
||||
++resurrections
|
||||
if(old_body && old_body.loc)
|
||||
if(iscarbon(old_body))
|
||||
var/mob/living/carbon/C = old_body
|
||||
for(var/obj/item/W in C)
|
||||
C.unEquip(W)
|
||||
var/wheres_wizdo = dir2text(get_dir(body_turf, item_turf))
|
||||
if(wheres_wizdo)
|
||||
old_body.visible_message("<span class='warning'>Suddenly [old_body.name]'s corpse falls to pieces! You see a strange energy rise from the remains, and speed off towards the [wheres_wizdo]!</span>")
|
||||
body_turf.Beam(item_turf,icon_state="lichbeam",icon='icons/effects/effects.dmi',time=10+10*resurrections,maxdistance=INFINITY)
|
||||
old_body.dust()
|
||||
|
||||
if(!marked_item) //linking item to the spell
|
||||
message = "<span class='warning'>"
|
||||
for(var/obj/item in hand_items)
|
||||
if(ABSTRACT in item.flags || NODROP in item.flags)
|
||||
continue
|
||||
marked_item = item
|
||||
M << "<span class='warning'>You begin to focus your very being into the [item.name]...</span>"
|
||||
break
|
||||
|
||||
if(!marked_item)
|
||||
M << "<span class='caution'>You must hold an item you wish to make your phylactery...</span>"
|
||||
|
||||
spawn(50)
|
||||
if(marked_item.loc != M) //I changed my mind I don't want to put my soul in a cheeseburger!
|
||||
M << "<span class='warning'>Your soul snaps back to your body as you drop the [marked_item.name]!</span>"
|
||||
marked_item = null
|
||||
return
|
||||
name = "RISE!"
|
||||
desc = "Rise from the dead! You will reform at the location of your phylactery and your old body will crumble away."
|
||||
charge_max = 1800 //3 minute cooldown, if you rise in sight of someone and killed again, you're probably screwed.
|
||||
charge_counter = 1800
|
||||
stat_allowed = 1
|
||||
marked_item.name = "Ensouled [marked_item.name]"
|
||||
marked_item.desc = "A terrible aura surrounds this item, its very existence is offensive to life itself..."
|
||||
marked_item.color = "#003300"
|
||||
M << "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>"
|
||||
current_body = M.mind.current
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.set_species("Skeleton")
|
||||
H.unEquip(H.wear_suit)
|
||||
H.unEquip(H.head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), slot_head)
|
||||
@@ -7,7 +7,7 @@
|
||||
invocation = "GAR YOK"
|
||||
invocation_type = "whisper"
|
||||
range = -1
|
||||
level_max = 1 //cannot be improved
|
||||
level_max = 0 //cannot be improved
|
||||
cooldown_min = 100
|
||||
include_user = 1
|
||||
|
||||
|
||||
@@ -201,6 +201,12 @@
|
||||
log_name = "IS"
|
||||
category = "Utility Spells"
|
||||
|
||||
/datum/spellbook_entry/lichdom
|
||||
name = "Bind Soul"
|
||||
spell_type = /obj/effect/proc_holder/spell/targeted/lichdom
|
||||
log_name = "LD"
|
||||
category = "Utility Spells"
|
||||
|
||||
/datum/spellbook_entry/lightningbolt
|
||||
name = "Lightning Bolt"
|
||||
spell_type = /obj/effect/proc_holder/spell/targeted/lightning
|
||||
|
||||
@@ -292,10 +292,12 @@
|
||||
//OTHER PROCS
|
||||
|
||||
//To batch-remove wizard spells. Linked to mind.dm.
|
||||
/mob/proc/spellremove(var/mob/M as mob, var/removeallspells=1)
|
||||
for(var/obj/effect/proc_holder/spell/spell_to_remove in src.spell_list)
|
||||
if (spell_to_remove.name == "Artificer" && !removeallspells) continue
|
||||
/mob/proc/spellremove(mob/M)
|
||||
if(!mind)
|
||||
return
|
||||
for(var/obj/effect/proc_holder/spell/spell_to_remove in src.mind.spell_list)
|
||||
qdel(spell_to_remove)
|
||||
mind.spell_list -= spell_to_remove
|
||||
|
||||
/datum/mind/proc/remove_spell(var/obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind
|
||||
if(!spell) return
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
desc = "Strange-looking, red, hat-wear that most certainly belongs to a real magic user."
|
||||
icon_state = "redwizard"
|
||||
|
||||
/obj/item/clothing/head/wizard/black
|
||||
name = "black wizard hat"
|
||||
desc = "Strange-looking black hat-wear that most certainly belongs to a real skeleton. Spooky."
|
||||
icon_state = "blackwizard"
|
||||
|
||||
|
||||
/obj/item/clothing/head/wizard/clown
|
||||
name = "purple wizard hat"
|
||||
desc = "Strange-looking purple hat-wear that most certainly belongs to a real magic user."
|
||||
@@ -66,6 +72,12 @@
|
||||
icon_state = "redwizard"
|
||||
item_state = "redwizrobe"
|
||||
|
||||
/obj/item/clothing/suit/wizrobe/black
|
||||
name = "black wizard robe"
|
||||
desc = "An unnerving black gem-lined robe that reeks of death and decay."
|
||||
icon_state = "blackwizard"
|
||||
item_state = "blackwizrobe"
|
||||
|
||||
/obj/item/clothing/suit/wizrobe/clown
|
||||
name = "Clown Robe"
|
||||
desc = "A set of armoured robes that seem to radiate a dark power. That, and bad fashion decisions."
|
||||
|
||||
@@ -26,6 +26,7 @@ mob/living
|
||||
qdel(guts)
|
||||
for(var/atom/movable/food in stomach_contents)
|
||||
qdel(food)
|
||||
remove_from_all_data_huds()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/blob_act()
|
||||
|
||||
|
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 313 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 443 KiB After Width: | Height: | Size: 445 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 150 KiB |
@@ -217,6 +217,7 @@
|
||||
#include "code\datums\spells\horsemask.dm"
|
||||
#include "code\datums\spells\inflict_handler.dm"
|
||||
#include "code\datums\spells\knock.dm"
|
||||
#include "code\datums\spells\lichdom.dm"
|
||||
#include "code\datums\spells\lightning.dm"
|
||||
#include "code\datums\spells\magnet.dm"
|
||||
#include "code\datums\spells\mind_transfer.dm"
|
||||
|
||||