Files
Bubberstation/code/datums/diseases/heart_failure.dm
SkyratBot 0a1f06a2d1 [MIRROR] This tail refactor turned into an organ refactor. Funny how that works. [MDB IGNORE] (#14017)
* This tail refactor turned into an organ refactor. Funny how that works.

* Firstly, fixing all the conflicts.

* Fixes all our maps (hopefully)

* Actually, this should fix pod people hair :)

* Almost everything is working, just two major things to fix

* Fixed a certain kind of external organ

* Cleaning up some more stuff

* Turned tail_cat into tail because why the fuck are they separate?

* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file

* Adds relevant_layers to organs to help with rendering

* Makes stored_feature_id also check mutant_bodyparts

* Fixes the icon_state names of ALL the tails (pain)

* Fixes wagging, gotta refactor most mutant bodyparts later on

* I Love Added Failures

* Fixed some organs that slipped through my searches

* This could possibly fix the CI for this?

* It doesn't look like it did fix it

* This will make it pass, even if it's ugly as sin.

* Fixed Felinids having a weird ghost tail

* Fixes instances of snouts and tails not being properly colored

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-06-11 23:20:16 -04:00

70 lines
3.0 KiB
Plaintext

/datum/disease/heart_failure
form = "Condition"
name = "Myocardial Infarction"
max_stages = 5
stage_prob = 1
cure_text = "Heart replacement surgery to cure. Defibrillation (or as a last resort, uncontrolled electric shocking) may also be effective after the onset of cardiac arrest. Penthrite can also mitigate cardiac arrest."
agent = "Shitty Heart"
viable_mobtypes = list(/mob/living/carbon/human)
spreading_modifier = 1
desc = "If left untreated the subject will die!"
severity = "Dangerous!"
disease_flags = CAN_CARRY|CAN_RESIST
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
visibility_flags = HIDDEN_PANDEMIC
required_organs = list(/obj/item/organ/internal/heart)
bypasses_immunity = TRUE // Immunity is based on not having an appendix; this isn't a virus
var/sound = FALSE
/datum/disease/heart_failure/Copy()
var/datum/disease/heart_failure/D = ..()
D.sound = sound
return D
/datum/disease/heart_failure/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
if(!affected_mob.can_heartattack())
cure()
return FALSE
switch(stage)
if(1 to 2)
if(DT_PROB(1, delta_time))
to_chat(affected_mob, span_warning("You feel [pick("discomfort", "pressure", "a burning sensation", "pain")] in your chest."))
if(DT_PROB(1, delta_time))
to_chat(affected_mob, span_warning("You feel dizzy."))
affected_mob.adjust_timed_status_effect(6 SECONDS, /datum/status_effect/confusion)
if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, span_warning("You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")]."))
if(3 to 4)
if(!sound)
affected_mob.playsound_local(affected_mob, 'sound/health/slowbeat.ogg', 40, FALSE, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
sound = TRUE
if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, span_danger("You feel a sharp pain in your chest!"))
if(prob(25))
affected_mob.vomit(95)
affected_mob.emote("cough")
affected_mob.Paralyze(40)
affected_mob.losebreath += 4
if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, span_danger("You feel very weak and dizzy..."))
affected_mob.adjust_timed_status_effect(8 SECONDS, /datum/status_effect/confusion)
affected_mob.adjustStaminaLoss(40, FALSE)
affected_mob.emote("cough")
if(5)
affected_mob.stop_sound_channel(CHANNEL_HEARTBEAT)
affected_mob.playsound_local(affected_mob, 'sound/effects/singlebeat.ogg', 100, FALSE, use_reverb = FALSE)
if(affected_mob.stat == CONSCIOUS)
affected_mob.visible_message(span_danger("[affected_mob] clutches at [affected_mob.p_their()] chest as if [affected_mob.p_their()] heart is stopping!"), \
span_userdanger("You feel a terrible pain in your chest, as if your heart has stopped!"))
affected_mob.adjustStaminaLoss(60, FALSE)
affected_mob.set_heartattack(TRUE)
affected_mob.reagents.add_reagent(/datum/reagent/medicine/c2/penthrite, 3) // To give the victim a final chance to shock their heart before losing consciousness
cure()
return FALSE