Lichdom and apprentice contract improvements (#5285)

* Improves lichdom code a bit.

* Adds changelog

* Do the thing that burger asked for.

* Fixes extra book.
This commit is contained in:
Alberyk
2018-10-06 19:18:53 -03:00
committed by Werner
parent e3560362d8
commit cb90c11a8a
3 changed files with 52 additions and 30 deletions
+5 -1
View File
@@ -54,7 +54,11 @@
user << "<span class='notice'>With the signing of this paper you agree to become \the [contract_master]'s apprentice in the art of wizardry.</span>"
user.faction = "Space Wizard"
wizards.add_antagonist_mind(user.mind,1)
new /obj/item/weapon/spellbook/student(get_turf(user))
var/obj/item/I = new /obj/item/weapon/spellbook/student(get_turf(user))
user.put_in_hands(I)
new /obj/item/clothing/shoes/sandal(get_turf(user))
new /obj/item/clothing/suit/wizrobe(get_turf(user))
new /obj/item/clothing/head/wizard(get_turf(user))
return 1
return 0
@@ -140,18 +140,19 @@
max_targets = 1
level_max = list(Sp_TOTAL = 0, Sp_SPEED = 0, Sp_POWER = 0)
cast_sound = 'sound/magic/pope_entry.ogg'
hud_state = "wiz_lich"
/spell/targeted/lichdom/cast(mob/target,var/mob/living/carbon/human/user as mob)
..()
if(isundead(user))
user << "You have no soul or life to offer."
return 0
user.visible_message("<span class='cult'>\The [user]'s skin sloughs off bone, their blood boils and guts turn to dust!</span>")
gibs(user.loc)
playsound(src, 'sound/magic/pope_entry.ogg', 100, 1)
user.verbs += /mob/living/carbon/proc/dark_resurrection
user.add_spell(new /spell/targeted/dark_resurrection)
user.set_species("Skeleton")
user.unEquip(user.wear_suit)
user.unEquip(user.head)
@@ -161,46 +162,57 @@
var/obj/item/phylactery/G = new(get_turf(user))
G.lich = user
G.icon_state = "cursedheart-on"
user.remove_spell(src)
return 1
/mob/living/carbon/proc/dark_resurrection()
set category = "Abilities"
set name = "Dark Resurrection"
set desc = "Return to your phylactery and rebuild your body."
/spell/targeted/dark_resurrection
name = "Dark Resurrection"
desc = "This spell brings the user back to life, as long their soul is stored in a phylactery."
feedback = "DAR"
range = 0
school = "necromancy"
spell_flags = GHOSTCAST | INCLUDEUSER
charge_max = 600 //1 minute
max_targets = 1
var/mob/living/carbon/C = usr
if(C.stat != DEAD)
C << "<span class='notice'>You're not dead yet!</span>"
return
invocation = ""
invocation_type = SpI_NONE
hud_state = "wiz_lich"
/spell/targeted/dark_resurrection/cast(mob/target,var/mob/living/carbon/human/user as mob)
..()
if(user.stat != DEAD)
to_chat(user, "<span class='notice'>You're not dead yet!</span>")
return 0
var/obj/item/phylactery/P
for(var/thing in world_phylactery)
var/obj/item/phylactery/N = thing
if (!QDELETED(N) && N.lich == C)
if (!QDELETED(N) && N.lich == user)
P = N
if(P)
C.forceMove(get_turf(P))
C << "<span class='notice'>Your dead body returns to your phylactery, slowly rebuilding itself.</span>"
user.forceMove(get_turf(P))
to_chat(user, "<span class='notice'>Your dead body returns to your phylactery, slowly rebuilding itself.</span>")
if(prob(25))
var/area/A = get_area(P)
command_announcement.Announce("High levels of bluespace activity detected at \the [A]. Investigate it soon as possible.", "Bluespace Anomaly Report")
C.verbs -= /mob/living/carbon/proc/dark_resurrection
addtimer(CALLBACK(src, .proc/post_dark_resurrection), rand(400, 800))
addtimer(CALLBACK(src, .proc/post_dark_resurrection, user), rand(200, 400))
return 1
else
C << "<span class='danger'>Your phylactery was destroyed, your existence will face oblivion now.</span>"
C.visible_message("<span class='cult'>As [C]'s body turns to dust, a twisted wail can be heard!</span>")
playsound(C.loc, 'sound/hallucinations/wail.ogg', 50, 1)
C.dust()
return
to_chat(user, "<span class='danger'>Your phylactery was destroyed, your existence will face oblivion now.</span>")
user.visible_message("<span class='cult'>As [user]'s body turns to dust, a twisted wail can be heard!</span>")
playsound(get_turf(user), 'sound/hallucinations/wail.ogg', 50, 1)
user.dust()
return 0
/mob/living/carbon/proc/post_dark_resurrection()
src.revive()
src << "<span class='danger'>You have returned to life!</span>"
src.visible_message("<span class='cult'>[src] rises up from the dead!</span>")
playsound(src, 'sound/magic/pope_entry.ogg', 100, 1)
src.update_canmove()
src.verbs += /mob/living/carbon/proc/dark_resurrection
/spell/targeted/dark_resurrection/proc/post_dark_resurrection(var/mob/living/carbon/human/user as mob)
user.revive()
to_chat(user, "<span class='danger'>You have returned to life!</span>")
user.visible_message("<span class='cult'>[user] rises up from the dead!</span>")
playsound(get_turf(user), 'sound/magic/pope_entry.ogg', 100, 1)
user.update_canmove()
return 1