|
1 | | -/datum/reagent/toxin/novichok |
2 | | - name = "Novichok" |
3 | | - description = "A lethal nerve agent." |
4 | | - color = "#AAAAAA77" |
5 | | - toxpwr = 2 |
6 | | - metabolization_rate = 0.7 * REAGENTS_METABOLISM |
7 | | - |
8 | | -/datum/reagent/toxin/novichok/proc/pick_paralyzed_limb() |
9 | | - return pick(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_R_LEG, TRAIT_PARALYSIS_L_LEG) |
10 | | - |
11 | | -/datum/reagent/toxin/novichok/on_mob_life(mob/living/carbon/M, seconds_per_tick, times_fired) |
12 | | - . = ..() |
13 | | - var/need_update |
14 | | - if(times_fired % 3 == 0) |
15 | | - need_update += M.adjustOxyLoss(12, updating_health = TRUE) |
16 | | - need_update += M.adjustOrganLoss(ORGAN_SLOT_HEART, 3 * REM * seconds_per_tick) |
17 | | - need_update += M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * seconds_per_tick) |
18 | | - if(times_fired % 30 == 0 && times_fired > 0) |
19 | | - if(ishuman(M) && !M.undergoing_cardiac_arrest() && M.can_heartattack()) |
20 | | - M.set_heartattack(TRUE) |
21 | | - if(M.stat == CONSCIOUS) |
22 | | - M.visible_message(span_userdanger("[M] clutches at [M.p_their()] chest as if [M.p_their()] heart stopped!")) |
23 | | - if(SPT_PROB(10, seconds_per_tick)) |
24 | | - var/paralyzed_limb = pick_paralyzed_limb() |
25 | | - ADD_TRAIT(M, paralyzed_limb, type) |
26 | | - need_update += M.adjustStaminaLoss(10 * REM * seconds_per_tick, updating_stamina = FALSE) |
27 | | - if(need_update) |
28 | | - return UPDATE_MOB_HEALTH |
29 | | - |
30 | | -/datum/reagent/toxin/novichok/on_mob_end_metabolize(mob/living/carbon/M) |
31 | | - . = ..() |
32 | | - if(!ishuman(M)) |
33 | | - return |
34 | | - REMOVE_TRAIT(M, TRAIT_PARALYSIS_L_ARM, type) |
35 | | - REMOVE_TRAIT(M, TRAIT_PARALYSIS_R_ARM, type) |
36 | | - REMOVE_TRAIT(M, TRAIT_PARALYSIS_L_LEG, type) |
37 | | - |
38 | | - REMOVE_TRAIT(M, TRAIT_PARALYSIS_R_LEG, type) |
39 | | - |
| 1 | +/datum/reagent/toxin/novichok |
| 2 | + name = "Novichok" |
| 3 | + description = "A lethal nerve agent." |
| 4 | + color = "#AAAAAA77" |
| 5 | + toxpwr = 2 |
| 6 | + metabolization_rate = 0.7 * REAGENTS_METABOLISM |
| 7 | + |
| 8 | +/datum/reagent/toxin/novichok/proc/pick_paralyzed_limb() |
| 9 | + return pick(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_R_LEG, TRAIT_PARALYSIS_L_LEG) |
| 10 | + |
| 11 | +/datum/reagent/toxin/novichok/on_mob_life(mob/living/carbon/M, seconds_per_tick, times_fired) |
| 12 | + . = ..() |
| 13 | + var/need_update |
| 14 | + if(times_fired % 3 == 0) |
| 15 | + need_update += M.adjustOxyLoss(12, updating_health = TRUE) |
| 16 | + need_update += M.adjustOrganLoss(ORGAN_SLOT_HEART, 3 * REM * seconds_per_tick) |
| 17 | + need_update += M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * seconds_per_tick) |
| 18 | + if(times_fired % 30 == 0 && times_fired > 0) |
| 19 | + if(ishuman(M) && !M.undergoing_cardiac_arrest() && M.can_heartattack()) |
| 20 | + M.set_heartattack(TRUE) |
| 21 | + if(M.stat == CONSCIOUS) |
| 22 | + M.visible_message(span_userdanger("[M] clutches at [M.p_their()] chest as if [M.p_their()] heart stopped!")) |
| 23 | + if(SPT_PROB(10, seconds_per_tick)) |
| 24 | + var/paralyzed_limb = pick_paralyzed_limb() |
| 25 | + ADD_TRAIT(M, paralyzed_limb, type) |
| 26 | + need_update += M.adjustStaminaLoss(10 * REM * seconds_per_tick, updating_stamina = FALSE) |
| 27 | + if(need_update) |
| 28 | + return UPDATE_MOB_HEALTH |
| 29 | + |
| 30 | +/datum/reagent/toxin/novichok/on_mob_end_metabolize(mob/living/carbon/M) |
| 31 | + . = ..() |
| 32 | + if(!ishuman(M)) |
| 33 | + return |
| 34 | + REMOVE_TRAIT(M, TRAIT_PARALYSIS_L_ARM, type) |
| 35 | + REMOVE_TRAIT(M, TRAIT_PARALYSIS_R_ARM, type) |
| 36 | + REMOVE_TRAIT(M, TRAIT_PARALYSIS_L_LEG, type) |
| 37 | + |
| 38 | + REMOVE_TRAIT(M, TRAIT_PARALYSIS_R_LEG, type) |
| 39 | + |
0 commit comments