give @s echo_shard[custom_data={class_ability_item:1b},custom_name='{"color":"red","italic":false,"text":"Class Ability: Mysterious Concoction"}',consumable={consume_seconds:3,sound:"item.bottle.fill",has_consume_particles:false,on_consume_effects:[{type:"minecraft:play_sound",sound:"block.brewing_stand.brew"}],animation:"none"},use_cooldown={seconds:30},enchantment_glint_override=true]
particle instant_effect ~ ~1 ~ 0.3 0.5 0.3 1 20 normal
particle totem_of_undying ~ ~1.5 ~ 0.3 0.5 0.3 0.1 20 normal
particle entity_effect{color:[0.820,0.000,0.000,1.00]} ~ ~1 ~ 0.5 0.5 0.5 1 80

execute if score world Run_Active matches 0 run playsound entity.arrow.hit_player master @s ~ ~1 ~ 1 0
execute if score world Run_Active matches 0 run title @s actionbar {"color":"red","text": "Sorry, no stacking potions pre-run :>"}

execute if score world InIntermission matches 0 run playsound entity.arrow.hit_player master @s ~ ~1 ~ 1 0
execute if score world InIntermission matches 0 run title @s actionbar {"color":"red","text": "Sorry, no stacking potions in intermission :>"}

execute if score world Run_Active matches 1 run function kiwi2:upgrades/classes/apothecary/apothecary_roll

# Common Rolls (80%)
    # give @s splash_potion[potion_contents={potion:"strong_swiftness"}] 1
    # give @s splash_potion[potion_contents={potion:"strong_harming"}] 1
    # give @s splash_potion[potion_contents={potion:"strong_healing"}] 1
    # give @s splash_potion[potion_contents={potion:"strong_poison"}] 1
    # give @s splash_potion[potion_contents={potion:"strong_regeneration"}] 1
    # give @s splash_potion[potion_contents={potion:"strong_strength"}] 1
    # give @s splash_potion[potion_contents={potion:"slowness"}] 1
    # give @s lingering_potion[potion_contents={potion:"swiftness"}] 1
    # give @s lingering_potion[potion_contents={potion:"harming"}] 1
    # give @s lingering_potion[potion_contents={potion:"healing"}] 1
    # give @s lingering_potion[potion_contents={potion:"poison"}] 1
    # give @s lingering_potion[potion_contents={potion:"regeneration"}] 1
    # give @s lingering_potion[potion_contents={potion:"strength"}] 1
    # give @s lingering_potion[potion_contents={potion:"slowness"}] 1

# Rare Rolls (15%)
    # give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:health_boost",amplifier:0,duration:400}]},custom_name='[{"bold":true,"color":"blue","italic":false,"text":"[RARE] "},{"bold":false,"color":"white","italic":false,"text":"Health Boost Potion"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:resistance",amplifier:0,duration:400}]},custom_name='[{"bold":true,"color":"blue","italic":false,"text":"[RARE] "},{"bold":false,"color":"white","italic":false,"text":"Bulwark Potion"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:wither",amplifier:1,duration:400}]},custom_name='[{"bold":true,"color":"blue","italic":false,"text":"[RARE] "},{"bold":false,"color":"white","italic":false,"text":"Withering Potion"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:slowness",amplifier:2,duration:200}]},custom_name='[{"bold":true,"color":"blue","italic":false,"text":"[RARE] "},{"bold":false,"color":"white","italic":false,"text":"Binding Potion"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:poison",amplifier:2,duration:600}]},custom_name='[{"bold":true,"color":"blue","italic":false,"text":"[RARE] "},{"bold":false,"color":"white","italic":false,"text":"Toxin Potion"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:levitation",amplifier:2,duration:200}]},custom_name='[{"bold":true,"color":"blue","italic":false,"text":"[RARE] "},{"bold":false,"color":"white","italic":false,"text":"Levitation Potion"}]'] 1

# Epic Rolls (4%)
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:poison",amplifier:3,duration:1200},{id:"minecraft:wither",amplifier:3,duration:1200},{id:"minecraft:nausea",amplifier:3,duration:1200}]},custom_name='[{"bold":true,"color":"dark_purple","italic":false,"text":"[EPIC] "},{"bold":false,"color":"white","italic":false,"text":"Pure Absinthe"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:regeneration",amplifier:1,duration:1200},{id:"minecraft:instant_health",amplifier:1,duration:60}]},custom_name='[{"bold":true,"color":"dark_purple","italic":false,"text":"[EPIC] "},{"bold":false,"color":"white","italic":false,"text":"Kombucha"}]'] 1
    # give @p potion[potion_contents={custom_effects:[{id:"minecraft:strength",amplifier:0,duration:2400},{id:"minecraft:speed",amplifier:0,duration:2400}]},custom_name='[{"bold":true,"color":"dark_purple","italic":false,"text":"[EPIC] "},{"bold":false,"color":"white","italic":false,"text":"Traditional Chica"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:resistance",amplifier:1,duration:1200},{id:"minecraft:fire_resistance",amplifier:1,duration:1200}]},custom_name='[{"bold":true,"color":"dark_purple","italic":false,"text":"[EPIC] "},{"bold":false,"color":"white","italic":false,"text":"Potent Laudanum"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:levitation",amplifier:5,duration:200}]},custom_name='[{"bold":true,"color":"dark_purple","italic":false,"text":"[EPIC] "},{"bold":false,"color":"white","italic":false,"text":"Anti-Gravity Potion"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:speed",amplifier:2,duration:1200},{id:"minecraft:absorption",amplifier:4,duration:100},{id:"minecraft:regeneration",amplifier:0,duration:300}]},custom_name='[{"bold":true,"color":"dark_purple","italic":false,"text":"[EPIC] "},{"bold":false,"color":"white","italic":false,"text":"Adrenochrome"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:absorption",amplifier:4,duration:1200}]},custom_name='[{"bold":true,"color":"dark_purple","italic":false,"text":"[EPIC] "},{"bold":false,"color":"white","italic":false,"text":"Shielding Potion"}]'] 1

# Legendary Rolls (1%)
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:regeneration",amplifier:3,duration:1200},{id:"minecraft:health_boost",amplifier:3,duration:2400},{id:"minecraft:saturation",amplifier:3,duration:400}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Amrita"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:wither",amplifier:4,duration:288000},{id:"minecraft:poison",amplifier:4,duration:288000}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Halahala"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:instant_damage",amplifier:4,duration:20}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Potassium Cyanide"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:instant_health",amplifier:4,duration:20}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Elixir of Life"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:slowness",amplifier:5,duration:1800}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"α-Bungarotoxin"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:dolphins_grace",amplifier:5,duration:3600},{id:"minecraft:fire_resistance",amplifier:5,duration:3600},{id:"minecraft:glowing",amplifier:5,duration:3600},{id:"minecraft:conduit_power",amplifier:5,duration:3600},{id:"minecraft:luck",amplifier:5,duration:3600},{id:"minecraft:saturation",amplifier:5,duration:3600},{id:"minecraft:speed",amplifier:5,duration:3600},{id:"minecraft:slow_falling",amplifier:5,duration:3600}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Cloud 9"}]'] 1
    # give @p splash_potion[potion_contents={custom_effects:[{id:"minecraft:strength",amplifier:5,duration:600},{id:"minecraft:nausea",amplifier:5,duration:600},{id:"minecraft:poison",amplifier:5,duration:2400}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Norse God\'s Ale"}]'] 1
