function init(hero) {
    hero.setName("Black Widow");
    hero.setTier(6);
    
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.addPrimaryEquipment("fiskheroes:desert_eagle{Dual:1}", true, item => !item.nbt().getBoolean("Dual"));
    hero.addPrimaryEquipment("fiskheroes:tactical_tonfa{Dual:1}", true, item => item.nbt().getBoolean("Dual"));
    hero.addPrimaryEquipment("fiskheroes:grappling_gun", true);
	
   
	  hero.addPowers("fiskheroes:leaping", "fiskheroes:invisibility", "pack:widow");
    
	 
     hero.addAttribute("WEAPON_DAMAGE", 8.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 10, 0);
    hero.addAttribute("FALL_RESISTANCE", 15.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 0);
    hero.addAttribute("SPRINT_SPEED", 0.8, 1);
    hero.addAttribute("STEP_HEIGHT", 1.0, 0);	
	
    hero.addKeyBind("AIM", "key.aim", -1);
	
    hero.addKeyBind("CHARGED_BEAM", "Widow's Bite", 4);
    hero.addKeyBind("GUN_RELOAD", "key.reload", 1);
	  hero.addKeyBind("INVISIBILITY", "key.invisibility", 2);  
    hero.addKeyBind("UTILITY_BELT", "key.utilityBelt", 3);
    
    hero.setHasPermission(hasPermission);
     hero.setKeyBindEnabled((entity, keyBind) => keyBind != "GUN_RELOAD" || entity.getHeldItem().isGun() && !entity.getData("fiskheroes:aiming"));
      hero.supplyFunction("canAim", entity => entity.getHeldItem().isGun());

}

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

