Merge pull request #5071 from Citadel-Station-13/upstream-merge-34458

[MIRROR] Refactors and nerfs Fleshmend
This commit is contained in:
LetterJay
2018-01-24 20:44:30 -06:00
committed by GitHub
4 changed files with 45 additions and 52 deletions
+2
View File
@@ -28,6 +28,8 @@
#define STATUS_EFFECT_BLOODDRUNK /datum/status_effect/blooddrunk //Stun immunity and greatly reduced damage taken
#define STATUS_EFFECT_FLESHMEND /datum/status_effect/fleshmend //Very fast healing; suppressed by fire, and heals less fire damage
/////////////
// DEBUFFS //
/////////////
+24
View File
@@ -412,3 +412,27 @@
/datum/status_effect/sword_spin/on_remove()
owner.visible_message("<span class='warning'>[owner]'s inhuman strength dissipates and the sword's runes grow cold!</span>")
//Used by changelings to rapidly heal
//Heals 10 brute and oxygen damage every second, and 5 fire
//Being on fire will suppress this healing
/datum/status_effect/fleshmend
id = "fleshmend"
duration = 100
alert_type = /obj/screen/alert/status_effect/fleshmend
/datum/status_effect/fleshmend/tick()
if(owner.on_fire)
linked_alert.icon_state = "fleshmend_fire"
return
else
linked_alert.icon_state = "fleshmend"
owner.adjustBruteLoss(-10, FALSE)
owner.adjustFireLoss(-5, FALSE)
owner.adjustOxyLoss(-10)
/obj/screen/alert/status_effect/fleshmend
name = "Fleshmend"
desc = "Our wounds are rapidly healing. <i>This effect is prevented if we are on fire.</i>"
icon_state = "fleshmend"
@@ -1,52 +1,19 @@
/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."
helptext = "If we are on fire, the healing effect will not function. Does not regrow limbs or restore lost blood."
chemical_cost = 20
dna_cost = 2
req_stat = UNCONSCIOUS
//Starts healing you every second for 10 seconds.
//Can be used whilst unconscious.
/obj/effect/proc_holder/changeling/fleshmend/sting_action(mob/living/user)
if(user.has_status_effect(STATUS_EFFECT_FLESHMEND))
to_chat(user, "<span class='warning'>We are already fleshmending!</span>")
return
to_chat(user, "<span class='notice'>We begin to heal rapidly.</span>")
user.apply_status_effect(STATUS_EFFECT_FLESHMEND)
return TRUE
//Check buffs.dm for the fleshmend status effect code