anchor.diff:  obj/item/weapon/organ
   	icon = 'icons/mob/human_races/r_human.dmi'
   
  -/*
  -//Damage will not exceed max_damage using this proc
  -//Cannot apply negative damage
  -/datum/organ/external/proc/take_damage(brute, burn)
  -	if(owner && (owner.status_flags & GODMODE))	return 0	//godmode
  -	brute	= max(brute,0)
  -	burn	= max(burn,0)
  -
  -	var/can_inflict = max_damage - (brute_dam + burn_dam)
  -	if(!can_inflict)	return 0
  -*/
  -
   obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
   	..(loc)
   	if(!istype(H))
  
positive.code: 			blood_DNA = list()
  		blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
  
  	var/icon/I = new /icon(icon, icon_state)
  
  	if (H.s_tone >= 0)
  		I.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
  	else
  		I.Blend(rgb(-H.s_tone,  -H.s_tone,  -H.s_tone), ICON_SUBTRACT)
  	icon = I
  
  obj/item/weapon/organ/head
  	name = "head"
  	icon_state = "head_m"
  	var/mob/living/carbon/brain/brainmob
  	var/brain_op_stage = 0
  
  obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H)
  	..()
  	spawn(5)
  	if(brainmob && brainmob.client)
  		brainmob.client.screen.len = null //clear the hud
  	if(ishuman(H))
  		if(H.gender == FEMALE)
  			H.icon_state = "head_f"
  		H.overlays += H.generate_head_icon()
  	transfer_identity(H)
  	pixel_x = -10
  	pixel_y = 6
  	name = "[H.real_name]'s head"
  
  	H.regenerate_icons()
  
  	H.death()
  
  obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
  	brainmob = new(src)
  	brainmob.name = H.real_name
  	brainmob.real_name = H.real_name
  	brainmob.dna = H.dna
  	if(H.mind)
  		H.mind.transfer_to(brainmob)
  	brainmob.container = src
  
  obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
  	if(istype(W,/obj/item/weapon/scalpel))
  		switch(brain_op_stage)
  			if(0)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] is beginning to have \his head cut open with [src] by [user].", 1)
  				brainmob << "\red [user] begins to cut open your head with [src]!"
  				user << "\red You cut [brainmob]'s head open with [src]!"
  
  				brain_op_stage = 1
  
  			if(2)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] is having \his connections to the brain delicately severed with [src] by [user].", 1)
  				brainmob << "\red [user] begins to cut open your head with [src]!"
  				user << "\red You cut [brainmob]'s head open with [src]!"
  
  				brain_op_stage = 3.0
  			else
  				..()
  	else if(istype(W,/obj/item/weapon/circular_saw))
  		switch(brain_op_stage)
  			if(1)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] has \his skull sawed open with [src] by [user].", 1)
  				brainmob << "\red [user] begins to saw open your head with [src]!"
  				user << "\red You saw [brainmob]'s head open with [src]!"
  
  				brain_op_stage = 2
  			if(3)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] has \his spine's connection to the brain severed with [src] by [user].", 1)
  				brainmob << "\red [user] severs your brain's connection to the spine with [src]!"
  				user << "\red You sever [brainmob]'s brain's connection to the spine with [src]!"
  
  				user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [brainmob.name] ([brainmob.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
  				brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
  				log_admin("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
  				message_admins("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
  
  				var/obj/item/brain/B = new(loc)
  				B.transfer_identity(brainmob)
  
  				brain_op_stage = 4.0
  			else
  				..()
  	else
  		..()
  
  obj/item/weapon/organ/l_arm
  	name = "left arm"
  
negative.code: obj/item/weapon/organ/r_leg
  	name = "right leg"
  	icon_state = "r_leg"
  obj/item/weapon/organ/head
  	name = "head"
  	icon_state = "head_m"
  	var/mob/living/carbon/brain/brainmob
  	var/brain_op_stage = 0
  
  obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H)
  	..()
  	spawn(5)
  	if(brainmob && brainmob.client)
  		brainmob.client.screen.len = null //clear the hud
  	if(ishuman(H))
  		if(H.gender == FEMALE)
  			H.icon_state = "head_f"
  		H.overlays += H.generate_head_icon()
  	transfer_identity(H)
  	pixel_x = -10
  	pixel_y = 6
  	name = "[H.real_name]'s head"
  
  	H.regenerate_icons()
  
  	H.death()
  
  obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
  	brainmob = new(src)
  	brainmob.name = H.real_name
  	brainmob.real_name = H.real_name
  	brainmob.dna = H.dna
  	if(H.mind)
  		H.mind.transfer_to(brainmob)
  	brainmob.container = src
  
  obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
  	if(istype(W,/obj/item/weapon/scalpel))
  		switch(brain_op_stage)
  			if(0)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] is beginning to have \his head cut open with [src] by [user].", 1)
  				brainmob << "\red [user] begins to cut open your head with [src]!"
  				user << "\red You cut [brainmob]'s head open with [src]!"
  
  				brain_op_stage = 1
  
  			if(2)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] is having \his connections to the brain delicately severed with [src] by [user].", 1)
  				brainmob << "\red [user] begins to cut open your head with [src]!"
  				user << "\red You cut [brainmob]'s head open with [src]!"
  
  				brain_op_stage = 3.0
  			else
  				..()
  	else if(istype(W,/obj/item/weapon/circular_saw))
  		switch(brain_op_stage)
  			if(1)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] has \his skull sawed open with [src] by [user].", 1)
  				brainmob << "\red [user] begins to saw open your head with [src]!"
  				user << "\red You saw [brainmob]'s head open with [src]!"
  
  				brain_op_stage = 2
  			if(3)
  				for(var/mob/O in (oviewers(brainmob) - user))
  					O.show_message("\red [brainmob] has \his spine's connection to the brain severed with [src] by [user].", 1)
  				brainmob << "\red [user] severs your brain's connection to the spine with [src]!"
  				user << "\red You sever [brainmob]'s brain's connection to the spine with [src]!"
  
  				user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [brainmob.name] ([brainmob.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
  				brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
  				log_admin("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
  				message_admins("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
  
  				var/obj/item/brain/B = new(loc)
  				B.transfer_identity(brainmob)
  
  				brain_op_stage = 4.0
  			else
  				..()
  	else
  		..()
  