diff --git a/code/datums/diseases/legionvirus.dm b/code/datums/diseases/legionvirus.dm index 22144a7b2a14..a6e1bdadcdd2 100644 --- a/code/datums/diseases/legionvirus.dm +++ b/code/datums/diseases/legionvirus.dm @@ -1,28 +1,29 @@ -/datum/disease/transformation/legionvirus - name = "Soulus Saturation" +/datum/disease/transformation/legionvirus //Diseases are a quick way to exposit a bunch of information onto players, most of the effects here are handled by the legion skull organ from /mob/living/simple_animal/hostile/mining_mobs/hivelord.dm + name = "Legion Infection" max_stages = 5 spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS - cure_text = "System Cleaner" - cures = list(/datum/reagent/medicine/system_cleaner) - agent = "Soulus Dust" + cure_text = "Surgically removing the skull from the patient's chest; applications of spaceacillin or synaptizine can delay onset of the infection." + agent = "Legion skull" viable_mobtypes = list(/mob/living/carbon/human) visibility_flags = 0 - stage_prob = 5 - cure_chance = 20 - desc = "If left untreated, this disease will cause the infected to transform into a legion." + stage_prob = 0 // WOOOOOO SNOWFLAKE!!!!!!! WOOOOOO!!!! + desc = "If left untreated, the skull will slowly overtake its host's body, eventually growing into a legion." severity = DISEASE_SEVERITY_HARMFUL - disease_flags = CURABLE + disease_flags = NONE + visibility_flags = HIDDEN_PANDEMIC bypasses_immunity = TRUE - stage1 = list("Your joints itch.") - stage2 = list("Your head begins to ache.") - stage3 = list("Ash begins to flake off your skin.") - stage4 = list("You feel like your head is splitting in two!") - stage5 = list("You feel something growing inside your chest!") + stage1 = list(span_notice("You feel a dull pain in your chest.")) + stage2 = list(span_notice("Your head begins to ache.")) + stage3 = list(span_notice("Something moves underneath your skin.")) + stage4 = list(span_warning("You feel something pressing against your skin!")) + stage5 = list(span_warning("Your skin begins to tear apart-!")) new_form = /mob/living/simple_animal/hostile/asteroid/hivelord/legion /datum/disease/transformation/legionvirus/do_disease_transformation(mob/living/H) - H.visible_message("[H] transforms into a legion!") + if(stage5) + to_chat(affected_mob, pick(stage5)) + H.visible_message(span_warning("[H] suddenly collapses, a pallid grey mass bursting from their body!")) var/mob/living/simple_animal/hostile/asteroid/hivelord/legion/L if(HAS_TRAIT(H, TRAIT_DWARF)) //dwarf legions aren't just fluff! L = new /mob/living/simple_animal/hostile/asteroid/hivelord/legion/dwarf(H.loc) @@ -32,4 +33,3 @@ H.adjustBruteLoss(1000) L.stored_mob = H H.forceMove(L) - qdel(src) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm index b5d539086ac7..b7ca291a5be4 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm @@ -208,7 +208,7 @@ attack_sound = 'sound/weapons/pierce.ogg' throw_message = "is shrugged off by" del_on_death = TRUE - stat_attack = HARD_CRIT + stat_attack = SOFT_CRIT robust_searching = 1 var/can_infest_dead = FALSE @@ -222,7 +222,7 @@ /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/staff/Initialize() . = ..() - addtimer(CALLBACK(src, PROC_REF(death)), 50) + addtimer(CALLBACK(src, PROC_REF(death)), 5 SECONDS) AddComponent(/datum/component/swarming) /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life() @@ -230,6 +230,8 @@ if(stat == DEAD || !isturf(loc)) return for(var/mob/living/carbon/human/victim in range(src, 1)) //Only for corpse right next to/on same tile + if(istype(victim.getorganslot(ORGAN_SLOT_REGENERATIVE_CORE), /obj/item/organ/legion_skull)) // no double dipping + continue switch(victim.stat) if(UNCONSCIOUS, HARD_CRIT) infest(victim) @@ -239,21 +241,87 @@ infest(victim) return //This will qdelete the legion. - /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/proc/infest(mob/living/carbon/human/H) - visible_message("[name] burrows into the flesh of [H]!") - var/mob/living/simple_animal/hostile/asteroid/hivelord/legion/L - if(HAS_TRAIT(H, TRAIT_DWARF)) //dwarf legions aren't just fluff! - L = new /mob/living/simple_animal/hostile/asteroid/hivelord/legion/dwarf(H.loc) + visible_message(span_warning("[name] burrows into the flesh of [H]!")) + if(H.stat != DEAD) + var/obj/item/organ/legion_skull/throwyouabone = new() + throwyouabone.Insert(H) else - L = new(H.loc) - visible_message("[L] staggers to [L.p_their()] feet!") - H.death() - H.adjustBruteLoss(1000) - L.stored_mob = H - H.forceMove(L) + var/mob/living/simple_animal/hostile/asteroid/hivelord/legion/L + if(HAS_TRAIT(H, TRAIT_DWARF)) //dwarf legions aren't just fluff! + L = new /mob/living/simple_animal/hostile/asteroid/hivelord/legion/dwarf(H.loc) + else + L = new(H.loc) + visible_message(span_warning("[L] staggers to [L.p_their()] feet!")) + H.adjustBruteLoss(1000) + L.stored_mob = H + H.forceMove(L) qdel(src) +/obj/item/organ/legion_skull + name = "legion skull" + desc = "The skull of a legion, likely torn from a soon-to-be host." + icon_state = "legion_skull" + zone = BODY_ZONE_CHEST + slot = ORGAN_SLOT_REGENERATIVE_CORE + grind_results = list(/datum/reagent/medicine/soulus = 2, /datum/reagent/blood = 5) + var/datum/disease/transformation/legionvirus/malignance + var/malignance_countdown = 5 MINUTES + var/malignance_tracker + +/obj/item/organ/legion_skull/on_find(mob/living/finder) + ..() + to_chat(finder, span_warning("You found a skull-shaped growth in [owner]'s [zone]!")) + +/obj/item/organ/legion_skull/Insert(mob/living/carbon/M, special = 0) + ..() + malignance = new() + malignance.infect(M, FALSE) //we handle all the fancy virus stuff in the organ, so we need a reference for it + malignance_tracker = addtimer(CALLBACK(src, PROC_REF(update_stage)), malignance_countdown, TIMER_STOPPABLE|TIMER_DELETE_ME) + M.heal_overall_bleeding(12) //stop dying so fast + +/obj/item/organ/legion_skull/Remove(mob/living/carbon/M, special = 0) + malignance_countdown = initial(malignance_countdown) + deltimer(malignance_tracker) + malignance_tracker = null + malignance.cure() + ..() + +/obj/item/organ/legion_skull/on_life() + . = ..() + skull_check() + +/obj/item/organ/legion_skull/on_death() + . = ..() + skull_check() + +/// track our timers and reagents +/obj/item/organ/legion_skull/proc/skull_check() + if(!malignance) + malignance = new() + malignance.infect(owner, FALSE) + if(owner.reagents.has_reagent(/datum/reagent/medicine/synaptizine, needs_metabolizing = TRUE) || owner.reagents.has_reagent(/datum/reagent/medicine/spaceacillin, needs_metabolizing = TRUE)) + if(isnull(timeleft(malignance_tracker))) //ruhehehehehe + malignance_countdown = min(malignance_countdown + 1 SECONDS, initial(malignance_countdown)) //slightly improve our resistance to dying so we don't turn the second a treatment runs out + return + malignance_countdown = timeleft(malignance_tracker) //pause our timer if we have the reagents + deltimer(malignance_tracker) + malignance_tracker = null //you would think deltimer would do this but it actually doesn't track a direct reference! + return + if(!malignance_tracker) + malignance_tracker = addtimer(CALLBACK(src, PROC_REF(update_stage)), malignance_countdown, TIMER_STOPPABLE|TIMER_DELETE_ME) //and resume if we run out + +/// Updates the stage of our tied disease +/obj/item/organ/legion_skull/proc/update_stage() + malignance.update_stage(min(malignance.stage + 1, malignance.max_stages)) + if(malignance.stage == 5) + malignance.stage_act() //force the transformation here, then delete everything + qdel(malignance) + qdel(src) + return + malignance_countdown = initial(malignance_countdown) + malignance_tracker = addtimer(CALLBACK(src, PROC_REF(update_stage)), malignance_countdown, TIMER_STOPPABLE|TIMER_DELETE_ME) + //Advanced Legion is slightly tougher to kill and can raise corpses (revive other legions) /mob/living/simple_animal/hostile/asteroid/hivelord/legion/advanced name = "Signifer" diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 11a930efda30..d42fc60057f1 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1961,7 +1961,10 @@ ..() /datum/reagent/medicine/soulus/overdose_process(mob/living/M) - M.ForceContractDisease(new /datum/disease/transformation/legionvirus(), FALSE, TRUE) + var/mob/living/carbon/C = M + if(!istype(C.getorganslot(ORGAN_SLOT_REGENERATIVE_CORE), /obj/item/organ/legion_skull)) + var/obj/item/organ/legion_skull/spare_ribs = new() + spare_ribs.Insert(M) ..() /datum/reagent/medicine/soulus/on_mob_end_metabolize(mob/living/M) diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 8f2566a98f8a..816d3671a8d9 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ