capu/capu+ fake death for realsies, add fake death pills to syndis/maint

This commit is contained in:
datlo
2019-01-02 09:46:03 +00:00
parent de2e25e3b6
commit 244fcfc739
10 changed files with 74 additions and 14 deletions
@@ -315,7 +315,7 @@
/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(attacker_style && attacker_style.help_act(user, target))//adminfu only...
return TRUE
if(target.health >= config.health_threshold_crit)
if(target.health >= config.health_threshold_crit && !(target.status_flags & FAKEDEATH))
target.help_shake_act(user)
return TRUE
else
@@ -155,3 +155,32 @@
if(prob(5))
to_chat(M, "<span class='warning'>You would DIE for some [name] right now!</span>")
return update_flags
/datum/reagent/proc/fakedeath(mob/living/M)
if(M.status_flags & FAKEDEATH)
return
if(!(M.status_flags & CANPARALYSE))
return
if(M.mind && M.mind.changeling && M.mind.changeling.regenerating) //no messing with changeling's fake death
return
M.visible_message("<B>[M]</B> seizes up and falls limp, [M.p_their()] eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary.
M.status_flags |= FAKEDEATH
M.update_stat("fakedeath reagent")
M.med_hud_set_health()
M.med_hud_set_status()
/datum/reagent/proc/fakerevive(mob/living/M)
if(!(M.status_flags & FAKEDEATH))
return
if(M.mind && M.mind.changeling && M.mind.changeling.regenerating)
return
if(M.resting)
M.StopResting()
M.status_flags &= ~(FAKEDEATH)
M.update_stat("fakedeath reagent end")
M.med_hud_set_status()
M.med_hud_set_health()
if(M.healthdoll)
M.healthdoll.cached_healthdoll_overlays.Cut()
if(M.dna.species)
M.dna.species.handle_hud_icons(M)
@@ -1037,7 +1037,7 @@
/datum/reagent/capulettium
name = "Capulettium"
id = "capulettium"
description = "A rare drug that causes the user to appear dead for some time."
description = "A rare drug that causes the user to fall unconscious and appear dead as long as it's in the body."
reagent_state = LIQUID
color = "#60A584"
heart_rate_stop = 1
@@ -1046,23 +1046,21 @@
/datum/reagent/capulettium/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
switch(current_cycle)
if(1 to 5)
if(1 to 10)
update_flags |= M.AdjustEyeBlurry(10, FALSE)
if(6 to 10)
M.Drowsy(10)
if(11)
update_flags |= M.Paralyse(10, FALSE)
M.visible_message("<B>[M]</B> seizes up and falls limp, [M.p_their()] eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary.
if(12 to 60)
update_flags |= M.Paralyse(10, FALSE)
if(61 to INFINITY)
update_flags |= M.AdjustEyeBlurry(10, FALSE)
fakedeath(M)
return ..() | update_flags
/datum/reagent/capulettium/on_mob_delete(mob/living/M)
if(M.status_flags & FAKEDEATH)
fakerevive(M)
..()
/datum/reagent/capulettium_plus
name = "Capulettium Plus"
id = "capulettium_plus"
description = "A rare and expensive drug that causes the user to appear dead for some time while they retain consciousness and vision."
description = "A rare and expensive drug that will silence the user and let him appear dead as long as it's in the body. Rest to play dead, stand up to wake up."
reagent_state = LIQUID
color = "#60A584"
heart_rate_stop = 1
@@ -1070,8 +1068,17 @@
/datum/reagent/capulettium_plus/on_mob_life(mob/living/M)
M.Silence(2)
if((M.status_flags & FAKEDEATH) && !M.resting)
fakerevive(M)
else if(!(M.status_flags & FAKEDEATH) && M.resting)
fakedeath(M)
return ..()
/datum/reagent/capulettium_plus/on_mob_delete(mob/living/M)
if(M.status_flags & FAKEDEATH)
fakerevive(M)
..()
/datum/reagent/toxic_slurry
name = "Toxic Slurry"
id = "toxic_slurry"
@@ -63,6 +63,12 @@
icon_state = "pill21"
list_reagents = list("initropidril" = 50)
/obj/item/reagent_containers/food/pill/fakedeath
name = "fake death pill"
desc = "Swallow then rest to appear dead, stand up to wake up. Also mutes the user's voice."
icon_state = "pill4"
list_reagents = list("capulettium_plus" = 50)
/obj/item/reagent_containers/food/pill/adminordrazine
name = "Adminordrazine pill"
desc = "It's magic. We don't have to explain it."