function init(hero) {
    hero.setName("Golem");
	hero.setVersion("James Stone");
    hero.setTier(4);
    
	hero.setHelmet("Head");
    hero.setChestplate("Torso");
    hero.setLeggings("Legs");
    hero.setBoots("Feet");
	hero.addEquipment("minecraft:stone");
    
	hero.addAbilities("fiskheroes:size_manipulation", "fiskheroes:steel_transformation", "fiskheroes:superhuman_durability", "fiskheroes:fire_immunity");
    hero.addWeaknesses("fiskheroes:metal_skin");
    hero.addAttribute("FALL_RESISTANCE", 1.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 0.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 0.5, 0);
    
    hero.addKeyBind("STEEL_TRANSFORM", "Absorb Stone", 1);
	
	hero.supplyFunction("getMinSize", 1.0);
    hero.supplyFunction("getMaxSize", 1.2);
    hero.supplyFunction("isInstant", false);
	
	hero.addAttributeProfile("STEEL", steelProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setModifierEnabled(isModifierEnabled);
}

function steelProfile(profile) {
    profile.addAttribute("ATTACK_DAMAGE", 0.9, 1);
    profile.addAttribute("FALL_RESISTANCE", 11.5, 0);
    profile.addAttribute("JUMP_HEIGHT", 0.5, 0);
    profile.addAttribute("PUNCH_DAMAGE", 12.5, 0);
    profile.addAttribute("SPRINT_SPEED", -0.1, 1);
    profile.addAttribute("SWORD_DAMAGE", -0.2, 1);
}

function getAttributeProfile(entity) {
    return entity.getData("fiskheroes:steeled") ? "STEEL" : null;
}

function isModifierEnabled(entity, modifier) {
    if (modifier == "fiskheroes:steel_transformation") {
        return entity.getHeldItem().name() == "minecraft:stone";
    }
	else if (modifier == "fiskheroes:size_manipulation") {
		return entity.getData("fiskheroes:steeled") && entity.getHeldItem().name() == "minecraft:stone";
	}
    return true;
}