data modify storage inv_update list set value []
data modify storage inv_update list set from entity @s Inventory[{Slot:-106b}]
data remove storage inv_update list[{tag:{custom:1}}]

execute store result score #count stats_calc run data get storage inv_update list[0].Count 1
# Minecraft
execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.attack_damage[{slot:"offhand"}].value 1000
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation damage stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.max_health[{slot:"offhand"}].value 1000
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation health stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.movement_speed[{slot:"offhand"}].value 1000
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation speed stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.knockback_resistance[{slot:"offhand"}].value 1000
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation knock_r stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.armor[{slot:"offhand"}].value 1000
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation armor stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.armor_toughness[{slot:"offhand"}].value 1000
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation armor_t stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.attack_speed[{slot:"offhand"}].value 1000
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation attack_s stats_calc += #tmp stats_calc

# Custom
execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.curse[{slot:"offhand"}].value 100
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation curse stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.luck[{slot:"offhand"}].value 1
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation luck stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.mana_speed[{slot:"offhand"}].value 1
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation mana_speed stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.mana_capacity[{slot:"offhand"}].value 1
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation mana_capacity stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.mana_cost[{slot:"offhand"}].value 1
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation mana_cost stats_calc += #tmp stats_calc

execute store result score #tmp stats_calc run data get storage inv_update list[0].tag.stats.souls_capacity[{slot:"offhand"}].value 1
scoreboard players operation #tmp stats_calc *= #count stats_calc
scoreboard players operation souls_capacity stats_calc += #tmp stats_calc
