Update fleshmend.dm

This commit is contained in:
LetterJay
2018-01-24 15:40:05 -06:00
committed by GitHub
parent be9f8a2d06
commit 072056f919
@@ -1,57 +1,3 @@
<<<<<<< HEAD
/obj/effect/proc_holder/changeling/fleshmend
name = "Fleshmend"
desc = "Our flesh rapidly regenerates, healing our burns, bruises and shortness of breath. Effectiveness decreases with quick, repeated use."
helptext = "Heals a moderate amount of damage over a short period of time. Can be used while unconscious. Does not regrow limbs or restore lost blood."
chemical_cost = 20
dna_cost = 2
req_stat = UNCONSCIOUS
var/recent_uses = 1 //The factor of which the healing should be divided by
var/healing_ticks = 10
// The ideal total healing amount,
// divided by healing_ticks to get heal/tick
var/total_healing = 100
/obj/effect/proc_holder/changeling/fleshmend/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/effect/proc_holder/changeling/fleshmend/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/proc_holder/changeling/fleshmend/process()
if(recent_uses > 1)
recent_uses = max(1, recent_uses - (1 / healing_ticks))
//Starts healing you every second for 10 seconds.
//Can be used whilst unconscious.
/obj/effect/proc_holder/changeling/fleshmend/sting_action(mob/living/user)
to_chat(user, "<span class='notice'>We begin to heal rapidly.</span>")
if(recent_uses > 1)
to_chat(user, "<span class='warning'>Our healing's effectiveness is reduced \
by quick repeated use!</span>")
recent_uses++
INVOKE_ASYNC(src, .proc/fleshmend, user)
return TRUE
/obj/effect/proc_holder/changeling/fleshmend/proc/fleshmend(mob/living/user)
// The healing itself - doesn't heal toxin damage
// (that's anatomic panacea) and the effectiveness decreases with
// each use in a short timespan
for(var/i in 1 to healing_ticks)
if(user)
var/healpertick = -(total_healing / healing_ticks)
user.adjustBruteLoss(healpertick / recent_uses, 0)
user.adjustOxyLoss(healpertick / recent_uses, 0)
user.adjustFireLoss(healpertick / recent_uses, 0)
user.updatehealth()
else
break
sleep(10)
=======
/obj/effect/proc_holder/changeling/fleshmend
name = "Fleshmend"
desc = "Our flesh rapidly regenerates, healing our burns, bruises, and shortness of breath. Functions while unconscious."
@@ -71,4 +17,3 @@
return TRUE
//Check buffs.dm for the fleshmend status effect code
>>>>>>> c051740... Refactors and nerfs Fleshmend (#34458)