Files
kiwistation/code/game/gamemodes/changeling/powers/fleshmend.dm
T
phil235 7e1efca13a Created two new procs to handle reviving mobs more easily:
- can_be_revived(), used so we don't revive a mob who would immediately die again (lack of brain organ for carbons).
- fully_heal(), called by revive when we want to completely heal a mob before trying to ressuscitate it.

I gave some arguments to revive() so the proc can be used by more than just the admin healing code (ai revived by the AI fixer console, drone revived by another drone clicking it, strange reagent ressuscitating you, borg revived by restart circuitboard, changeling using his revive ability, etc)

This fixes borg revival not updating its vision correctly and not updating the diagnostic HUD. Same fix for changeling revival.
2016-02-16 23:27:08 +01:00

44 lines
1.6 KiB
Plaintext

/obj/effect/proc_holder/changeling/fleshmend
name = "Fleshmend"
desc = "Our flesh rapidly regenerates, healing our wounds. Effectiveness decreases with quick, repeated use."
helptext = "Heals a moderate amount of damage over a short period of time. Can be used while unconscious, and will alert nearby crew."
chemical_cost = 25
dna_cost = 2
req_stat = UNCONSCIOUS
var/recent_uses = 1 //The factor of which the healing should be divided by
/obj/effect/proc_holder/changeling/fleshmend/New()
..()
SSobj.processing.Add(src)
/obj/effect/proc_holder/changeling/fleshmend/Destroy()
SSobj.processing.Remove(src)
..()
/obj/effect/proc_holder/changeling/fleshmend/process()
if(recent_uses > 1)
recent_uses--
//Starts healing you every second for 10 seconds. Can be used whilst unconscious.
/obj/effect/proc_holder/changeling/fleshmend/sting_action(mob/living/user)
user << "<span class='notice'>We begin to heal rapidly.</span>"
if(recent_uses > 1)
user << "<span class='warning'>Our healing's effectiveness is reduced by quickly repeated use!</span>"
spawn(0)
recent_uses++
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.restore_blood()
H.remove_all_embedded_objects()
for(var/i = 0, i < 10, i++) //The healing itself - doesn't heal toxin damage (that's anatomic panacea) and effectiveness decreases with each use in a short timespan
if(user)
user.adjustBruteLoss(-10 / recent_uses, 0)
user.adjustOxyLoss(-10 / recent_uses, 0)
user.adjustFireLoss(-10 / recent_uses, 0)
user.updatehealth()
sleep(10)
feedback_add_details("changeling_powers","RR")
return 1