Fixes tesla immunity being lost if you have reactive armor and refund the lighting bolt spell / vice versa

This commit is contained in:
ShizCalev
2020-01-06 21:04:44 -05:00
parent 1f8657331f
commit 0432f132fb
8 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -237,7 +237,7 @@
else if(isliving(A))
var/dist = get_dist(source, A)
var/mob/living/L = A
if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !(L.flags_1 & TESLA_IGNORE_1))
if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !(HAS_TRAIT(L, TRAIT_TESLA_SHOCKIMMUNE)))
closest_mob = L
closest_atom = A
closest_dist = dist
@@ -274,7 +274,7 @@
closest_structure = S
closest_atom = A
closest_dist = dist
else if(closest_structure)
continue