## Store IDs
scoreboard players operation #VB vb.dummy1 = @s vb.id.player
scoreboard players operation #VB vb.dummy2 = @s vb.id.chakram

## Move
execute if entity @e[tag=vb.custom_mob.breeze_chakram,predicate=vb:matching_id/chakram] run scoreboard players add @s vb.timer.chakram 2
execute if entity @e[tag=vb.custom_mob.blaze_chakram,predicate=vb:matching_id/chakram] run scoreboard players add @s vb.timer.chakram 1
execute if score @s vb.timer.chakram matches ..29 run function vb:tick_entity/custom_mob/chakram_core/forward
execute if score @s vb.timer.chakram matches 30.. run function vb:tick_entity/custom_mob/chakram_core/backward

## Damage
scoreboard players set #VB.Result vb.dummy9 0
execute if entity @e[distance=..5,type=!#vb:non_mob] run function vb:tick_entity/deal_damage/in_hitbox {conditions:",type=!#vb:non_mob,predicate=!vb:matching_id/player",amount:7,type:"vb:chakram",extra:" by @p[predicate=vb:matching_id/player]"}
execute if score #VB.Result vb.dummy9 matches 1 run function vb:tick_entity/custom_mob/chakram_core/rebound

## Position the chakram
execute as @e[tag=vb.custom_mob.breeze_chakram,predicate=vb:matching_id/chakram] run function vb:tick_entity/custom_mob/chakram_core/position
execute as @e[tag=vb.custom_mob.blaze_chakram,predicate=vb:matching_id/chakram] run function vb:tick_entity/custom_mob/chakram_core/position