function init(hero) {
    hero.setName("Vigilant /CW");
    hero.setTier(5);
    
    hero.setHelmet("item.superhero_armor.piece.mask");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    hero.addEquipment("fiskheroes:rip_hunters_gun");
    hero.addEquipment("fiskheroes:chronos_rifle");
    hero.addEquipment("fiskheroes:grappling_gun");

    hero.addPowers("fiskheroes:throwing_stars", "fiskheroes:enhanced_reflexes", "fiskheroes:cellular_regeneration", "cwheropack:pistol_gun");
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 3.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 0.60, 1);
    hero.addAttribute("PUNCH_DAMAGE", 5.22, 0);
    hero.addAttribute("SPRINT_SPEED", 0.3, 1);
    
    hero.addKeyBind("AIM", "Aim", 1);
    hero.addKeyBind("UTILITY_BELT", "key.utilityBelt", 2);

    hero.setDefaultScale(0.99);

    hero.supplyFunction("canAim", canAim);
    hero.setHasPermission(hasPermission);
}

function canAim(entity) {
    return entity.getHeldItem().name() == "fiskheroes:rip_hunters_gun" || entity.getHeldItem().name() == "fiskheroes:chronos_rifle" || entity.getHeldItem().isEmpty();
}

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