scoreboard players set @s attack_speed_multiplier 100
scoreboard players set @s attack_speed_stat 0
$scoreboard players set @s charged_attack_speed_max $(max)

#archer
execute as @s[tag=archer,scores={rc_duration_t=1..}] run scoreboard players add @s attack_speed_stat 30
execute as @s[tag=archer] run scoreboard players operation @s archer *= .10 number
execute as @s[tag=archer] run scoreboard players operation @s attack_speed_stat += @s archer
execute as @s[tag=archer] run scoreboard players operation @s archer /= .10 number


# function main:settings/stats/attack_speed/same

# execute as @s[scores={lightweight_string=1..}] run scoreboard players operation @s lightweight_string *= .20 number
# execute as @s[scores={lightweight_string=1..}] run scoreboard players operation @s attack_speed_stat += @s lightweight_string
# execute as @s[scores={lightweight_string=1..}] run scoreboard players operation @s lightweight_string /= .20 number

##END
execute if score @s attack_speed_stat matches 101.. run scoreboard players set @s attack_speed_stat 100
scoreboard players operation @s attack_speed_multiplier -= @s attack_speed_stat

scoreboard players operation @s charged_attack_speed_max *= @s attack_speed_multiplier
scoreboard players operation @s charged_attack_speed_max /= .100 number
# schedule function main:settings/calculation/damage_bonuses/calculation 1t