Making enchantment effect stronger
Im trying to make an enchantment for swords and axes that give the wither effect, but im not sure how to scale the effects with the enchantments level, this is the code
{ "description": "Withering", "exclusive_set": "minecraft:fire_aspect", "supported_items": [ "minecraft:wooden_sword", "minecraft:stone_sword", "minecraft:golden_sword", "minecraft:iron_sword", "minecraft:diamond_sword", "minecraft:netherite_sword", "minecraft:wooden_axe", "minecraft:stone_axe", "minecraft:golden_axe", "minecraft:iron_axe", "minecraft:diamond_axe", "minecraft:netherite_axe" ], "weight": 15, "max_level": 3, "min_cost": { "base": 10, "per_level_above_first": 10 }, "max_cost": { "base": 25, "per_level_above_first": 10 }, "anvil_cost": 7, "slots": [ "mainhand" ], "effects": { "minecraft:post_attack": [ { "effect": { "type": "minecraft:run_function", "function": "wither" }, "enchanted": "attacker", "affected": "victim" } ] } }
the function wither applies the wither effect to the entity: effect give @s wither 10