function init(hero) {
    hero.setName("Captain America");
    hero.setVersion("Zero Energy-Secret Avengers");
    hero.setTier(7);
    
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.setPrimaryEquipment("fiskheroes:captain_americas_shield");
    
    hero.addPowers("fiskheroes:super_soldier_serum", "fiskheroes:shield_throwing", "fiskheroes:retractable_shield");
    hero.addAttribute("PUNCH_DAMAGE", 7.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 4.5, 0);
    hero.addAttribute("JUMP_HEIGHT", 2.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 6.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.4, 1);
    
    hero.addKeyBind("SHIELD_THROW", "key.shieldThrow", 1);
    hero.addKeyBind("SHIELD", "key.shield", 2);
    
    hero.setHasPermission(hasPermission);
    hero.addAttributeProfile("SHIELD", shieldProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {
        "types": {
            "BLUNT": 0.9,
            "SHARP": 0.1
        }
    });
}

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

function shieldProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 12.5, 0);
}

function getProfile(entity) {
    return entity.getData("fiskheroes:shield") ? "SHIELD" : null;
}
