<commit_before>/mob/living/simple_animal/hostile/zombie
	name = "zombie"
	desc = "When Observe is full, the dead shall walk the station."
	icon = 'icons/mob/human.dmi'
	icon_state = "zombie_s"
	icon_living = "zombie_s"
	icon_dead = "zombie_dead"
	turns_per_move = 5
	speak_emote = list("groans")
	emote_see = list("groans")
	a_intent = "harm"
	maxHealth = 180
	health = 180
	speed = 2
	harm_intent_damage = 8
	melee_damage_lower = 20
	melee_damage_upper = 20
	attacktext = "claws"
	attack_sound = 'sound/hallucinations/growl1.ogg'
	atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
	minbodytemp = 0
	maxbodytemp = 350
	unsuitable_atmos_damage = 10
	environment_smash = 1
	robust_searching = 1
	stat_attack = 2
	gold_core_spawnable = 1
	faction = list("zombie")
	var/mob/living/carbon/human/stored_corpse = null
	butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/zombie = 3)
	see_invisible = SEE_INVISIBLE_MINIMUM
	see_in_dark = 8
	layer = MOB_LAYER - 0.1
	var/removingairlock = 0



/mob/living/simple_animal/hostile/zombie/AttackingTarget()
	..()
	if(isliving(target))
		var/mob/living/L = target
		if(ishuman(L) && L.stat)
			var/mob/living/carbon/human/H = L
			for(var/mob/living/simple_animal/hostile/zombie/holder/Z in H) //No instant heals for people who are already zombies
				src << "<span class='userdanger'>They'll be getting up on their own, just give them a minute!</span>"
				Z.faction = src.faction //Just in case zombies somehow ended up on different "teams"
				H.faction = src.faction
				return
			Zombify(H)
		else if (L.stat) //So they don't get stuck hitting a corpse
			L.gib()
			visible_message("<span class='danger'>[src] tears [L] to pieces!</span>")
			src << "<span class='userdanger'>You feast on [L], restoring your health!</span>"
			revive(full_heal = 1)

	if(istype(target, /obj/machinery/door/airlock))
		if(!removingairlock)
			src << "<span class='notice'>You start tearing apart the airlock...</span>"
			playsound(src.loc, 'sound/hallucinations/growl3.ogg', 50, 1)
			var/obj/machinery/door/airlock/A = target
			removingairlock = 1
			if(do_after(src, 250, 0, A, 1))
				playsound(src.loc, 'sound/hallucinations/far_noise.ogg', 50, 1)
				var/obj/structure/door_assembly/door = new A.doortype(get_turf(A))
				door.density = 0
				door.anchored = 1
				door.name = "ravaged airlock"
				door.desc = "An airlock that has been torn apart. Looks like it won't be keeping much out now."
				qdel(A)
			removingairlock = 0
		else
			src << "<span class='notice'>You are already tearing an airlock apart!</span>"

/mob/living/simple_animal/hostile/zombie/death()
	..()
	if(stored_corpse)
		stored_corpse.loc = loc
		if(ckey)
			stored_corpse.ckey = src.ckey
			stored_corpse << "<span class='userdanger'>You're down, but not quite out. You'll be back on your feet within a minute or two.</span>"
			var/mob/living/simple_animal/hostile/zombie/holder/D = new/mob/living/simple_animal/hostile/zombie/holder(stored_corpse)
			D.faction = src.faction
		qdel(src)
		return
	src << "<span class='userdanger'>You're down, but not quite out. You'll be back on your feet within a minute or two.</span>"
	spawn(rand(600,900))
		if(src)
			visible_message("<span class='danger'>[src] staggers to their feet!</span>")
			revive(full_heal = 1)

/mob/living/simple_animal/hostile/zombie/proc/Zombify(mob/living/carbon/human/H)<commit_msg>Zombie Tweaks<commit_after>/mob/living/simple_animal/hostile/zombie
	name = "zombie"
	desc = "When Observe is full, the dead shall walk the station."
	icon = 'icons/mob/human.dmi'
	icon_state = "zombie_s"
	icon_living = "zombie_s"
	icon_dead = "zombie_dead"
	turns_per_move = 5
	speak_emote = list("groans")
	emote_see = list("groans")
	a_intent = "harm"
	maxHealth = 120
	health = 120
	speed = 2
	harm_intent_damage = 8
	melee_damage_lower = 20
	melee_damage_upper = 20
	attacktext = "claws"
	attack_sound = 'sound/hallucinations/growl1.ogg'
	atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
	minbodytemp = 0
	maxbodytemp = 350
	unsuitable_atmos_damage = 10
	environment_smash = 1
	robust_searching = 1
	stat_attack = 2
	gold_core_spawnable = 1
	faction = list("zombie")
	var/mob/living/carbon/human/stored_corpse = null
	butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/zombie = 3)
	see_invisible = SEE_INVISIBLE_MINIMUM
	see_in_dark = 8
	layer = MOB_LAYER - 0.1
	var/removingairlock = 0



/mob/living/simple_animal/hostile/zombie/AttackingTarget()
	..()
	if(isliving(target))
		var/mob/living/L = target
		if(ishuman(L) && L.stat)
			var/mob/living/carbon/human/H = L
			for(var/mob/living/simple_animal/hostile/zombie/holder/Z in H) //No instant heals for people who are already zombies
				src << "<span class='userdanger'>They'll be getting up on their own, just give them a minute!</span>"
				Z.faction = src.faction //Just in case zombies somehow ended up on different "teams"
				H.faction = src.faction
				return
			Zombify(H)
		else if (L.stat) //So they don't get stuck hitting a corpse
			L.gib()
			visible_message("<span class='danger'>[src] tears [L] to pieces!</span>")
			src << "<span class='userdanger'>You feast on [L], restoring your health!</span>"
			revive(full_heal = 1)

	if(istype(target, /obj/machinery/door/airlock))
		if(!removingairlock)
			src << "<span class='notice'>You start tearing apart the airlock...</span>"
			playsound(src.loc, 'sound/hallucinations/growl3.ogg', 50, 1)
			var/obj/machinery/door/airlock/A = target
			removingairlock = 1
			if(do_after(src, 200, 0, A, 1))
				playsound(src.loc, 'sound/hallucinations/far_noise.ogg', 50, 1)
				var/obj/structure/door_assembly/door = new A.doortype(get_turf(A))
				door.density = 0
				door.anchored = 1
				door.name = "ravaged airlock"
				door.desc = "An airlock that has been torn apart. Looks like it won't be keeping much out now."
				qdel(A)
			removingairlock = 0
		else
			src << "<span class='notice'>You are already tearing an airlock apart!</span>"

/mob/living/simple_animal/hostile/zombie/death()
	..()
	if(stored_corpse)
		stored_corpse.loc = loc
		if(ckey)
			stored_corpse.ckey = src.ckey
			stored_corpse << "<span class='userdanger'>You're down, but not quite out. You'll be back on your feet within a minute or two.</span>"
			var/mob/living/simple_animal/hostile/zombie/holder/D = new/mob/living/simple_animal/hostile/zombie/holder(stored_corpse)
			D.faction = src.faction
		qdel(src)
		return
	src << "<span class='userdanger'>You're down, but not quite out. You'll be back on your feet within a minute or two.</span>"
	spawn(rand(300,400))
		if(src)
			visible_message("<span class='danger'>[src] staggers to their feet!</span>")
			revive(full_heal = 1)

/mob/living/simple_animal/hostile/zombie/proc/Zombify(mob/living/carbon/human/H)
{'fraction_non_alphanumeric': 0.13407661520869069, 'fraction_numerical': 0.018582046883933678, 'mean_word_length': 4.077648766328012, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6956895', 'n_tokens_mistral': 3044, 'n_tokens_neox': 2654, 'n_words': 604}