Goon Chemistry: Addiction and Overdosing

This commit is contained in:
Iamgoofball
2015-01-18 21:50:54 -08:00
parent c7e25dfdaa
commit b83ca5f8d1
34 changed files with 493 additions and 166 deletions

View File

@@ -441,7 +441,7 @@
name = "Neurotoxin"
id = "neurotoxin"
result = "neurotoxin"
required_reagents = list("gargleblaster" = 1, "stoxin" = 1)
required_reagents = list("gargleblaster" = 1, "morphine" = 1)
result_amount = 2
/datum/chemical_reaction/snowwhite

View File

@@ -844,14 +844,14 @@ obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
..()
reagents.add_reagent("nutriment", 1)
reagents.add_reagent("charcoal", 3+round(potency / 3, 1))
reagents.add_reagent("stoxin", 3+round(potency / 3, 1))
reagents.add_reagent("morphine", 3+round(potency / 3, 1))
bitesize = 1 + round(reagents.total_volume / 2, 1)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi/attackby(var/obj/item/O as obj, var/mob/user as mob)
. = ..()
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
user << "<span class='info'>- Anti-Toxin: <i>[reagents.get_reagent_amount("charcoal")]%</i></span>"
user << "<span class='info'>- Sleep Toxin: <i>[reagents.get_reagent_amount("stoxin")]%</i></span>"
user << "<span class='info'>- Morphine: <i>[reagents.get_reagent_amount("morphine")]%</i></span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
seed = /obj/item/seeds/amanitamycelium

View File

@@ -65,7 +65,7 @@
melee_damage_upper = 10
poison_per_bite = 10
var/atom/cocoon_target
poison_type = "stoxin"
poison_type = "morphine"
var/fed = 0
//hunters have the most poison and move the fastest, so they can find prey

View File

@@ -322,7 +322,7 @@
/obj/item/weapon/paper/Toxin
name = "paper- 'Chemical Information'"
info = "Known Onboard Toxins:<BR>\n\tGrade A Semi-Liquid Plasma:<BR>\n\t\tHighly poisonous. You cannot sustain concentrations above 15 units.<BR>\n\t\tA gas mask fails to filter plasma after 50 units.<BR>\n\t\tWill attempt to diffuse like a gas.<BR>\n\t\tFiltered by scrubbers.<BR>\n\t\tThere is a bottled version which is very different<BR>\n\t\t\tfrom the version found in canisters!<BR>\n<BR>\n\t\tWARNING: Highly Flammable. Keep away from heat sources<BR>\n\t\texcept in a enclosed fire area!<BR>\n\t\tWARNING: It is a crime to use this without authorization.<BR>\nKnown Onboard Anti-Toxin:<BR>\n\tAnti-Toxin Type 01P: Works against Grade A Plasma.<BR>\n\t\tBest if injected directly into bloodstream.<BR>\n\t\tA full injection is in every regular Med-Kit.<BR>\n\t\tSpecial toxin Kits hold around 7.<BR>\n<BR>\nKnown Onboard Chemicals (other):<BR>\n\tRejuvenation T#001:<BR>\n\t\tEven 1 unit injected directly into the bloodstream<BR>\n\t\t\twill cure paralysis and sleep toxins.<BR>\n\t\tIf administered to a dying patient it will prevent<BR>\n\t\t\tfurther damage for about units*3 seconds.<BR>\n\t\t\tit will not cure them or allow them to be cured.<BR>\n\t\tIt can be administeredd to a non-dying patient<BR>\n\t\t\tbut the chemicals disappear just as fast.<BR>\n\tSleep Toxin T#054:<BR>\n\t\t5 units wilkl induce precisely 1 minute of sleep.<BR>\n\t\t\tThe effect are cumulative.<BR>\n\t\tWARNING: It is a crime to use this without authorization"
info = "Known Onboard Toxins:<BR>\n\tGrade A Semi-Liquid Plasma:<BR>\n\t\tHighly poisonous. You cannot sustain concentrations above 15 units.<BR>\n\t\tA gas mask fails to filter plasma after 50 units.<BR>\n\t\tWill attempt to diffuse like a gas.<BR>\n\t\tFiltered by scrubbers.<BR>\n\t\tThere is a bottled version which is very different<BR>\n\t\t\tfrom the version found in canisters!<BR>\n<BR>\n\t\tWARNING: Highly Flammable. Keep away from heat sources<BR>\n\t\texcept in a enclosed fire area!<BR>\n\t\tWARNING: It is a crime to use this without authorization.<BR>\nKnown Onboard Anti-Toxin:<BR>\n\tAnti-Toxin Type 01P: Works against Grade A Plasma.<BR>\n\t\tBest if injected directly into bloodstream.<BR>\n\t\tA full injection is in every regular Med-Kit.<BR>\n\t\tSpecial toxin Kits hold around 7.<BR>\n<BR>\nKnown Onboard Chemicals (other):<BR>\n\tRejuvenation T#001:<BR>\n\t\tEven 1 unit injected directly into the bloodstream<BR>\n\t\t\twill cure paralysis and sleep toxins.<BR>\n\t\tIf administered to a dying patient it will prevent<BR>\n\t\t\tfurther damage for about units*3 seconds.<BR>\n\t\t\tit will not cure them or allow them to be cured.<BR>\n\t\tIt can be administeredd to a non-dying patient<BR>\n\t\t\tbut the chemicals disappear just as fast.<BR>\n\tMorphine T#054:<BR>\n\t\t5 units wilkl induce precisely 1 minute of sleep.<BR>\n\t\t\tThe effect are cumulative.<BR>\n\t\tWARNING: It is a crime to use this without authorization"
/obj/item/weapon/paper/courtroom
name = "paper- 'A Crash Course in Legal SOP on SS13'"

View File

@@ -70,7 +70,7 @@
/obj/item/weapon/pen/sleepy/New()
create_reagents(55)
reagents.add_reagent("stoxin", 30)
reagents.add_reagent("morphine", 30)
reagents.add_reagent("mutetoxin", 15)
reagents.add_reagent("tirizene", 10)
..()

View File

@@ -10,6 +10,8 @@ datum/reagent/nicotine
description = "Stun reduction per cycle, slight stamina regeneration buff. Overdoses become rapidly deadly."
reagent_state = LIQUID
color = "#60A584" // rgb: 96, 165, 132
overdose_threshold = 35
addiction_threshold = 30
datum/reagent/nicotine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -18,11 +20,14 @@ datum/reagent/nicotine/on_mob_life(var/mob/living/M as mob)
M << "<span class='notice'>[smoke_message]</span>"
M.AdjustStunned(-1)
M.adjustStaminaLoss(-1*REM)
if(volume > 35)
if(prob(20))
M << "You feel like you smoked too much."
M.adjustToxLoss(1*REM)
M.adjustOxyLoss(1*REM)
..()
return
datum/reagent/nicotine/overdose_process(var/mob/living/M as mob)
if(prob(20))
M << "You feel like you smoked too much."
M.adjustToxLoss(1*REM)
M.adjustOxyLoss(1*REM)
..()
return
@@ -32,6 +37,8 @@ datum/reagent/crank
description = "2x stun reduction per cycle. Warms you up, makes you jittery as hell."
reagent_state = LIQUID
color = "#60A584" // rgb: 96, 165, 132
overdose_threshold = 20
addiction_threshold = 10
datum/reagent/crank/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -41,13 +48,33 @@ datum/reagent/crank/on_mob_life(var/mob/living/M as mob)
M.AdjustParalysis(-2)
M.AdjustStunned(-2)
M.AdjustWeakened(-2)
if(volume > 20)
M.adjustBrainLoss(rand(1,10)*REM)
M.adjustToxLoss(rand(1,10)*REM)
M.adjustBruteLoss(rand(1,10)*REM)
..()
return
datum/reagent/crank/overdose_process(var/mob/living/M as mob)
M.adjustBrainLoss(rand(1,10)*REM)
M.adjustToxLoss(rand(1,10)*REM)
M.adjustBruteLoss(rand(1,10)*REM)
..()
return
datum/reagent/crank/addiction_act_stage1(var/mob/living/M as mob)
M.adjustBrainLoss(rand(1,10)*REM)
..()
return
datum/reagent/crank/addiction_act_stage2(var/mob/living/M as mob)
M.adjustToxLoss(rand(1,10)*REM)
..()
return
datum/reagent/crank/addiction_act_stage3(var/mob/living/M as mob)
M.adjustBruteLoss(rand(1,10)*REM)
..()
return
datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
M.adjustBrainLoss(rand(1,10)*REM)
M.adjustToxLoss(rand(1,10)*REM)
M.adjustBruteLoss(rand(1,10)*REM)
..()
return
/datum/chemical_reaction/crank
name = "Crank"
id = "crank"
@@ -63,8 +90,8 @@ datum/reagent/crank/on_mob_life(var/mob/living/M as mob)
description = "Cools and calms you down, occasional BRAIN and TOX damage."
reagent_state = LIQUID
color = "#60A584" // rgb: 96, 165, 132
var/cycle_count = 0
var/overdosed
overdose_threshold = 20
addiction_threshold = 15
/datum/reagent/krokodil/on_mob_life(var/mob/living/M as mob)
@@ -72,22 +99,40 @@ datum/reagent/crank/on_mob_life(var/mob/living/M as mob)
var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.")
if(prob(5))
M << "<span class='notice'>[high_message]</span>"
..()
return
/datum/reagent/krokodil/overdose_process(var/mob/living/M as mob)
if(prob(10))
M.adjustBrainLoss(rand(1,5)*REM)
M.adjustToxLoss(rand(1,5)*REM)
if(cycle_count == 10)
M.adjustBrainLoss(rand(1,10)*REM)
M.adjustToxLoss(rand(1,10)*REM)
if(cycle_count == 20)
..()
return
/datum/reagent/krokodil/addiction_act_stage1(var/mob/living/M as mob)
M.adjustBrainLoss(rand(1,5)*REM)
M.adjustToxLoss(rand(1,5)*REM)
..()
return
/datum/reagent/krokodil/addiction_act_stage2(var/mob/living/M as mob)
if(prob(25))
M << "<span class='danger'>Your skin feels loose...</span>"
if(cycle_count == 50)
M << "<span class='userdanger'>Your skin falls off!</span>"
..()
return
/datum/reagent/krokodil/addiction_act_stage3(var/mob/living/M as mob)
if(prob(25))
M << "<span class='danger'>Your skin starts to peel away...</span>"
M.adjustBruteLoss(3*REM)
..()
return
/datum/reagent/krokodil/addiction_act_stage4(var/mob/living/carbon/human/M as mob)
if(!istype(M.dna.species, /datum/species/skeleton))
M << "<span class='userdanger'>Your skin falls off! Holy shit!</span>"
M.adjustBruteLoss(rand(50,80)*REM) // holy shit your skin just FELL THE FUCK OFF
hardset_dna(M, null, null, null, null, /datum/species/skeleton)
if(volume > 20)
overdosed = 1
if(overdosed)
cycle_count++
else
M.adjustBruteLoss(5*REM)
..()
return

View File

@@ -59,15 +59,15 @@ datum/reagent/styptic_powder/on_mob_life(var/mob/living/M as mob)
datum/reagent/salglu_solution
name = "Saline-Glucose Solution"
id = "salglu_solution"
description = "33% chance per cycle of healing 1 point each of BRUTE and BURN damage."
description = "33% chance per cycle of healing 3 point each of BRUTE and BURN damage."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
datum/reagent/salglu_solution/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(33))
M.adjustBruteLoss(-1*REM)
M.adjustFireLoss(-1*REM)
if(prob(50))
M.adjustBruteLoss(-3*REM)
M.adjustFireLoss(-3*REM)
..()
return
@@ -81,8 +81,8 @@ datum/reagent/synthflesh
datum/reagent/synthflesh/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(!M) M = holder.my_atom
if(method == TOUCH)
M.heal_organ_damage(volume*REM,0)
M.adjustFireLoss((volume-(volume*2)*REM))
M.adjustBruteLoss(-(1*volume)*REM)
M.adjustFireLoss(-(1*volume)*REM)
M << "<span class='notice'>You feel your burns healing and your flesh knitting together!</span>"
..()
return
@@ -90,16 +90,16 @@ datum/reagent/synthflesh/reaction_mob(var/mob/living/M, var/method=TOUCH, var/vo
datum/reagent/charcoal
name = "Charcoal"
id = "charcoal"
description = "Heals 2 TOX damage per cycle."
description = "Heals 3 TOX damage per cycle and purges other chemicals slowly."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
datum/reagent/charcoal/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.adjustToxLoss(-1.5*REM)
M.adjustToxLoss(-3*REM)
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R != src)
M.reagents.remove_reagent(R.id,0.5)
M.reagents.remove_reagent(R.id,1)
..()
return
@@ -148,6 +148,7 @@ datum/reagent/omnizine
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
metabolization_rate = 0.2
overdose_threshold = 30
datum/reagent/omnizine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -158,6 +159,14 @@ datum/reagent/omnizine/on_mob_life(var/mob/living/M as mob)
..()
return
datum/reagent/omnizine/overdose_process(var/mob/living/M as mob)
M.adjustToxLoss(3*REM)
M.adjustOxyLoss(3*REM)
M.adjustBruteLoss(3*REM)
M.adjustFireLoss(3*REM)
..()
return
datum/reagent/calomel
name = "Calomel"
id = "calomel"
@@ -242,6 +251,7 @@ datum/reagent/sal_acid
description = "If BRUTE damage is under 50, 50% chance to heal one unit."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
overdose_threshold = 25
datum/reagent/sal_acid/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -251,6 +261,13 @@ datum/reagent/sal_acid/on_mob_life(var/mob/living/M as mob)
..()
return
datum/reagent/sal_acid/overdose_process(var/mob/living/M as mob)
if(M.getBruteLoss() < 50)
if(prob(50))
M.adjustBruteLoss(2*REM)
..()
return
/datum/chemical_reaction/sal_acid
name = "Salicyclic Acid"
id = "sal_acid"
@@ -315,12 +332,12 @@ datum/reagent/ephedrine
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
metabolization_rate = 0.3
overdose_threshold = 45
addiction_threshold = 30
datum/reagent/ephedrine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.status_flags |= GOTTAGOFAST
if(M.losebreath >= 10)
M.losebreath = max(10, M.losebreath-5)
M.AdjustParalysis(-1)
M.AdjustStunned(-1)
M.AdjustWeakened(-1)
@@ -328,6 +345,38 @@ datum/reagent/ephedrine/on_mob_life(var/mob/living/M as mob)
..()
return
datum/reagent/ephedrine/overdose_process(var/mob/living/M as mob)
if(prob(33))
M.adjustToxLoss(1*REM)
M.losebreath++
..()
return
datum/reagent/ephedrine/addiction_act_stage1(var/mob/living/M as mob)
if(prob(33))
M.adjustToxLoss(2*REM)
M.losebreath += 2
..()
return
datum/reagent/ephedrine/addiction_act_stage2(var/mob/living/M as mob)
if(prob(33))
M.adjustToxLoss(3*REM)
M.losebreath += 3
..()
return
datum/reagent/ephedrine/addiction_act_stage3(var/mob/living/M as mob)
if(prob(33))
M.adjustToxLoss(4*REM)
M.losebreath += 4
..()
return
datum/reagent/ephedrine/addiction_act_stage4(var/mob/living/M as mob)
if(prob(33))
M.adjustToxLoss(5*REM)
M.losebreath += 5
..()
return
/datum/chemical_reaction/ephedrine
name = "Ephedrine"
id = "ephedrine"
@@ -365,17 +414,66 @@ datum/reagent/morphine
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
var/cycle_count = 0
overdose_threshold = 30
addiction_threshold = 25
datum/reagent/morphine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.status_flags |= GOTTAGOFAST
if(cycle_count == 36)
M.sleeping += 1
if(volume > 20)
M.drowsyness += 1
cycle_count++
..()
return
datum/reagent/morphine/overdose_process(var/mob/living/M as mob)
if(prob(33))
var/obj/item/I = M.get_active_hand()
if(I)
M.drop_item()
cycle_count++
M.Dizzy(1)
M.Jitter(1)
..()
return
datum/reagent/morphine/addiction_act_stage1(var/mob/living/M as mob)
if(prob(33))
var/obj/item/I = M.get_active_hand()
if(I)
M.drop_item()
M.Dizzy(2)
M.Jitter(2)
..()
return
datum/reagent/morphine/addiction_act_stage2(var/mob/living/M as mob)
if(prob(33))
var/obj/item/I = M.get_active_hand()
if(I)
M.drop_item()
M.adjustToxLoss(1*REM)
M.Dizzy(3)
M.Jitter(3)
..()
return
datum/reagent/morphine/addiction_act_stage3(var/mob/living/M as mob)
if(prob(33))
var/obj/item/I = M.get_active_hand()
if(I)
M.drop_item()
M.adjustToxLoss(2*REM)
M.Dizzy(4)
M.Jitter(4)
..()
return
datum/reagent/morphine/addiction_act_stage4(var/mob/living/M as mob)
if(prob(33))
var/obj/item/I = M.get_active_hand()
if(I)
M.drop_item()
M.adjustToxLoss(3*REM)
M.Dizzy(5)
M.Jitter(5)
..()
return
@@ -418,6 +516,7 @@ datum/reagent/atropine
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
metabolization_rate = 0.2
overdose_threshold = 35
datum/reagent/atropine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -436,6 +535,14 @@ datum/reagent/atropine/on_mob_life(var/mob/living/M as mob)
..()
return
datum/reagent/atropine/overdose_process(var/mob/living/M as mob)
if(prob(50))
M.adjustToxLoss(2*REM)
M.Dizzy(1)
M.Jitter(1)
..()
return
/datum/chemical_reaction/atropine
name = "Atropine"
id = "atropine"
@@ -450,6 +557,7 @@ datum/reagent/epinephrine
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
metabolization_rate = 0.2
overdose_threshold = 30
datum/reagent/epinephrine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -466,7 +574,15 @@ datum/reagent/epinephrine/on_mob_life(var/mob/living/M as mob)
M.AdjustParalysis(-1)
M.AdjustStunned(-1)
M.AdjustWeakened(-1)
M.sleeping -= 1
M.sleeping = 0
..()
return
datum/reagent/epinephrine/overdose_process(var/mob/living/M as mob)
if(prob(33))
M.adjustStaminaLoss(5*REM)
M.adjustToxLoss(2*REM)
M.losebreath++
..()
return
@@ -500,6 +616,10 @@ datum/reagent/strange_reagent/reaction_mob(var/mob/living/carbon/human/M as mob,
M.visible_message("<span class='warning'>[M]'s body convulses a bit.</span>")
if(M.health <= config.health_threshold_dead && !M.suiciding && !ghost && !(NOCLONE in M.mutations))
M.stat = 1
M.adjustBruteLoss(-10)
M.adjustFireLoss(-10)
M.adjustOxyLoss(-10)
M.adjustToxLoss(-10)
dead_mob_list -= M
living_mob_list |= list(M)
M.emote("gasp")
@@ -635,3 +755,32 @@ proc/chemical_mob_spawn(var/datum/reagents/holder, var/amount_to_spawn, var/reac
id = "mutadone"
description = "Chance to remove genetic disabilities."
color = "#C8A5DC" // rgb: 200, 165, 220
datum/reagent/antihol
name = "Antihol"
id = "antihol"
description = "A powerful oxidizer that reacts with ethanol."
color = "#C8A5DC" // rgb: 200, 165, 220
datum/reagent/antihol/on_mob_life(var/mob/living/M as mob)
M.dizziness = 0
M.drowsyness = 0
M.stuttering = 0
M.confused = 0
M.reagents.remove_reagent("ethanol", 8)
M.adjustToxLoss(-0.2*REM)
..()
/datum/chemical_reaction/antihol
name = "antihol"
id = "antihol"
result = "antihol"
required_reagents = list("ethanol" = 1, "charcoal" = 1)
result_amount = 2
/datum/chemical_reaction/cryoxadone
name = "Cryoxadone"
id = "cryoxadone"
result = "cryoxadone"
required_reagents = list("stable_plasma" = 1, "acetone" = 1, "mutagen" = 1)
result_amount = 3

View File

@@ -101,4 +101,50 @@ datum/reagent/acetone
result = "ash"
required_reagents = list("oil" = 1)
result_amount = 1
required_temp = 480
required_temp = 480
datum/reagent/colorful_reagent
name = "Colorful Reagent"
id = "colorful_reagent"
description = "A solution."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
/datum/chemical_reaction/colorful_reagent
name = "colorful_reagent"
id = "colorful_reagent"
result = "colorful_reagent"
required_reagents = list("stable_plasma" = 1, "radium" = 1, "space_drugs" = 1, "cryoxadone" = 1, "triple_citrus" = 1)
result_amount = 5
var/list/potential_colors = list("#FF0000","#0000FF","#008000","#FFFF00")
datum/reagent/colorful_reagent/reaction_mob(var/mob/M, var/volume)
if(M)
M.color = pick(potential_colors)
..()
return
datum/reagent/colorful_reagent/reaction_obj(var/obj/O, var/volume)
if(O)
O.color = pick(potential_colors)
..()
return
datum/reagent/colorful_reagent/reaction_turf(var/turf/T, var/volume)
if(T)
T.color = pick(potential_colors)
..()
return
datum/reagent/triple_citrus
name = "Triple Citrus"
id = "triple_citrus"
description = "A solution."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
/datum/chemical_reaction/triple_citrus
name = "triple_citrus"
id = "triple_citrus"
result = "triple_citrus"
required_reagents = list("lemonjuice" = 1, "limejuice" = 1, "orangejuice" = 1)
result_amount = 5

View File

@@ -124,6 +124,8 @@ datum/reagent/clf3/on_mob_life(var/mob/living/M as mob)
proc/goonchem_vortex(var/turf/simulated/T, var/setting_type, var/range, var/pull_times)
for(var/atom/movable/X in orange(range, T))
if(istype(X, /obj/effect))
continue // stop pulling smoke and hotspots please
if(istype(X, /atom/movable))
if((X) && !X.anchored)
if(setting_type)

View File

@@ -26,25 +26,27 @@ datum/reagent/histamine
reagent_state = LIQUID
color = "#CF3600" // rgb: 207, 54, 0
metabolization_rate = 0.2
overdose_threshold = 30
datum/reagent/histamine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(volume >= 30)
M.adjustOxyLoss(pick(2,5)*REM)
M.adjustBruteLoss(pick(2,5)*REM)
M.adjustToxLoss(pick(2,5)*REM)
if(volume < 30)
switch(pick(1, 2, 3))
if(1)
M << "<span class='danger'>You are unable to look straight!</span>"
M.Dizzy(10)
if(2)
M.emote("cough")
var/obj/item/I = M.get_active_hand()
if(I)
M.drop_item()
if(3)
M.adjustBruteLoss(5*REM)
switch(pick(1, 2, 3))
if(1)
M << "<span class='danger'>You are unable to look straight!</span>"
M.Dizzy(10)
if(2)
M.emote("cough")
var/obj/item/I = M.get_active_hand()
if(I)
M.drop_item()
if(3)
M.adjustBruteLoss(1*REM)
..()
return
datum/reagent/histamine/overdose_process(var/mob/living/M as mob)
M.adjustOxyLoss(pick(2,5)*REM)
M.adjustBruteLoss(pick(2,5)*REM)
M.adjustToxLoss(pick(2,5)*REM)
..()
return
@@ -156,4 +158,41 @@ datum/reagent/questionmark/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.adjustToxLoss(1*REM)
..()
return
return
datum/reagent/itching_powder
name = "Itching Powder"
id = "itching_powder"
description = "Lots of annoying random effects, chances to do BRUTE damage from scratching. 6% chance to decay into 1-3 units of histamine."
reagent_state = LIQUID
color = "#CF3600" // rgb: 207, 54, 0
metabolization_rate = 0.3
/datum/reagent/itching_powder/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(method == TOUCH)
M.reagents.add_reagent("itching_powder", volume)
return
datum/reagent/itching_powder/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(rand(5,50)))
M << "You scratch at your head."
M.adjustBruteLoss(0.2*REM)
if(prob(rand(5,50)))
M << "You scratch at your leg."
M.adjustBruteLoss(0.2*REM)
if(prob(rand(5,50)))
M << "You scratch at your arm."
M.adjustBruteLoss(0.2*REM)
if(prob(6))
M.reagents.add_reagent("histamine",rand(1,3))
M.reagents.remove_reagent("itching_powder",1)
..()
return
/datum/chemical_reaction/itching_powder
name = "Itching Powder"
id = "itching_powder"
result = "itching_powder"
required_reagents = list("fuel" = 1, "ammonia" = 1)
result_amount = 2

View File

@@ -11,7 +11,9 @@ datum/reagents
var/maximum_volume = 100
var/atom/my_atom = null
var/chem_temp = 150
var/last_tick = 0
var/last_tick = 1
var/addiction_tick = 1
var/list/datum/reagent/addiction_list = new/list()
datum/reagents/New(maximum=100)
maximum_volume = maximum
@@ -197,12 +199,46 @@ datum/reagents/proc/trans_id_to(var/obj/target, var/reagent, var/amount=1, var/p
datum/reagents/proc/metabolize(var/mob/M)
if(last_tick == 3)
last_tick = 0
last_tick = 1
for(var/A in reagent_list)
var/datum/reagent/R = A
if(M && R)
if(M.reagent_check(R) != 1)
if(R.volume >= R.overdose_threshold && !R.overdosed && R.overdose_threshold > 0)
R.overdosed = 1
M << "<span class = 'userdanger'>You feel like you took too much of [R.name]!</span>"
if(R.volume >= R.addiction_threshold && !is_type_in_list(R, addiction_list) && R.addiction_threshold > 0)
var/datum/reagent/new_reagent = new R.type()
addiction_list.Add(new_reagent)
if(R.overdosed)
R.overdose_process(M)
if(is_type_in_list(R,addiction_list))
for(var/datum/reagent/addicted_reagent in addiction_list)
if(istype(R, addicted_reagent))
addicted_reagent.addiction_stage = -15 // you're satisfied for a good while.
R.on_mob_life(M)
if(addiction_tick == 6)
addiction_tick = 1
for(var/A in addiction_list)
var/datum/reagent/R = A
if(M && R)
if(R.addiction_stage < 0)
R.addiction_stage++
if(R.addiction_stage >= 0 && R.addiction_stage <= 10)
R.addiction_act_stage1(M)
R.addiction_stage++
if(R.addiction_stage >= 10 && R.addiction_stage <= 20)
R.addiction_act_stage2(M)
R.addiction_stage++
if(R.addiction_stage >= 20 && R.addiction_stage <= 30)
R.addiction_act_stage3(M)
R.addiction_stage++
if(R.addiction_stage > 30 && R.addiction_stage <= 40)
R.addiction_act_stage4(M)
if(R.addiction_stage > 40)
M << "<span class = 'notice'>You feel like you've gotten over your need for [R.name].</span>"
addiction_list.Remove(R)
addiction_tick++
last_tick++
update_total()

View File

@@ -1294,9 +1294,11 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
if(beaker)
if(beaker.reagents.chem_temp > temperature)
beaker.reagents.chem_temp = max(beaker.reagents.chem_temp-rate, temperature)
beaker.reagents.handle_reactions()
state_change = 1
else if(beaker.reagents.chem_temp < temperature)
beaker.reagents.chem_temp = min(beaker.reagents.chem_temp+rate, temperature)
beaker.reagents.handle_reactions()
state_change = 1
if(state_change)
SSnano.update_uis(src)

View File

@@ -24,6 +24,10 @@ datum/reagent
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
var/metabolization_rate = REAGENTS_METABOLISM
var/overrides_metab = 0
var/overdose_threshold = 0
var/addiction_threshold = 0
var/addiction_stage = 0
var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick.
datum/reagent/proc/reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //By default we have a chance to transfer some
if(!istype(M, /mob/living))
@@ -88,6 +92,31 @@ datum/reagent/proc/on_merge(var/data)
datum/reagent/proc/on_update(var/atom/A)
return
// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects
datum/reagent/proc/overdose_process(var/mob/living/M as mob)
return
datum/reagent/proc/addiction_act_stage1(var/mob/living/M as mob)
if(prob(30))
M << "<span class = 'notice'>You feel like some [name] right about now.</span>"
return
datum/reagent/proc/addiction_act_stage2(var/mob/living/M as mob)
if(prob(30))
M << "<span class = 'notice'>You feel like you need [name]. You just can't get enough.</span>"
return
datum/reagent/proc/addiction_act_stage3(var/mob/living/M as mob)
if(prob(30))
M << "<span class = 'danger'>You have an intense craving for [name].</span>"
return
datum/reagent/proc/addiction_act_stage4(var/mob/living/M as mob)
if(prob(30))
M << "<span class = 'userdanger'>You're not feeling good at all! You really need some [name].</span>"
return
datum/reagent/blood
data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Blood"

View File

@@ -137,27 +137,15 @@ datum/reagent/medicine/cryoxadone
color = "#C8A5DC" // rgb: 200, 165, 220
datum/reagent/medicine/cryoxadone/on_mob_life(var/mob/living/M as mob)
if(M.stat != DEAD && M.bodytemperature < 170)
M.adjustCloneLoss(-1)
M.adjustOxyLoss(-3)
M.heal_organ_damage(3,3)
M.adjustToxLoss(-3)
..()
return
datum/reagent/medicine/clonexadone
name = "Clonexadone"
id = "clonexadone"
description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' clones that get ejected early when used in conjunction with a cryo tube."
color = "#C8A5DC" // rgb: 200, 165, 220
datum/reagent/medicine/clonexadone/on_mob_life(var/mob/living/M as mob)
if(M.stat != DEAD && M.bodytemperature < 170)
if(M.stat != DEAD && M.bodytemperature < 270)
M.adjustCloneLoss(-3)
M.adjustOxyLoss(-3)
M.adjustOxyLoss(-10)
M.heal_organ_damage(3,3)
M.adjustBruteLoss(-3)
M.adjustFireLoss(-3)
M.adjustToxLoss(-3)
M.status_flags &= ~DISFIGURED
..()
return

View File

@@ -222,30 +222,6 @@ datum/reagent/toxin/pestkiller/reaction_mob(var/mob/living/M, var/method=TOUCH,
if(!C.wear_mask) // If not wearing a mask
C.adjustToxLoss(2) // 4 toxic damage per application, doubled for some reason
datum/reagent/toxin/stoxin
name = "Sleep Toxin"
id = "stoxin"
description = "An effective hypnotic used to treat insomnia."
color = "#E895CC" // rgb: 232, 149, 204
toxpwr = 0
datum/reagent/toxin/stoxin/on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
switch(data)
if(1 to 12)
if(prob(5)) M.emote("yawn")
if(12 to 15)
M.eye_blurry = max(M.eye_blurry, 10)
if(15 to 25)
M.drowsyness = max(M.drowsyness, 20)
if(25 to INFINITY)
M.Paralyse(20)
M.drowsyness = max(M.drowsyness, 30)
data++
..()
return
datum/reagent/toxin/spore
name = "Spore Toxin"
id = "spore"

View File

@@ -150,21 +150,6 @@ silicate
required_reagents = list("potassium" = 1, "oxygen" = 1, "sugar" = 1)
result_amount = 3
/datum/chemical_reaction/cryoxadone
name = "Cryoxadone"
id = "cryoxadone"
result = "cryoxadone"
required_reagents = list("salbutamol" = 1, "water" = 1, "oxygen" = 1)
result_amount = 3
/datum/chemical_reaction/clonexadone
name = "Clonexadone"
id = "clonexadone"
result = "clonexadone"
required_reagents = list("cryoxadone" = 1, "sodium" = 1)
required_catalysts = list("plasma" = 5)
result_amount = 2
/datum/chemical_reaction/spaceacillin
name = "Spaceacillin"
id = "spaceacillin"
@@ -179,20 +164,6 @@ silicate
required_reagents = list("water" = 1, "carbon" = 1, "charcoal" = 1)
result_amount = 2
/datum/chemical_reaction/ethylredoxrazine
name = "Ethylredoxrazine"
id = "ethylredoxrazine"
result = "ethylredoxrazine"
required_reagents = list("oxygen" = 1, "charcoal" = 1, "carbon" = 1)
result_amount = 3
/datum/chemical_reaction/ethanoloxidation
name = "ethanoloxidation" //Kind of a placeholder in case someone ever changes it so that chemicals
id = "ethanoloxidation" // react in the body. Also it would be silly if it didn't exist.
result = "water"
required_reagents = list("ethylredoxrazine" = 1, "ethanol" = 1)
result_amount = 2
/datum/chemical_reaction/glycerol
name = "Glycerol"
id = "glycerol"

View File

@@ -42,11 +42,11 @@
icon_state = "bottle12"
spawned_reagent = "cyanide"
/obj/item/weapon/reagent_containers/glass/bottle/stoxin
/obj/item/weapon/reagent_containers/glass/bottle/morphine
name = "sleep-toxin bottle"
desc = "A small bottle of sleep toxins. Just the fumes make you sleepy."
icon_state = "bottle20"
spawned_reagent = "stoxin"
spawned_reagent = "morphine"
/obj/item/weapon/reagent_containers/glass/bottle/morphine
name = "morphine bottle"
@@ -66,7 +66,7 @@
name = "charcoal bottle"
desc = "A small bottle of charcoal."
icon_state = "bottle17"
spawned_reagent = "salglu_solution"
spawned_reagent = "charcoal"
/obj/item/weapon/reagent_containers/glass/bottle/mutagen
name = "unstable mutagen bottle"

View File

@@ -123,7 +123,7 @@ obj/item/weapon/reagent_containers/hypospray/combat/nanites
name = "stimpack medipen"
desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor at the cost of some shortness of breath."
icon_state = "stimpen"
starting_reagent = "morphine"
starting_reagent = "ephedrine"
starting_amount = 9
/obj/item/weapon/reagent_containers/hypospray/medipen/stimpack/New()

View File

@@ -27,7 +27,7 @@
/obj/item/weapon/reagent_containers/pill/patch/styptic/New()
..()
reagents.add_reagent("styptic_powder", 25)
reagents.add_reagent("styptic_powder", 50)
/obj/item/weapon/reagent_containers/pill/patch/silver_sulf
name = "silver sulfadiazine patch"
@@ -35,4 +35,4 @@
/obj/item/weapon/reagent_containers/pill/patch/silver_sulf/New()
..()
reagents.add_reagent("silver_sulfadiazine", 25)
reagents.add_reagent("silver_sulfadiazine", 50)

View File

@@ -106,13 +106,13 @@
reagents.add_reagent("adminordrazine", 50)
/obj/item/weapon/reagent_containers/pill/stox
name = "sleeping pill"
/obj/item/weapon/reagent_containers/pill/morphine
name = "morphine pill"
desc = "Commonly used to treat insomnia."
icon_state = "pill8"
/obj/item/weapon/reagent_containers/pill/stox/New()
/obj/item/weapon/reagent_containers/pill/morphine/New()
..()
reagents.add_reagent("stoxin", 30)
reagents.add_reagent("morphine", 30)
/obj/item/weapon/reagent_containers/pill/stimulant
name = "stimulant pill"
@@ -121,7 +121,7 @@
/obj/item/weapon/reagent_containers/pill/stimulant/New()
..()
reagents.add_reagent("morphine", 10)
reagents.add_reagent("ephedrine", 10)
reagents.add_reagent("ethylredoxrazine", 10)
reagents.add_reagent("coffee", 30)