mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Electrocution Refactor+Electric Reagents
This commit is contained in:
@@ -608,3 +608,21 @@ datum/reagent/firefighting_foam/reaction_obj(var/obj/O, var/volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
explosion(location,0,0,3)
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/shock_explosion
|
||||
name = "shock_explosion"
|
||||
id = "shock_explosion"
|
||||
result = null
|
||||
required_reagents = list("teslium" = 5, "uranium" = 5) //uranium to this so it can't be spammed like no tomorrow without mining help.
|
||||
result_amount = 1
|
||||
mix_message = "<span class='danger'>The reaction releases an electrical blast!</span>"
|
||||
mix_sound = 'sound/magic/lightningbolt.ogg'
|
||||
|
||||
/datum/chemical_reaction/shock_explosion/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
for(var/mob/living/carbon/C in view(6, T))
|
||||
C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results.
|
||||
C.electrocute_act(1, "electrical blast")
|
||||
holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched.
|
||||
holder.del_reagent("uranium")
|
||||
return
|
||||
|
||||
@@ -745,3 +745,37 @@ datum/reagent/ants/on_mob_life(var/mob/living/M as mob)
|
||||
M.adjustBruteLoss(2)
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/teslium //Teslium. Causes periodic shocks, and makes shocks against the target much more effective.
|
||||
name = "Teslium"
|
||||
id = "teslium"
|
||||
description = "An unstable, electrically-charged metallic slurry. Increases the conductance of living things."
|
||||
reagent_state = LIQUID
|
||||
color = "#20324D" //RGB: 32, 50, 77
|
||||
metabolization_rate = 0.2
|
||||
var/shock_timer = 0
|
||||
|
||||
/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, 1) //Override because it's caused from INSIDE of you
|
||||
playsound(M, "sparks", 50, 1)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/teslium
|
||||
name = "Teslium"
|
||||
id = "teslium"
|
||||
result = "teslium"
|
||||
required_reagents = list("plasma" = 1, "silver" = 1, "blackpowder" = 1)
|
||||
result_amount = 3
|
||||
mix_message = "<span class='danger'>A jet of sparks flies from the mixture as it merges into a flickering slurry.</span>"
|
||||
min_temp = 400
|
||||
mix_sound = null
|
||||
|
||||
/datum/chemical_reaction/teslium/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(6, 1, location)
|
||||
s.start()
|
||||
return
|
||||
Reference in New Issue
Block a user