Changes to changeling revive and regeneration

This commit is contained in:
Jack Edge
2016-07-08 08:25:14 +01:00
parent b3196bb298
commit ec1efeb52f
5 changed files with 27 additions and 12 deletions
@@ -15,7 +15,8 @@
var/req_stat = CONSCIOUS // CONSCIOUS, UNCONSCIOUS or DEAD
var/genetic_damage = 0 // genetic damage caused by using the sting. Nothing to do with cloneloss.
var/max_genetic_damage = 100 // hard counter for spamming abilities. Not used/balanced much yet.
var/always_keep = 0 // important for abilities like regenerate that screw you if you lose them.
var/always_keep = 0 // important for abilities like revive that screw you if you lose them.
var/ignores_fakedeath = FALSE // usable with the FAKEDEATH flag
/obj/effect/proc_holder/changeling/proc/on_purchase(mob/user)
@@ -56,16 +57,16 @@
user << "<span class='warning'>We cannot do that in this form!</span>"
return 0
var/datum/changeling/c = user.mind.changeling
if(c.chem_charges<chemical_cost)
if(c.chem_charges < chemical_cost)
user << "<span class='warning'>We require at least [chemical_cost] unit\s of chemicals to do that!</span>"
return 0
if(c.absorbedcount<req_dna)
if(c.absorbedcount < req_dna)
user << "<span class='warning'>We require at least [req_dna] sample\s of compatible DNA.</span>"
return 0
if(req_stat < user.stat)
user << "<span class='warning'>We are incapacitated.</span>"
return 0
if((user.status_flags & FAKEDEATH) && name != "Regenerate")
if((user.status_flags & FAKEDEATH) && (!ignores_fakedeath))
user << "<span class='warning'>We are incapacitated.</span>"
return 0
if(c.geneticdamage > max_genetic_damage)
@@ -1,5 +1,5 @@
/obj/effect/proc_holder/changeling/fakedeath
name = "Regenerative Stasis"
name = "Reviving Stasis"
desc = "We fall into a stasis, allowing us to regenerate and trick our enemies."
chemical_cost = 15
dna_cost = 0
@@ -25,12 +25,12 @@
/obj/effect/proc_holder/changeling/fakedeath/proc/ready_to_regenerate(mob/user)
if(user && user.mind && user.mind.changeling && user.mind.changeling.purchasedpowers)
user << "<span class='notice'>We are ready to regenerate.</span>"
user << "<span class='notice'>We are ready to revive.</span>"
user.mind.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/revive(null)
/obj/effect/proc_holder/changeling/fakedeath/can_sting(mob/user)
if(user.status_flags & FAKEDEATH)
user << "<span class='warning'>We are already regenerating.</span>"
user << "<span class='warning'>We are already reviving.</span>"
return
if(!user.stat) //Confirmation for living changelings if they want to fake their death
switch(alert("Are we sure we wish to fake our own death?",,"Yes", "No"))
@@ -5,8 +5,8 @@
blood volume."
helptext = "Will alert nearby crew if any external limbs are \
regenerated. Can be used while unconscious."
chemical_cost = 20
dna_cost = 1
chemical_cost = 10
dna_cost = 0
req_stat = UNCONSCIOUS
/obj/effect/proc_holder/changeling/regenerate/sting_action(mob/living/user)
@@ -1,16 +1,28 @@
/obj/effect/proc_holder/changeling/revive
name = "Revive"
desc = "We regenerate, healing all damage from our form."
helptext = "Does not regrow lost organs or limbs."
helptext = "Does not regrow lost organs or a missing head."
req_stat = DEAD
always_keep = 1
always_keep = TRUE
ignores_fakedeath = TRUE
//Revive from revival stasis
/obj/effect/proc_holder/changeling/revive/sting_action(mob/living/carbon/user)
user.status_flags &= ~(FAKEDEATH)
user.tod = null
user.revive(full_heal = 1)
// Does not restore limbs,
var/list/missing = user.get_missing_limbs()
missing -= "head" // headless changelings are funny
if(missing.len)
playsound(user, 'sound/magic/Demon_consume.ogg', 50, 1)
user.visible_message("<span class='warning'>[user]'s missing limbs \
reform, making a loud, grotesque sound!</span>",
"<span class='userdanger'>Your limbs regrow, making a \
loud, crunchy sound and giving you great pain!</span>",
"<span class='italics'>You hear organic matter ripping \
and tearing!</span>")
user.emote("scream")
user.regenerate_limbs(0, list("head"))
user << "<span class='notice'>We have revived ourselves.</span>"
user.mind.changeling.purchasedpowers -= src
feedback_add_details("changeling_powers","CR")
@@ -78,6 +78,8 @@
/obj/item/bodypart/throw_impact(atom/hit_atom)
..()
playsound(get_turf(src), 'sound/misc/splort.ogg', 50, 1, -1)
pixel_x = rand(-3, 3)
pixel_y = rand(-3, 3)
/obj/item/bodypart/proc/drop_organs(mob/user)
var/turf/T = get_turf(src)