Merge pull request #4346 from Fox-McCloud/overdose-rework

Overdose Rework and Food Poisoning
This commit is contained in:
TheDZD
2016-05-04 20:52:37 -04:00
15 changed files with 619 additions and 210 deletions
+55
View File
@@ -0,0 +1,55 @@
/datum/disease/berserker
name = "Berserker"
max_stages = 2
stage_prob = 5
spread_text = "Non-Contagious"
spread_flags = SPECIAL
cure_text = "Anti-Psychotics"
cures = list("haloperidol")
agent = "Jagged Crystals"
cure_chance = 10
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Swearing, shouting, attacking nearby crew members uncontrollably."
severity = DANGEROUS
disease_flags = CURABLE
spread_flags = NON_CONTAGIOUS
/datum/disease/berserker/stage_act()
..()
if(affected_mob.reagents.has_reagent("thc"))
to_chat(affected_mob, "<span class='notice'>You mellow out.</span>")
cure()
return
switch(stage)
if(1)
if(prob(5))
affected_mob.emote(pick("twitch_s", "grumble"))
if(prob(5))
var/speak = pick("Grr...", "Fuck...", "Fucking...", "Fuck this fucking.. fuck..")
affected_mob.say(speak)
if(2)
if(prob(5))
affected_mob.emote(pick("twitch_s", "scream"))
if (prob(5))
var/speak = pick("AAARRGGHHH!!!!", "GRR!!!", "FUCK!! FUUUUUUCK!!!", "FUCKING SHITCOCK!!", "WROOAAAGHHH!!")
affected_mob.say(speak)
if (prob(15))
affected_mob.visible_message("<span class='danger'>[affected_mob] twitches violently!</span>")
affected_mob.drop_l_hand()
affected_mob.drop_r_hand()
if (prob(33))
if(affected_mob.incapacitated())
affected_mob.visible_message("<span class='danger'>[affected_mob] spasms and twitches!</span>")
return
affected_mob.visible_message("<span class='danger'>[affected_mob] thrashes around violently!</span>")
for(var/mob/living/carbon/M in range(1, affected_mob))
if(M == affected_mob)
continue
var/damage = rand(1, 5)
if (prob(80))
playsound(affected_mob.loc, "punch", 25, 1, -1)
affected_mob.visible_message("<span class='danger'>[affected_mob] hits [M] with their thrashing!</span>")
M.adjustBruteLoss(damage)
else
playsound(affected_mob.loc, "sound/weapons/punchmiss.ogg", 25, 1, -1)
affected_mob.visible_message("<span class='danger'>[affected_mob] fails to hit [M] with their thrashing!</span>")
+77
View File
@@ -0,0 +1,77 @@
/datum/disease/food_poisoning
name = "Food Poisoning"
max_stages = 3
stage_prob = 5
spread_text = "Non-Contagious"
spread_flags = SPECIAL
cure_text = "Sleep"
agent = "Salmonella"
cures = list("chicken_soup")
cure_chance = 10
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Nausea, sickness, and vomitting."
severity = MINOR
disease_flags = CURABLE
spread_flags = NON_CONTAGIOUS
var/remissive = 0
/datum/disease/food_poisoning/stage_act()
if(!remissive)
..()
if(affected_mob.sleeping && prob(33))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
remissive = 1
if(remissive)
if(prob(stage_prob))
stage--
if(stage == 0)
cure()
return
switch(stage)
if(1)
if(prob(5))
to_chat(affected_mob, "<span class='danger'>Your stomach feels weird.</span>")
if(prob(5))
to_chat(affected_mob, "<span class='danger'>You feel queasy.</span>")
if(2)
if(affected_mob.sleeping && prob(40))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
if(prob(1) && prob(10))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
if(prob(10))
affected_mob.emote("groan")
if(prob(5))
to_chat(affected_mob, "<span class='danger'>Your stomach aches.</span>")
if(prob(5))
to_chat(affected_mob, "<span class='danger'>You feel nauseous.</span>")
if(3)
if(affected_mob.sleeping && prob(25))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
if(prob(1) && prob(10))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
if(prob(10))
affected_mob.emote("moan")
if(prob(10))
affected_mob.emote("groan")
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Your stomach hurts.</span>")
if(prob(1))
to_chat(affected_mob, "<span class='danger'>You feel sick.</span>")
if(prob(5))
if(affected_mob.nutrition > 10)
affected_mob.visible_message("<span class='danger'>[affected_mob] vomits on the floor profusely!</span>")
affected_mob.fakevomit(no_text = 1)
affected_mob.nutrition -= rand(3,5)
else
to_chat(affected_mob, "<span class='danger'>Your stomach lurches painfully!</span>")
affected_mob.visible_message("<span class='danger'>[affected_mob] gags and retches!</span>")
affected_mob.Stun(rand(2,4))
affected_mob.Weaken(rand(2,4))