function main:characters/reaper/rc/id1/tick
function main:characters/reaper/q/id1/tick
function main:characters/reaper/weapon/id1/tick
function main:characters/reaper/shift/id1/tick
execute unless predicate main:holding/stroke_glove run function main:characters/reaper/indicator

#effects
$function main:characters/effects {"character":$(character)}

##weapon
execute if score @s first_person matches 1 as @s[predicate=main:holding/firework_star] run function main:characters/reaper/weapon
execute as @s[predicate=main:holding/rod,predicate=!main:holding/firework_star] run function main:characters/reaper/weapon
execute as @s[predicate=main:holding/nothing] unless entity @e[type=item,nbt={Item:{components:{"minecraft:custom_data":{character:reaper}}}}] run function main:characters/reaper/weapon
execute as @s[predicate=!main:holding/rod] unless entity @e[type=item,nbt={Item:{components:{"minecraft:custom_data":{character:reaper}}}}] run clear @s firework_star
execute if score @s first_person matches 1 run function main:characters/reaper/weapon

execute if score .weapon_animation reaper matches ..0 if score .shift_animation reaper matches ..0 if score .rc_animation reaper matches ..0 if score .q_animation reaper matches ..0 run function main:mechanics/animation/stop {"frame":8388608}

execute if score .weapon_animation reaper matches 1.. run scoreboard players remove .weapon_animation reaper 1
execute if score .rc_animation reaper matches 1.. run scoreboard players remove .rc_animation reaper 1
execute if score .shift_animation reaper matches 1.. run scoreboard players remove .shift_animation reaper 1
execute if score .q_animation reaper matches 1.. run scoreboard players remove .q_animation reaper 1

execute if score .souls_cd reaper matches 1.. run scoreboard players remove .souls_cd reaper 1
execute if score .souls_decay reaper matches 1.. run scoreboard players remove .souls_decay reaper 1
execute if score .souls reaper matches 1.. if score .souls_decay reaper matches ..0 run function main:characters/reaper/decay

execute if entity @s[tag=upgrade_8] if score .souls reaper matches 100.. at @s run function main:characters/reaper/upgrades/id/8/activation