Files
Polaris/code/game/gamemodes/technomancer/spells/resurrect.dm
Neerti 0d140349b3 Technomancer Bug Fixes & Tweaks
Cores can now be locked and unlocked by a verb.  Locked cores cannot be removed by anyone.  Cores automatically unlock if the wearer dies or otherwise stops existing for some reason.
Healing spells now induce a flat instability cost on the healer instead of it being split between healer and healed.  The amount healed is greatly increased if used on someone besides the healer.
Mend Organs is now called Great Mend Wounds, and now heals broken bones, IB, eye damage, and blood loss in addition to internal organs.
Radiating instability (the purple glow) now gives a warning to people afflicted.
Instability discounts should start applying correctly for specific cores.
Instability now affects all living mobs and not just humans.  This includes borgs and simple animals.
Phase shift now adds ongoing instability while hiding inside the rift.
Projectile spells should be logged now.
Wards last forever, and should not die in vacuum now.
Restoration aura is now green colored and not blue.
Simple mobs and cyborgs are now harmed by lightning.
2016-10-04 21:09:15 -04:00

63 lines
2.6 KiB
Plaintext

/datum/technomancer/spell/resurrect
name = "Resurrect"
desc = "This function injects various regenetive medical compounds and nanomachines, in an effort to restart the body, \
however this must be done soon after they die, as this will have no effect on people who have died long ago. It also doesn't \
resolve whatever caused them to die originally."
cost = 100
obj_path = /obj/item/weapon/spell/resurrect
ability_icon_state = "tech_resurrect"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/resurrect
name = "resurrect"
icon_state = "radiance"
desc = "Perhaps this can save a trip to cloning?"
cast_methods = CAST_MELEE
aspect = ASPECT_BIOMED
/obj/item/weapon/spell/resurrect/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(L == user)
user << "<span class='warning'>Clever as you may seem, this won't work on yourself while alive.</span>"
return 0
if(L.stat != DEAD)
user << "<span class='warning'>\The [L] isn't dead!</span>"
return 0
if(pay_energy(5000))
if(L.tod > world.time + 10 MINUTES)
user << "<span class='danger'>\The [L]'s been dead for too long, even this function cannot replace cloning at \
this point.</span>"
return 0
user << "<span class='notice'>You stab \the [L] with a hidden integrated hypo, attempting to bring them back...</span>"
if(istype(L, /mob/living/simple_animal))
var/mob/living/simple_animal/SM = L
SM.health = SM.maxHealth / 3
SM.stat = CONSCIOUS
dead_mob_list -= SM
living_mob_list += SM
SM.icon_state = SM.icon_living
adjust_instability(30)
else if(ishuman(L))
var/mob/living/carbon/human/H = L
if(!H.client && H.mind) //Don't force the dead person to come back if they don't want to.
for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind == H.mind)
ghost << "<b><font color = #330033><font size = 3>The Technomancer [user.real_name] is trying to \
revive you. Return to your body if you want to be resurrected!</b> \
(Verbs -> Ghost -> Re-enter corpse)</font></font>"
break
sleep(10 SECONDS)
if(H.client)
L.stat = CONSCIOUS //Note that if whatever killed them in the first place wasn't fixed, they're likely to die again.
dead_mob_list -= H
living_mob_list += H
H.timeofdeath = null
visible_message("<span class='danger'>\The [H]'s eyes open!</span>")
user << "<span class='notice'>It's alive!</span>"
adjust_instability(100)
else
user << "<span class='warning'>The body of \the [H] doesn't seem to respond, perhaps you could try again?</span>"
adjust_instability(10)