<commit_before>/obj/effect/proc_holder/spell/targeted/touch
	var/hand_path = "/obj/item/melee/touch_attack"
	var/obj/item/melee/touch_attack/attached_hand = null
	invocation_type = "none" //you scream on connecting, not summoning
	include_user = 1
	range = -1

/obj/effect/proc_holder/spell/targeted/touch/Click(mob/user = usr)
	if(attached_hand)
		qdel(attached_hand)
		charge_counter = charge_max
		attached_hand = null
		to_chat(user, "<span class='notice'>You draw the power out of your hand.</span>")
		return FALSE
	..()

/obj/effect/proc_holder/spell/targeted/touch/cast(list/targets,mob/user = usr)
	for(var/mob/living/carbon/C in targets)
		if(!attached_hand)
			if(!ChargeHand(C))
				return FALSE
	while(attached_hand)
		charge_counter = 0
		stoplag(1)

/obj/effect/proc_holder/spell/targeted/touch/can_cast(mob/user = usr)
	if(attached_hand)
		return TRUE
	return ..()

/obj/effect/proc_holder/spell/targeted/touch/proc/ChargeHand(mob/living/carbon/user)
	attached_hand = new hand_path(src)
	if(!user.put_in_hands(attached_hand))
		qdel(attached_hand)
		charge_counter = charge_max
		attached_hand = null
		to_chat(user, "<span class='warning'>Your hands are full!</span>")
		return FALSE
	to_chat(user, "<span class='notice'>You channel the power of the spell to your hand.</span>")
	return TRUE


/obj/effect/proc_holder/spell/targeted/touch/disintegrate
	name = "Disintegrate"
	desc = "This spell charges your hand with vile energy that can be used to violently explode victims."
	hand_path = "/obj/item/melee/touch_attack/disintegrate"<commit_msg>Fixes can_cast short circuit (#34097)<commit_after>/obj/effect/proc_holder/spell/targeted/touch
	var/hand_path = "/obj/item/melee/touch_attack"
	var/obj/item/melee/touch_attack/attached_hand = null
	invocation_type = "none" //you scream on connecting, not summoning
	include_user = 1
	range = -1

/obj/effect/proc_holder/spell/targeted/touch/Click(mob/user = usr)
	if(attached_hand)
		qdel(attached_hand)
		charge_counter = charge_max
		attached_hand = null
		to_chat(user, "<span class='notice'>You draw the power out of your hand.</span>")
		return FALSE
	..()

/obj/effect/proc_holder/spell/targeted/touch/cast(list/targets,mob/user = usr)
	for(var/mob/living/carbon/C in targets)
		if(!attached_hand)
			if(!ChargeHand(C))
				return FALSE
	while(attached_hand)
		charge_counter = 0
		stoplag(1)

/obj/effect/proc_holder/spell/targeted/touch/can_cast(mob/user = usr)
	return ..() && attached_hand

/obj/effect/proc_holder/spell/targeted/touch/proc/ChargeHand(mob/living/carbon/user)
	attached_hand = new hand_path(src)
	if(!user.put_in_hands(attached_hand))
		qdel(attached_hand)
		charge_counter = charge_max
		attached_hand = null
		to_chat(user, "<span class='warning'>Your hands are full!</span>")
		return FALSE
	to_chat(user, "<span class='notice'>You channel the power of the spell to your hand.</span>")
	return TRUE


/obj/effect/proc_holder/spell/targeted/touch/disintegrate
	name = "Disintegrate"
	desc = "This spell charges your hand with vile energy that can be used to violently explode victims."
	hand_path = "/obj/item/melee/touch_attack/disintegrate"
{'fraction_non_alphanumeric': 0.12348436502871729, 'fraction_numerical': 0.004148053605615826, 'mean_word_length': 4.816326530612245, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6432212', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1114, 'n_words': 221}