{
  "format_version": "1.16.100",
  "minecraft:item": {
	"description": {
      "identifier": "pixel:netherite_katana_wakizashi_vltsb",
      "category":"Equipment"
    },
    "components": {
	  "minecraft:icon": {
	    "texture": "netherite_wakizashi"
	  },
      "minecraft:creative_category": {
        "parent": "itemGroup.name.sword"
      },
	  "tag:damage:netherite":{},
      "tag:minecraft:is_wakizashi":{},
	  "minecraft:allow_off_hand": true,
	  "minecraft:display_name": {
		"value": "item.pixel:netherite_katana_wakizashi_vltsb.name"
	  },
      "minecraft:max_stack_size": 1,
      "minecraft:use_duration": 3600,
      "minecraft:hand_equipped": true,
      "minecraft:durability": {
        "max_durability": 2032,
        "damage_chance": {
          "min": 60,
          "max": 100
        }
      },
      "minecraft:food": {
        "can_always_eat": true
      },
      "minecraft:repairable": {
        "repair_items": [
          {
            "items": [ "minecraft:netherite_scrap" ],
            "repair_amount": 480
          },
          {
            "items": [ "pixel:repair_item" ],
            "repair_amount": 250
          },
          {
            "items": [ "pixel:netherite_katana_wakizashi_vltsb" ],
            "repair_amount": "query.max_durability"
          }
        ]
      },
      "minecraft:mining_speed": 3,
      "minecraft:damage": 8,
      "minecraft:enchantable": {
        "value": 16,
        "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":[
	      {
		    "condition": "query.scoreboard('lghtmstr') >= 0 && query.scoreboard('lghtmstr') < 500",
		    "sequence":[
	          {
	            "run_command":{
	              "command":[
	                "scoreboard objectives add katana_cd dummy",
	                "scoreboard players set @s katana_cd 20",
	                "effect @s weakness 1 20"
	              ]
	            }
	          },
	          {
		        "condition": "query.scoreboard('katana_cd') < 2",
	            "sequence":[
	              {
		            "add_mob_effect": {
                      "effect": "wither",
                      "target": "other",
                      "duration": 5,
                      "amplifier": 1
			        }
	              }
	            ]
	          }
		    ]
	      },
	      {
		    "condition": "query.scoreboard('lghtmstr') >= 500",
		    "sequence":[
	          {
		        "condition": "query.scoreboard('katana_cd') < 2",
	            "sequence":[
	              {
		            "add_mob_effect": {
                      "effect": "wither",
                      "target": "other",
                      "duration": 8,
                      "amplifier": 1
			        }
	              }
	            ]
	          }
		    ]
	      },
	      {
		    "condition": "query.scoreboard('frctnstrk') > 0",
		    "sequence":[
	          {
		        "damage": {
		          "type": "fire_tick",
		          "amount": 3,
		          "target": "other"
	            }
	          }
		    ]
	      },
	      {
		    "condition": "query.scoreboard('irnlng') != 1 && query.scoreboard('dmndlng') != 1",
	        "randomize":[
	          {
	            "weight": 10,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 5"
		          ]
		        }
	          },
	          {
	            "weight": 20,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 6"
		          ]
		        }
	          },
	          {
	            "weight": 5,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 4"
		          ]
		        }
	          }
	        ]
	      },
	      {
		    "condition": "query.scoreboard('irnlng') == 1",
	        "randomize":[
	          {
	            "weight": 10,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 2"
		          ]
		        }
	          },
	          {
	            "weight": 20,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 5"
		          ]
		        }
	          },
	          {
	            "weight": 5,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 4"
		          ]
		        }
	          }
	        ]
	      },
	      {
		    "condition": "query.scoreboard('dmndlng') == 1",
	        "randomize":[
	          {
	            "weight": 10,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 2"
		          ]
		        }
	          },
	          {
	            "weight": 20,
		        "run_command": {
		          "command":[
	                "scoreboard players remove @s exhaust 3"
		          ]
		        }
	          }
	        ]
	      },
	      {
	        "randomize":[
	          {
	            "weight": 10,
		        "damage": {
		          "type": "durability",
		          "amount": 1
	            }
	          },
	          {
	            "weight": 20,
		        "damage": {
		          "type": "durability",
		          "amount": 0
	            }
	          },
	          {
	            "weight": 5,
		        "damage": {
		          "type": "durability",
		          "amount": 2
	            }
	          }
	        ]
	      },
	      {
	        "randomize":[
	          {
	            "weight": 15,
	            "run_command":{
	              "command":[
	                "scoreboard objectives add lghtmstr dummy"
	              ]
	            }
	          },
	          {
	            "weight": 20,
	            "run_command":{
	              "command":[
	                "scoreboard objectives add lghtmstr dummy",
	                "scoreboard players add @s lghtmstr 1"
	              ]
	            }
	          },
	          {
	            "weight": 10,
	            "run_command":{
	              "command":[
	                "scoreboard objectives add lghtmstr dummy",
	                "scoreboard players add @s lghtmstr 2"
	              ]
	            }
	          },
	          {
	            "weight": 2,
	            "run_command":{
	              "command":[
	                "scoreboard objectives add lghtmstr dummy",
	                "scoreboard players add @s lghtmstr 5"
	              ]
	            }
	          }
	        ]
	      },
	      {
		    "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"
		      ]
		    }
	      }
	    ]
	  }
    }
  }
}