Crit Rework Final Submission

This commit is contained in:
Fox McCloud
2019-03-28 17:28:00 -04:00
parent 290e9135d0
commit d0ea5ee8b9
87 changed files with 797 additions and 480 deletions
+25 -2
View File
@@ -160,6 +160,7 @@
/obj/item/organ/internal/heart/cybernetic/upgraded/on_life()
if(!ishuman(owner))
return
if(!(status & ORGAN_DEAD) && !attempted_restart && !beating)
to_chat(owner, "<span class='warning'>Your [name] detects a cardiac event and attempts to return to its normal rhythm!</span>")
if(prob(20) && emagged)
@@ -180,6 +181,28 @@
addtimer(CALLBACK(src, .proc/recharge), 300)
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] fails to return to its normal rhythm!</span>"), 30)
if(!(status & ORGAN_DEAD) && !attempted_restart && owner.HasDisease(new /datum/disease/critical/heart_failure(0)))
to_chat(owner, "<span class='warning'>Your [name] detects a cardiac event and attempts to return to its normal rhythm!</span>")
if(prob(40) && emagged)
attempted_restart = TRUE
for(var/datum/disease/critical/heart_failure/HF in owner.viruses)
HF.cure()
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] returns to its normal rhythm!</span>"), 30)
addtimer(CALLBACK(src, .proc/recharge), 200)
else if(prob(25))
attempted_restart = TRUE
for(var/datum/disease/critical/heart_failure/HF in owner.viruses)
HF.cure()
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] returns to its normal rhythm!</span>"), 30)
addtimer(CALLBACK(src, .proc/recharge), 200)
else
attempted_restart = TRUE
if(emagged)
addtimer(CALLBACK(src, .proc/recharge), 200)
else
addtimer(CALLBACK(src, .proc/recharge), 300)
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] fails to return to its normal rhythm!</span>"), 30)
if(!(status & ORGAN_DEAD))
var/boost = emagged ? 2 : 1
owner.AdjustDrowsy(-4 * boost)
@@ -230,7 +253,7 @@
owner.adjustFireLoss(numHigh)
if(prob(numMid))
to_chat(owner, "<span class='warning'>Your [name] lurches awkwardly!</span>")
Stop()
owner.ForceContractDisease(new /datum/disease/critical/heart_failure(0))
if(prob(numMid))
to_chat(owner, "<span class='danger'>Your [name] stops beating!</span>")
Stop()
@@ -246,4 +269,4 @@
owner.adjustFireLoss(numMid)
if(prob(numLow))
to_chat(owner, "<span class='warning'>Your [name] lurches awkwardly!</span>")
Stop()
owner.ForceContractDisease(new /datum/disease/critical/heart_failure(0))