on damage:
victim is a player
attacker is a player
set {_ochrona} to 1
set {_ostrosc} to 1
loop victim's helmet, victim's chestplate, victim's leggings, victim's boots:
if loop-value is enchanted with protection:
add level of protection of loop-value to {_ochrona}
if attacker's tool is enchanted with sharpness:
add level of sharpness of attacker's tool to {_ostrosc}
set {_dmg} to {_ostrosc} / {_ochrona}
if "%active potion effects of attacker%" contains "strength":
set {_effect} to amplifier of strength of attacker + 1
set {_dmg} to {_dmg} * {_effect}
set damage to {_dmg}