execute if predicate items:in_inventory/item_type/passive run function items:passive/souls_max
execute if predicate items:in_inventory/item_type/armor run function items:armor/souls_max
execute if predicate items:in_inventory/item_type/weapon run function items:weapon/souls_max

execute if score @s souls >= @s souls_capacity run scoreboard players operation @s souls -= @s souls_capacity
execute if score @s souls >= @s souls_capacity run function items:soul/trigger_max
