anchor.diff:  	name = "reactive tesla armor"
   	desc = "An experimental suit of armor with sensitive detectors hooked up to a huge capacitor grid, with emitters strutting out of it. Zap."
   	siemens_coefficient = -1
  +	cooldown_message = "<span class='danger'>The tesla capacitors on the reactive tesla armor are still recharging! The armor merely emits some sparks.</span>"
  +	cooldown_message = "<span class='warning'>The tesla capacitors beep ominously for a moment.</span>"
   	var/zap_power = 25000
   	var/zap_range = 20
   	var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
  
positive.code: 	if(slot_flags & slot) //Was equipped to a valid slot for this item?
  		REMOVE_TRAIT(user, TRAIT_TESLA_SHOCKIMMUNE, "reactive_tesla_armor")
  
  /obj/item/clothing/suit/armor/reactive/tesla/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
  	if(!active)
  		return FALSE
  	if(prob(hit_reaction_chance))
  		if(world.time < reactivearmor_cooldown)
  			var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
  			sparks.set_up(1, 1, src)
  			sparks.start()
  			owner.visible_message("<span class='danger'>The tesla capacitors on [owner]'s reactive tesla armor are still recharging! The armor merely emits some sparks.</span>")
  			return
  		owner.visible_message("<span class='danger'>[src] blocks [attack_text], sending out arcs of lightning!</span>")
  		tesla_zap(owner, zap_range, zap_power, zap_flags)
  		reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
  		return TRUE
  
  //Repulse
  
  /obj/item/clothing/suit/armor/reactive/repulse
  	name = "reactive repulse armor"
  	desc = "An experimental suit of armor that violently throws back attackers."
  	var/repulse_force = MOVE_FORCE_EXTREMELY_STRONG
  
  /obj/item/clothing/suit/armor/reactive/repulse/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
  	if(!active)
  		return FALSE
  	if(prob(hit_reaction_chance))
  		if(world.time < reactivearmor_cooldown)
  			owner.visible_message("<span class='danger'>The repulse generator is still recharging!</span>")
  			return FALSE
  		playsound(get_turf(owner),'sound/magic/repulse.ogg', 100, TRUE)
  		owner.visible_message("<span class='danger'>[src] blocks [attack_text], converting the attack into a wave of force!</span>")
  		var/turf/T = get_turf(owner)
  		var/list/thrown_items = list()
  		for(var/atom/movable/A in range(T, 7))
  			if(A == owner || A.anchored || thrown_items[A])
  				continue
  			var/throwtarget = get_edge_target_turf(T, get_dir(T, get_step_away(A, T)))
  			A.safe_throw_at(throwtarget, 10, 1, force = repulse_force)
  			thrown_items[A] = A
  
  		reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
  		return TRUE
  
  /obj/item/clothing/suit/armor/reactive/table
  	name = "reactive table armor"
  	desc = "If you can't beat the memes, embrace them."
  	var/tele_range = 10
  
  /obj/item/clothing/suit/armor/reactive/table/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
  	if(!active)
  		return FALSE
  	if(prob(hit_reaction_chance))
  		var/mob/living/carbon/human/H = owner
  		if(world.time < reactivearmor_cooldown)
  			owner.visible_message("<span class='danger'>The reactive table armor's fabricators are still on cooldown!</span>")
  			return FALSE
  		owner.visible_message("<span class='danger'>The reactive teleport system flings [H] clear of [attack_text] and slams [H.p_them()] into a fabricated table!</span>")
  		owner.visible_message("<font color='red' size='3'>[H] GOES ON THE TABLE!!!</font>")
  		owner.Paralyze(40)
  		do_teleport(owner, get_turf(owner), tele_range, no_effects = TRUE, channel = TELEPORT_CHANNEL_BLUESPACE)
  		new /obj/structure/table(get_turf(owner))
  		reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
  		return TRUE
  	return FALSE
  
  /obj/item/clothing/suit/armor/reactive/table/emp_act()
  	return
  
negative.code: /obj/item/clothing/suit/armor/reactive/stealth
  	name = "reactive stealth armor"
  	desc = "An experimental suit of armor that renders the wearer invisible on detection of imminent harm, and creates a decoy that runs away from the owner. You can't fight what you can't see."
  	cooldown_message = "<span class='danger'>The reactive stealth system activates, but is not charged enough to fully cloak!</span>"
  	emp_message = "<span class='warning'>The reactive stealth armor's threat assessment system crashes...</span>"
  	///when triggering while on cooldown will only flicker the alpha slightly. this is how much it removes.
  	var/cooldown_alpha_removal = 50
  	///cooldown alpha flicker- how long it takes to return to the original alpha
  	var/cooldown_animation_time = 3 SECONDS
  	///how long they will be fully stealthed
  	var/stealth_time = 4 SECONDS
  	///how long it will animate back the alpha to the original
  	var/animation_time = 2 SECONDS
  	var/in_stealth = FALSE
  
  /obj/item/clothing/suit/armor/reactive/stealth/cooldown_activation(mob/living/carbon/human/owner)
  	if(in_stealth)
  		return //we don't want the cooldown message either)
  	owner.alpha = max(0, owner.alpha - cooldown_alpha_removal)
  	animate(owner, alpha = initial(owner.alpha), time = cooldown_animation_time)
  	..()
  
  /obj/item/clothing/suit/armor/reactive/stealth/reactive_activation(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
  	var/mob/living/simple_animal/hostile/illusion/escape/decoy = new(owner.loc)
  	decoy.Copy_Parent(owner, 50)
  	decoy.GiveTarget(owner) //so it starts running right away
  	decoy.Goto(owner, decoy.move_to_delay, decoy.minimum_distance)
  	owner.alpha = 0
  	in_stealth = TRUE
  	owner.visible_message("<span class='danger'>[owner] is hit by [attack_text] in the chest!</span>") //We pretend to be hit, since blocking it would stop the message otherwise
  	addtimer(CALLBACK(src, .proc/end_stealth, owner), stealth_time)
  	reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
  	return TRUE
  
  /obj/item/clothing/suit/armor/reactive/stealth/proc/end_stealth(mob/living/carbon/human/owner)
  	in_stealth = FALSE
  	animate(owner, alpha = initial(owner.alpha), time = animation_time)
  
  /obj/item/clothing/suit/armor/reactive/stealth/emp_activation(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
  	if(!isliving(hitby))
  		return FALSE //it just doesn't activate
  	var/mob/living/attacker = hitby
  	owner.visible_message("<span class='danger'>[src] activates, cloaking the wrong person!</span>")
  	attacker.alpha = 0
  	addtimer(VARSET_CALLBACK(attacker, alpha, initial(attacker.alpha)), 4 SECONDS)
  	reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
  	return FALSE
  
  //Tesla
  
  