schedule function kattersstructures:misc/remove_boss_enchantments 10s

execute as @a if items entity @s weapon.mainhand minecraft:crossbow run item modify entity @s weapon.mainhand [{"function":"minecraft:set_enchantments","enchantments":{"kattersstructures:raj_lightning":0},"conditions":[{"condition":"minecraft:entity_properties","entity":"this","predicate":{"equipment":{"mainhand":{"predicates":{"minecraft:enchantments":[{"enchantments":"kattersstructures:raj_lightning","levels":{"min":0,"max":50}}]}}}}}]}]
execute as @a if items entity @s weapon.offhand minecraft:crossbow run item modify entity @s weapon.offhand [{"function":"minecraft:set_enchantments","enchantments":{"kattersstructures:raj_lightning":0},"conditions":[{"condition":"minecraft:entity_properties","entity":"this","predicate":{"equipment":{"offhand":{"predicates":{"minecraft:enchantments":[{"enchantments":"kattersstructures:raj_lightning","levels":{"min":0,"max":50}}]}}}}}]}]
execute as @a if items entity @s armor.chest #minecraft:enchantable/chest_armor run item modify entity @s armor.chest [{"function":"minecraft:set_enchantments","enchantments":{"kattersstructures:raj_minion":0},"conditions":[{"condition":"minecraft:entity_properties","entity":"this","predicate":{"equipment":{"chest":{"predicates":{"minecraft:enchantments":[{"enchantments":"kattersstructures:raj_minion","levels":{"min":0,"max":50}}]}}}}}]}]
execute as @a if items entity @s armor.chest #minecraft:enchantable/chest_armor run item modify entity @s armor.chest [{"function":"minecraft:set_enchantments","enchantments":{"kattersstructures:raj_ambient":0},"conditions":[{"condition":"minecraft:entity_properties","entity":"this","predicate":{"equipment":{"chest":{"predicates":{"minecraft:enchantments":[{"enchantments":"kattersstructures:raj_ambient","levels":{"min":0,"max":50}}]}}}}}]}]