elements = {
    "seraph": "holy",
    "cryogenic_ruler": "ice",
    "ender_dragon": "ender",
    "flesh_mass": "blood",
    "creaking": "nature",
    "supreme_witch": "evocation",
    "soul_flame": "fire",
}

armor_slots = {
    "helmet": ("head", 8),
    "chestplate": ("body", 18),
    "leggins": ("legs", 14),
    "boots": ("feet", 8),
}

template = """
    'hazennstuff:{element}_{piece}': {{
      'minecraft:attribute_modifiers': {{
        modifiers: [
          {{slot: '{slot}',operation: 'add_value',amount: {armor},type: 'minecraft:generic.armor', id: 'minecraft:base_armor'}},
          {{slot: '{slot}',operation: 'add_value',amount: 2,type: 'minecraft:generic.armor_toughness',id: 'minecraft:base_armor_toughness'}},
          {{slot: '{slot}',operation: 'add_value',amount: 150,type: 'irons_spellbooks:max_mana',id: 'irons_spellbooks:{slot}_max_mana_modifier'}},
          {{slot: '{slot}',operation: 'add_multiplied_base',amount: 0.05,type: 'minecraft:generic.knockback_resistance',id: 'minecraft:base_knockback_resistance'}},
          {{slot: '{slot}',operation: 'add_multiplied_base',amount: 0.05,type: 'irons_spellbooks:{spell}_spell_power',id: 'irons_spellbooks:{slot}_{spell}_spell_power_modifier'}},
          {{slot: '{slot}',operation: 'add_multiplied_base',amount: 0.05,type: 'irons_spellbooks:eldrith_spell_power',id: 'irons_spellbooks:eldrith_{spell}_spell_power_modifier'}},
          {{slot: '{slot}',operation: 'add_multiplied_base',amount: 0.035,type: 'irons_spellbooks:spell_power',id: 'irons_spellbooks:{slot}_spell_power_modifier'}},
        ],
      }},
    }},"""

for element, spell in elements.items():
    for piece, (slot, armor) in armor_slots.items():
        print(template.format(element=element, piece=piece, slot=slot, armor=armor, spell=spell))
