Damage Menu - Seizure and Heart Attacks (#22825)

changes:
  - rscadd: "Adds Seizure and Heart Attack buttons to the Damage Menu."
  - rscadd: "Adds tooltips to several buttons in the Damage Menu."
<img width="668" height="772" alt="Screenshot 2026-07-12 115649"
src="https://github.com/user-attachments/assets/7809096c-3f15-43b2-b741-21e54ff47e3d"
/>
This commit is contained in:
Batrachophreno
2026-07-18 00:13:15 +00:00
committed by GitHub
parent 126c188758
commit 6289d82ada
4 changed files with 52 additions and 1 deletions
@@ -144,6 +144,13 @@
if("misc")
log_and_message_admins("used the Damage Menu to deploy [params["action"]] on [H]", usr, get_turf(H))
switch(params["action"])
// Minor actions()
if("seizure")
H.seizure()
if("heart attack")
if(!H.trigger_heart_attack())
to_chat(usr, SPAN_WARNING("Unable to trigger a heart attack on [H]."))
// Major actions
if("wind")
toggle_wind_paralysis(H, usr)
if("gigashatter")
@@ -1353,6 +1353,26 @@
if(shock_stage >= 150)
Weaken(20)
/mob/living/carbon/human/proc/trigger_heart_attack()
if(status_flags & GODMODE)
return FALSE
if(stat == DEAD || !should_have_organ(BP_HEART))
return FALSE
var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART]
if(!istype(heart) || BP_IS_ROBOTIC(heart) || (heart.status & ORGAN_DEAD))
return FALSE
shock_stage = max(shock_stage, 120)
heart.pulse = PULSE_NONE
heart.handle_pulse()
BITSET(hud_updateflag, HEALTH_HUD)
to_chat(src, SPAN_DANGER("Your heart has stopped!"))
visible_message("<b>[src]</b> suddenly collapses, clutching at [get_pronoun("his")] chest!")
Paralyse(15)
return TRUE
/*
Called by life(), instead of having the individual hud items update icons each tick and check for status changes