execute unless entity @n[distance=..3,tag=necromancer_summon] run title @s actionbar {"color":"red", "text": "No valid summons nearby!"}
execute unless entity @n[distance=..3,tag=necromancer_summon] run playsound entity.arrow.hit_player master @s ~ ~ ~ 1 0.5
execute unless entity @n[distance=..3,tag=necromancer_summon] run give @s minecraft:bone[minecraft:custom_name='{"italic":false,"text":"[ Titan Strand ]"}',minecraft:lore=['{"color":"gray","italic":false,"text":"[","extra":[{"color":"dark_green","bold":false,"italic":false,"keybind":"key.use"},{"color":"gray","italic":false,"text":"] on a summon to mutate it with the Titan strand."}]}','{"text":""}','{"color":"#d79e2b","italic":false,"text":"[ STAT ] ","extra":[{"color":"red","bold":false,"italic":false,"text":"+25% Health"}]}','{"color":"#d79e2b","italic":false,"text":"[ STAT ] ","extra":[{"color":"green","bold":false,"italic":false,"text":"+25% Scale"}]}','{"color":"#d79e2b","italic":false,"text":"[ STAT ] ","extra":[{"color":"white","bold":false,"italic":false,"text":"+4 Armor"}]}','{"color":"#d79e2b","italic":false,"text":"[ STAT ] ","extra":[{"color":"blue","bold":false,"italic":false,"text":"-40% Movement Speed"}]}','{"text":""}','{"color":"gray","italic":false,"text":"This will not effect any existing strands. This strand cannot be removed."}'],minecraft:rarity=rare,minecraft:enchantment_glint_override=true,minecraft:custom_data={necromancer_titan_strand_upgrade:1b,necromancer_soul_upgrade:1b},minecraft:consumable={consume_seconds:0,animation:none,sound:"minecraft:block.trial_spawner.spawn_item_begin",has_consume_particles:false},minecraft:item_model="minecraft:nautilus_shell"] 1

tag @n[distance=..3,limit=1,tag=necromancer_summon] add titan_strand
attribute @n[distance=..3,limit=1,tag=titan_strand] max_health modifier add necromancer_titan_strand_max_health 0.25 add_multiplied_total
attribute @n[distance=..3,limit=1,tag=titan_strand] scale modifier add necromancer_titan_strand_scale 0.25 add_multiplied_total
attribute @n[distance=..3,limit=1,tag=titan_strand] armor modifier add necromancer_titan_strand_armor 4 add_value
attribute @n[distance=..3,limit=1,tag=titan_strand] movement_speed modifier add necromancer_titan_strand_movement_speed -0.4 add_multiplied_total
execute as @n[distance=..3,limit=1,tag=titan_strand] at @s run particle minecraft:instant_effect ~ ~1 ~ 0.5 0.8 0.5 0.1 30
execute as @n[distance=..3,limit=1,tag=titan_strand] at @s run particle minecraft:sculk_soul ~ ~1 ~ 0.5 0.8 0.5 0.2 25