只用effect做不到的
可以用replaceitem的keep法检测
指令如下
循环无条件保持开启:replaceitem entity @e[family=monster] slot.armor.head 0 keep iron_helmet 1 480
连锁有条件保持开启:execute as @e[family=monster] at @s run summon armor_stand ls ~~~
连锁有条件保持开启 execute as @e[family=monster] at @s run tp @s @e[name=ls,c=1]
连锁有条件保持开启kill @e[name=ls]