diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1de9dc9d795..8e0403271d3 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -412,6 +412,12 @@ /mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/base_siemens_coeff = 1.0, var/def_zone = null, var/tesla_shock = 0) var/hairvar = 0 if(status_flags & GODMODE) return 0 //godmode + + if (!tesla_shock) + shock_damage *= base_siemens_coeff + if (shock_damage<1) + return 0 + if(!def_zone) var/list/damage_areas = list() //The way this works is by damaging multiple areas in an "Arc" if no def_zone is provided. should be pretty easy to add more arcs if it's needed. though I can't imangine a situation that can apply. if(istype(user, /mob/living/carbon/human)) @@ -440,12 +446,29 @@ shock_damage *= gloves.siemens_coefficient for (var/area in damage_areas) - apply_damage(shock_damage, BURN, area) - shock_damage *= 0.8 - visible_message("[src] was shocked by [source]!", "You are shocked by [source]!", "You hear an electrical crack.") - var/obj/item/organ/external/affected_organ = get_organ(check_zone(def_zone)) - var/siemens_coeff = base_siemens_coeff * get_siemens_coefficient_organ(affected_organ) - return ..(shock_damage, source, siemens_coeff, def_zone, tesla_shock) + apply_damage(shock_damage, BURN, area, used_weapon="Electrocution") + shock_damage *= 0.4 + playsound(loc, "sparks", 50, 1, -1) + + if (shock_damage > 15 || tesla_shock) + visible_message( + "[src] was shocked by the [source]!", + "You feel a powerful shock course through your body!", + "You hear a heavy electrical crack." + ) + Stun(10)//This should work for now, more is really silly and makes you lay there forever + Weaken(10) + + else + visible_message( + "[src] was mildly shocked by the [source].", + "You feel a mild shock course through your body.", + "You hear a light zapping." + ) + + spark(loc, 5, alldirs) + + return shock_damage /mob/living/carbon/human/Topic(href, href_list) if (href_list["refresh"]) @@ -1499,4 +1522,4 @@ if(stat) return pulling_punches = !pulling_punches src << "You are now [pulling_punches ? "pulling your punches" : "not pulling your punches"]." - return \ No newline at end of file + return diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm index afdc2a65d3d..334c3c82100 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm @@ -63,4 +63,4 @@ if(ishuman(target)) var/mob/living/carbon/human/M = target var/shock_damage = rand(10,20) - M.electrocute_act(shock_damage, ran_zone()) + M.electrocute_act(shock_damage)