damage @s 0 mob_attack by @n[type=villager,tag=engineer_q]

# execute if score .shield_cd engineer matches ..0 as @a run
execute as @a[tag=!upgrade_9] run scoreboard players operation @s shield += @s shield_1
execute as @a[tag=upgrade_9] run scoreboard players operation @s shield += @s shield_2
# scoreboard players set .shield_cd engineer 1
function main:mechanics/damage/enemy/deal_damage with storage minecraft:q_damage engineer.id1

execute if entity @a[tag=upgrade_3] at @s run function main:characters/engineer/upgrades/id/3/activation