function init(hero) {
    hero.setName("Link/SSBHP");
    hero.setTier(3);
    hero.setVersion("Super Smash Bros");
    
    hero.setHelmet("item.superhero_armor.piece.hood");
    hero.setChestplate("item.superhero_armor.piece.tunic");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.addEquipment("fiskheroes:prometheus_sword");
    hero.addEquipment("fiskheroes:compound_bow");
    hero.addEquipment("fiskheroes:quiver");
    hero.addEquipment("fiskheroes:captain_americas_shield");
    
    hero.addAbilities("fiskheroes:archery", "fiskheroes:throwing_stars", "fiskheroes:retractable_shield", "fiskheroes:retractable_blade");
    hero.addAttribute("ARROW_DAMAGE", 0.15, 1);
    hero.addAttribute("ATTACK_DAMAGE", 1.1, 1);
    hero.addAttribute("BOW_DRAWBACK", 0.6, 1);
    hero.addAttribute("FALL_RESISTANCE", 5.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 0);
    hero.addAttribute("PUNCH_DAMAGE", 1.5, 0);
    hero.addAttribute("SPRINT_SPEED", 0.15, 1);
    hero.addAttribute("SWORD_DAMAGE", -0.25, 1);
    
    hero.addKeyBind("HORIZONTAL_BOW", "key.horizontalBow", 4);
    hero.addKeyBind("UTILITY_RESET", "key.utilityReset", 2);
    hero.addKeyBind("UTILITY_SWITCH", "key.utilitySwitch", 3);
	hero.addKeyBind("SHIELD", "Toggle Shield", 1);
	hero.addKeyBind("BLADE", "Toggle Sword", 5);
	
	hero.setHasPermission(hasPermission);
	hero.addAttributeProfile("SHIELD", shieldProfile);
    hero.setAttributeProfile(getAttributeProfile);
	
	hero.setDefaultScale(0.945);
}

function shieldProfile(profile) {
    profile.addAttribute("ARROW_DAMAGE", 0.15, 1);
    profile.addAttribute("ATTACK_DAMAGE", 1.0, 1);
    profile.addAttribute("BOW_DRAWBACK", 0.6, 1);
    profile.addAttribute("FALL_RESISTANCE", 5.0, 0);
    profile.addAttribute("JUMP_HEIGHT", 1.5, 0);
    profile.addAttribute("PUNCH_DAMAGE", 5.0, 0);
    profile.addAttribute("SPRINT_SPEED", 0.15, 1);
    profile.addAttribute("SWORD_DAMAGE", -0.25, 1);
}
function bladeProfile(profile) {
    profile.addAttribute("ARROW_DAMAGE", 0.15, 1);
    profile.addAttribute("ATTACK_DAMAGE", 1.0, 1);
    profile.addAttribute("BOW_DRAWBACK", 0.6, 1);
    profile.addAttribute("FALL_RESISTANCE", 5.0, 0);
    profile.addAttribute("JUMP_HEIGHT", 1.5, 0);
    profile.addAttribute("PUNCH_DAMAGE", 5.0, 0);
    profile.addAttribute("SPRINT_SPEED", 0.15, 1);
    profile.addAttribute("SWORD_DAMAGE", 3.25, 1);
}

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

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