{
  "format_version": "1.16.100",
  "minecraft:item": {
	"description": {
      "identifier": "pixel:giant_mace",
      "category":"Equipment"
    },
    "components": {
	  "minecraft:icon": {
	    "texture": "giant_mace"
	  },
      "minecraft:creative_category": {
        "parent": "itemGroup.name.sword"
      },
	  "tag:damage:beyond_netherite":{},
	  "tag:minecraft:longrange":{},
      "tag:minecraft:is_giant_mace":{},
	  "minecraft:allow_off_hand": true,
	  "minecraft:display_name": {
		"value": "item.pixel:giant_mace.name"
	  },
      "minecraft:max_stack_size": 1,
      "minecraft:use_duration": 3600,
      "minecraft:hand_equipped": true,
      "minecraft:durability": {
        "max_durability": 1435,
        "damage_chance": {
          "min": 60,
          "max": 100
        }
      },
      "minecraft:repairable": {
        "repair_items": [
          {
            "items": [ "minecraft:iron_ingot" ],
            "repair_amount": "query.max_durability * 0.25"
          },
          {
            "items": [ "minecraft:iron_sword" ],
            "repair_amount": "query.max_durability"
          },
          {
            "items": [ "pixel:giant_mace" ],
            "repair_amount": "query.max_durability"
          }
        ]
      },
      "minecraft:mining_speed": 1.5,
      "minecraft:damage": 8,
      "minecraft:enchantable": {
        "value": 15,
        "slot": "sword"
      },
      "minecraft:can_destroy_in_creative": false,
      "minecraft:digger": {
        "use_efficiency": true,
        "destroy_speeds": [
          {
            "block": "minecraft:web",
            "speed": 15,
			"on_dig": {
			  "event": "minecraft:break"
			}
          },
          {
            "block": "minecraft:bamboo",
            "speed": 10,
			"on_dig": {
			  "event": "minecraft:break"
			}
          }
        ],
		"on_dig": {
		  "event": "minecraft:break",
		  "target": "self"
		}
      },
      "minecraft:chargeable": {
		"on_complete": {
		  "event": "filter_the_shoot",
		  "target": "self"
		}
	  },
	  "minecraft:weapon": {
		"on_hurt_entity": {
		  "event": "minecraft:break"
		}
	  }
	},
	"events": {
	  "minecraft:break": {
	    "sequence":[
	      {
		   "damage": {
		     "type": "durability",
		     "amount": 1
	        },
	        "run_command":{
	          "command":[
	            "scoreboard players remove @s exhaust 2",
	            "scoreboard objectives add mace_cd dummy",
	            "scoreboard players set @s mace_cd 60"
	          ]
	        }
	      },
	      {
		   "condition": "query.scoreboard('exhaust') >= 5 && query.mark_variant == 0",
	       "sequence":[
	        {
		     "damage": {
		      "type": "entity_attack",
		      "amount": 2,
		      "target": "other"
		    },
		    "add_mob_effect": {
              "effect": "slowness",
              "target": "other",
              "duration": 3,
              "amplifier": 3
			},
	        "run_command":{
	          "command":[
	            "scoreboard players remove @s exhaust 5",
	            "event entity @s combo_1"
	          ]
	        }
	       }
	     ]
	    },
	      {
		   "condition": "query.scoreboard('exhaust') >= 3 && query.mark_variant == 1",
	       "sequence":[
	        {
		     "damage": {
		      "type": "entity_attack",
		      "amount": 4,
		      "target": "other"
		    },
		    "add_mob_effect": {
              "effect": "slowness",
              "target": "other",
              "duration": 5,
              "amplifier": 3
			},
	        "run_command":{
	          "command":[
	            "scoreboard players remove @s exhaust 3",
	            "event entity @s combo_2"
	          ]
	        }
	       }
	     ]
	    },
	      {
		   "condition": "query.scoreboard('exhaust') >= 7 && query.mark_variant == 2",
	       "sequence":[
	        {
		     "damage": {
		      "type": "entity_attack",
		      "amount": 6,
		      "target": "other"
		    },
		    "add_mob_effect": {
              "effect": "slowness",
              "target": "other",
              "duration": 2,
              "amplifier": 3
			},
	        "run_command":{
	          "command":[
	            "scoreboard players remove @s exhaust 7",
	            "event entity @s combo_0"
	          ]
	        }
	       },
           {
	        "run_command":{
	          "command":[
	            "tp @s ^^^-2"
	          ],
	          "target": "other"
	        }
	       }
	     ]
	    },
	      {
		    "condition": "query.scoreboard('irnlng') != 1 && query.scoreboard('dmndlng') != 1",
		    "run_command": {
		      "command":[
	            "scoreboard players set @s exhregen 100"
		      ]
		    }
	      },
	      {
		    "condition": "query.scoreboard('irnlng') == 1",
		    "run_command": {
		      "command":[
	            "scoreboard players set @s exhregen 100"
		      ]
		    }
	      },
	      {
		    "condition": "query.scoreboard('dmndlng') == 1",
		    "run_command": {
		      "command":[
	            "scoreboard players set @s exhregen 100"
		      ]
		    }
	      }
	    ]
	  }
    }
  }
}