mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Aiming to implement the framework oranges has detailed in https://tgstation13.org/phpBB/viewtopic.php?f=10&t=19102 Moves canmove to a bitflag in a new variable called mobility_flags, that will allow finer grain control of what someone can do codewise, for example, letting them move but not stand up, or stand up but not move. Adds Immobilize()d status effect that freezes movement but does not prevent anything else. Adds Paralyze()d which is oldstun "You can't do anything at all and knock down). Stun() will now prevent any item/UI usage and movement (which is similar to before). Knockdown() will now only knockdown without preventing item usage/movement. People knocked down will be able to crawl at softcrit-speeds Refactors some /mob variables and procs to /mob/living. update_canmove() refactored to update_mobility() and will handle mobility_flags instead of the removed canmove cl rscadd: Crawling is now possible if you are down but not stunned. Obviously, you will be slower. /cl Refactors are done. I'd rather get this merged faster than try to fine tune stuff like slips. The most obvious gameplay effect this pr has will be crawling, and I believe I made tiny tweaks but I can't find it Anything I missed or weird behavior should be reported.
84 lines
2.7 KiB
Plaintext
84 lines
2.7 KiB
Plaintext
/datum/disease/dna_retrovirus
|
|
name = "Retrovirus"
|
|
max_stages = 4
|
|
spread_text = "Contact"
|
|
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
|
|
cure_text = "Rest or an injection of mutadone"
|
|
cure_chance = 6
|
|
agent = ""
|
|
viable_mobtypes = list(/mob/living/carbon/human)
|
|
desc = "A DNA-altering retrovirus that scrambles the structural and unique enzymes of a host constantly."
|
|
severity = DISEASE_SEVERITY_HARMFUL
|
|
permeability_mod = 0.4
|
|
stage_prob = 2
|
|
var/restcure = 0
|
|
|
|
/datum/disease/dna_retrovirus/New()
|
|
..()
|
|
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
|
|
if(prob(40))
|
|
cures = list("mutadone")
|
|
else
|
|
restcure = 1
|
|
|
|
/datum/disease/dna_retrovirus/Copy()
|
|
var/datum/disease/dna_retrovirus/D = ..()
|
|
D.restcure = restcure
|
|
return D
|
|
|
|
/datum/disease/dna_retrovirus/stage_act()
|
|
..()
|
|
switch(stage)
|
|
if(1)
|
|
if(restcure)
|
|
if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(30))
|
|
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
|
cure()
|
|
return
|
|
if (prob(8))
|
|
to_chat(affected_mob, "<span class='danger'>Your head hurts.</span>")
|
|
if (prob(9))
|
|
to_chat(affected_mob, "You feel a tingling sensation in your chest.")
|
|
if (prob(9))
|
|
to_chat(affected_mob, "<span class='danger'>You feel angry.</span>")
|
|
if(2)
|
|
if(restcure)
|
|
if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(20))
|
|
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
|
cure()
|
|
return
|
|
if (prob(8))
|
|
to_chat(affected_mob, "<span class='danger'>Your skin feels loose.</span>")
|
|
if (prob(10))
|
|
to_chat(affected_mob, "You feel very strange.")
|
|
if (prob(4))
|
|
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head!</span>")
|
|
affected_mob.Unconscious(40)
|
|
if (prob(4))
|
|
to_chat(affected_mob, "<span class='danger'>Your stomach churns.</span>")
|
|
if(3)
|
|
if(restcure)
|
|
if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(20))
|
|
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
|
cure()
|
|
return
|
|
if (prob(10))
|
|
to_chat(affected_mob, "<span class='danger'>Your entire body vibrates.</span>")
|
|
|
|
if (prob(35))
|
|
if(prob(50))
|
|
scramble_dna(affected_mob, 1, 0, rand(15,45))
|
|
else
|
|
scramble_dna(affected_mob, 0, 1, rand(15,45))
|
|
|
|
if(4)
|
|
if(restcure)
|
|
if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(5))
|
|
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
|
cure()
|
|
return
|
|
if (prob(60))
|
|
if(prob(50))
|
|
scramble_dna(affected_mob, 1, 0, rand(50,75))
|
|
else
|
|
scramble_dna(affected_mob, 0, 1, rand(50,75)) |