Skip to content

Commit

Permalink
Legion attacks now kill you slower (#3141)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Getting attacked by a legion skull while unconscious now causes it to
generate a funny new organ (and staunch some current bleeding, so the
victim will die slower) which will eventually transform you into a
legion if untreated. Legion skulls will also not attack people who are
in hardcrit.
If a surgical table is not present, the onset of legionnification can be
postponed by injecting spaceacillin or synaptizine, which halt the
disease's progress while being metabolized.

## Why It's Good For The Game

Dying instantly? boring !! time for drama.

## Changelog

:cl:
add: legion attacks will now inject an organ which eventually causes a
transformation, rather than instantly killing and transforming people.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: Theos <[email protected]>
  • Loading branch information
SomeguyManperson authored Aug 1, 2024
1 parent c4141d3 commit 569dea9
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 30 deletions.
32 changes: 16 additions & 16 deletions code/datums/diseases/legionvirus.dm
Original file line number Diff line number Diff line change
@@ -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("<span class='warning'>You feel like your head is splitting in two!</span>")
stage5 = list("<span class='warning'>You feel something growing inside your chest!</span>")
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("<span class='warning'>[H] transforms into a legion!</span>")
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)
Expand All @@ -32,4 +33,3 @@
H.adjustBruteLoss(1000)
L.stored_mob = H
H.forceMove(L)
qdel(src)
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -222,14 +222,16 @@

/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()
. = ..()
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)
Expand All @@ -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("<span class='warning'>[name] burrows into the flesh of [H]!</span>")
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("<span class='warning'>[L] staggers to [L.p_their()] feet!</span>")
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file modified icons/obj/surgery.dmi
Binary file not shown.

0 comments on commit 569dea9

Please sign in to comment.