Files
Bubberstation/code/modules/events/fake_virus.dm
T
108880a1e6 Sneeze Rework: Projectile Combat Edition (#83361)
## About The Pull Request
Reworks sneezing. Instead of a range check that checks if you're facing
someone, it is now a skill check


https://github.com/tgstation/tgstation/assets/7501474/c11ffa16-9bd2-4ed1-8022-2094360657bc

All sneezes shoot projectiles, but depends on the virus if they're
infectious. Using the sneeze emote is the only method that doesn't shoot
a sneeze

## Why It's Good For The Game
I think the invisible infection mechanics are unfun. A lot of station
dangers challenge your knowledge and mechanical skill, while viruses are
gotten by being around people in a roleplay game. You can get a round
seriously ruined if you walk past someone with a sneezing virus and
don't immediately rush spaceillin or chemistry, which I don't think is
mechanically interesting.

Now if you get infected, it's a skill issue. Get good and dodge the
sneeze

Note that this is just one method of infection. I didn't touch coughing
and airborne viruses, which do constant area checks and infect everyone
around. I plan to, but not now. I'll probably make coughing do a cone or
something, and ignore the airborne viruses since they can't be modified
and are generally less broken

## Changelog
🆑
balance: You can now dodge sneezes
balance: Infectious simple diseases that use sneezes now infect with
sneezes and have lowered airborn transmission
balance: Damageless attacks, projectiles, hugs etc no longer drain
shields
/🆑

- [x] Make sneezes shoot to your cursor so you can either intentionally
sneeze on people or sneeze away from people if you react fast

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-06-07 13:40:05 -04:00

36 lines
1.8 KiB
Plaintext

/datum/round_event_control/fake_virus
name = "Fake Virus"
typepath = /datum/round_event/fake_virus
weight = 20
category = EVENT_CATEGORY_HEALTH
description = "Some crewmembers suffer from temporary hypochondria."
/datum/round_event/fake_virus/start()
var/list/fake_virus_victims = list()
for(var/mob/living/carbon/human/victim in GLOB.player_list)
if(victim.stat != CONSCIOUS || HAS_TRAIT(victim, TRAIT_VIRUSIMMUNE))
continue
if(!(victim.mind?.assigned_role.job_flags & JOB_CREW_MEMBER))
continue
fake_virus_victims += victim
//first we do hard status effect victims
var/defacto_min = min(3, length(fake_virus_victims))
if(defacto_min <= 0)// event will hit 1-3 people by default, but will do 1-2 or just 1 if only those many candidates are available
return
for(var/i in 1 to rand(1, defacto_min))
var/mob/living/carbon/human/hypochondriac = pick_n_take(fake_virus_victims)
hypochondriac.apply_status_effect(/datum/status_effect/fake_virus)
announce_to_ghosts(hypochondriac)
//then we do light one-message victims who simply cough or whatever once (have to repeat the process since the last operation modified our candidates list)
defacto_min = min(5, length(fake_virus_victims))
if(defacto_min <= 0)
return
for(var/i in 1 to rand(1, defacto_min))
var/mob/living/carbon/human/onecoughman = pick_n_take(fake_virus_victims)
if(prob(25))//1/4 odds to get a spooky message instead of coughing out loud
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), onecoughman, span_warning("[pick("Your head hurts.", "Your head pounds.")]")), rand(3 SECONDS, 15 SECONDS))
else
addtimer(CALLBACK(onecoughman, TYPE_PROC_REF(/mob, emote), pick("cough", "sniff")), rand(3 SECONDS, 15 SECONDS))//deliver the message with a slightly randomized time interval so there arent multiple people coughing at the exact same time