
# -> Reset adv trigger
advancement revoke @s only overly_realistic:items/use_bow

# -> Add to usage time
scoreboard players add @s OverlyRealistic.Player.UseItem_Bow_Continuous 1

# -> If usage time < max then return
execute unless score @s OverlyRealistic.Player.UseItem_Bow_Continuous matches 20.. run \
    return fail

# -> Reset usage time
scoreboard players reset @s OverlyRealistic.Player.UseItem_Bow_Continuous

# -> Decrease stamina
execute unless score @s OverlyRealistic.Player.WisdomStats.Archery matches 1.. run \
    return run \
        scoreboard players remove @s OverlyRealistic.Player.Stats.Stamina 6
execute if score @s OverlyRealistic.Player.WisdomStats.Archery matches 1 run \
    return run \
        scoreboard players remove @s OverlyRealistic.Player.Stats.Stamina 5
execute if score @s OverlyRealistic.Player.WisdomStats.Archery matches 3 run \
    return run \
        scoreboard players remove @s OverlyRealistic.Player.Stats.Stamina 4
execute if score @s OverlyRealistic.Player.WisdomStats.Archery matches 5 run \
    return run \
        scoreboard players remove @s OverlyRealistic.Player.Stats.Stamina 3
