food poisoning

This commit is contained in:
Fox-McCloud
2016-05-04 19:58:44 -04:00
parent 311141225a
commit 08ec1db17e
4 changed files with 92 additions and 0 deletions
+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))
+11
View File
@@ -62,6 +62,17 @@
M.ForceContractDisease(new /datum/disease/berserker(0))
..()
/datum/reagent/salmonella
name = "Salmonella "
id = "salmonella "
description = "A nasty bacteria found in spoiled food."
reagent_state = LIQUID
color = "#1E4600"
/datum/reagent/salmonella/on_mob_life(var/mob/living/carbon/M as mob)
if(!M) M = holder.my_atom
M.ForceContractDisease(new /datum/disease/food_poisoning(0))
..()
/datum/reagent/spore
name = "Blob Spores"
+3
View File
@@ -10,8 +10,10 @@ datum/reagent/questionmark/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(!istype(M, /mob/living))
return
if(method == INGEST)
M.Stun(2)
M.Weaken(2)
to_chat(M, "<span class='danger'>Ugh! Eating that was a terrible idea!</span>")
M.ForceContractDisease(new /datum/disease/food_poisoning(0))
datum/reagent/egg
name = "Egg"
@@ -199,6 +201,7 @@ datum/reagent/fungus/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
M.reagents.add_reagent("toxin", rand(1,5))
else if(ranchance <= 5)
to_chat(M, "<span class='warning'>That tasted absolutely FOUL.</span>")
M.ForceContractDisease(new /datum/disease/food_poisoning(0))
else
to_chat(M, "<span class='warning'>Yuck!</span>")
+1
View File
@@ -220,6 +220,7 @@
#include "code\datums\diseases\fake_gbs.dm"
#include "code\datums\diseases\flu.dm"
#include "code\datums\diseases\fluspanish.dm"
#include "code\datums\diseases\food_poisoning.dm"
#include "code\datums\diseases\gbs.dm"
#include "code\datums\diseases\magnitis.dm"
#include "code\datums\diseases\pierrot_throat.dm"