{
  "criteria": {
    "durability_change": {
      "trigger": "minecraft:item_durability_changed",
      "conditions": {
        "delta": {
          "max": -1
        },
        "item": {
          "items": "#overly_realistic:all_tools"
        },
        "player": [
          {
            "condition": "minecraft:value_check",
            "value": {
              "type": "minecraft:score",
              "target": "this",
              "score": "OverlyRealistic.Player.Stats.Intelligence"
            },
            "range": {
              "max": 39
            }
          },
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "slots": {
                "weapon.mainhand": {
                  "items": "#overly_realistic:all_tools"
                }
              }
            }
          }
        ]
      }
    }
  },
  "requirements": [
    [
      "durability_change"
    ]
  ],
  "rewards": {
    "function": "overly_realistic:players/durability_changes/tool_usage"
  }
}