mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Added organ damage random medical event.
It doesn't make a lot of sense, but who cares about that!
This commit is contained in:
@@ -1030,6 +1030,7 @@
|
||||
#include "code\modules\events\money_hacker.dm"
|
||||
#include "code\modules\events\money_lotto.dm"
|
||||
#include "code\modules\events\money_spam.dm"
|
||||
#include "code\modules\events\organ_failure.dm"
|
||||
#include "code\modules\events\prison_break.dm"
|
||||
#include "code\modules\events\radiation_storm.dm"
|
||||
#include "code\modules\events\rogue_drones.dm"
|
||||
|
||||
@@ -69,11 +69,12 @@
|
||||
possibleEvents[/datum/event/meteor_shower] = 80 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/blob] = 30 * active_with_role["Engineer"]
|
||||
|
||||
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 25
|
||||
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 100
|
||||
if(active_with_role["Medical"] > 0)
|
||||
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 100
|
||||
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 75
|
||||
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 5
|
||||
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 150
|
||||
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 10
|
||||
possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50
|
||||
|
||||
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
|
||||
if(active_with_role["Security"] > 0)
|
||||
|
||||
28
code/modules/events/organ_failure.dm
Normal file
28
code/modules/events/organ_failure.dm
Normal file
@@ -0,0 +1,28 @@
|
||||
datum/event/organ_failure
|
||||
var/severity = 1
|
||||
|
||||
datum/event/organ_failure/setup()
|
||||
announceWhen = rand(0, 3000)
|
||||
endWhen = announceWhen + 1
|
||||
severity = rand(1, 3)
|
||||
|
||||
datum/event/organ_failure/announce()
|
||||
command_alert("Confirmed outbreak of level [rand(3,7)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak5.ogg')
|
||||
|
||||
datum/event/organ_failure/start()
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70))
|
||||
candidates += G
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
while(severity > 0 && candidates.len)
|
||||
var/mob/living/carbon/human/C = candidates[1]
|
||||
|
||||
// Bruise one of their organs
|
||||
var/datum/organ/internal/I = pick(C.internal_organs)
|
||||
I.damage = I.min_bruised_damage
|
||||
candidates.Remove(C)
|
||||
severity--
|
||||
Reference in New Issue
Block a user