{
  "pools": [
    {
      "rolls": {
        "type": "minecraft:binomial",
        "n": {
          "type": "minecraft:storage",
          "storage": "mt:settings",
          "path": "loot_table_rolls.initial"
        },
        "p": {
          "type": "minecraft:score",
          "target": "this",
          "score": "mt.total",
          "scale": 0.000001
        }
      },
      "bonus_rolls": {
        "min": 1,
        "max": 6
      },
      "entries": [
        {
          "type": "minecraft:loot_table",
          "value": "mt:charms/legendary",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.1
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:splash_potion",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 1
            },
            {
              "function": "minecraft:set_components",
              "components": {
                "max_stack_size": 5,
                "minecraft:custom_name": [
                  {
                    "text": "Ultimate",
                    "color": "gold",
                    "bold": false,
                    "italic": false
                  },
                  {
                    "text": " Splash",
                    "color": "gold",
                    "bold": false,
                    "italic": false
                  }
                ],
                "minecraft:potion_contents": {
                  "custom_color": 0,
                  "custom_effects": [
                    {
                      "id": "minecraft:slowness",
                      "amplifier": 4,
                      "duration": 1200
                    },
                    {
                      "id": "minecraft:mining_fatigue",
                      "amplifier": 4,
                      "duration": 1200
                    },
                    {
                      "id": "minecraft:instant_damage",
                      "amplifier": 2,
                      "duration": 10
                    },
                    {
                      "id": "minecraft:nausea",
                      "amplifier": 4,
                      "duration": 120
                    },
                    {
                      "id": "minecraft:blindness",
                      "amplifier": 4,
                      "duration": 40
                    },
                    {
                      "id": "minecraft:hunger",
                      "amplifier": 255,
                      "duration": 1200
                    },
                    {
                      "id": "minecraft:weakness",
                      "amplifier": 2,
                      "duration": 1200
                    },
                    {
                      "id": "minecraft:poison",
                      "amplifier": 4,
                      "duration": 1200
                    },
                    {
                      "id": "minecraft:wither",
                      "amplifier": 4,
                      "duration": 1200
                    },
                    {
                      "id": "minecraft:levitation",
                      "amplifier": 30,
                      "duration": 40,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:unluck",
                      "amplifier": 9,
                      "duration": 160,
                      "show_particles": true
                    }
                  ]
                }
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.75
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 700000
                }
              }
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:ender_chest",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ]
        },
        {
          "type": "minecraft:loot_table",
          "weight": 1,
          "value": "mt:chests/swamp/swamp_chestplate",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.5
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 800000
                }
              }
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ]
        },
        {
          "type": "minecraft:loot_table",
          "weight": 1,
          "value": "mt:chests/swamp/toxic_machette",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.5
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 800000
                }
              }
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:turtle_helmet",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 599999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:glistering_melon_slice",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 549999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:golden_carrot",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 8,
                "max": 16
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 599999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:bone_block",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 8,
                "max": 16
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 599999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:mangrove_log",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 18,
                "max": 36
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 599999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:skeleton_skull",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 599999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:phantom_membrane",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 599999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:golden_apple",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:enchanted_golden_apple",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 1
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:green_shulker_box",
          "functions": [
            {
              "function": "minecraft:set_contents",
              "component": "minecraft:container",
              "entries": [
                {
                  "type": "minecraft:loot_table",
                  "value": "mt:chests/swamp/epic"}
              ]
            },
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            }
          ]
        },
        {
          "type": "item",
          "weight": 2,
          "name": "minecraft:green_dye",
          "functions": [
            {
              "function": "minecraft:set_name",
              "name": [
                {
                  "text": "Spinach",
                  "color": "gold",
                  "italic": false
                }
              ]
            },
            {
              "function": "set_count",
              "count": 2
            },
            {
              "function": "minecraft:set_components",
              "components": {
                  "minecraft:enchantment_glint_override": true,
                  "minecraft:max_stack_size": 99,
                  "minecraft:food": {
                    "nutrition": 6,
                    "saturation": 2,
                    "can_always_eat": true
                  },
                  "minecraft:consumable": {
                    "consume_seconds": 3,
                    "sound": "entity.generic.eat",
                    "has_consume_particles": false,
                    "on_consume_effects": [
                      {
                        "type": "minecraft:apply_effects",
                        "effects": [
                          {
                            "id": "minecraft:strength",
                            "amplifier": 4,
                            "duration": 160
                          }
                        ],
                        "probability": 1
                      }
                    ]
                  },
                  "minecraft:lore": [
                    {
                      "text": "Takes a while to eat... ",
                      "color": "gray",
                      "italic": false
                    },
                    {
                      "text": "but gives Strength V for ",
                      "color": "gray",
                      "italic": false
                    },
                    {
                      "text": "8s, shredding everything ",
                      "color": "gray",
                      "italic": false
                    }
                  ],                  
                  "minecraft:custom_data": {
                    "food": "mt.spinach"
                  }
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.6
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:potion",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 1
            },
            {
              "function": "minecraft:set_components",
              "components": {
                "minecraft:custom_data": {
                  "item": "upotion"
                },
                "max_stack_size": 5,
                "minecraft:custom_name": [
                  {
                    "text": "Ultimate",
                    "color": "gold",
                    "bold": false,
                    "italic": false
                  },
                  {
                    "text": " Potion",
                    "color": "gold",
                    "bold": false,
                    "italic": false
                  }
                ],                
                "minecraft:potion_contents": {
                  "custom_color": 16119285,
                  "custom_effects": [
                    {
                      "id": "minecraft:speed",
                      "amplifier": 2,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:haste",
                      "amplifier": 2,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:strength",
                      "amplifier": 2,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:instant_health",
                      "amplifier": 2,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:regeneration",
                      "amplifier": 2,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:resistance",
                      "amplifier": 1,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:fire_resistance",
                      "amplifier": 1,
                      "duration": 1200
                    },
                    {
                      "id": "minecraft:water_breathing",
                      "amplifier": 1,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:absorption",
                      "amplifier": 3,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:saturation",
                      "amplifier": 1,
                      "duration": 1200,
                      "show_particles": true
                    },
                    {
                      "id": "minecraft:luck",
                      "amplifier": 9,
                      "duration": 1200,
                      "show_particles": true
                    }
                  ]
                }
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.75
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 600000
                }
              }
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ]
        }
      ]
    }
  ]
}
