anchor.diff:  
   /obj/effect/hallucination/simple/clown/scary
   	image_state = "scary_clown"
  -
  -/obj/effect/hallucination/simple/borer
  -	image_icon = 'icons/mob/borer.dmi'
  -	image_state = "brainslug"
  -
  -/obj/effect/hallucination/borer
  -	//A borer unconsciouss you and crawls in your ear
  -	var/obj/machinery/atmospherics/components/unary/vent_pump/pump = null
  -	var/obj/effect/hallucination/simple/borer/borer = null
  -
  -/obj/effect/hallucination/borer/Initialize(mapload, var/mob/living/carbon/T)
  -	..()
  -	target = T
  -	for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in orange(7,target))
  -		if(!U.welded)
  -			pump = U
  -			break
  -	if(pump)
  -		borer = new(pump.loc,target)
  -		for(var/i=0, i<11, i++)
  -			walk_to(borer, get_step(borer, get_cardinal_dir(borer, T)))
  -			if(borer.Adjacent(T))
  -				to_chat(T, "<span class='userdanger'>You feel a creeping, horrible sense of dread come over you, freezing your limbs and setting your heart racing.</span>")
  -				T.Stun(80)
  -				sleep(50)
  -				qdel(borer)
  -				sleep(rand(60, 90))
  -				to_chat(T, "<span class='changeling'><i>Primary [rand(1000,9999)] states:</i> [pick("Hello","Hi","You're my slave now!","Don't try to get rid of me...")]</span>")
  -				break
  -			sleep(4)
  -		if(!QDELETED(borer))
  -			qdel(borer)
  -	qdel(src)
   
   /obj/effect/hallucination/simple/bubblegum
   	name = "Bubblegum"
  
positive.code: 		for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
  			humans += H
  		person = pick(humans)
  		to_chat(target, target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans()))
  	qdel(src)
  
  /obj/effect/hallucination/message
  
  /obj/effect/hallucination/message/Initialize(mapload, var/mob/living/carbon/T)
  	..()
  	target = T
  	var/chosen = pick("<span class='userdanger'>The light burns you!</span>", \
  		"<span class='danger'>You don't feel like yourself.</span>", \
  		"<span class='userdanger'>Unknown has punched [target]!</span>", \
  		"<span class='notice'>You hear something squeezing through the ducts...</span>", \
  		"<span class='notice'>You hear a distant scream.</span>", \
  		"<span class='notice'>You feel invincible, nothing can hurt you!</span>", \
  		"<span class='warning'>You feel a tiny prick!</span>", \
  		"<B>[target]</B> sneezes.", \
  		"<span class='warning'>You feel faint.</span>", \
  		"<span class='noticealien'>You hear a strange, alien voice in your head...</span>[pick("Hiss","Ssss")]", \
  		"<span class='notice'>You can see...everything!</span>")
  	to_chat(target, chosen)
  	qdel(src)
  
  /mob/living/carbon/proc/hallucinate(hal_type, specific) // specific is used to specify a particular hallucination
  	set waitfor = 0
  	switch(hal_type)
  		if("xeno")
  			new /obj/effect/hallucination/xeno_attack(src.loc,src)
  		if("borer")
  			new /obj/effect/hallucination/borer(src.loc,src)
  		if("singulo")
  			new /obj/effect/hallucination/singularity_scare(src.loc,src)
  		if("koolaid")
  			new /obj/effect/hallucination/oh_yeah(src.loc,src)
  		if("battle")
  			new /obj/effect/hallucination/battle(src.loc,src)
  		if("flood")
  			new /obj/effect/hallucination/fake_flood(src.loc,src)
  		if("delusion")
  			new /obj/effect/hallucination/delusion(src.loc,src)
  		if("self_delusion")
  			new /obj/effect/hallucination/self_delusion(src.loc,src)
  		if("fake")
  			new /obj/effect/hallucination/fakeattacker(src.loc,src)
  		if("bolts")
  			new /obj/effect/hallucination/bolts(src.loc,src)
  		if("bolts_minor")
  			new /obj/effect/hallucination/bolts(src.loc,src,rand(1,2))
  		if("whispers")
  			new /obj/effect/hallucination/whispers(src.loc,src)
  		if("message")
  			new /obj/effect/hallucination/message(src.loc,src)
  		if("items_other")
  			new /obj/effect/hallucination/items_other(src.loc,src)
  		if("sounds")
  			//Strange audio
  			switch(rand(1,20))
  				if(1) playsound_local(null,'sound/machines/airlock.ogg', 15, 1)
  				if(2)
  					if(prob(50)) playsound_local(null,'sound/effects/explosion1.ogg', 50, 1)
  					else playsound_local(null, 'sound/effects/explosion2.ogg', 50, 1)
  				if(3) playsound_local(null, 'sound/effects/explosionfar.ogg', 50, 1)
  				if(4) playsound_local(null, pick('sound/effects/glassbr1.ogg','sound/effects/glassbr2.ogg','sound/effects/glassbr3.ogg'), 50, 1)
  				if(5)
  					playsound_local(null, 'sound/weapons/ring.ogg', 35)
  					sleep(15)
  					playsound_local(null, 'sound/weapons/ring.ogg', 35)
  					sleep(15)
  					playsound_local(null, 'sound/weapons/ring.ogg', 35)
  				if(6) playsound_local(null, 'sound/magic/summon_guns.ogg', 50, 1)
  				if(7) playsound_local(null, 'sound/machines/alarm.ogg', 100, 0)
  				if(8) playsound_local(null, 'sound/voice/bfreeze.ogg', 35, 0)
  				if(9)
  					//To make it more realistic, I added two gunshots (enough to kill)
  					playsound_local(null, 'sound/weapons/gunshot.ogg', 25, 1)
  					spawn(rand(10,30))
  						playsound_local(null, 'sound/weapons/gunshot.ogg', 25, 1)
  						sleep(rand(5,10))
  						playsound_local(null, sound(get_sfx("bodyfall"), 25), 25, 1)
  				if(10) playsound_local(null, 'sound/effects/pray_chaplain.ogg', 50)
  				if(11)
  					//Same as above, but with tasers.
  					playsound_local(null, 'sound/weapons/taser.ogg', 25, 1)
  					spawn(rand(10,30))
  						playsound_local(null, 'sound/weapons/taser.ogg', 25, 1)
  						sleep(rand(5,10))
  						playsound_local(null, sound(get_sfx("bodyfall"), 25), 25, 1)
  			//Rare audio
  				if(12)
  			//These sounds are (mostly) taken from Hidden: Source
  					var/list/creepyasssounds = list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',\
  						'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\
  						'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
  						'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
  						'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
  					playsound_local(null, pick(creepyasssounds), 50, 1)
  				if(13)
  					playsound_local(null, 'sound/effects/ratvar_rises.ogg', 100)
  					sleep(150)
  					playsound_local(null, 'sound/effects/ratvar_reveal.ogg', 100)
  				if(14)
  					to_chat(src, "<h1 class='alert'>Priority Announcement</h1>")
  					to_chat(src, "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>")
  					playsound_local(null, 'sound/ai/shuttledock.ogg', 100)
  				//Deconstructing a wall
  				if(15)
  					playsound_local(null, 'sound/items/welder.ogg', 15, 1)
  					sleep(105)
  					playsound_local(null, 'sound/items/welder2.ogg', 15, 1)
  					sleep(15)
  					playsound_local(null, 'sound/items/ratchet.ogg', 15, 1)
  				//Hacking a door
  				if(16)
  					playsound_local(null, 'sound/items/screwdriver.ogg', 15, 1)
  					sleep(rand(10,30))
  					for(var/i = rand(1,3), i>0, i--)
  						playsound_local(null, 'sound/weapons/empty.ogg', 15, 1)
  						sleep(rand(10,30))
  					playsound_local(null, 'sound/machines/airlockforced.ogg', 15, 1)
  				if(17)
  					playsound_local(null, 'sound/weapons/saberon.ogg',35,1)
  				if(18)
  					to_chat(src, "<h1 class='alert'>Biohazard Alert</h1>")
  					to_chat(src, "<br><br><span class='alert'>Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.</span><br><br>")
  					playsound_local(null, 'sound/ai/outbreak5.ogg')
  				if(19) //Tesla loose!
  					playsound_local(null, 'sound/magic/lightningbolt.ogg', 35, 1)
  					sleep(20)
  					playsound_local(null, 'sound/magic/lightningbolt.ogg', 65, 1)
  					sleep(20)
  					playsound_local(null, 'sound/magic/lightningbolt.ogg', 100, 1)
  				if(20) //AI is doomsdaying!
  					to_chat(src, "<h1 class='alert'>Anomaly Alert</h1>")
  					to_chat(src, "<br><br><span class='alert'>Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.</span><br><br>")
  					playsound_local(null, 'sound/ai/aimalf.ogg', 100)
  		if("hudscrew")
  			//Screwy HUD
  			//to_chat(src, "Screwy HUD")
  			hal_screwyhud = pick(SCREWYHUD_NONE,SCREWYHUD_CRIT,SCREWYHUD_DEAD,SCREWYHUD_HEALTHY)
  			sleep(rand(100,250))
  			hal_screwyhud = 0
  
  		if("fake_alert")
  			var/alert_type = pick("oxy","not_enough_tox","not_enough_co2","too_much_oxy","too_much_co2","tox_in_air","newlaw","nutrition","charge","weightless","fire","locked","hacked","temp","pressure")
  			if(specific)
  				alert_type = specific
  			switch(alert_type)
  				if("oxy")
  					throw_alert("oxy", /obj/screen/alert/oxy, override = TRUE)
  				if("not_enough_tox")
  					throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox, override = TRUE)
  				if("not_enough_co2")
  					throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2, override = TRUE)
  				if("too_much_oxy")
  					throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy, override = TRUE)
  				if("too_much_co2")
  					throw_alert("too_much_co2", /obj/screen/alert/too_much_co2, override = TRUE)
  				if("tox_in_air")
  					throw_alert("tox_in_air", /obj/screen/alert/tox_in_air, override = TRUE)
  				if("nutrition")
  					if(prob(50))
  						throw_alert("nutrition", /obj/screen/alert/fat, override = TRUE)
  					else
  						throw_alert("nutrition", /obj/screen/alert/starving, override = TRUE)
  				if("weightless")
  					throw_alert("weightless", /obj/screen/alert/weightless, override = TRUE)
  				if("fire")
  					throw_alert("fire", /obj/screen/alert/fire, override = TRUE)
  				if("temp")
  					if(prob(50))
  						throw_alert("temp", /obj/screen/alert/hot, 3, override = TRUE)
  					else
  						throw_alert("temp", /obj/screen/alert/cold, 3, override = TRUE)
  				if("pressure")
  					if(prob(50))
  						throw_alert("pressure", /obj/screen/alert/highpressure, 2, override = TRUE)
  					else
  						throw_alert("pressure", /obj/screen/alert/lowpressure, 2, override = TRUE)
  				//BEEP BOOP I AM A ROBOT
  				if("newlaw")
  					throw_alert("newlaw", /obj/screen/alert/newlaw, override = TRUE)
  				if("locked")
  					throw_alert("locked", /obj/screen/alert/locked, override = TRUE)
  				if("hacked")
  					throw_alert("hacked", /obj/screen/alert/hacked, override = TRUE)
  				if("charge")
  					throw_alert("charge",/obj/screen/alert/emptycell, override = TRUE)
  			sleep(rand(100,200))
  			clear_alert(alert_type, clear_override = TRUE)
  
  		if("items")
  			//Strange items
  			//to_chat(src, "Traitor Items")
  			if(!halitem)
  				halitem = new
  				var/obj/item/l_hand = get_item_for_held_index(1)
  				var/obj/item/r_hand = get_item_for_held_index(2)
  				var/l = ui_hand_position(get_held_index_of_item(l_hand))
  				var/r = ui_hand_position(get_held_index_of_item(r_hand))
  				var/list/slots_free = list(l,r)
  				if(l_hand) slots_free -= l
  				if(r_hand) slots_free -= r
  				if(ishuman(src))
  					var/mob/living/carbon/human/H = src
  					if(!H.belt) slots_free += ui_belt
  					if(!H.l_store) slots_free += ui_storage1
  					if(!H.r_store) slots_free += ui_storage2
  				if(slots_free.len)
  					halitem.screen_loc = pick(slots_free)
  					halitem.layer = ABOVE_HUD_LAYER
  					halitem.plane = ABOVE_HUD_PLANE
  					switch(rand(1,6))
  						if(1) //revolver
  							halitem.icon = 'icons/obj/guns/projectile.dmi'
  							halitem.icon_state = "revolver"
  							halitem.name = "Revolver"
  						if(2) //c4
  							halitem.icon = 'icons/obj/grenade.dmi'
  							halitem.icon_state = "plastic-explosive0"
  							halitem.name = "Mysterious Package"
  							if(prob(25))
  								halitem.icon_state = "c4small_1"
  						if(3) //sword
  							halitem.icon = 'icons/obj/weapons.dmi'
  							halitem.icon_state = "sword1"
  							halitem.name = "Sword"
  						if(4) //stun baton
  							halitem.icon = 'icons/obj/weapons.dmi'
  							halitem.icon_state = "stunbaton"
  							halitem.name = "Stun Baton"
  						if(5) //emag
  							halitem.icon = 'icons/obj/card.dmi'
  							halitem.icon_state = "emag"
  							halitem.name = "Cryptographic Sequencer"
  						if(6) //flashbang
  							halitem.icon = 'icons/obj/grenade.dmi'
  							halitem.icon_state = "flashbang1"
  							halitem.name = "Flashbang"
  					if(client) client.screen += halitem
  					QDEL_IN(halitem, rand(100, 250))
  		if("dangerflash")
  			//Flashes of danger
  			//to_chat(src, "Danger Flash")
  			if(!halimage)
  				var/list/possible_points = list()
  				for(var/turf/open/floor/F in view(src,world.view))
  					possible_points += F
  				if(possible_points.len)
  					var/turf/open/floor/target = pick(possible_points)
  
  					switch(rand(1,4))
  						if(1)
  							//to_chat(src, "Space")
  							halimage = image('icons/turf/space.dmi',target,"[rand(1,25)]",TURF_LAYER)
  						if(2)
  							//to_chat(src, "Lava")
  							halimage = image('icons/turf/floors/lava.dmi',target,"smooth",TURF_LAYER)
  						if(3)
  							//to_chat(src, "Chasm")
  							halimage = image('icons/turf/floors/Chasms.dmi',target,"smooth",TURF_LAYER)
  						if(4)
  							//to_chat(src, "C4")
  							halimage = image('icons/obj/grenade.dmi',target,"plastic-explosive2",OBJ_LAYER+0.01)
  
  
  					if(client) client.images += halimage
  					sleep(rand(40,60)) //Only seen for a brief moment.
  					if(client) client.images -= halimage
  					halimage = null
  		if("death")
  			//Fake death
  			hal_screwyhud = SCREWYHUD_DEAD
  			SetUnconscious(400)
  			var/area/area = get_area(src)
  			to_chat(src, "<span class='deadsay'><b>[mind.name]</b> has died at <b>[area.name]</b>.</span>")
  			if(prob(50))
  				var/list/dead_people = list()
  				for(var/mob/dead/observer/G in GLOB.player_list)
  					dead_people += G
  				var/mob/dead/observer/fakemob = pick(dead_people)
  				if(fakemob)
  					sleep(rand(30, 60))
  					to_chat(src, "<span class='deadsay'><b>DEAD: [fakemob.name]</b> says, \"[pick("rip","welcome [first_name()]","you too?","is the AI malf?",\
  					 "i[prob(50)?" fucking":""] hate [pick("blood cult", "clock cult", "revenants", "abductors","double agents","viruses","badmins","you")]")]\"</span>")
  			sleep(rand(50,70))
  			hal_screwyhud = SCREWYHUD_NONE
  			SetSleeping(0)
  		if("husks")
  			if(!halbody)
  				var/list/possible_points = list()
  				for(var/turf/open/floor/F in view(src,world.view))
  					possible_points += F
  				if(possible_points.len)
  					var/turf/open/floor/target = pick(possible_points)
  					switch(rand(1,4))
  						if(1)
  							var/image/body = image('icons/mob/human.dmi',target,"husk",TURF_LAYER)
  							var/matrix/M = matrix()
  							M.Turn(90)
  							body.transform = M
  							halbody = body
  						if(2,3)
  							halbody = image('icons/mob/human.dmi',target,"husk",TURF_LAYER)
  						if(4)
  							halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
  
  					if(client) client.images += halbody
  					spawn(rand(30,50)) //Only seen for a brief moment.
  						if(client) client.images -= halbody
  						halbody = null
  
negative.code: 
  /datum/hallucination/whispers/New(mob/living/carbon/T, forced = TRUE)
  	..()
  	var/speak_messages = list("[pick_list_replacements(HAL_LINES_FILE, "suspicion")]",\
  	"[pick_list_replacements(HAL_LINES_FILE, "greetings")][target.first_name()]!",\
  	"[pick_list_replacements(HAL_LINES_FILE, "getout")]",\
  	"[pick_list_replacements(HAL_LINES_FILE, "weird")]",\
  	"[pick_list_replacements(HAL_LINES_FILE, "didyouhearthat")]",\
  	"[pick_list_replacements(HAL_LINES_FILE, "imatraitor")]",\
  	"[pick_list_replacements(HAL_LINES_FILE, "doubt")]",\
  	"[pick_list_replacements(HAL_LINES_FILE, "aggressive")]",\
  	"[pick_list_replacements(HAL_LINES_FILE, "help")]!!",\
  	"[pick_list_replacements(HAL_LINES_FILE, "escape")]",\
  	"I'm infected, [pick_list_replacements(HAL_LINES_FILE, "infection_advice")]!")
  
  	var/radio_messages = list("Set [target.first_name()] to arrest!",\
  	"[pick_list_replacements(HAL_LINES_FILE, "people")] is [pick_list_replacements(HAL_LINES_FILE, "accusations")]!",\
  	"Help!",\
  	"[pick_list_replacements(HAL_LINES_FILE, "threat")] in [pick_list_replacements(HAL_LINES_FILE, "location")][prob(50)?"!":"!!"]",\
  	"Where's [target.first_name()]?"\
  	,"[pick("C","Ai, c","Someone c","Rec")]all the shuttle!"\
  	,"AI [pick("rogue", "is dead")]!!")
  