#deal damage based on weapon
tag @e[type=#main:enemies,tag=enemy,tag=engineer_weapon_hit] remove engineer_weapon_hit
#scrap
execute if entity @s[tag=!engineer_weapon_hit] as @a[tag=engineer] run function main:characters/engineer/passive {"metal":"10"}

execute if entity @a[tag=engineer,scores={weapon_id=1}] as @s[tag=!engineer_weapon_hit] at @s run function main:mechanics/damage/enemy/deal_damage with storage minecraft:weapon_damage engineer.id1
tag @s add engineer_weapon_hit

function main:characters/engineer/weapon/id1/global_hit