function init(hero) {
    hero.setName("Winter Soldier");
    hero.setTier(8);
      
	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.setPrimaryEquipment("fiskheroes:captain_americas_shield");
    hero.addPrimaryEquipment("fiskheroes:beretta_93r", true, item => !item.nbt().getBoolean("Dual"));
	hero.addEquipment("minecraft:iron_axe");
    hero.addPowers("pack:dagger","pack:winter", "fiskheroes:shield_throwing");
	
    hero.addAttribute("WEAPON_DAMAGE", 10.5, 0);
    hero.addAttribute("PUNCH_DAMAGE", 14.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 8.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.25, 0);
    hero.addAttribute("SPRINT_SPEED", 0.9, 1);
    hero.addAttribute("STEP_HEIGHT", 0.5, 0);
    
	
	  hero.addKeyBind("AIM", "key.aim", -1);
	hero.addKeyBind("SHIELD", "Arm Block", 4);
    hero.addKeyBind("GUN_RELOAD", "key.reload", 2); 
    hero.addKeyBind("UTILITY_BELT", "Grenades", 3);
   hero.addKeyBind("SHIELD_THROW", "key.shieldThrow", 1);
hero.addKeyBind("BLADE", "Combat Knife", 5);
   
       hero.setHasPermission(hasPermission);
     hero.setKeyBindEnabled((entity, keyBind) => keyBind != "GUN_RELOAD" || entity.getHeldItem().isGun() && !entity.getData("fiskheroes:aiming"));
      hero.supplyFunction("canAim", entity => entity.getHeldItem().isGun());
	hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {"types": {"SHARP": 1.0}});

}


function bladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 17, 0);
}

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



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


