diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index f768b6238fb..2703bfb76dc 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -137,6 +137,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_UNHUSKABLE "trait_unhuskable" /// Reduces the chance viruses will spread to this mob, and if the mob has a virus, slows its advancement #define TRAIT_VIRUS_RESISTANCE "virus_resistance" +/// Causes viruses, infected burns, and parasites to spread more effectively and faster, like an inverse of the above. +#define TRAIT_IMMUNODEFICIENCY "immunodeficiency" #define TRAIT_GENELESS "geneless" #define TRAIT_PIERCEIMMUNE "pierce_immunity" #define TRAIT_NODISMEMBER "dismember_immunity" diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index 335a9ee18f3..67d00ff3ac4 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -338,6 +338,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_IGNORING_GRAVITY" = TRAIT_IGNORING_GRAVITY, "TRAIT_ILLITERATE" = TRAIT_ILLITERATE, "TRAIT_IMMOBILIZED" = TRAIT_IMMOBILIZED, + "TRAIT_IMMUNODEFICIENCY" = TRAIT_IMMUNODEFICIENCY, "TRAIT_INCAPACITATED" = TRAIT_INCAPACITATED, "TRAIT_INTROVERT" = TRAIT_INTROVERT, "TRAIT_INVISIBLE_MAN" = TRAIT_INVISIBLE_MAN, diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 23a2db65d23..c3ca21c3fee 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -68,7 +68,7 @@ if(ishuman(src)) var/mob/living/carbon/human/infecting_human = src - if(HAS_TRAIT(infecting_human, TRAIT_VIRUS_RESISTANCE) && prob(75)) + if(HAS_TRAIT(infecting_human, TRAIT_VIRUS_RESISTANCE) && !HAS_TRAIT(infecting_human, TRAIT_IMMUNODEFICIENCY) && prob(75)) return switch(target_zone) @@ -190,7 +190,7 @@ if(losebreath >= 1) return FALSE // Spaceacillin for infection resistance - if(HAS_TRAIT(src, TRAIT_VIRUS_RESISTANCE) && prob(75)) + if(HAS_TRAIT(src, TRAIT_VIRUS_RESISTANCE) && !HAS_TRAIT(src, TRAIT_IMMUNODEFICIENCY) && prob(75)) return FALSE // Bio check for head AND mask // Meaning if we're masked up and wearing a dome, we are very likely never getting sick diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index c34f4ff13c7..1d70be73fc6 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -119,6 +119,7 @@ var/slowdown = HAS_TRAIT(affected_mob, TRAIT_VIRUS_RESISTANCE) ? 0.5 : 1 // spaceacillin slows stage speed by 50% var/recovery_prob = 0 var/cure_mod + var/bad_immune = HAS_TRAIT(affected_mob, TRAIT_IMMUNODEFICIENCY) ? 2 : 1 if(required_organ) if(!has_required_infectious_organ(affected_mob, required_organ)) @@ -126,7 +127,7 @@ return FALSE if(has_cure()) - cure_mod = cure_chance + cure_mod = cure_chance / bad_immune if(istype(src, /datum/disease/advance)) cure_mod = max(cure_chance, DISEASE_MINIMUM_CHEMICAL_CURE_CHANCE) if(disease_flags & CHRONIC && SPT_PROB(cure_mod, seconds_per_tick)) @@ -142,7 +143,7 @@ if(stage == max_stages && stage_peaked != TRUE) //mostly a sanity check in case we manually set a virus to max stages stage_peaked = TRUE - if(SPT_PROB(stage_prob*slowdown, seconds_per_tick)) + if(SPT_PROB(stage_prob*slowdown*bad_immune, seconds_per_tick)) update_stage(min(stage + 1, max_stages)) // if(!(disease_flags & CHRONIC) && disease_flags & CURABLE && bypasses_immunity != TRUE) @@ -222,7 +223,7 @@ recovery_prob *= DISEASE_SLEEPING_RECOVERY_MULTIPLIER //any form of sleeping magnifies all effects a little bit - recovery_prob = clamp(recovery_prob, 0, 100) + recovery_prob = clamp(recovery_prob / bad_immune, 0, 100) if(recovery_prob) if(SPT_PROB(recovery_prob, seconds_per_tick)) diff --git a/code/datums/quirks/negative_quirks/immunodeficiency.dm b/code/datums/quirks/negative_quirks/immunodeficiency.dm new file mode 100644 index 00000000000..b8ebab90efe --- /dev/null +++ b/code/datums/quirks/negative_quirks/immunodeficiency.dm @@ -0,0 +1,26 @@ +/datum/quirk/item_quirk/immunodeficiency + name = "Immunodeficiency" + desc = "Whiether by chronic illness or genetic happenstance, your body is a 24/7 Bed and Breakfast for bacteria, viruses, and parasites of all kinds. Even with your prescribed immunity boosters, you'll fare worse than most others." + icon = FA_ICON_MASK_FACE + value = -10 + mob_trait = TRAIT_IMMUNODEFICIENCY + gain_text = span_danger("Just the thought of illness makes you feverish.") + lose_text = span_notice("Your immune system miraculously reasserts itself.") + medical_record_text = "Patient is afflicted with chronic immunodeficiency." + mail_goodies = list( + /obj/item/reagent_containers/syringe/antiviral, + /obj/item/healthanalyzer/simple/disease + ) + +/datum/quirk/item_quirk/immunodeficiency/add_unique(client/client_source) + var/obj/item/clothing/mask/surgical/ppe = new + give_item_to_holder(ppe, list(LOCATION_MASK = ITEM_SLOT_MASK, LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS)) + give_item_to_holder( + /obj/item/storage/pill_bottle/immunodeficiency, + list( + LOCATION_LPOCKET = ITEM_SLOT_LPOCKET, + LOCATION_RPOCKET = ITEM_SLOT_RPOCKET, + LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, + LOCATION_HANDS = ITEM_SLOT_HANDS, + ) + ) diff --git a/code/datums/wounds/burns.dm b/code/datums/wounds/burns.dm index ef7404415a9..2482d7997b3 100644 --- a/code/datums/wounds/burns.dm +++ b/code/datums/wounds/burns.dm @@ -53,7 +53,11 @@ if(HAS_TRAIT(victim, TRAIT_VIRUS_RESISTANCE)) sanitization += 0.9 - + if(HAS_TRAIT(victim, TRAIT_IMMUNODEFICIENCY) && !HAS_TRAIT(victim, TRAIT_VIRUS_RESISTANCE)) + infestation += 0.05 + sanitization = max(sanitization - 0.15, 0) + if(infestation_rate <= 0.15 && prob(50)) + infestation_rate += 0.001 if(limb.current_gauze) limb.seep_gauze(WOUND_BURN_SANITIZATION_RATE * seconds_per_tick) diff --git a/code/game/objects/items/storage/pillbottles.dm b/code/game/objects/items/storage/pillbottles.dm index 9da9abf0c80..e5664e0fd3c 100644 --- a/code/game/objects/items/storage/pillbottles.dm +++ b/code/game/objects/items/storage/pillbottles.dm @@ -190,3 +190,9 @@ desc = "A bottle containing patches of ondansetron, a drug used to treat nausea and vomiting. May cause drowsiness." spawn_count = 5 spawn_type = /obj/item/reagent_containers/applicator/patch/ondansetron + +/obj/item/storage/pill_bottle/immunodeficiency + name = "bottle of immune boosters" + desc = "Contains immune system boosters, used to manage chronic immunodeficiency." + spawn_count = 5 + spawn_type = /obj/item/reagent_containers/applicator/pill/spaceacillin diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index ae65973ca2a..2f11b046e07 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -70,6 +70,8 @@ slowdown *= 2 // spaceacillin doubles the time it takes to grow if(owner.has_status_effect(/datum/status_effect/nest_sustenance)) slowdown *= 0.80 //egg gestates 20% faster if you're trapped in a nest + if(HAS_TRAIT(owner, TRAIT_IMMUNODEFICIENCY) && !HAS_TRAIT(owner, TRAIT_VIRUS_RESISTANCE)) + slowdown *= 0.5 //terrible immune system = doubled parasite growth addtimer(CALLBACK(src, PROC_REF(advance_embryo_stage)), growth_time*slowdown) diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm index f4604d477b8..d5f7a0f69ce 100644 --- a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm @@ -926,3 +926,12 @@ Basically, we fill the time between now and 2s from now with hands based off the /datum/reagent/inverse/rezadone/on_mob_end_metabolize(mob/living/carbon/affected_mob) . = ..() affected_mob.cure_trauma_type(/datum/brain_trauma/mild/phobia/fish, resilience = TRAUMA_RESILIENCE_ABSOLUTE) + +/datum/reagent/inverse/spaceacillin + name = "Sepsisillin" + description = "Weakens the immune system, acclerating the effects of bacteria, viruses, and parasites while negating the effects of immunity boosters." //it's like spacacillin but evil muahaha + color = "#002f06" //Gross green-black. Seemed fitting. + ph = 8.1 + metabolization_rate = 0.1 * REM + tox_damage = 0 + metabolized_traits = list(TRAIT_IMMUNODEFICIENCY) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 1e2df6c1e50..7bdfd00857e 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -251,6 +251,8 @@ metabolization_rate = 0.1 * REAGENTS_METABOLISM ph = 8.1 chemical_flags = REAGENT_CAN_BE_SYNTHESIZED + inverse_chem_val = 0.3 + inverse_chem = /datum/reagent/inverse/spaceacillin added_traits = list(TRAIT_VIRUS_RESISTANCE) //Goon Chems. Ported mainly from Goonstation. Easily mixable (or not so easily) and provide a variety of effects. diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index c8683cb6eae..3b3a2e456a3 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -183,6 +183,12 @@ list_reagents = list(/datum/reagent/medicine/morphine = 30) rename_with_volume = TRUE +/obj/item/reagent_containers/applicator/pill/spaceacillin + name = "spaceacillin pill" + desc = "Increases resistance to viruses, bacteria, and parasites." + icon_state = "pill17" + list_reagents = list(/datum/reagent/medicine/spaceacillin = 1.5) //1 minute since 0.05 every tick. + /obj/item/reagent_containers/applicator/pill/stimulant name = "stimulant pill" desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!" diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm index fc7b59e7767..78f58204e36 100644 --- a/code/modules/zombie/items.dm +++ b/code/modules/zombie/items.dm @@ -29,7 +29,7 @@ return // spaceacillin has a 75% chance to block infection - if(HAS_TRAIT(target, TRAIT_VIRUS_RESISTANCE) && prob(75)) + if(HAS_TRAIT(target, TRAIT_VIRUS_RESISTANCE) && !HAS_TRAIT(target, TRAIT_IMMUNODEFICIENCY) && prob(75)) return var/obj/item/bodypart/actual_limb = target.get_bodypart(def_zone) diff --git a/tgstation.dme b/tgstation.dme index f67f0ef8d68..006cfd0a01e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1958,6 +1958,7 @@ #include "code\datums\quirks\negative_quirks\hemiplegic.dm" #include "code\datums\quirks\negative_quirks\hypersensitive.dm" #include "code\datums\quirks\negative_quirks\illiterate.dm" +#include "code\datums\quirks\negative_quirks\immunodeficiency.dm" #include "code\datums\quirks\negative_quirks\indebted.dm" #include "code\datums\quirks\negative_quirks\insanity.dm" #include "code\datums\quirks\negative_quirks\light_drinker.dm"