scoreboard players set #neg_dmg stats_num 1
scoreboard players set #neg_hp stats_num 1
scoreboard players set #neg_speed stats_num 1
scoreboard players set #neg_knock_resist stats_num 1
scoreboard players set #neg_armor stats_num 1
scoreboard players set #neg_armor_toughness stats_num 1
scoreboard players set #neg_attack_speed stats_num 1

scoreboard players set #neg_curse stats_num 1
scoreboard players set #neg_luck stats_num 1
scoreboard players set #neg_mana_speed stats_num 1
scoreboard players set #neg_mana_capacity stats_num 1
scoreboard players set #neg_mana_cost stats_num 1
scoreboard players set #neg_kills_capacity stats_num 1

scoreboard players set #tmp stats_num 0

execute if score damage stats_calc < #tmp stats_num run scoreboard players set #neg_dmg stats_num -1
execute if score health stats_calc < #tmp stats_num run scoreboard players set #neg_hp stats_num -1
execute if score speed stats_calc < #tmp stats_num run scoreboard players set #neg_speed stats_num -1
execute if score knock_r stats_calc < #tmp stats_num run scoreboard players set #neg_knock_resist stats_num -1
execute if score armor stats_calc < #tmp stats_num run scoreboard players set #neg_armor stats_num -1
execute if score armor_t stats_calc < #tmp stats_num run scoreboard players set #neg_armor_toughness stats_num -1
execute if score attack_s stats_calc < #tmp stats_num run scoreboard players set #neg_attack_speed stats_num -1

execute if score curse stats_calc < #tmp stats_num run scoreboard players set #neg_curse stats_num -1
execute if score luck stats_calc < #tmp stats_num run scoreboard players set #neg_luck stats_num -1
execute if score mana_speed stats_calc < #tmp stats_num run scoreboard players set #neg_mana_speed stats_num -1
execute if score mana_capacity stats_calc < #tmp stats_num run scoreboard players set #neg_mana_capacity stats_num -1
execute if score mana_cost stats_calc < #tmp stats_num run scoreboard players set #neg_mana_cost stats_num -1
execute if score kills_capacity stats_calc < #tmp stats_num run scoreboard players set #neg_kills_capacity stats_num -1


execute if score damage stats_calc < #tmp stats_num run tag @s add neg_dmg
execute if score health stats_calc < #tmp stats_num run tag @s add neg_hp
execute if score speed stats_calc < #tmp stats_num run tag @s add neg_speed
execute if score knock_r stats_calc < #tmp stats_num run tag @s add neg_knock_resist
execute if score armor stats_calc < #tmp stats_num run tag @s add neg_armor
execute if score armor_t stats_calc < #tmp stats_num run tag @s add neg_armor_toughness
execute if score attack_s stats_calc < #tmp stats_num run tag @s add neg_attack_speed

execute if score curse stats_calc < #tmp stats_num run tag @s add neg_curse
execute if score luck stats_calc < #tmp stats_num run tag @s add neg_luck
execute if score mana_speed stats_calc < #tmp stats_num run tag @s add neg_mana_speed
execute if score mana_capacity stats_calc < #tmp stats_num run tag @s add neg_mana_capacity
execute if score mana_cost stats_calc < #tmp stats_num run tag @s add neg_mana_cost
execute if score kills_capacity stats_calc < #tmp stats_num run tag @s add neg_kills_capacity
