##> python  .py

uuid = 0

Stats_Info = {
    "Immunity": ("dark_purple", ""),
    "Health": ("red", ""),
    "Mending": ("red", ""),
    "Armor": ("green", ""),
    "Fortitude": ("green", ""),
    "Damage": ("red", ""),
    "Strength": ("dark_red", "%"),
    "Frenzy": ("yellow", "%"),
    "Syphon": ("aqua", "%"),
    "Swiftness": ("white", "%"),
    "Master": ("yellow", "%")
}
Skill_Name = [
    ("Smite", [("Smite", "value")]),
    ("Fatal Tempo", [("FatalTempo", "1b")]),
    ("Night Shift", [
        ("NightShift", "1b"),
        ("Damage_Amp_NightShift", "Night Shift")
        # get 2nd Damage_Amp_NightShift from data's Damage_Amp_NightShift
    ]),
    ("Day Shift", [
        ("DayShift", "1b"),
        ("Damage_Amp_DayShift", "Day Shift")
    ]),
    ("White Night", [
        ("WhiteNight", "1b"),
        ("Damage_Amp_WhiteNight", "White Night")
    ]),
    ("Defuse", [("Defuse", "1b")])
]
def Smite_Lore(value):
    return f'\'{{"text":"Deals ","color":"gray","italic":false,"extra":[{{"text":"+{value*2.5:g}","color":"red"}},{{"text":" more damage to ","color":"gray"}},{{"text":"Undead","color":"dark_green"}},{{"text":" enemies.","color":"gray"}}]}}\''
def Fatal_Tempo_Lore(value):
    return f'\'{{"text":"Gain ","color":"gray","italic":false,"extra":[{{"text":"+1 Frenzy","color":"yellow"}},{{"text":" for every ","color":"gray"}},{{"text":"10 Swiftness","color":"white"}},{{"text":" over 100.","color":"gray"}}]}}\''
def Night_Shift_Lore(amp):
    return f'\'{{"text":"Deals ","color":"gray","italic":false,"extra":[{{"text":"+{amp:g}%","color":"red"}},{{"text":" more damage during the night.","color":"gray"}}]}}\''
def Day_Shift_Lore(amp):
    return f'\'{{"text":"Deals ","color":"gray","italic":false,"extra":[{{"text":"+{amp:g}%","color":"red"}},{{"text":" more damage during the day.","color":"gray"}}]}}\''
def White_Night_Lore(amp):
    return f'\'{{"text":"Deals ","color":"gray","italic":false,"extra":[{{"text":"+{amp:g}%","color":"red"}},{{"text":" more damage.","color":"gray"}}]}}\''
def Defuse_Lore(value):
    return f'\'{{"text":"Instantly kill ","color":"gray","italic":false,"extra":[{{"text":"Creepers","color":"green"}},{{"text":".","color":"gray"}}]}}\''
Skill_Lore = {
    "Smite": Smite_Lore,
    "Fatal Tempo": Fatal_Tempo_Lore,
    "Night Shift": Night_Shift_Lore,
    "Day Shift": Day_Shift_Lore,
    "White Night": White_Night_Lore,
    "Defuse": Defuse_Lore
}
Weapon_Name = [
    "Settler",
    "Ancient",
    "Ash",
    "Phantom",
    "Moonlight",
    "Warden",
    "Paradox",
    "Winter",
    "Sunrise",
    "Sunset",
]
Weapon_Type = {
    "head": "HELMET",
    "chest": "CHESTPLATE",
    "legs": "LEGGINGS",
    "feet": "BOOTS",
    "mainhand": "SWORD",
    "bow": "BOW",
    "pickaxe": "PICKAXE"
}
Rarity_Name = [
    "COMMON",
    "UNCOMMON",
    "RARE",
    "EPIC",
    "LEGENDARY",
    "MYTHIC",
    "DIVINE"
]
Rarity_Color = [
    "white",
    "green",
    "blue",
    "dark_purple",
    "gold",
    "light_purple",
    "aqua"
]
Attribute_Name = {
    "Health": "max_health",
    "Armor": "armor",
    "Speed": "movement_speed",
    "Damage": "attack_damage",
    "AtkSpd": "attack_speed"
}
Item_Type = {
    "head": ["leather","chainmail","netherite","leather","iron","netherite","leather","diamond","leather","leather"],
    "chest": ["leather","chainmail","netherite","iron","golden","golden","leather","leather","leather","leather"],
    "legs": ["leather","chainmail","netherite","chainmail","iron","iron","leather","leather","leather","leather"],
    "feet": ["leather","chainmail","netherite","leather","diamond","netherite","leather","diamond","leather","leather"],
    "mainhand": ["stone_sword","wooden_sword","stone_shovel","iron_shovel","iron_hoe","netherite_axe","golden_pickaxe","diamond_sword","golden_hoe","diamond_hoe"],
    "bow": ["bow","bow","bow","bow","bow","bow","bow","bow","bow","bow"],
    "pickaxe": ["wooden","stone","iron"]
}
Sign = {
    "head": "# All Helmets",
    "chest": "# All Chestplates",
    "legs": "# All Leggings",
    "feet": "# All Boots",
    "mainhand": "# All Swords"
}
Ingredients = [
    "spider_eye",
    "bone",
    "arrow",
    "rotten_flesh",
    "spawner"
]
Token = {
    "spider_eye": [("Dummy Token", "dummy_trim", "head", 64, 64, 1)],
#   "spider_eye": [("Spider Eye Token", "spire_armor_trim_smithing_template", "feet", 64, 64, 1)],
    "bone": [("Bone Token", "eye_armor_trim_smithing_template", "chest", 16, 0, 1)],
    "arrow": [("Arrow Token", "dune_armor_trim_smithing_template", "legs", 64, 0, 1)],
    "rotten_flesh": [("Rotten Flesh Token", "wild_armor_trim_smithing_template", "feet", 16, 0, 1)],
    "spawner": [("Spawner Token", "ward_armor_trim_smithing_template", "mainhand", 64, 0, 1)]
#   "spawner": [("Spawner Token", "ward_armor_trim_smithing_template", "mainhand", 64, 64, 1),
#               ("Ancient Spawner Token", "snout_armor_trim_smithing_template", "mainhand", 64, 64, 1)] is also possible
#   (generate 2 trades)
}
Trade_need = {
    "spider_eye": [-1,2,5,8,11,14,18,19,20,21], #
    "bone": [8,101,102,104,106,108,109,110,111,112], #
    "arrow": [32,101,102,104,106,108,110,111,112,113], #
    "rotten_flesh": [8,101,102,103,104,105,105,106,106,106], #
    "spawner": [16,32,101,102,103,105,107,108,109,110], #
}

def WriteDisplay(num, rarity, tier, slot, leather_color, Stats, Skills):
    S = []
    for i in range (0, num):
        ss = ''
        tir = tier[i]
        rarty = rarity[i]
        lcol = ''
        if leather_color[i] != -1:
            lcol = f'color:{leather_color[i]},'
        Stts = Stats[i]
        Skll = Skills[i]
        type = Weapon_Type.get(slot, 0)
        
        name = ''
        rname = ''
        rcolor = ''
        if 1 <= tir <= len(Weapon_Name):
            name = Weapon_Name[tir - 1]
        else:
            name = "Unknown"
        if 1 <= rarty <= len(Rarity_Name):
            rname = Rarity_Name[rarty - 1]
        else:
            rname = "Unknown"
        if 1 <= rarty <= len(Rarity_Color):
            rcolor = Rarity_Color[rarty - 1]
        else:
            rcolor = "gray"
        
        immunity = Stts.get("Immunity", 0)
        nmspace = ''
        if immunity != 0:
            nmspace += ' '
        ss += f'display:{{{lcol}Name:\'{{"text":"{name}{nmspace}","color":"{rcolor}","italic":false'
        if immunity != 0:
            ss += ',"extra":[{"text":"'
            for i in range (0, immunity):
                ss += '❂'
            ss += f'","color":"white","italic":false}},{{"text":" (Immunity: {immunity})","color":"dark_gray","italic":false}}]'
        ss += '}\',Lore:['
        
        for status, (scolor, sper) in Stats_Info.items():
            value = Stts.get(status, 0)
            if value != 0:
                if status == "Health":
                    ss += f'\'{{"text":"Health: ","color":"gray","italic":false,"extra":[{{"text":"+{value}{sper}","color":"{scolor}"}}'
    
                    mending = Stts.get("Mending", 0)
                    mending_color, _ = Stats_Info["Mending"]
                    if mending != 0:
                        ss += f',{{"text":"　Mending: ","color":"gray","italic":false}},{{"text":"+{mending}","color":"{mending_color}","italic":false}}'
    
                    ss += f']}}\','
                elif status == "Armor":
                    ss += f'\'{{"text":"Armor: ","color":"gray","italic":false,"extra":[{{"text":"+{value}{sper}","color":"{scolor}"}}'
    
                    fortitude = Stts.get("Fortitude", 0)
                    fortitude_color, _ = Stats_Info["Fortitude"]
                    if fortitude != 0:
                        ss += f',{{"text":"　Fortitude: ","color":"gray","italic":false}},{{"text":"+{fortitude}","color":"{fortitude_color}","italic":false}}'
    
                    ss += f']}}\','
                elif status == "Mending" and Stts.get("Health", 0) != 0:
                    pass
                elif status == "Fortitude" and Stts.get("Armor", 0) != 0:
                    pass
                elif status != "Immunity" and status != "Master":
                    ss += f'\'{{"text":"{status}: ","color":"gray","italic":false,"extra":[{{"text":"+{value}{sper}","color":"{scolor}"}}]}}\','
        
        if Skll != {}:
            for skill, sklore in Skill_Lore.items():
                value = Skll.get(skill, 0)
                if value != 0:
                    ss += '\'{"text":"","italic":false}\','
                    ss += f'\'{{"text":"{skill}","color":"gold","italic":false}}\',{sklore(value)},'
                    
        master = Stts.get("Master", 0)
        if master != 0:
            ss += '\'{"text":"","italic":false}\','
            ss += f'\'{{"text":"All your stats are increased by ","color":"gray","italic":false,"extra":[{{"text":"+{master}%","color":"yellow"}},{{"text":" ! ","color":"gray"}},{{"text":"(Master: {master})","color":"dark_gray"}}]}}\','
              
        ss += f'\'{{"text":"","italic":false}}\','
        if slot == "mainhand" and i == 6:
            ss += f'\'{{"text":"You probably should not break","color":"dark_gray","bold":false,"italic":false}}\','
            ss += f'\'{{"text":"spawners with this sword.","color":"dark_gray","bold":false,"italic":false}}\','
        ss += f'\'{{"text":"{rname} {type}","color":"{rcolor}","bold":true,"italic":false}}\']}}'
        
        S.append(ss)
        
    return S

def WriteTags(num, tier, slot, Stats, Skills):
    S = []
    
    for i in range (0, num):
        ss = ''
        Stts = Stats[i]
        tir = tier[i]
        Skll = Skills[i]

        ss += f',Tier:{tir}'
        
        for status in Stats_Info:
            value = Stts.get(status, 0)
            if value != 0:
                if status == "Damage":
                    status = "SwordDamage"
                if slot == "mainhand":
                    ss += f',{status}_on_hand:{value}'
                else:
                    ss += f',{status}:{value}'

        for skill, list in Skill_Name:
            if Skll.get(skill, "null") != "null":
                for tagname, tagvalue in list:
                    if tagvalue == "value":
                        tagvalue = Skll.get(tagname, "null")
                    elif tagvalue != "1b":
                        tagvalue = Skll.get(tagvalue, "null")
                        
                    ss += f',{tagname}:{tagvalue}'

        if slot == "mainhand":
            ss += ',Damage_enable:1b'
            if i == 6:
                ss += ',Paradox:1b'

        S.append(ss)

    return S

def WriteAttributes(num, slot, Attributes):
    global uuid
    S = []
    
    for i in range (0, num):
        ss = ',AttributeModifiers:['

        for j in range (0, len(Attributes)):
            UUIDs = []
            name = Attributes[j]
            aname = Attribute_Name.get(name, "world_breaker")

            op = 0
            if name == "Speed":
                op = 1

            for k in range (0, 4):
                uuid += 1
                UUIDs.append(uuid)

            ss += f'{{AttributeName:"generic.{aname}",Name:"{name}",Slot:"{slot}",Operation:{op},Amount:0.0d,UUID:  [I;{UUIDs[0]},{UUIDs[1]},{UUIDs[2]},{UUIDs[3]}]}},'

        ss = ss.rstrip(",")
        ss += ']'
        
        S.append(ss)
    
    return S

def WriteEnchants(num, Skills):
    S = []
    
    for i in range (0, num):
        Skll = Skills[i]
        ss = ',Enchantments:[{id:"minecraft:unbreaking",lvl:1s}'
        
        x = Skll.get("Smite", 0)
        if x > 0:
            ss += f',{{id:"minecraft:smite",lvl:{x}s}}'
    
        ss += ']'
        
        S.append(ss)    
    
    return S

def ReturnNBT(num, rarity, tier, slot, leather_color, Attributes, Stats, Skills):
    Display = WriteDisplay(num, rarity, tier, slot, leather_color, Stats, Skills)
    Tags = WriteTags(num, tier, slot, Stats, Skills)
    attributes = WriteAttributes(num, slot, Attributes)
    enchants = WriteEnchants(num, Skills)

    NBT = []
    for i in range (0, num):
        NBT.append(Display[i] + Tags[i] + attributes[i] + ',Unbreakable:1b' + enchants[i] + ',HideFlags:127')
    return NBT
        
def GiveItems(num, rarity, tier, slot, leather_color, Attributes, Stats, Skills):
    print(f'{Sign[slot]}')
    
    NBT = ReturnNBT(num, rarity, tier, slot, leather_color, Attributes, Stats, Skills)

    ItemType = Item_Type.get(slot, [])
    itemtype = "stardust"
    for i in range (0, num):
        if len(ItemType) > i:
            itemtype = ItemType[i]
        if slot in ["head", "chest", "legs", "feet", "pickaxe"]:
            itemtype += f'_{Weapon_Type.get(slot, "Core").lower()}'
            
        print(f'give @s minecraft:{itemtype}{{' + NBT[i] + '}')
        
    print('')
def Give(Data):
    for Data_this in Data:
        GiveItems(*Data_this)        
def InteractShop_Items(num, rarity, tier, slot, leather_color, Attributes, Stats, Skills):
    if slot != "mainhand" and slot != "head":
        return
    
    NBT = ReturnNBT(num, rarity, tier, slot, leather_color, Attributes, Stats, Skills)

    ItemType = Item_Type.get(slot, [])
    itemtype = "stardust"
    for i in range (0, num):
        if len(ItemType) > i:
            itemtype = ItemType[i]
        if slot in ["head", "chest", "legs", "feet", "pickaxe"]:
            itemtype += f'_{Weapon_Type.get(slot, "Core").lower()}'
        
        a = ''
        b = ''
        if slot == "mainhand":
            b = 'Weapon'
        elif slot == "head":
            b = 'Helmet'
        a += f'{b}_Tier{i+1}_Test=1..'
        if slot == "head" and i == 0:
            a += ',Helmet_Tier2_Test=..0,Helmet_Tier3_Test=..0,Helmet_Tier4_Test=..0,Helmet_Tier5_Test=..0,Helmet_Tier6_Test=..0,Helmet_Tier7_Test=..0,Helmet_Tier8_Test=..0,Helmet_Tier9_Test=..0,Helmet_Tier10_Test=..0'
        
        print(f'execute as @s[scores={{{a}}}] run give @s minecraft:{itemtype}{{' + NBT[i] + '}')
def InteractShop(Data):
    for Data_this in Data:
        InteractShop_Items(*Data_this)
    
def Summon_Instant_Items():
    for slot in ["head", "chest", "legs", "feet", "mainhand"]:
        print(f'{Sign[slot]}')
        
        ItemType = Item_Type.get(slot, [])
        itemtype = "stardust"
        for i in range (0, 10):
            if len(ItemType) > i:
                itemtype = ItemType[i]
            if slot in ["head", "chest", "legs", "feet", "pickaxe"]:
                itemtype += f'_{Weapon_Type.get(slot, "Core").lower()}'

            print(f'summon item ~ ~ ~ {{Item:{{id:"minecraft:{itemtype}",Count:1b,tag:{{}}}},Tags:["instant_{slot}_{i}"],PickupDelay:0s,Invulnerable:1b}}')
            print(f'data modify entity @e[type=item,tag=instant_{slot}_{i},sort=nearest,limit=1] Item.tag set from storage hearing:item_data {slot}[{i}]')

        print('')

def SaveToStorage(num, rarity, tier, slot, leather_color, Attributes, Stats, Skills):
    NBT = ReturnNBT(num, rarity, tier, slot, leather_color, Attributes, Stats, Skills)
    
    if slot == "head":
        print('# execute unless data entity @s Inventory[{Slot:103b}] run ')
        print(f'item replace entity @s armor.head with minecraft:leather_helmet{{{NBT[0]}}}')
        print('')
    print(f'{Sign[slot]}')
    for i in range (0, num):
        print(f'data modify storage hearing:item_data {slot} append value {{{NBT[i]}}}')
        
    print('')
def SaveSt(Data):
    for Data_this in Data:
        SaveToStorage(*Data_this)

def SummmonVillager():
    summon = ''
    summon += f'summon villager ~ ~ ~ {{Tags:["upgrade_villager"],DeathLootTable:"minecraft:empty",Silent:1b,NoAI:1b,PersistenceRequired:1b,Attributes:[{{Name:"minecraft:generic.max_health",Base:1000.0}}],Health:1000.0f,ActiveEffects:[{{Id:14b,Amplifier:0b,Duration:9999999,ShowParticles:0b}}],VillagerData:{{type:"minecraft:plains",profession:"minecraft:cleric",level:6}},CustomName:\'{{"text":"Upgrade","color":"yellow","italic":false}}\',Offers:{{Recipes:['
    
    for ingredient in Ingredients:
        for name, item, slot, buy1, buy2, count in Token[ingredient]:
            if name != "Dummy Token":
                if buy1 == 0 and buy2 == 0:
                    summon += (
                        f'{{buy:{{id:"minecraft:{ingredient}",Count:1b}},'
                    )
                elif buy1 == 0 or buy2 == 0:
                    summon += (
                        f'{{buy:{{id:"minecraft:{ingredient}",Count:{buy1+buy2}b}},'
                    )
                else:
                    summon += (
                        f'{{buy:{{id:"minecraft:{ingredient}",Count:{buy1}b}},'
                        f'buyB:{{id:"minecraft:{ingredient}",Count:{buy2}b}},'
                    )
                    
                summon += (
                    f'sell:{{id:"minecraft:{item}",Count:{count}b,tag:{{'
                    f'display:{{Name:\'{{"text":"{name}","color":"green","italic":false}}\'}}'
                    f',HideFlags:127,Token:1}}}},'
                    f'maxUses:999999,rewardExp:0b}},'
                )
        
        slt = Token[ingredient][0][2]
        Need = Trade_need[ingredient]
        for i in range (0, 10):
            item_type1 = Item_Type[slt][i-1]
            if slt in ["head", "chest", "legs", "feet", "pickaxe"]:
                item_type1 += f'_{Weapon_Type.get(slt, "Core").lower()}'
            item_type2 = Item_Type[slt][i]
            if slt in ["head", "chest", "legs", "feet", "pickaxe"]:
                item_type2 += f'_{Weapon_Type.get(slt, "Core").lower()}'
            
            _ingredient = ingredient
            a = ''
            row = Need[i] // 100
            amount = Need[i] % 100
            if row <= 0:
                a = f'id:"minecraft:{_ingredient}",Count:{amount}b'
            else:
                _ingredient = Token[ingredient][row-1][1]
                _ingredient_name = Token[ingredient][row-1][0]
                a = f'id:"minecraft:{_ingredient}",Count:{amount}b,tag:{{display:{{Name:\'{{"text":"{_ingredient_name}","color":"green","italic":false}}\'}},HideFlags:127,Token:1}}'
            
            if slt == "head" and i == 0:
                continue
            else:
                if i == 0:
                    summon += (
                        f'{{buy:{{{a}}},'
                        f'sell:{{id:"minecraft:{item_type2}",Count:1b,tag:{{}}}},'
                        f'maxUses:999999,rewardExp:0b}},'
                    )
                else:
                    summon += (
                        f'{{buy:{{id:"minecraft:{item_type1}",Count:1b,tag:{{}}}},'
                        f'buyB:{{{a}}},'
                        f'sell:{{id:"minecraft:{item_type2}",Count:1b,tag:{{}}}},'
                        f'maxUses:999999,rewardExp:0b}},'
                    )
    
    summon += ']}}'
    
    print(f'{summon}\n')
    print('execute as @e[type=minecraft:villager,tag=upgrade_villager,distance=..1,sort=nearest,limit=1] run function hearing:upgrade/setting_villager\n')
    print('tag @s add theresvillager\n\n\n')
def SettingVillager():    
    l = 0
    for sllt in ["head", "chest", "legs", "feet", "mainhand"]:
        count = sum(
            1
            for Tokens in Token.values()
            for token in Tokens
            if token[0] != "Dummy Token" and token[2] == sllt
        )
        l += count
        
        for j in range (0, 9):
            if j == 0 and sllt != "head":
                print(f'data modify entity @s Offers.Recipes[{l}].sell.tag set from storage hearing:item_data {sllt}[{j}]')
                l += 1
            print(f'data modify entity @s Offers.Recipes[{l}].buy.tag set from storage hearing:item_data {sllt}[{j}]')
            print(f'data modify entity @s Offers.Recipes[{l}].sell.tag set from storage hearing:item_data {sllt}[{j+1}]')
            l += 1

# Immunity, Health, Mending, Armor, Fortitude,
#   "Damage", "Strength", "Frenzy", "Syphon", "Swiftness", "Master"
Stats_List = [
    [
        [0, 0,  0, 0,  3, 0, 0, 0,  10, 0, 0],
        [1, 0,  0, 0,  6, 0, 0, 0,  20, 0, 0],
        [1, 1,  5, 1,  9, 0, 0, 0,  30, 0, 0],
        [1, 1,  5, 1, 12, 0, 0, 0,  50, 0, 0],
        [1, 1, 10, 1, 15, 0, 0, 0,  70, 0, 0],
        [2, 2, 10, 1, 18, 0, 0, 0,  90, 0, 0],
        [2, 2, 15, 1, 21, 0, 0, 0, 110, 0, 0],
        [2, 2, 20, 1, 24, 0, 0, 0, 140, 0, 0],
        [3, 2, 25, 1, 27, 0, 0, 0, 170, 0, 1],
        [3, 2, 30, 1, 30, 0, 0, 0, 200, 0, 1]
    ],
    [
        [0, 0,  5, 1,  6, 0, 0, 0,  0, 0, 0],
        [0, 0, 10, 1, 12, 0, 0, 0,  0, 0, 0],
        [0, 1, 15, 2, 18, 0, 0, 0, 10, 0, 0],
        [0, 1, 20, 2, 24, 0, 0, 0, 20, 0, 0],
        [0, 2, 25, 3, 30, 0, 0, 0, 30, 0, 0],
        [0, 2, 30, 3, 36, 0, 0, 0, 40, 0, 0],
        [0, 2, 35, 3, 42, 0, 0, 0, 50, 0, 0],
        [0, 3, 40, 4, 48, 0, 0, 0, 60, 0, 0],
        [0, 3, 50, 4, 54, 0, 0, 0, 70, 0, 1],
        [0, 3, 60, 4, 60, 0, 0, 0, 80, 0, 1]
    ],
    [
        [0, 0, 10, 0,  4, 0, 0, 0,   5, 0, 0],
        [0, 0, 15, 0,  8, 0, 0, 0,  10, 0, 0],
        [0, 1, 20, 0, 12, 0, 0, 0,  20, 0, 0],
        [0, 1, 25, 1, 16, 0, 0, 0,  30, 0, 0],
        [0, 2, 30, 1, 20, 0, 0, 0,  40, 0, 0],
        [0, 2, 40, 1, 24, 0, 0, 0,  50, 0, 0],
        [0, 3, 50, 2, 28, 0, 0, 0,  60, 0, 0],
        [0, 3, 60, 2, 32, 0, 0, 0,  80, 0, 0],
        [0, 4, 70, 2, 36, 0, 0, 0, 100, 0, 1],
        [0, 4, 80, 2, 40, 0, 0, 0, 120, 0, 1]
    ],
    [
        [0, 0,  0, 0,  3, 0, 0, 0,  10,  5, 0],
        [0, 0,  0, 0,  3, 0, 0, 0,  20, 10, 0],
        [0, 1,  5, 0,  6, 0, 0, 0,  30, 15, 0],
        [0, 1,  5, 1,  6, 0, 0, 0,  50, 20, 0],
        [0, 1, 10, 1,  9, 0, 0, 0,  70, 25, 0],
        [0, 1, 10, 1,  9, 0, 0, 0,  90, 30, 0],
        [0, 1, 15, 1, 12, 0, 0, 0, 110, 35, 0],
        [1, 1, 20, 1, 12, 0, 0, 0, 140, 40, 0],
        [1, 1, 25, 1, 15, 0, 0, 0, 170, 45, 1],
        [1, 1, 30, 1, 15, 0, 0, 0, 200, 50, 1]
    ],
    [
        [0, 0, 0, 0, 0, 4,  0,  0,  10, 0, 0],
        [0, 0, 0, 0, 0, 4,  2,  0,  20, 0, 0],
        [0, 0, 0, 0, 0, 5,  4,  0,  30, 0, 0],
        [0, 0, 0, 0, 0, 5,  6,  0,  40, 0, 0],
        [0, 0, 0, 0, 0, 5,  8,  0,  50, 0, 0],
        [0, 0, 0, 0, 0, 5, 10,  2,  60, 0, 0],
        [0, 0, 0, 0, 0, 5, 12,  4,  70, 0, 0],
        [0, 0, 0, 0, 0, 6, 14,  6,  80, 0, 0],
        [0, 0, 0, 0, 0, 6, 17,  8,  90, 0, 1],
        [0, 0, 0, 0, 0, 7, 20, 10, 100, 0, 1]
    ]
]

All_Stats = []
for group in Stats_List:
    Stat = []

    for stats in group:
        d = {}
        i = 0

        for key in Stats_Info:
            d[key] = stats[i]
            i += 1

        Stat.append(d)

    All_Stats.append(Stat)

Data = [
    [
        10,
        [1,2,3,3,4,4,5,5,6,7],
        [1,2,3,4,5,6,7,8,9,10],
        "head",
        [-1,-1,-1,3847130,-1,-1,16738740,-1,16777215,1908001],
        ["Health","Armor","Speed"],
        All_Stats[0],
        [{},{},{},{},{},{},{},{},{},{}]
    ],
    [
        10,
        [1,2,3,3,4,4,5,5,6,7],
        [1,2,3,4,5,6,7,8,9,10],
        "chest",
        [-1,-1,-1,-1,-1,-1,16738740,3847130,16777215,1908001],
        [],
        All_Stats[1],
        [{},{},{},{},{},{},{},{},{},{}]
    ],
    [
        10,
        [1,2,3,3,4,4,5,5,6,7],
        [1,2,3,4,5,6,7,8,9,10],
        "legs",
        [-1,-1,-1,-1,-1,-1,16738740,3847130,16777215,1908001],
        [],
        All_Stats[2],
        [{},{},{},{},{},{},{},{},{},{}]
    ],
    [
        10,
        [1,2,3,3,4,4,5,5,6,7],
        [1,2,3,4,5,6,7,8,9,10],
        "feet",
        [-1,-1,-1,3847130,-1,-1,16738740,-1,16777215,1908001],
        [],
        All_Stats[3],
        [{},{},{},{},{},{},{},{},{},{}]
    ],
    [
        10,
        [1,2,3,3,4,4,5,5,6,7],
        [1,2,3,4,5,6,7,8,9,10],
        "mainhand",
        [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],
        ["Damage","AtkSpd"],
        All_Stats[4],
        [
            {},
            {"Smite": 1},
            {"Smite": 1},
            {"Smite": 1,"Fatal Tempo": True},
            {"Smite": 1,"Fatal Tempo": True, "Night Shift": 20},
            {"Smite": 1,"Fatal Tempo": True, "Day Shift": 20},
            {"Smite": 1,"Fatal Tempo": True, "White Night": 20},
            {"Smite": 1,"Fatal Tempo": True, "White Night": 20},
            {"Smite": 1,"Fatal Tempo": True, "White Night": 20, "Defuse": True},
            {"Smite": 1,"Fatal Tempo": True, "White Night": 20, "Defuse": True}
        ]
    ]
]

##> This SaveSt(Data) also do the 1st Settler equip.
##> But, does not replace fragile, so change it with your own.
#   (Change these 3 parts: it's name, lore-last-line's tier label, and add a tag: Dummy:1b)
SaveSt(Data)

#InteractShop(Data)

#Summon_Instant_Items()

#SummmonVillager()
#SettingVillager()