function init(hero) {
    hero.setName("Daredevil");
    hero.setTier(6);
    
    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("minecraft:iron_axe");
    
    hero.addPowers("pack:acrobat", "fiskheroes:enhanced_reflexes",   "fiskheroes:accelerated_perception");
   
     hero.addAttribute("WEAPON_DAMAGE", 6.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 10.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 25.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.85, 0);
    hero.addAttribute("SPRINT_SPEED", 0.6, 1);
    hero.addAttribute("STEP_HEIGHT", 1.0, 0);	
    
	
    hero.addKeyBind("SLOW_MOTION", "Enhanced Senses", 1);
hero.addKeyBind("BLADE", "Billy Club", 2);
	  hero.addKeyBind("WEB_ZIP", "Billy Club Zip", 3);
    hero.addKeyBindFunc("func_WEB_SWINGING", webSwingingKey, "Billy Club Swinging", 4);
	
	
	hero.addAttributeProfile("BLADE", bladeProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getProfile);
    hero.addDamageProfile("BLADE", {"types": {"BLUNT": 1.0}});
	hero.setModifierEnabled(isModifierEnabled);
}

function webSwingingKey(player, manager) {
    var flag = player.getData("fiskheroes:web_swinging");
    
    if (!flag) {
        manager.setDataWithNotify(player, "fiskheroes:prev_utility_belt_type", player.getData("fiskheroes:utility_belt_type"));
        manager.setDataWithNotify(player, "fiskheroes:utility_belt_type", -1);
        manager.setDataWithNotify(player, "fiskheroes:gliding", false);
    }
    
    manager.setDataWithNotify(player, "fiskheroes:web_swinging", !flag);
    return true;
}
function bladeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 13, 0);
    profile.addAttribute("SPRINT_SPEED", 0.5, 1);
}

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

function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:web_swinging") {
		return entity.getData("fiskheroes:blade");
	}
	else if (modifier.name() == "fiskheroes:web_zip") {
		return entity.getData("fiskheroes:blade");
	}
    return true;
}