<commit_before>/obj/effect/proc_holder/spell/targeted/genetic
	name = "Genetic"
	desc = "This spell inflicts a set of mutations and disabilities upon the target."

	var/list/active_on = list()
	var/list/traits = list() //disabilities
	var/list/mutations = list() //mutation defines
	var/duration = 100 //deciseconds
	/*
		Disabilities
			1st bit - ?
			2nd bit - ?
			3rd bit - ?
			4th bit - ?
			5th bit - ?
			6th bit - ?
	*/

/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets,mob/user = usr)
	playMagSound()
	for(var/mob/living/carbon/target in targets)
		if(target.anti_magic_check())
			continue
		if(!target.dna)
			continue
		for(var/A in mutations)
			target.dna.add_mutation(A)
		for(var/A in traits)
			ADD_TRAIT(target, A, GENETICS_SPELL)
		active_on += target
		addtimer(CALLBACK(src, .proc/remove, target), duration)

/obj/effect/proc_holder/spell/targeted/genetic/Destroy()
	. = ..()
	for(var/V in active_on)
		remove(V)

/obj/effect/proc_holder/spell/targeted/genetic/proc/remove(mob/living/carbon/target)
	active_on -= target
	if(!QDELETED(target))
		for(var/A in mutations)
			target.dna.remove_mutation(A)
		for(var/A in traits)
			REMOVE_TRAIT(target, A, GENETICS_SPELL)<commit_msg>Makes the Mutate spell less annoying to use (#46092)<commit_after>/obj/effect/proc_holder/spell/targeted/genetic
	name = "Genetic"
	desc = "This spell inflicts a set of mutations and disabilities upon the target."

	var/list/active_on = list()
	var/list/traits = list() //disabilities
	var/list/mutations = list() //mutation defines
	var/duration = 100 //deciseconds
	/*
		Disabilities
			1st bit - ?
			2nd bit - ?
			3rd bit - ?
			4th bit - ?
			5th bit - ?
			6th bit - ?
	*/

/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets,mob/user = usr)
	playMagSound()
	for(var/mob/living/carbon/target in targets)
		if(target.anti_magic_check())
			continue
		if(!target.dna)
			continue
		for(var/A in mutations)
			target.dna.add_mutation(A)
		for(var/A in traits)
			ADD_TRAIT(target, A, GENETICS_SPELL)
		active_on += target
		if(duration < charge_max)
			addtimer(CALLBACK(src, .proc/remove, target), duration, TIMER_OVERRIDE|TIMER_UNIQUE)

/obj/effect/proc_holder/spell/targeted/genetic/Destroy()
	. = ..()
	for(var/V in active_on)
		remove(V)

/obj/effect/proc_holder/spell/targeted/genetic/proc/remove(mob/living/carbon/target)
	active_on -= target
	if(!QDELETED(target))
		for(var/A in mutations)
			target.dna.remove_mutation(A)
		for(var/A in traits)
			REMOVE_TRAIT(target, A, GENETICS_SPELL)
{'fraction_non_alphanumeric': 0.13275385223231925, 'fraction_numerical': 0.009087317265902806, 'mean_word_length': 3.7063197026022303, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '1203077', 'n_tokens_mistral': 1062, 'n_tokens_neox': 950, 'n_words': 182}