{
  "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:loot_table",
          "weight": 1,
          "value": "mt:chests/ocean/ocean_chestplate",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.5
            },
            {
              "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:loot_table",
          "weight": 2,
          "value": "mt:runes/sponge_master",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 3
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "#disable_rune"
                },
                "score": "mt.constant"
              },
              "range": 0
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 700000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:guardian_spawn_egg",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 1
              }
            },
            {
              "function": "minecraft:set_components",
              "components": {
                "minecraft:custom_name": {
                  "text": "Guardian Spawn Egg",
                  "color": "gold",
                  "italic": false
                },
                "minecraft:lore": [
                  {
                    "text": "Hint: use this on a spawner.",
                    "color": "gray",
                    "italic": false
                  }
                ],
                "minecraft:tooltip_display": {
                  "hidden_components": [
                    "minecraft:dyed_color"
                  ]
                }                
              }
            }
          ],
          "conditions": [
            {
              "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
            },
            {
              "condition": "minecraft:random_chance",
              "chance": 0.1
            }
          ]
        },
        {
          "type": "minecraft:loot_table",
          "weight": 2,
          "value": "mt:chests/ocean/trident",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.66
            },
            {
              "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:loot_table",
          "weight": 1,
          "value": "mt:chests/ocean/oceanic_spear",
          "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": 1,
          "name": "minecraft:fishing_rod",
          "conditions": [
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ],
          "functions": [
            {
              "function": "minecraft:set_enchantments",
              "enchantments": {
                "minecraft:luck_of_the_sea": {
                  "min": 1,
                  "max": 10
                }
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.5
                }
              ]
            },
            {
              "function": "minecraft:set_enchantments",
              "enchantments": {
                "minecraft:mending": 1
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.5
                }
              ]
            },
            {
              "function": "minecraft:set_enchantments",
              "enchantments": {
                "minecraft:lure": {
                  "min": 1,
                  "max": 5
                },
                "minecraft:unbreaking": {
                  "min": 0,
                  "max": 10
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:splash_potion",
          "functions": [
            {
              "function": "minecraft:set_potion",
              "id": "minecraft:long_turtle_master"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:shield",
          "functions": [
            {
              "function": "minecraft:set_enchantments",
              "enchantments": {
                "minecraft:unbreaking": {
                  "type": "minecraft:uniform",
                  "min": 4,
                  "max": 10
                },
                "minecraft:mending": 1
              },
              "add": false
            },
            {
              "function": "minecraft:set_components",
              "components": {
                "minecraft:custom_data": {
                  "weapon": "light"
                }
              }
            },
            {
              "function": "set_name",
              "name": [
                {
                  "text": "Lightweight Shield",
                  "color": "aqua",
                  "italic": false
                }
              ]
            },
            {
              "function": "minecraft:set_attributes",
              "modifiers": [
                {
                  "id": "lightweight",
                  "attribute": "minecraft:movement_speed",
                  "amount": 0.075,
                  "operation": "add_multiplied_total",
                  "slot": "offhand"
                },
                {
                  "id": "lightweight",
                  "attribute": "minecraft:armor",
                  "amount": -1,
                  "operation": "add_value",
                  "slot": "offhand"
                },
                {
                  "id": "lightweight",
                  "attribute": "minecraft:armor_toughness",
                  "amount": -1,
                  "operation": "add_value",
                  "slot": "offhand"
                }
              ]
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.75
            },
            {
              "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:blue_shulker_box",
          "functions": [
            {
              "function": "minecraft:set_contents",
              "component": "minecraft:container",
              "entries": [
                {
                  "type": "minecraft:loot_table",
                  "value": "mt:chests/ocean/epic"
                }
              ]
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:enchanted_golden_apple",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "type": "minecraft:uniform",
                "min": 1,
                "max": 3
              },
              "add": false
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.25
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:golden_apple",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "type": "minecraft:binomial",
                "n": 2,
                "p": 4
              },
              "add": false
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:totem_of_undying",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": {
                  "type": "minecraft:constant",
                  "value": 1
                },
                "max": {
                  "type": "minecraft:constant",
                  "value": 2
                }
              },
              "add": false
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:conduit",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 1
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.25
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:sponge",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 7,
                "max": 14
              },
              "add": false
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.25
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:cooked_salmon",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 24,
                "max": 36
              },
              "add": false
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 699999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:prismarine",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 24,
                "max": 48
              },
              "add": false
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 699999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:dark_prismarine",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 24,
                "max": 36
              },
              "add": false
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:suspicious_stew",
          "functions": [
            {
              "function": "minecraft:set_stew_effect",
              "effects": [
                {
                  "type": "minecraft:saturation",
                  "duration": {
                    "min": 1000,
                    "max": 2000
                  }
                }
              ]
            },
            {
              "function": "minecraft:set_components",
              "components": {
                "minecraft:custom_data": {
                  "food": "satstew"
                },
                "minecraft:custom_name": {
                  "text": "Saturation Stew",
                  "color": "gold",
                  "italic": false
                }                
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 550000
                }
              }
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ]
        }
      ]
    }
  ]
}
