function olink:ch1/find_linked

# slots
scoreboard players set n_daggers fd_slot 0
execute as @e[type=#as,tag=dagger,tag=ch1_olinked,limit=6] run scoreboard players add n_daggers fd_slot 1

# summon or upgrade
execute if score n_daggers fd_slot matches ..5 run function items:obj/flying_daggers/dagger/summon/0
execute if score n_daggers fd_slot matches 6 as @e[type=#as,tag=dagger,tag=ch1_olinked,tag=basic,limit=1] run function items:obj/flying_daggers/dagger/upgrade
