Dionea anti-radiation drugs reaction (#5054)

As per request of Lore Dev team, this adds Dionea (allergic) reaction to any anti-radiation reagents. And also toxin regeneration from radiation ...
This commit is contained in:
Mykhailo Bykhovtsev
2018-08-04 12:21:22 -07:00
committed by Werner
parent dd4efb5a27
commit b1a3703a9b
7 changed files with 106 additions and 23 deletions

View File

@@ -211,30 +211,23 @@ var/hadevent = 0
/proc/high_radiation_event()
/* // Haha, this is way too laggy. I'll keep the prison break though.
for(var/obj/machinery/light/L in world)
if(isNotStationLevel(L.z)) continue
L.flicker(50)
sleep(100)
*/
for(var/mob/living/carbon/human/H in living_mob_list)
var/turf/T = get_turf(H)
if(!T)
continue
if(isNotStationLevel(T.z))
continue
if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(15,75)),IRRADIATE, blocked = H.getarmor(null, "rad"))
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE, blocked = H.getarmor(null, "rad"))
if (prob(25))
if (prob(75))
randmutb(H)
domutcheck(H,null,MUTCHK_FORCED)
else
randmutg(H)
domutcheck(H,null,MUTCHK_FORCED)
H.apply_effect((rand(15,75)),IRRADIATE, blocked = H.getarmor(null, "rad"))
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE, blocked = H.getarmor(null, "rad"))
if (prob(25))
if (prob(75))
randmutb(H)
domutcheck(H,null,MUTCHK_FORCED)
else
randmutg(H)
domutcheck(H,null,MUTCHK_FORCED)
sleep(100)
command_announcement.Announce("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')

View File

@@ -43,6 +43,14 @@
if(istype(C,/mob/living/carbon/human))
var/mob/living/carbon/human/H = C
if(H.is_diona())
var/damage = rand(15, 30)
H.adjustToxLoss(-damage)
if(prob(5))
damage = rand(20, 60)
H.adjustToxLoss(-damage)
to_chat(H, "<span class='notice'>You can feel flow of energy which makes you regenerate.</span>")
H.apply_effect((rand(15,30)),IRRADIATE,blocked = H.getarmor(null, "rad"))
if(prob(4))
H.apply_effect((rand(20,60)),IRRADIATE,blocked = H.getarmor(null, "rad"))

View File

@@ -306,9 +306,13 @@
reagent_state = SOLID
color = "#C7C7C7"
taste_description = "the color blue, and regret"
unaffected_species = IS_MACHINE
/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.apply_effect(10 * removed, IRRADIATE, blocked = 0) // Radium may increase your chances to cure a disease
if(alien == IS_DIONA)
M.adjustToxLoss(-20 * removed)
return
if(M.virus2.len)
for(var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]

View File

@@ -957,10 +957,24 @@
glass_name = "cup of tea"
glass_desc = "Tasty black tea, it has antioxidants, it's good for you!"
unaffected_species = IS_MACHINE
var/last_taste_time = -100
/datum/reagent/drink/tea/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
M.adjustToxLoss(-0.5 * removed)
/datum/reagent/drink/tea/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
if(last_taste_time + 800 < world.time) // Not to spam message
to_chat(M, "<span class='danger'>Your body withers as you feel slight pain throughout.</span>")
last_taste_time = world.time
metabolism = REM * 0.33
M.adjustToxLoss(1.5 * removed)
else
M.adjustToxLoss(-0.5 * removed)
/datum/reagent/drink/tea/icetea
name = "Iced Tea"
id = "icetea"

View File

@@ -450,9 +450,18 @@
overdose = REAGENTS_OVERDOSE
scannable = 1
taste_description = "bitterness"
unaffected_species = IS_MACHINE
var/last_taste_time = -100
/datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.apply_radiation(-30 * removed)
if(alien == IS_DIONA)
if(last_taste_time + 500 < world.time) // Not to spam message
to_chat(M, "<span class='danger'>Your body withers as you feel a searing pain throughout.</span>")
last_taste_time = world.time
metabolism = REM * 0.33
M.adjustToxLoss(30 * removed) // Tested numbers myself
else
M.apply_radiation(-30 * removed)
/datum/reagent/arithrazine
name = "Arithrazine"
@@ -464,12 +473,21 @@
overdose = REAGENTS_OVERDOSE
scannable = 1
taste_description = "bitterness"
unaffected_species = IS_MACHINE
var/last_taste_time = -100
/datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.apply_radiation(-70 * removed)
M.adjustToxLoss(-10 * removed)
if(prob(60))
M.take_organ_damage(4 * removed, 0)
if(alien == IS_DIONA)
if(last_taste_time + 250 < world.time) // Not to spam message
to_chat(M, "<span class='danger'>Your body withers as you feel a searing pain throughout.</span>")
last_taste_time = world.time
metabolism = REM * 0.33
M.adjustToxLoss(120 * removed) // Tested numbers myself
else
M.apply_radiation(-70 * removed)
M.adjustToxLoss(-10 * removed)
if(prob(60))
M.take_organ_damage(4 * removed, 0)
/datum/reagent/spaceacillin
name = "Spaceacillin"

View File

@@ -91,6 +91,7 @@
var/obj/item/device/radio/radio
var/debug = 0
var/last_message_time = -100 //for message
/obj/machinery/power/supermatter/Initialize()
. = ..()
@@ -278,6 +279,11 @@
if (!(l in oview(rad_range, src)) && !(l in range(src, round(rad_range * 2/3))))
continue
l.apply_effect(rads, IRRADIATE, blocked = l.getarmor(null, "rad"))
if(l.is_diona())
l.adjustToxLoss(-rads)
if(last_message_time + 800 < world.time) // Not to spam message
to_chat(l, "<span class='notice'>You can feel an extreme level of energy which flows throught your body and makes you regenerate very fast.</span>")
last_message_time = world.time
power -= (power/DECAY_FACTOR)**3 //energy losses due to radiation