Rebalences teslium blob slightly (#16119)

* part 1 of rework

* Finishes the rework for now

* Allows it to leave the body

* Makes it a proc
This commit is contained in:
Qwertytoforty
2021-06-17 15:47:31 +01:00
committed by GitHub
parent d6e71523b1
commit 5fb2ccbcfc
2 changed files with 29 additions and 7 deletions
@@ -181,11 +181,11 @@
volume = ..()
M.apply_damage(0.4 * volume, BURN)
if(M.reagents)
if(M.reagents.has_reagent("teslium") && prob(0.6 * volume))
if(M.reagents.has_reagent("blob_teslium") && prob(0.6 * volume))
M.electrocute_act((0.5 * volume), "the blob's electrical discharge", 1, SHOCK_NOGLOVES)
M.reagents.del_reagent("teslium")
M.reagents.del_reagent("blob_teslium")
return //don't add more teslium after you shock it out of someone.
M.reagents.add_reagent("teslium", 0.125 * volume) // a little goes a long way
M.reagents.add_reagent("blob_teslium", 0.125 * volume) // a little goes a long way
/datum/reagent/blob/proc/send_message(mob/living/M)
var/totalmessage = message
@@ -1228,15 +1228,19 @@
color = "#20324D" //RGB: 32, 50, 77
metabolization_rate = 0.2
var/shock_timer = 0
//The random values assigned to the high and low number for the random time for shocks
var/shock_high = 30
var/shock_low = 5
var/use_chaotic_random = TRUE //Do you change the random number every cycle, or after shock is triggered
var/chosen_timer = 15 //The timer chosen last cycle, or every time they are shocked
process_flags = ORGANIC | SYNTHETIC
taste_description = "electricity"
/datum/reagent/teslium/on_mob_life(mob/living/M)
shock_timer++
if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
shock_timer = 0
M.electrocute_act(rand(5, 20), "Teslium in their body", 1, SHOCK_NOGLOVES) //Override because it's caused from INSIDE of you
playsound(M, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
shock_proc(M)
return ..()
/datum/reagent/teslium/on_mob_add(mob/living/M)
@@ -1251,6 +1255,24 @@
H.physiology.siemens_coeff *= 0.5
..()
/datum/reagent/teslium/proc/shock_proc(mob/living/M)
if(use_chaotic_random)
chosen_timer = rand(shock_low, shock_high)
if(shock_timer >= chosen_timer)
shock_timer = 0
M.electrocute_act(rand(5, 20), "Teslium in their body", 1, SHOCK_NOGLOVES) //Override because it's caused from INSIDE of you
playsound(M, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
chosen_timer = rand(shock_low, shock_high) //It needs to be randomised here for blob teslium, and randoming it here doesn't affect normal
/datum/reagent/teslium/blob //This version has it's shocks much less frequently, while retaining the shock multiplier
id = "blob_teslium"
shock_low = 10
use_chaotic_random = FALSE
/datum/reagent/teslium/blob/on_mob_add(mob/living/M)
..()
chosen_timer = rand(10, 30)
/datum/reagent/gluttonytoxin
name = "Gluttony's Blessing"
id = "gluttonytoxin"