mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-15 11:39:18 +00:00
Revenant abilities cause purple sparkles now. Incidentally fixed up EMP pulses so they don't set the name and duration of the object they spawn for everything that spawns the object.
30 lines
836 B
Plaintext
30 lines
836 B
Plaintext
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
|
|
if(!epicenter) return
|
|
|
|
if(!istype(epicenter, /turf))
|
|
epicenter = get_turf(epicenter.loc)
|
|
|
|
if(log)
|
|
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
|
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
|
|
|
if(heavy_range > 1)
|
|
new/obj/effect/overlay/temp/emp/pulse(epicenter)
|
|
|
|
if(heavy_range > light_range)
|
|
light_range = heavy_range
|
|
|
|
for(var/atom/T in range(light_range, epicenter))
|
|
var/distance = get_dist(epicenter, T)
|
|
if(distance < 0)
|
|
distance = 0
|
|
if(distance < heavy_range)
|
|
T.emp_act(1)
|
|
else if(distance == heavy_range)
|
|
if(prob(50))
|
|
T.emp_act(1)
|
|
else
|
|
T.emp_act(2)
|
|
else if(distance <= light_range)
|
|
T.emp_act(2)
|
|
return 1 |