function init(hero) {
    hero.setName("hero.fiskheroes.captain_america.name");
	hero.setVersion("Endgame");
    hero.setTier(3);
    
    hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.addEquipment("fiskheroes:captain_americas_shield");
    
    hero.addAbilities("fiskheroes:cellular_regeneration", "fiskheroes:enhanced_reflexes", "fiskheroes:steel_transformation", "fiskheroes:electrokinesis", "fiskheroes:retractable_blade");
    hero.addAttribute("ATTACK_DAMAGE", 0.9, 1);
    hero.addAttribute("FALL_RESISTANCE", 7.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 3.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 5.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.4, 1);
	
	
	hero.addKeyBind("BLADE", "Worthy", 2);
	hero.addKeyBind("STEEL_TRANSFORM", "Worthy", 1);
    
    hero.setHasPermission(hasPermission);
	hero.addAttributeProfile("HAMMER", hammerProfile);
	hero.setAttributeProfile(getAttributeProfile);
	hero.setModifierEnabled(isModifierEnabled);
}

function hasPermission(entity, permission) {
    return permission == "THROW_SHIELD" || permission == "USE_SHIELD";
}

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

function hammerProfile(profile) {
	profile.addAttribute("ATTACK_DAMAGE", 0.3, 1);
    profile.addAttribute("PUNCH_DAMAGE", 19.5, 0);
	profile.addAttribute("JUMP_HEIGHT", 3, 0);
	profile.addAttribute("SPRINT_SPEED", 0.3, 1);
	profile.addAttribute("STEP_HEIGHT", 0.5, 0);
}

function isModifierEnabled(entity, modifier) {
    if (modifier == "fiskheroes:retractable_blade" || modifier == "fiskheroes:electrokinesis") {
        return entity.getData("fiskheroes:steeled");
    }
	else if (modifier == "fiskheroes:steel_transformation") {
		return entity.getHeldItem().isEmpty();
	}
    return true;
}