/
medicine_reagents.dm
1576 lines (1377 loc) · 63 KB
/
medicine_reagents.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//////////////////////////////////////////////////////////////////////////////////////////
// MEDICINE REAGENTS
//////////////////////////////////////////////////////////////////////////////////////
// where all the reagents related to medicine go.
/datum/reagent/medicine
name = "Medicine"
taste_description = "bitterness"
failed_chem = /datum/reagent/impurity/healing/medicine_failure
/datum/reagent/medicine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
current_cycle++
if(length(reagent_removal_skip_list))
return
holder.remove_reagent(type, metabolization_rate * delta_time / M.metabolism_efficiency) //medicine reagents stay longer if you have a better metabolism
/datum/reagent/medicine/leporazine
name = "Leporazine"
description = "Leporazine will effectively regulate a patient's body temperature, ensuring it never leaves safe levels."
ph = 8.4
color = "#DB90C6"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/leporazine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/target_temp = M.get_body_temp_normal(apply_change=FALSE)
if(M.bodytemperature > target_temp)
M.adjust_bodytemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, target_temp)
else if(M.bodytemperature < (target_temp + 1))
M.adjust_bodytemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 0, target_temp)
if(ishuman(M))
var/mob/living/carbon/human/humi = M
if(humi.coretemperature > target_temp)
humi.adjust_coretemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, target_temp)
else if(humi.coretemperature < (target_temp + 1))
humi.adjust_coretemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 0, target_temp)
..()
/datum/reagent/medicine/adminordrazine //An OP chemical for admins
name = "Adminordrazine"
description = "It's magic. We don't have to explain it."
color = "#E0BB00" //golden for the gods
taste_description = "badmins"
chemical_flags = REAGENT_DEAD_PROCESS
// The best stuff there is. For testing/debugging.
/datum/reagent/medicine/adminordrazine/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
. = ..()
if(chems.has_reagent(type, 1))
mytray.adjustWater(round(chems.get_reagent_amount(type) * 1))
mytray.adjustHealth(round(chems.get_reagent_amount(type) * 1))
mytray.adjustPests(-rand(1,5))
mytray.adjustWeeds(-rand(1,5))
if(chems.has_reagent(type, 3))
switch(rand(100))
if(66 to 100)
mytray.mutatespecie()
if(33 to 65)
mytray.mutateweed()
if(1 to 32)
mytray.mutatepest(user)
else if(prob(20))
mytray.visible_message(span_warning("Nothing happens..."))
/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.heal_bodypart_damage(5 * REM * delta_time, 5 * REM * delta_time)
M.adjustToxLoss(-5 * REM * delta_time, FALSE, TRUE)
M.setOxyLoss(0, 0)
M.setCloneLoss(0, 0)
M.set_blurriness(0)
M.set_blindness(0)
M.SetKnockdown(0)
M.SetStun(0)
M.SetUnconscious(0)
M.SetParalyzed(0)
M.SetImmobilized(0)
M.set_confusion(0)
M.SetSleeping(0)
M.silent = FALSE
M.dizziness = 0
M.disgust = 0
M.drowsyness = 0
M.stuttering = 0
M.slurring = 0
M.jitteriness = 0
M.hallucination = 0
M.radiation = 0
REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT))
M.reagents.remove_all_type(/datum/reagent/toxin, 5 * REM * delta_time, FALSE, TRUE)
if(M.blood_volume < BLOOD_VOLUME_NORMAL)
M.blood_volume = BLOOD_VOLUME_NORMAL
M.cure_all_traumas(TRAUMA_RESILIENCE_MAGIC)
for(var/organ in M.internal_organs)
var/obj/item/organ/O = organ
O.setOrganDamage(0)
for(var/thing in M.diseases)
var/datum/disease/D = thing
if(D.severity == DISEASE_SEVERITY_POSITIVE)
continue
D.cure()
..()
. = TRUE
/datum/reagent/medicine/adminordrazine/quantum_heal
name = "Quantum Medicine"
description = "Rare and experimental particles, that apparently swap the user's body with one from an alternate dimension where it's completely healthy."
taste_description = "science"
/datum/reagent/medicine/synaptizine
name = "Synaptizine"
description = "Increases resistance to stuns as well as reducing drowsiness and hallucinations."
color = "#FF00FF"
ph = 4
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.drowsyness = max(M.drowsyness - (5 * REM * delta_time), 0)
M.AdjustStun(-20 * REM * delta_time)
M.AdjustKnockdown(-20 * REM * delta_time)
M.AdjustUnconscious(-20 * REM * delta_time)
M.AdjustImmobilized(-20 * REM * delta_time)
M.AdjustParalyzed(-20 * REM * delta_time)
if(holder.has_reagent(/datum/reagent/toxin/mindbreaker))
holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5 * REM * delta_time)
M.hallucination = max(M.hallucination - (10 * REM * delta_time), 0)
if(DT_PROB(16, delta_time))
M.adjustToxLoss(1, 0)
. = TRUE
..()
/datum/reagent/medicine/synaphydramine
name = "Diphen-Synaptizine"
description = "Reduces drowsiness, hallucinations, and Histamine from body."
color = "#EC536D" // rgb: 236, 83, 109
ph = 5.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.drowsyness = max(M.drowsyness - (5 * REM * delta_time), 0)
if(holder.has_reagent(/datum/reagent/toxin/mindbreaker))
holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5 * REM * delta_time)
if(holder.has_reagent(/datum/reagent/toxin/histamine))
holder.remove_reagent(/datum/reagent/toxin/histamine, 5 * REM * delta_time)
M.hallucination = max(M.hallucination - (10 * REM * delta_time), 0)
if(DT_PROB(16, delta_time))
M.adjustToxLoss(1, 0)
. = TRUE
..()
/datum/reagent/medicine/cryoxadone
name = "Cryoxadone"
description = "A chemical mixture with almost magical healing powers. Its main limitation is that the patient's body temperature must be under 270K for it to metabolise correctly."
color = "#0000C8"
taste_description = "blue"
ph = 11
burning_temperature = 20 //cold burning
burning_volume = 0.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/power = -0.00003 * (M.bodytemperature ** 2) + 3
if(M.bodytemperature < T0C)
M.adjustOxyLoss(-3 * power * REM * delta_time, 0)
M.adjustBruteLoss(-power * REM * delta_time, 0)
M.adjustFireLoss(-power * REM * delta_time, 0)
M.adjustToxLoss(-power * REM * delta_time, 0, TRUE) //heals TOXINLOVERs
M.adjustCloneLoss(-power * REM * delta_time, 0)
for(var/i in M.all_wounds)
var/datum/wound/iter_wound = i
iter_wound.on_xadone(power * REAGENTS_EFFECT_MULTIPLIER * delta_time)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration
. = TRUE
metabolization_rate = REAGENTS_METABOLISM * (0.00001 * (M.bodytemperature ** 2) + 0.5)
..()
// Healing
/datum/reagent/medicine/cryoxadone/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
. = ..()
mytray.adjustHealth(round(chems.get_reagent_amount(type) * 3))
mytray.adjustToxic(-round(chems.get_reagent_amount(type) * 3))
/datum/reagent/medicine/clonexadone
name = "Clonexadone"
description = "A chemical that derives from Cryoxadone. It specializes in healing clone damage, but nothing else. Requires very cold temperatures to properly metabolize, and metabolizes quicker than cryoxadone."
color = "#3D3DC6"
taste_description = "muscle"
ph = 13
metabolization_rate = 1.5 * REAGENTS_METABOLISM
/datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.bodytemperature < T0C)
M.adjustCloneLoss((0.00006 * (M.bodytemperature ** 2) - 6) * REM * delta_time, 0)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
. = TRUE
metabolization_rate = REAGENTS_METABOLISM * (0.000015 * (M.bodytemperature ** 2) + 0.75)
..()
/datum/reagent/medicine/pyroxadone
name = "Pyroxadone"
description = "A mixture of cryoxadone and slime jelly, that apparently inverses the requirement for its activation."
color = "#f7832a"
taste_description = "spicy jelly"
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
var/power = 0
switch(M.bodytemperature)
if(BODYTEMP_HEAT_DAMAGE_LIMIT to 400)
power = 2
if(400 to 460)
power = 3
else
power = 5
if(M.on_fire)
power *= 2
M.adjustOxyLoss(-2 * power * REM * delta_time, FALSE)
M.adjustBruteLoss(-power * REM * delta_time, FALSE)
M.adjustFireLoss(-1.5 * power * REM * delta_time, FALSE)
M.adjustToxLoss(-power * REM * delta_time, FALSE, TRUE)
M.adjustCloneLoss(-power * REM * delta_time, FALSE)
for(var/i in M.all_wounds)
var/datum/wound/iter_wound = i
iter_wound.on_xadone(power * REAGENTS_EFFECT_MULTIPLIER * delta_time)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
. = TRUE
..()
/datum/reagent/medicine/rezadone
name = "Rezadone"
description = "A powder derived from fish toxin, Rezadone can effectively treat genetic damage as well as restoring minor wounds and restoring corpses husked by burns. Overdose will cause intense nausea and minor toxin damage."
reagent_state = SOLID
color = "#669900" // rgb: 102, 153, 0
overdose_threshold = 30
ph = 12.2
taste_description = "fish"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/rezadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. // No such luck so far
M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
..()
. = TRUE
/datum/reagent/medicine/rezadone/overdose_process(mob/living/M, delta_time, times_fired)
M.adjustToxLoss(1 * REM * delta_time, 0)
M.Dizzy(5 * REM * delta_time)
M.Jitter(5 * REM * delta_time)
..()
. = TRUE
/datum/reagent/medicine/rezadone/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
. = ..()
if(!iscarbon(exposed_mob))
return
var/mob/living/carbon/patient = exposed_mob
if(reac_volume >= 5 && HAS_TRAIT_FROM(patient, TRAIT_HUSK, BURN) && patient.getFireLoss() < UNHUSK_DAMAGE_THRESHOLD) //One carp yields 12u rezadone.
patient.cure_husk(BURN)
patient.visible_message(span_nicegreen("[patient]'s body rapidly absorbs moisture from the environment, taking on a more healthy appearance."))
/datum/reagent/medicine/spaceacillin
name = "Spaceacillin"
description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with. Also reduces infection in serious burns."
color = "#E1F2E6"
metabolization_rate = 0.1 * REAGENTS_METABOLISM
ph = 8.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
//Goon Chems. Ported mainly from Goonstation. Easily mixable (or not so easily) and provide a variety of effects.
/datum/reagent/medicine/oxandrolone
name = "Oxandrolone"
description = "Stimulates the healing of severe burns. Extremely rapidly heals severe burns and slowly heals minor ones. Overdose will worsen existing burns."
reagent_state = LIQUID
color = "#1E8BFF"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 25
ph = 10.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/oxandrolone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.getFireLoss() > 25)
M.adjustFireLoss(-4 * REM * delta_time, 0) //Twice as effective as AIURI for severe burns
else
M.adjustFireLoss(-0.5 * REM * delta_time, 0) //But only a quarter as effective for more minor ones
..()
. = TRUE
/datum/reagent/medicine/oxandrolone/overdose_process(mob/living/M, delta_time, times_fired)
if(M.getFireLoss()) //It only makes existing burns worse
M.adjustFireLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
. = TRUE
..()
/datum/reagent/medicine/salglu_solution
name = "Saline-Glucose Solution"
description = "Has a 33% chance per metabolism cycle to heal brute and burn damage. Can be used as a temporary blood substitute, as well as slowly speeding blood regeneration."
reagent_state = LIQUID
color = "#DCDCDC"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 60
taste_description = "sweetness and salt"
var/last_added = 0
var/maximum_reachable = BLOOD_VOLUME_NORMAL - 10 //So that normal blood regeneration can continue with salglu active
var/extra_regen = 0.25 // in addition to acting as temporary blood, also add about half this much to their actual blood per second
ph = 5.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(last_added)
M.blood_volume -= last_added
last_added = 0
if(M.blood_volume < maximum_reachable) //Can only up to double your effective blood level.
var/amount_to_add = min(M.blood_volume, 5*volume)
var/new_blood_level = min(M.blood_volume + amount_to_add, maximum_reachable)
last_added = new_blood_level - M.blood_volume
M.blood_volume = new_blood_level + (extra_regen * REM * delta_time)
if(DT_PROB(18, delta_time))
M.adjustBruteLoss(-0.5, 0)
M.adjustFireLoss(-0.5, 0)
. = TRUE
..()
/datum/reagent/medicine/salglu_solution/overdose_process(mob/living/M, delta_time, times_fired)
if(DT_PROB(1.5, delta_time))
to_chat(M, span_warning("You feel salty."))
holder.add_reagent(/datum/reagent/consumable/salt, 1)
holder.remove_reagent(/datum/reagent/medicine/salglu_solution, 0.5)
else if(DT_PROB(1.5, delta_time))
to_chat(M, span_warning("You feel sweet."))
holder.add_reagent(/datum/reagent/consumable/sugar, 1)
holder.remove_reagent(/datum/reagent/medicine/salglu_solution, 0.5)
if(DT_PROB(18, delta_time))
M.adjustBruteLoss(0.5, FALSE, FALSE, BODYPART_ORGANIC)
M.adjustFireLoss(0.5, FALSE, FALSE, BODYPART_ORGANIC)
. = TRUE
..()
/datum/reagent/medicine/mine_salve
name = "Miner's Salve"
description = "A powerful painkiller. Restores bruising and burns in addition to making the patient believe they are fully healed. Also great for treating severe burn wounds in a pinch."
reagent_state = LIQUID
color = "#6D6374"
metabolization_rate = 0.4 * REAGENTS_METABOLISM
ph = 2.6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
C.hal_screwyhud = SCREWYHUD_HEALTHY
C.adjustBruteLoss(-0.25 * REM * delta_time, 0)
C.adjustFireLoss(-0.25 * REM * delta_time, 0)
..()
return TRUE
/datum/reagent/medicine/mine_salve/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume, show_message = TRUE)
. = ..()
if(!iscarbon(exposed_mob) || (exposed_mob.stat == DEAD))
return
if(methods & (INGEST|VAPOR|INJECT))
exposed_mob.adjust_nutrition(-5)
if(show_message)
to_chat(exposed_mob, span_warning("Your stomach feels empty and cramps!"))
if(methods & (PATCH|TOUCH))
var/mob/living/carbon/exposed_carbon = exposed_mob
for(var/s in exposed_carbon.surgeries)
var/datum/surgery/surgery = s
surgery.speed_modifier = max(0.1, surgery.speed_modifier)
if(show_message)
to_chat(exposed_carbon, span_danger("You feel your injuries fade away to nothing!") )
/datum/reagent/medicine/mine_salve/on_mob_end_metabolize(mob/living/M)
if(iscarbon(M))
var/mob/living/carbon/N = M
N.hal_screwyhud = SCREWYHUD_NONE
..()
/datum/reagent/medicine/omnizine
name = "Omnizine"
description = "Slowly heals all damage types. Overdose will cause damage in all types instead."
reagent_state = LIQUID
color = "#DCDCDC"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
overdose_threshold = 30
var/healing = 0.5
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.adjustToxLoss(-healing * REM * delta_time, 0)
M.adjustOxyLoss(-healing * REM * delta_time, 0)
M.adjustBruteLoss(-healing * REM * delta_time, 0)
M.adjustFireLoss(-healing * REM * delta_time, 0)
..()
. = TRUE
/datum/reagent/medicine/omnizine/overdose_process(mob/living/M, delta_time, times_fired)
M.adjustToxLoss(1.5 * REM * delta_time, FALSE)
M.adjustOxyLoss(1.5 * REM * delta_time, FALSE)
M.adjustBruteLoss(1.5 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC)
M.adjustFireLoss(1.5 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC)
..()
. = TRUE
/datum/reagent/medicine/omnizine/protozine
name = "Protozine"
description = "A less environmentally friendly and somewhat weaker variant of omnizine."
color = "#d8c7b7"
healing = 0.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/calomel
name = "Calomel"
description = "Quickly purges the body of all chemicals. Toxin damage is dealt if the patient is in good condition."
reagent_state = LIQUID
color = "#19C832"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
taste_description = "acid"
ph = 1.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/calomel/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
for(var/datum/reagent/toxin/R in M.reagents.reagent_list)
M.reagents.remove_reagent(R.type, 3 * REM * delta_time)
if(M.health > 20)
M.adjustToxLoss(1 * REM * delta_time, 0)
. = TRUE
..()
/datum/reagent/medicine/potass_iodide
name = "Potassium Iodide"
description = "Efficiently restores low radiation damage."
reagent_state = LIQUID
color = "#BAA15D"
metabolization_rate = 2 * REAGENTS_METABOLISM
ph = 12 //It's a reducing agent
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.radiation > 0)
M.radiation -= min(8 * REM * delta_time, M.radiation)
..()
/datum/reagent/medicine/pen_acid
name = "Pentetic Acid"
description = "Reduces massive amounts of radiation and toxin damage while purging other chemicals from the body."
reagent_state = LIQUID
color = "#E6FFF0"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
ph = 1 //One of the best buffers, NEVERMIND!
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.radiation -= (max(M.radiation - RAD_MOB_SAFE, 0) / 50) * REM * delta_time
M.adjustToxLoss(-2 * REM * delta_time, 0)
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R != src)
M.reagents.remove_reagent(R.type, 2 * REM * delta_time)
..()
. = TRUE
/datum/reagent/medicine/sal_acid
name = "Salicylic Acid"
description = "Stimulates the healing of severe bruises. Extremely rapidly heals severe bruising and slowly heals minor ones. Overdose will worsen existing bruising."
reagent_state = LIQUID
color = "#D2D2D2"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 25
ph = 2.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.getBruteLoss() > 25)
M.adjustBruteLoss(-4 * REM * delta_time, 0)
else
M.adjustBruteLoss(-0.5 * REM * delta_time, 0)
..()
. = TRUE
/datum/reagent/medicine/sal_acid/overdose_process(mob/living/M, delta_time, times_fired)
if(M.getBruteLoss()) //It only makes existing bruises worse
M.adjustBruteLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
. = TRUE
..()
/datum/reagent/medicine/salbutamol
name = "Salbutamol"
description = "Rapidly restores oxygen deprivation as well as preventing more of it to an extent."
reagent_state = LIQUID
color = "#00FFFF"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.adjustOxyLoss(-3 * REM * delta_time, 0)
if(M.losebreath >= 4)
M.losebreath -= 2 * REM * delta_time
..()
. = TRUE
/datum/reagent/medicine/ephedrine
name = "Ephedrine"
description = "Increases stun resistance and movement speed, giving you hand cramps. Overdose deals toxin damage and inhibits breathing."
reagent_state = LIQUID
color = "#D2FFFA"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 30
ph = 12
purity = REAGENT_STANDARD_PURITY
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 4) //1.6 per 2 seconds
inverse_chem = /datum/reagent/inverse/corazargh
inverse_chem_val = 0.4
/datum/reagent/medicine/ephedrine/on_mob_metabolize(mob/living/L)
..()
L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
ADD_TRAIT(L, TRAIT_STUNRESISTANCE, type)
/datum/reagent/medicine/ephedrine/on_mob_end_metabolize(mob/living/L)
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
REMOVE_TRAIT(L, TRAIT_STUNRESISTANCE, type)
..()
/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(DT_PROB(10 * (1-creation_purity), delta_time) && iscarbon(M))
var/obj/item/I = M.get_active_held_item()
if(I && M.dropItemToGround(I))
to_chat(M, span_notice("Your hands spaz out and you drop what you were holding!"))
M.Jitter(10)
M.AdjustAllImmobility(-20 * REM * delta_time * normalise_creation_purity())
M.adjustStaminaLoss(-1 * REM * delta_time * normalise_creation_purity(), FALSE)
..()
return TRUE
/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M, delta_time, times_fired)
if(DT_PROB(1 * normalise_creation_purity(), delta_time) && iscarbon(M))
var/datum/disease/D = new /datum/disease/heart_failure
M.ForceContractDisease(D)
to_chat(M, span_userdanger("You're pretty sure you just felt your heart stop for a second there.."))
M.playsound_local(M, 'sound/effects/singlebeat.ogg', 100, 0)
if(DT_PROB(3.5 * normalise_creation_purity(), delta_time))
to_chat(M, span_notice("[pick("Your head pounds.", "You feel a tight pain in your chest.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]"))
if(DT_PROB(18 * normalise_creation_purity(), delta_time))
M.adjustToxLoss(1, 0)
M.losebreath++
. = TRUE
return TRUE
/datum/reagent/medicine/diphenhydramine
name = "Diphenhydramine"
description = "Rapidly purges the body of Histamine and reduces jitteriness. Slight chance of causing drowsiness."
reagent_state = LIQUID
color = "#64FFE6"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
ph = 11.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(DT_PROB(5, delta_time))
M.drowsyness++
M.jitteriness -= 1 * REM * delta_time
holder.remove_reagent(/datum/reagent/toxin/histamine, 3 * REM * delta_time)
..()
/datum/reagent/medicine/morphine
name = "Morphine"
description = "A painkiller that allows the patient to move at full speed even when injured. Causes drowsiness and eventually unconsciousness in high doses. Overdose will cause a variety of effects, ranging from minor to lethal."
reagent_state = LIQUID
color = "#A9FBFB"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 30
ph = 8.96
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/opiods = 10)
/datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/L)
..()
L.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
/datum/reagent/medicine/morphine/on_mob_end_metabolize(mob/living/L)
L.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
..()
/datum/reagent/medicine/morphine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle >= 5)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "numb", /datum/mood_event/narcotic_medium, name)
switch(current_cycle)
if(11)
to_chat(M, span_warning("You start to feel tired...") )
if(12 to 24)
M.drowsyness += 1 * REM * delta_time
if(24 to INFINITY)
M.Sleeping(40 * REM * delta_time)
. = TRUE
..()
/datum/reagent/medicine/morphine/overdose_process(mob/living/M, delta_time, times_fired)
if(DT_PROB(18, delta_time))
M.drop_all_held_items()
M.Dizzy(2)
M.Jitter(2)
..()
/datum/reagent/medicine/oculine
name = "Oculine"
description = "Quickly restores eye damage, cures nearsightedness, and has a chance to restore vision to the blind."
reagent_state = LIQUID
color = "#404040" //oculine is dark grey, inacusiate is light grey
metabolization_rate = 0.25 * REAGENTS_METABOLISM
taste_description = "dull toxin"
purity = REAGENT_STANDARD_PURITY
ph = 10
impure_chem = null
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
inverse_chem = /datum/reagent/inverse/oculine
inverse_chem_val = 0.45
///The lighting alpha that the mob had on addition
var/delta_light
/datum/reagent/medicine/oculine/on_mob_add(mob/living/owner)
if(!iscarbon(owner))
return
RegisterSignal(owner, COMSIG_CARBON_GAIN_ORGAN, .proc/on_gained_organ)
RegisterSignal(owner, COMSIG_CARBON_LOSE_ORGAN, .proc/on_removed_organ)
var/obj/item/organ/eyes/eyes = owner.getorganslot(ORGAN_SLOT_EYES)
if(!eyes)
return
improve_eyesight(owner, eyes)
/datum/reagent/medicine/oculine/proc/improve_eyesight(mob/living/carbon/owner, obj/item/organ/eyes/eyes)
delta_light = creation_purity*30
if(eyes.lighting_alpha)
eyes.lighting_alpha -= delta_light
else
eyes.lighting_alpha = 255 - delta_light
eyes.see_in_dark += 3
owner.update_sight()
/datum/reagent/medicine/oculine/proc/restore_eyesight(mob/living/carbon/owner, obj/item/organ/eyes/eyes)
eyes.lighting_alpha += delta_light
eyes.see_in_dark -= 3
owner.update_sight()
/datum/reagent/medicine/oculine/proc/on_gained_organ(mob/owner, obj/item/organ/organ)
SIGNAL_HANDLER
if(!istype(organ, /obj/item/organ/eyes))
return
var/obj/item/organ/eyes/eyes = organ
improve_eyesight(owner, eyes)
/datum/reagent/medicine/oculine/proc/on_removed_organ(mob/prev_owner, obj/item/organ/organ)
SIGNAL_HANDLER
if(!istype(organ, /obj/item/organ/eyes))
return
var/obj/item/organ/eyes/eyes = organ
restore_eyesight(prev_owner, eyes)
/datum/reagent/medicine/oculine/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
owner.adjust_blindness(-2 * REM * delta_time * normalise_creation_purity())
owner.adjust_blurriness(-2 * REM * delta_time * normalise_creation_purity())
var/obj/item/organ/eyes/eyes = owner.getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return ..()
var/fix_prob = 10
if(creation_purity >= 1)
fix_prob = 100
eyes.applyOrganDamage(-2 * REM * delta_time * normalise_creation_purity())
if(HAS_TRAIT_FROM(owner, TRAIT_BLIND, EYE_DAMAGE))
if(DT_PROB(fix_prob, delta_time))
to_chat(owner, span_warning("Your vision slowly returns..."))
owner.cure_blind(EYE_DAMAGE)
owner.cure_nearsighted(EYE_DAMAGE)
owner.blur_eyes(35)
else if(HAS_TRAIT_FROM(owner, TRAIT_NEARSIGHT, EYE_DAMAGE))
to_chat(owner, span_warning("The blackness in your peripheral vision fades."))
owner.cure_nearsighted(EYE_DAMAGE)
owner.blur_eyes(10)
..()
/datum/reagent/medicine/oculine/on_mob_delete(mob/living/owner)
var/obj/item/organ/eyes/eyes = owner.getorganslot(ORGAN_SLOT_EYES)
if(!eyes)
return
restore_eyesight(owner, eyes)
..()
/datum/reagent/medicine/inacusiate
name = "Inacusiate"
description = "Rapidly repairs damage to the patient's ears to cure deafness, assuming the source of said deafness isn't from genetic mutations, chronic deafness, or a total defecit of ears." //by "chronic" deafness, we mean people with the "deaf" quirk
color = "#606060" // ditto
ph = 2
purity = REAGENT_STANDARD_PURITY
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
impure_chem = /datum/reagent/impurity/inacusiate
inverse_chem_val = 0.3
inverse_chem = /datum/reagent/impurity/inacusiate
/datum/reagent/medicine/inacusiate/on_mob_add(mob/living/owner, amount)
. = ..()
if(creation_purity >= 1)
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/owner_hear)
//Lets us hear whispers from far away!
/datum/reagent/medicine/inacusiate/proc/owner_hear(datum/source, message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, list/message_mods = list())
SIGNAL_HANDLER
if(!isliving(holder.my_atom))
return
var/mob/living/owner = holder.my_atom
var/atom/movable/composer = holder.my_atom
if(message_mods[WHISPER_MODE])
message = composer.compose_message(owner, message_language, message, , spans, message_mods)
/datum/reagent/medicine/inacusiate/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
var/obj/item/organ/ears/ears = owner.getorganslot(ORGAN_SLOT_EARS)
if(!ears)
return ..()
ears.adjustEarDamage(-4 * REM * delta_time * normalise_creation_purity(), -4 * REM * delta_time * normalise_creation_purity())
..()
/datum/reagent/medicine/inacusiate/on_mob_delete(mob/living/owner)
. = ..()
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
/datum/reagent/medicine/atropine
name = "Atropine"
description = "If a patient is in critical condition, rapidly heals all damage types as well as regulating oxygen in the body. Excellent for stabilizing wounded patients."
reagent_state = LIQUID
color = "#1D3535" //slightly more blue, like epinephrine
metabolization_rate = 0.25 * REAGENTS_METABOLISM
overdose_threshold = 35
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/atropine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.health <= M.crit_threshold)
M.adjustToxLoss(-2 * REM * delta_time, 0)
M.adjustBruteLoss(-2* REM * delta_time, 0)
M.adjustFireLoss(-2 * REM * delta_time, 0)
M.adjustOxyLoss(-5 * REM * delta_time, 0)
. = TRUE
M.losebreath = 0
if(DT_PROB(10, delta_time))
M.Dizzy(5)
M.Jitter(5)
..()
/datum/reagent/medicine/atropine/overdose_process(mob/living/M, delta_time, times_fired)
M.adjustToxLoss(0.5 * REM * delta_time, 0)
. = TRUE
M.Dizzy(1 * REM * delta_time)
M.Jitter(1 * REM * delta_time)
..()
/datum/reagent/medicine/epinephrine
name = "Epinephrine"
description = "Very minor boost to stun resistance. Slowly heals damage if a patient is in critical condition, as well as regulating oxygen loss. Overdose causes weakness and toxin damage."
reagent_state = LIQUID
color = "#D2FFFA"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
overdose_threshold = 30
ph = 10.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/epinephrine/on_mob_metabolize(mob/living/carbon/M)
..()
ADD_TRAIT(M, TRAIT_NOCRITDAMAGE, type)
/datum/reagent/medicine/epinephrine/on_mob_end_metabolize(mob/living/carbon/M)
REMOVE_TRAIT(M, TRAIT_NOCRITDAMAGE, type)
..()
/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = TRUE
if(holder.has_reagent(/datum/reagent/toxin/lexorin))
holder.remove_reagent(/datum/reagent/toxin/lexorin, 2 * REM * delta_time)
holder.remove_reagent(/datum/reagent/medicine/epinephrine, 1 * REM * delta_time)
if(DT_PROB(10, delta_time))
holder.add_reagent(/datum/reagent/toxin/histamine, 4)
..()
return
if(M.health <= M.crit_threshold)
M.adjustToxLoss(-0.5 * REM * delta_time, 0)
M.adjustBruteLoss(-0.5 * REM * delta_time, 0)
M.adjustFireLoss(-0.5 * REM * delta_time, 0)
M.adjustOxyLoss(-0.5 * REM * delta_time, 0)
if(M.losebreath >= 4)
M.losebreath -= 2 * REM * delta_time
if(M.losebreath < 0)
M.losebreath = 0
M.adjustStaminaLoss(-0.5 * REM * delta_time, 0)
if(DT_PROB(10, delta_time))
M.AdjustAllImmobility(-20)
..()
/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M, delta_time, times_fired)
if(DT_PROB(18, REM * delta_time))
M.adjustStaminaLoss(2.5, 0)
M.adjustToxLoss(1, 0)
M.losebreath++
. = TRUE
..()
/datum/reagent/medicine/strange_reagent
name = "Strange Reagent"
description = "A miracle drug capable of bringing the dead back to life. Works topically unless anotamically complex, in which case works orally. Only works if the target has less than 200 total brute and burn damage and hasn't been husked and requires more reagent depending on damage inflicted. Causes damage to the living."
reagent_state = LIQUID
color = "#A0E85E"
metabolization_rate = 1.25 * REAGENTS_METABOLISM
taste_description = "magnets"
harmful = TRUE
ph = 0.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
// FEED ME SEYMOUR
/datum/reagent/medicine/strange_reagent/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
. = ..()
if(chems.has_reagent(type, 1))
mytray.spawnplant()
/datum/reagent/medicine/strange_reagent/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
if(exposed_mob.stat != DEAD)
return ..()
if(exposed_mob.suiciding) //they are never coming back
exposed_mob.visible_message(span_warning("[exposed_mob]'s body does not react..."))
return
if(iscarbon(exposed_mob) && !(methods & INGEST)) //simplemobs can still be splashed
return ..()
var/amount_to_revive = round((exposed_mob.getBruteLoss()+exposed_mob.getFireLoss())/20)
if(exposed_mob.getBruteLoss()+exposed_mob.getFireLoss() >= 200 || HAS_TRAIT(exposed_mob, TRAIT_HUSK) || reac_volume < amount_to_revive) //body will die from brute+burn on revive or you haven't provided enough to revive.
exposed_mob.visible_message(span_warning("[exposed_mob]'s body convulses a bit, and then falls still once more."))
exposed_mob.do_jitter_animation(10)
return
exposed_mob.visible_message(span_warning("[exposed_mob]'s body starts convulsing!"))
exposed_mob.notify_ghost_cloning("Your body is being revived with Strange Reagent!")
exposed_mob.do_jitter_animation(10)
var/excess_healing = 5*(reac_volume-amount_to_revive) //excess reagent will heal blood and organs across the board
addtimer(CALLBACK(exposed_mob, /mob/living/carbon.proc/do_jitter_animation, 10), 40) //jitter immediately, then again after 4 and 8 seconds
addtimer(CALLBACK(exposed_mob, /mob/living/carbon.proc/do_jitter_animation, 10), 80)
addtimer(CALLBACK(exposed_mob, /mob/living.proc/revive, FALSE, FALSE, excess_healing), 79)
..()
/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/damage_at_random = rand(0, 250)/100 //0 to 2.5
M.adjustBruteLoss(damage_at_random * REM * delta_time, FALSE)
M.adjustFireLoss(damage_at_random * REM * delta_time, FALSE)
..()
. = TRUE
/datum/reagent/medicine/mannitol
name = "Mannitol"
description = "Efficiently restores brain damage."
color = "#A0A0A0" //mannitol is light grey, neurine is lighter grey
ph = 10.4
overdose_threshold = 15
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
purity = REAGENT_STANDARD_PURITY
impure_chem = /datum/reagent/impurity/mannitol
inverse_chem_val = 0.45
impure_chem = /datum/reagent/impurity/mannitol
/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2 * REM * delta_time * normalise_creation_purity())
..()
//Having mannitol in you will pause the brain damage from brain tumor (so it heals an even 2 brain damage instead of 1.8)
/datum/reagent/medicine/mannitol/on_mob_metabolize(mob/living/carbon/owner)
. = ..()
ADD_TRAIT(owner, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
/datum/reagent/medicine/mannitol/on_mob_end_metabolize(mob/living/carbon/owner)
REMOVE_TRAIT(owner, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
. = ..()
/datum/reagent/medicine/mannitol/overdose_start(mob/living/owner)
to_chat(owner, span_notice("You suddenly feel </span><span class='purple'>E N L I G H T E N E D!"))
/datum/reagent/medicine/mannitol/overdose_process(mob/living/owner, delta_time, times_fired)
if(DT_PROB(65, delta_time))
return
var/list/tips
if(DT_PROB(50, delta_time))
tips = world.file2list("strings/tips.txt")
if(DT_PROB(50, delta_time))
tips = world.file2list("strings/sillytips.txt")
else
tips = world.file2list("strings/chemistrytips.txt")
var/message = pick(tips)
to_chat(owner, span_purple("<b>Tip of the round: </b>[html_encode(message)]"))
..()
/datum/reagent/medicine/neurine
name = "Neurine"
description = "Reacts with neural tissue, helping reform damaged connections. Can cure minor traumas."
color = "#C0C0C0" //ditto
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED | REAGENT_DEAD_PROCESS
purity = REAGENT_STANDARD_PURITY
impure_chem = /datum/reagent/inverse/neurine //if people get grumpy, delete this line
inverse_chem_val = 0.5
inverse_chem = /datum/reagent/inverse/neurine
///brain damage level when we first started taking the chem
var/initial_bdamage = 200
/datum/reagent/medicine/neurine/on_mob_add(mob/living/owner, amount)
. = ..()
ADD_TRAIT(owner, TRAIT_ANTICONVULSANT, name)
if(!iscarbon(owner))
return
var/mob/living/carbon/carbon = owner
if(creation_purity >= 1)
initial_bdamage = carbon.getOrganLoss(ORGAN_SLOT_BRAIN)
/datum/reagent/medicine/neurine/on_mob_delete(mob/living/owner)
. = ..()
REMOVE_TRAIT(owner, TRAIT_ANTICONVULSANT, name)
if(!iscarbon(owner))
return
var/mob/living/carbon/carbon = owner
if(initial_bdamage < carbon.getOrganLoss(ORGAN_SLOT_BRAIN))
carbon.setOrganLoss(ORGAN_SLOT_BRAIN, initial_bdamage)
/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/consumable/ethanol/neurotoxin))
holder.remove_reagent(/datum/reagent/consumable/ethanol/neurotoxin, 5 * REM * delta_time * normalise_creation_purity())
if(DT_PROB(8 * normalise_creation_purity(), delta_time))
owner.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
..()
/datum/reagent/medicine/neurine/on_mob_dead(mob/living/carbon/owner, delta_time)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * REM * delta_time * normalise_creation_purity())
..()
/datum/reagent/medicine/mutadone
name = "Mutadone"
description = "Removes jitteriness and restores genetic defects."
color = "#5096C8"
taste_description = "acid"
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.jitteriness = 0
if(M.has_dna())
M.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA), TRUE)
if(!QDELETED(M)) //We were a monkey, now a human
..()
/datum/reagent/medicine/antihol
name = "Antihol"
description = "Purges alcoholic substance from the patient's body and eliminates its side effects."
color = "#00B4C8"
taste_description = "raw egg"
ph = 4
purity = REAGENT_STANDARD_PURITY
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
inverse_chem_val = 0.35
inverse_chem = /datum/reagent/inverse/antihol
/datum/reagent/medicine/antihol/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.dizziness = 0
M.drowsyness = 0
M.slurring = 0
M.set_confusion(0)
M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3 * REM * delta_time * normalise_creation_purity(), FALSE, TRUE)
M.adjustToxLoss(-0.2 * REM * delta_time, 0)
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.drunkenness = max(H.drunkenness - (10 * REM * delta_time * normalise_creation_purity()), 0)
..()
. = TRUE
/datum/reagent/medicine/stimulants
name = "Stimulants"
description = "Increases stun resistance and movement speed in addition to restoring minor damage and weakness. Overdose causes weakness and toxin damage."
color = "#78008C"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 60
ph = 8.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 4) //0.8 per 2 seconds
/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L)
..()