execute as @n[tag=armorkit] on origin run advancement grant @s only survivalplus:adventure/merchant/armorkit
execute as @n[tag=armorkit] if entity @e[distance=..1,tag=armor] run kill @s
execute at @s[tag=armor] run function survivalplus:tools/upgrade_effect

execute as @s[tag=armor,tag=gravedigger] run function survivalplus:mobs/upgrade/armor/gravedigger
execute as @s[tag=armor,tag=tim] run function survivalplus:mobs/upgrade/armor/tim
#execute as @s[tag=armor,type=piglin_brute] run data merge entity @s {Health:50,HandItems:[{id:netherite_axe,tag:{stuncrit:tag,2hand:tag,specialtool:tag,AttributeModifiers:[{AttributeName:"generic.attack_damage",Amount:14,Slot:mainhand,Name:"generic.attack_damage",UUID:[I;-123625,33530,221828,-67060]},{AttributeName:"generic.attack_damage",Amount:0.5,Slot:mainhand,Operation:1,Name:"generic.attack_damage",UUID:[I;-123625,33630,221828,-67260]},{AttributeName:"generic.movement_speed",Amount:-0.025,Slot:mainhand,Name:"generic.movement_speed",UUID:[I;-123625,33730,221828,-67460]},{AttributeName:"generic.attack_knockback",Amount:4,Slot:mainhand,Name:"generic.attack_knockback",UUID:[I;-123625,33830,221828,-67660]},{AttributeName:"generic.attack_speed",Amount:-3.4,Slot:mainhand,Name:"generic.attack_speed",UUID:[I;-123625,33930,221828,-67860]},{AttributeName:"generic.armor_toughness",Amount:8,Slot:mainhand,Name:"generic.armor_toughness",UUID:[I;-123625,34030,221828,-68060]},{AttributeName:"generic.knockback_resistance",Amount:1,Slot:mainhand,Name:"generic.knockback_resistance",UUID:[I;-123625,34130,221828,-68260]}],display:{Lore:['[{"text":"Two-handed","italic":false,"color":"red"}]','[{"text":"Staggering Crits","italic":false,"color":"light_purple"}]']}},Count:1}],HandDropChances:[1f],ArmorItems:[{id:golden_boots,Count:1},{id:golden_leggings,Count:1},{id:netherite_chestplate,tag:{Trim:{pattern:snout,material:gold}},Count:1},{id:netherite_helmet,tag:{Trim:{pattern:raiser,material:gold}},Count:1}],Attributes:[{Name:"generic.attack_damage",Base:2f}]}
execute as @s[tag=armor,tag=ice_stray] run function survivalplus:mobs/upgrade/armor/ice_stray
execute as @s[tag=armor,tag=iron_husk] run function survivalplus:mobs/upgrade/armor/iron_husk
execute as @s[tag=armor,tag=gold_skel] run function survivalplus:mobs/upgrade/armor/gold_skel
execute as @s[tag=armor,tag=undead_miner] run function survivalplus:mobs/upgrade/armor/undead_miner
execute as @s[tag=armor,tag=bogged_archer] run function survivalplus:mobs/upgrade/armor/bogged_archer
execute as @s[tag=armor,tag=larmor] run function survivalplus:mobs/upgrade/armor/living_armor
tag @s[tag=armor] add armored
tag @s[tag=armored] remove armorable
tag @s[tag=armored] remove armor
tag @s[tag=armored] remove RanEn