-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathjungle_datums.dm
611 lines (513 loc) · 19.3 KB
/
jungle_datums.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
//screen shit
/atom/movable/screen/fullscreen/trip
icon_state = "trip"
layer = TRIP_LAYER
alpha = 0 //we animate it ourselves
//floor trip
/atom/movable/screen/fullscreen/ftrip
icon_state = "ftrip"
icon = 'yogstation/icons/mob/screen_full_big.dmi'
screen_loc = "CENTER-9,CENTER-7"
appearance_flags = TILE_BOUND
layer = ABOVE_OPEN_TURF_LAYER
alpha = 0 //we animate it ourselves
//wall trip
/atom/movable/screen/fullscreen/gtrip
icon_state = "gtrip"
icon = 'yogstation/icons/mob/screen_full_big.dmi'
screen_loc = "CENTER-9,CENTER-7"
appearance_flags = TILE_BOUND
layer = BELOW_MOB_LAYER
alpha = 0 //we animate it ourselves
// reagents
/datum/reagent/jungle
name = "Impossible Jungle Chem"
description = "A reagent that is impossible to make in the jungle."
can_synth = FALSE
taste_description = "jungle"
/datum/reagent/jungle/retrosacharide
name = "Retrosacharide"
description = "Sacharide with a twisting structure that resembles the golden spiral. It seeks to achieve stability, but it never seems to stop."
taste_description = "starch"
var/delta_healing = 5
/datum/reagent/jungle/retrosacharide/on_mob_life(mob/living/L)
. = ..()
var/brute = L.getBruteLoss()
var/fire = L.getFireLoss()
var/toxin = L.getToxLoss()
var/average = (brute + fire + toxin)/3
if(brute != fire || brute != toxin)
var/b_offset = clamp(average - brute,-delta_healing,delta_healing)
var/f_offset = clamp(average - fire,-delta_healing,delta_healing)
var/t_offset = clamp(average - toxin,-delta_healing,delta_healing)
L.adjustBruteLoss(b_offset,FALSE)
L.adjustFireLoss(f_offset,FALSE)
L.adjustToxLoss(t_offset)
return
switch(rand(0,2))
if(0)
L.adjustBruteLoss(-0.5)
if(1)
L.adjustFireLoss(-0.5)
if(2)
L.adjustToxLoss(-0.5)
/datum/reagent/jungle/jungle_scent
name = "Jungle scent"
description = "It reeks of the jungle pits, but I wonder if it has any effects do to that?"
taste_description = "jungle"
metabolization_rate = REAGENTS_METABOLISM / 2
var/has_mining = FALSE
/datum/reagent/jungle/jungle_scent/on_mob_metabolize(mob/living/L)
. = ..()
if("mining" in L.faction)
has_mining = TRUE
return
L.faction += "mining"
/datum/reagent/jungle/jungle_scent/on_mob_end_metabolize(mob/living/L)
. = ..()
if(has_mining)
return
L.faction -= "mining"
/datum/reagent/jungle/polybycin
name = "Polybycin"
description = "An unknown molecule with simmiliar structure to psychodelics found on terra, effects unknown."
taste_description = "colours"
metabolization_rate = REAGENTS_METABOLISM / 2
var/offset = 0
var/atom/movable/screen/fullscreen/trip/cached_screen
var/atom/movable/screen/fullscreen/ftrip/cached_screen_floor
var/atom/movable/screen/fullscreen/gtrip/cached_screen_game
/datum/reagent/jungle/polybycin/on_mob_metabolize(mob/living/L)
. = ..()
add_filters(L)
/datum/reagent/jungle/polybycin/on_mob_life(mob/living/L)
. = ..()
update_filters(L)
/datum/reagent/jungle/polybycin/on_mob_end_metabolize(mob/living/L)
remove_filters(L)
. = ..()
// I seperated these functions from the ones right above this comment for clarity, and because i wanted to seperate visual stuff from effects stuff, makes it easier to understand.
/datum/reagent/jungle/polybycin/proc/add_filters(mob/living/psychonaut)
if(!psychonaut.hud_used || !psychonaut.client)
return
// var/atom/movable/screen/plane_master/game_world/game_plane = psychonaut.hud_used.plane_masters["[GAME_PLANE]"]
//var/atom/movable/screen/plane_master/floor/floor_plane = psychonaut.hud_used.plane_masters["[FLOOR_PLANE]"]
var/atom/movable/plane_master_controller/game_plane_master_controller = psychonaut.hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
cached_screen = psychonaut.overlay_fullscreen("polycybin_trip",/atom/movable/screen/fullscreen/trip)
cached_screen_floor = psychonaut.overlay_fullscreen("polycybin_ftrip",/atom/movable/screen/fullscreen/ftrip)
cached_screen_game = psychonaut.overlay_fullscreen("polycybin_gtrip",/atom/movable/screen/fullscreen/gtrip)
game_plane_master_controller.add_filter("polycybin_ftrip", 1, alpha_mask_filter(render_source = FLOOR_PLANE))
game_plane_master_controller.add_filter("polycybin_gtrip", 1 , alpha_mask_filter())
/datum/reagent/jungle/polybycin/proc/remove_filters(mob/living/L)
if(!L.client)
return
cached_screen = null
cached_screen_floor = null
cached_screen_game = null
L.clear_fullscreen("polycybin_trip")
L.clear_fullscreen("polycybin_ftrip")
L.clear_fullscreen("polycybin_gtrip")
/datum/reagent/jungle/polybycin/update_filters(mob/living/L)
if(!L.client)
return
. = ..()
if(cached_screen)
animate(cached_screen, alpha = min(min(current_cycle,volume)/25,1)*255, time = 2 SECONDS)
if(cached_screen_floor)
animate(cached_screen_floor, alpha = min(min(current_cycle,volume)/25,1)*255, time = 2 SECONDS)
if(cached_screen_game)
animate(cached_screen_game, alpha = min(min(current_cycle,volume)/25,1)*255, time = 2 SECONDS)
/datum/ore_patch
var/ore_type
var/ore_quantity_lower
var/ore_quantity_upper
var/ore_color
var/overlay_state
/datum/ore_patch/proc/spawn_at(turf/T)
var/i = 0
var/amt = rand(ore_quantity_lower,ore_quantity_upper)
for(i = 0; i < amt; i++)
new ore_type(T)
/datum/ore_patch/iron
ore_type = /obj/item/stack/ore/iron
ore_quantity_upper = 2
ore_quantity_lower = 1
ore_color = "#878687"
overlay_state = "rock_Iron"
/datum/ore_patch/plasma
ore_type = /obj/item/stack/ore/plasma
ore_quantity_upper = 2
ore_quantity_lower = 1
ore_color = "#c716b8"
overlay_state = "rock_Plasma"
/datum/ore_patch/uranium
ore_type = /obj/item/stack/ore/uranium
ore_quantity_upper = 2
ore_quantity_lower = 1
ore_color = "#1fb83b"
overlay_state = "rock_Uranium"
/datum/ore_patch/titanium
ore_type = /obj/item/stack/ore/titanium
ore_quantity_upper = 2
ore_quantity_lower = 1
ore_color = "#b3c0c7"
overlay_state = "rock_Titanium"
/datum/ore_patch/gold
ore_type = /obj/item/stack/ore/gold
ore_quantity_upper = 1
ore_quantity_lower = 1
ore_color = "#f0972b"
overlay_state = "rock_Gold"
/datum/ore_patch/silver
ore_type = /obj/item/stack/ore/silver
ore_quantity_upper = 1
ore_quantity_lower = 1
ore_color = "#bdbebf"
overlay_state = "rock_Silver"
/datum/ore_patch/diamond
ore_type = /obj/item/stack/ore/diamond
ore_quantity_upper = 2
ore_quantity_lower = 1
ore_color = "#22c2d4"
overlay_state = "rock_Diamond"
/datum/ore_patch/bluespace
ore_type = /obj/item/stack/ore/bluespace_crystal
ore_quantity_upper = 2
ore_quantity_lower = 1
ore_color = "#506bc7"
overlay_state = "rock_BScrystal"
/datum/ore_patch/dilithium
ore_type = /obj/item/stack/ore/dilithium_crystal
ore_quantity_upper = 2
ore_quantity_lower = 1
ore_color = "#bd50c7"
overlay_state = "rock_Dilithium"
/datum/ore_patch/sand
ore_type = /obj/item/stack/ore/glass/basalt
ore_quantity_upper = 10
ore_quantity_lower = 2
ore_color = "#2d2a2d"
overlay_state = "rock_Dilithium"
/datum/reagent/space_cleaner/sterilizine/primal
name = "Primal Sterilizine"
description = "While crude and odorous, it still seems to kill enough bacteria to be usable."
/datum/reagent/toxin/meduracha //try putting this in a blowgun!
name = "Meduracha Toxin"
description = "Harvested from Meduracha tentacles, the toxin has quickly decayed into a less deadly form, but still is quite fatal."
color = "#00ffb3"
taste_description = "acid"
toxpwr = 3.5 //slightly more damaging than ground up plasma, and also causes other minor effects
/datum/reagent/toxin/meduracha/on_mob_life(mob/living/carbon/M)
M.damageoverlaytemp = 60
M.update_damage_hud()
M.adjust_eye_blur(3)
return ..()
/datum/reagent/quinine
name = "Quinine"
description = "Dark brown liquid used to treat exotic diseases."
color = "#5e3807"
taste_description = "bitter and sour"
/datum/reagent/magnus_purpura_enzyme
name = "Magnus purpura enzyme"
description = "Yellowish liquid with potent anti-acidic properties"
color = "#e0ea4e"
taste_description = "sweet"
metabolization_rate = 0.2
var/alert_id = "magnus_purpura"
/datum/reagent/magnus_purpura_enzyme/on_mob_metabolize(mob/living/L)
. = ..()
ADD_TRAIT(L,TRAIT_SULPH_PIT_IMMUNE,JUNGLELAND_TRAIT)
L.throw_alert(alert_id,/atom/movable/screen/alert/magnus_purpura)
/datum/reagent/magnus_purpura_enzyme/on_mob_life(mob/living/carbon/M)
. = ..()
M.adjustToxLoss(-3.5 * REM) // YOU CAN ONLY GET IT ON JUNGLELAND, why not make it pretty good?
/datum/reagent/magnus_purpura_enzyme/on_mob_end_metabolize(mob/living/L)
REMOVE_TRAIT(L,TRAIT_SULPH_PIT_IMMUNE,JUNGLELAND_TRAIT)
L.clear_alert(alert_id)
return ..()
/datum/reagent/magnus_purpura_enzyme/condensed
name = "Condensed magnus purpura enzyme"
description = "Yellowish liquid with VERY potent anti-acidic properties"
color = "#eeff00"
taste_description = "sweet"
metabolization_rate = 0.1
alert_id = "magnus_purpura_condensed"
//i tried to base it off of actual malaria
/datum/disease/malaria
name = "Malaria Exotica"
agent = "Plasmodium Exotica"
cure_text = "Quinine, Synaptizine or Tonic water"
max_stages = 8 // yes 8 fucking stages
severity = DISEASE_SEVERITY_HARMFUL
disease_flags = CURABLE
visibility_flags = HIDDEN_SCANNER
spread_flags = DISEASE_SPREAD_BLOOD
needs_all_cures = FALSE
cures = list(/datum/reagent/quinine, /datum/reagent/medicine/synaptizine,/datum/reagent/consumable/tonic)
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
var/next_stage_time = 0
var/time_per_stage = 2 MINUTES //around 16 minutes till this reaches lethality
/datum/disease/malaria/infect(mob/living/infectee, make_copy)
next_stage_time = world.time + time_per_stage
return ..()
/datum/disease/malaria/stage_act()
//we handle curing and stuff ourselves
var/cure = has_cure()
if(cure)
if(prob(20))
update_stage(stage - 1)
if(stage == 0)
cure()
return
if( world.time >= next_stage_time)
update_stage(clamp(stage + 1,0,max_stages))
next_stage_time = world.time + time_per_stage + rand(-(time_per_stage * 0.25), time_per_stage * 0.25)
switch(stage)
if(1) //asymptomatic for some time
return
if(2)
visibility_flags = NONE
affected_mob.adjust_bodytemperature(30, 0, BODYTEMP_HEAT_DAMAGE_LIMIT - 1) //slowly rising fever that is no lethal *yet*
if(prob(10))
to_chat(affected_mob, span_warning("[pick("You feel hot.", "You feel like you're burning.")]"))
if(prob(40))
to_chat(affected_mob, span_warning("[pick("You feel dizzy.", "Your head spins.")]"))
return
if(3)
affected_mob.blood_volume -= 0.5
affected_mob.adjust_bodytemperature(50, 0, BODYTEMP_HEAT_DAMAGE_LIMIT - 1) //fast rising not deadly fever
if(prob(20))
to_chat(affected_mob, span_warning("[pick("You feel hot.", "You feel like you're burning.")]"))
if(prob(40))
if(prob(50))
to_chat(affected_mob, span_warning("[pick("You feel dizzy.", "Your head spins.")]"))
else
to_chat(affected_mob, span_userdanger("A wave of dizziness washes over you!"))
affected_mob.adjust_dizzy(5)
if(prob(10))
affected_mob.adjust_jitter(5)
if(prob(30))
to_chat(affected_mob, span_warning("[pick("Your head hurts.", "Your head pounds.")]"))
if(prob(30))
affected_mob.emote("cough")
return
if(4) //another period of asymptomaticity before shit really hits the fan
affected_mob.blood_volume -= 0.25
return
if(5) // a few more minutes before disease really becomes deadly
severity = DISEASE_SEVERITY_DANGEROUS
affected_mob.blood_volume -= 0.75
affected_mob.adjust_bodytemperature(30) //slowly rising fever that can become deadly
if(prob(30))
to_chat(affected_mob, span_warning("[pick("You feel hot.", "You feel like you're burning.")]"))
if(prob(60))
if(prob(40))
to_chat(affected_mob, span_warning("[pick("You feel dizzy.", "Your head spins.")]"))
else
to_chat(affected_mob, span_userdanger("A wave of dizziness washes over you!"))
affected_mob.adjust_dizzy(5)
if(prob(15))
affected_mob.adjust_jitter(5)
if(prob(30))
if(prob(50))
to_chat(affected_mob, span_warning("[pick("Your head hurts.", "Your head pounds.")]"))
else
to_chat(affected_mob, span_warning("[pick("Your head hurts a lot.", "Your head pounds incessantly.")]"))
affected_mob.adjustStaminaLoss(25)
if(prob(40))
affected_mob.emote("cough")
return
if(6) //another period of lower deadliness
affected_mob.blood_volume -= 0.25
if(prob(40))
affected_mob.emote("cough")
return
if(7)
affected_mob.blood_volume -= 1
affected_mob.adjust_bodytemperature(35)
if(prob(30))
to_chat(affected_mob, span_warning("[pick("You feel hot.", "You feel like you're burning.")]"))
if(prob(40))
affected_mob.emote("cough")
if(prob(15))
affected_mob.adjust_jitter(5)
if(prob(60))
if(prob(30))
to_chat(affected_mob, span_warning("[pick("Your head hurts.", "Your head pounds.")]"))
else
to_chat(affected_mob, span_warning("[pick("Your head hurts a lot.", "Your head pounds incessantly.")]"))
affected_mob.adjustStaminaLoss(25)
if(prob(10))
affected_mob.adjustStaminaLoss(20)
to_chat(affected_mob, span_warning("[pick("You feel weak.", "Your body feel numb.")]"))
return
if(8)
affected_mob.blood_volume -= 2
affected_mob.adjust_bodytemperature(75) //a deadly fever
if(prob(40))
to_chat(affected_mob, span_warning("[pick("You feel hot.", "You feel like you're burning.")]"))
if(prob(70))
if(prob(30))
to_chat(affected_mob, span_warning("[pick("You feel dizzy.", "Your head spins.")]"))
else
to_chat(affected_mob, span_userdanger("A wave of dizziness washes over you!"))
affected_mob.adjust_dizzy(5)
if(prob(50))
affected_mob.emote("cough")
if(prob(20))
affected_mob.adjust_jitter(5)
if(prob(50))
to_chat(affected_mob, span_warning("[pick("Your head hurts a lot.", "Your head pounds incessantly.")]"))
affected_mob.adjustStaminaLoss(25)
else
to_chat(affected_mob, span_userdanger("[pick("Your head hurts!", "You feel a burning knife inside your brain!", "A wave of pain fills your head!")]"))
affected_mob.Stun(35)
if(prob(25))
affected_mob.adjustStaminaLoss(50)
to_chat(affected_mob, span_warning("[pick("You feel very weak.", "Your body feel completely numb.")]"))
return
else
return
//instead of it being chance based, malaria is based on time
/datum/action/cooldown/tar_crown_spawn_altar
name = "Summon tar altar"
desc = "Summons a tar altar at your current location (MAX 3)"
cooldown_time = 1 MINUTES
background_icon = 'yogstation/icons/mob/actions/backgrounds.dmi'
background_icon_state = "jungle"
button_icon = 'yogstation/icons/mob/actions.dmi'
button_icon_state = "tar_crown_summon"
var/obj/item/clothing/head/yogs/tar_king_crown/crown
/datum/action/cooldown/tar_crown_spawn_altar/New(Target)
. = ..()
crown = target
LAZYINITLIST(crown.actions)
crown.actions += src
/datum/action/cooldown/tar_crown_spawn_altar/Trigger()
. = TRUE
if(!IsAvailable())
return FALSE
var/name = input(owner,"Choose name for the tar shrine","Shrine name")
if(!name)
return FALSE
StartCooldown()
if(crown.max_tar_shrines == crown.current_tar_shrines.len)
var/key = pick(crown.current_tar_shrines)
qdel(crown.current_tar_shrines[key])
crown.current_tar_shrines -= key
crown.current_tar_shrines[name] = new /obj/structure/tar_shrine(get_turf(owner))
/datum/action/cooldown/tar_crown_teleport
name = "Teleport to a tar shrine"
desc = "Teleports you to a chosen tar shrine"
cooldown_time = 1 MINUTES
background_icon = 'yogstation/icons/mob/actions/backgrounds.dmi'
background_icon_state = "jungle"
button_icon = 'yogstation/icons/mob/actions.dmi'
button_icon_state = "tar_crown_teleport"
var/obj/item/clothing/head/yogs/tar_king_crown/crown
/datum/action/cooldown/tar_crown_teleport/New(Target)
. = ..()
crown = target
LAZYINITLIST(crown.actions)
crown.actions += src
/datum/action/cooldown/tar_crown_teleport/Trigger()
. = TRUE
if(!IsAvailable())
return FALSE
var/name = input(owner,"Choose the altar to teleport to") as anything in crown.current_tar_shrines
if(!name)
return FALSE
StartCooldown()
var/location = get_turf(crown.current_tar_shrines[name])
animate(owner, time = 2.5 SECONDS, color = "#280025")
if(!do_after(owner, 2.5 SECONDS, owner))
animate(owner, time = 0.5 SECONDS, color = initial(owner.color))
return
new /obj/effect/tar_king/orb_in(get_turf(owner),owner,NORTH)
do_teleport(owner,location)
animate(owner, time = 0.5 SECONDS, color = initial(owner.color))
/// jungle recipes---
/datum/chemical_reaction/poultice/alt2
name = "tribal poultice 2"
id = "poultice_alt2"
required_temp = 420
required_reagents = list(/datum/reagent/cellulose = 40, /datum/reagent/ash = 15, /datum/reagent/space_cleaner/sterilizine/primal = 4)
/datum/reagent/toxin/concentrated
name = "Concentrated toxin"
toxpwr = 2
#define STAGE_THRESHOLD 15
#define ALERT_ID "toxic_buildup_metabolites"
/datum/reagent/toxic_metabolites
name = "Toxic metabolites"
description = "Deadly toxic buildup of metabolities caused by direct exposition to jungleland's environment."
color = "#002d09"
harmful = TRUE
can_synth = FALSE
self_consuming = TRUE
taste_mult = 100
taste_description = "death"
metabolization_rate = 0.5
var/stage = 1
var/old_stage = 1
var/alert_type = /atom/movable/screen/alert/status_effect/toxic_buildup
/datum/reagent/toxic_metabolites/reaction_mob(mob/living/exposed_mob, methods, reac_volume, show_message, permeability)
if(isliving(exposed_mob) && exposed_mob.reagents)
var/modifier = (100 - exposed_mob.getarmor(null, BIO)) / 100
var/amount = round(max(reac_volume - exposed_mob.reagents.get_reagent_amount(type), 0) * modifier, 0.1) // no reagent duplication on mobs
if(amount >= 0.5)
exposed_mob.reagents.add_reagent(type, amount)
return TRUE
return FALSE
// consumes 2 every 2 seconds
/datum/reagent/toxic_metabolites/on_mob_life(mob/living/carbon/M)
. = ..()
if(HAS_TRAIT(M,TRAIT_SULPH_PIT_IMMUNE))
cure()
return
stage = min(floor(volume/STAGE_THRESHOLD) + 1, 4)
if(stage != old_stage) //so we don't keep updating the alert if we don't need to
M.throw_alert(ALERT_ID,alert_type,stage)
old_stage = stage
switch(stage)
if(1)
M.adjustToxLoss(0.25, forced = TRUE)
if(2)
M.adjustToxLoss(0.5, forced = TRUE)
M.adjustOrganLoss(ORGAN_SLOT_LIVER,0.25)
if(prob(2.5))
to_chat(M, "You feel slight burning coming from within you, as the toxins singe you from within!")
M.adjustFireLoss(5)
if(3)
M.adjustToxLoss(1, forced = TRUE)
M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.5)
M.adjustStaminaLoss(5)
M.clear_stamina_regen()
if(prob(5))
to_chat(M, "You feel a burning sensation coming from within you, as the toxins burn you from within!")
M.adjustFireLoss(10)
if(4)
M.adjustToxLoss(2.5, forced = TRUE)
M.adjustOrganLoss(ORGAN_SLOT_LIVER, 1)
M.adjustStaminaLoss(10)
M.clear_stamina_regen()
if(prob(10))
to_chat(M, "You feel deep burning sensation from within as the toxins burn you from within!")
M.adjustFireLoss(15)
/datum/reagent/toxic_metabolites/on_mob_add(mob/living/L)
. = ..()
if(HAS_TRAIT(L,TRAIT_SULPH_PIT_IMMUNE))
cure()
return
RegisterSignal(L, COMSIG_REGEN_CORE_HEALED,PROC_REF(cure))
stage = min(floor(volume/STAGE_THRESHOLD) + 1, 4)
old_stage = stage
L.throw_alert(ALERT_ID,alert_type,stage)
/datum/reagent/toxic_metabolites/on_mob_delete(mob/living/L)
UnregisterSignal(L, COMSIG_REGEN_CORE_HEALED)
L.clear_alert(ALERT_ID)
return ..()
/datum/reagent/toxic_metabolites/proc/cure()
if(holder)
holder.remove_reagent(type, volume)
#undef STAGE_THRESHOLD
#undef ALERT_ID