function init(hero) {
    hero.setName("Pit/SSBHP");
    hero.setTier(2);
    hero.setVersion("Super Smash Bros");

    hero.setHelmet("Head");
    hero.setChestplate("Torso");
    hero.setLeggings("Legs");
    hero.setBoots("Sandals");
    hero.addEquipment("fiskheroes:compound_bow");
    hero.addEquipment("fiskheroes:quiver");
    
    hero.addAbilities("fiskheroes:archery", "fiskheroes:gliding_flight", "fiskheroes:retractable_shield");
    hero.addAttribute("BOW_DRAWBACK", 0.50, 1);
    hero.addAttribute("FALL_RESISTANCE", 10.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 0)
    hero.addAttribute("PUNCH_DAMAGE", 0.5, 0);
    hero.addAttribute("SPRINT_SPEED", 0.15, 1);
    hero.addAttribute("SWORD_DAMAGE", -0.25, 1);
    
    hero.addKeyBind("HORIZONTAL_BOW", "key.horizontalBow", 1);
    hero.addKeyBind("SHIELD", "key.shield", 2);
	
	hero.setHasPermission(hasPermission);
	hero.addAttributeProfile("SHIELD", shieldProfile);
    hero.setAttributeProfile(getAttributeProfile);
	
	hero.setDefaultScale(0.94);
}

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 hasPermission(entity, permission) {
    return permission == "THROW_SHIELD" || permission == "USE_SHIELD" || permission == "USE_GRAPPLING_GUN";
}

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