{
  "description": "Illegal enchantment",
  "supported_items": [
    "minecraft:stick",
    "minecraft:flint"
  ],
  "weight": 200,
  "max_level": 1,
  "min_cost": {
    "base": 1,
    "per_level_above_first": 0
  },
  "max_cost": {
    "base": 1,
    "per_level_above_first": 0
  },
  "anvil_cost": 1,
  "slots": [
    "mainhand"
  ],
  "effects": {
    "minecraft:post_attack": [
      {
        "enchanted": "attacker",
        "affected": "victim",
        "effect": {
          "type": "minecraft:apply_mob_effect",
          "to_apply": "minecraft:levitation",
          "min_duration": 5,
          "max_duration": 5,
          "min_amplifier": 2,
          "max_amplifier": 2
        },
        "requirements": {
          "condition": "minecraft:entity_properties",
          "entity": "this",
          "predicate": {
            "type": "minecraft:shulker",
            "nbt": "{Tags:[\"shulker_boss\"]}"
          }
        }
      },
      {
        "enchanted": "attacker",
        "affected": "victim",
        "effect": {
          "type": "minecraft:apply_mob_effect",
          "to_apply": "minecraft:levitation",
          "min_duration": 15,
          "max_duration": 15,
          "min_amplifier": 1,
          "max_amplifier": 1
        },
        "requirements": {
          "condition": "minecraft:entity_properties",
          "entity": "attacker",
          "predicate": {
            "type": "minecraft:shulker",
            "nbt": "{Tags:[\"shulker_miniboss\"]}"
          }
        }
      },
      {
        "enchanted": "victim",
        "affected": "victim",
        "effect": {
          "type": "minecraft:apply_mob_effect",
          "to_apply": "minecraft:invisibility",
          "min_duration": 3,
          "max_duration": 5,
          "min_amplifier": 0,
          "max_amplifier": 0
        },
        "requirements": {
          "condition": "minecraft:entity_properties",
          "entity": "this",
          "predicate": {
            "type": "minecraft:phantom",
            "nbt": "{Tags:[\"phantom_boss\"]}"
          }
        }
      },
      {
        "enchanted": "attacker",
        "affected": "victim",
        "effect": {
          "type": "minecraft:apply_mob_effect",
          "to_apply": "minecraft:darkness",
          "min_duration": 4,
          "max_duration": 6,
          "min_amplifier": 0,
          "max_amplifier": 0
        },
        "requirements": {
          "condition": "minecraft:entity_properties",
          "entity": "attacker",
          "predicate": {
            "type": "minecraft:phantom",
            "nbt": "{Tags:[\"phantom_boss_ominous\"]}"
          }
        }
      },
      {
        "enchanted": "victim",
        "affected": "victim",
        "effect": {
          "type": "minecraft:all_of",
          "effects": [
            {
              "type": "minecraft:run_function",
              "function": "nova_structures:spawn_guardian_minion"
            },
            {
              "type": "minecraft:play_sound",
              "sound": "block.trial_spawner.spawn_mob",
              "volume": 6,
              "pitch": 1.5
            }
          ]
        },
        "requirements": {
          "condition": "minecraft:all_of",
          "terms": [
            {
              "condition": "minecraft:any_of",
              "terms": [
                {
                  "condition": "minecraft:entity_properties",
                  "entity": "this",
                  "predicate": {
                    "type": "minecraft:elder_guardian",
                    "nbt": "{Tags:[\"elder_guardian_boss_ominous\"]}"
                  }
                },
                {
                  "condition": "minecraft:entity_properties",
                  "entity": "this",
                  "predicate": {
                    "type": "minecraft:elder_guardian",
                    "nbt": "{Tags:[\"elder_guardian_boss\"]}"
                  }
                }
              ]
            },
            {
              "condition": "minecraft:random_chance",
              "chance": 0.25
            }
          ]
        }
      },
      {
        "enchanted": "attacker",
        "affected": "victim",
        "effect": {
          "type": "minecraft:apply_mob_effect",
          "to_apply": "minecraft:poison",
          "min_duration": 3,
          "max_duration": 5,
          "min_amplifier": 2,
          "max_amplifier": 2
        },
        "requirements": {
          "condition": "minecraft:any_of",
          "terms": [
            {
              "condition": "minecraft:entity_properties",
              "entity": "attacker",
              "predicate": {
                "type": "minecraft:cave_spider",
                "nbt": "{Tags:[\"cave_spider_boss_ominous\"]}"
              }
            },
            {
              "condition": "minecraft:entity_properties",
              "entity": "attacker",
              "predicate": {
                "type": "minecraft:cave_spider",
                "nbt": "{Tags:[\"cave_spider_boss\"]}"
              }
            }
          ]
        }
      },
      {
        "enchanted": "attacker",
        "affected": "victim",
        "effect": {
          "type": "minecraft:apply_mob_effect",
          "to_apply": "minecraft:slowness",
          "min_duration": 3,
          "max_duration": 5,
          "min_amplifier": 2,
          "max_amplifier": 2
        },
        "requirements": {
          "condition": "minecraft:any_of",
          "terms": [
            {
              "condition": "minecraft:entity_properties",
              "entity": "attacker",
              "predicate": {
                "type": "minecraft:breeze",
                "nbt": "{Tags:[\"breeze_boss_ominous\"]}"
              }
            },
            {
              "condition": "minecraft:entity_properties",
              "entity": "attacker",
              "predicate": {
                "nbt": "{Tags:[\"breeze_boss\"]}"
              }
            }
          ]
        }
      }
    ],
    "minecraft:tick": [
      {
        "effect": {
          "type": "minecraft:spawn_particles",
          "particle": {
            "type": "minecraft:reverse_portal"
          },
          "horizontal_position": {
            "type": "in_bounding_box",
            "scale": 2
          },
          "vertical_position": {
            "type": "in_bounding_box",
            "scale": 2
          },
          "horizontal_velocity": {},
          "vertical_velocity": {},
          "speed": 0
        },
        "requirements": {
          "condition": "minecraft:entity_properties",
          "entity": "this",
          "predicate": {
            "type": "minecraft:phantom",
            "nbt": "{Tags:[\"phantom_boss\"]}",
            "effects": {
              "minecraft:invisibility": {}
            }
          }
        }
      }
    ],
    "minecraft:prevent_equipment_drop": {}
  }
}
