function init(hero) {
    hero.setName("Cyborg /CW");
    hero.setVersion("Doom Patrol");
    hero.setTier(4);
    
    hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestplate");
    hero.setLeggings("item.superhero_armor.piece.leggings");
    hero.setBoots("item.superhero_armor.piece.boots");
    
    hero.addPowers("cwheropack:cyber_physiology");
    hero.addAttribute("PUNCH_DAMAGE", 6.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 5.45, 1);
    
    hero.addKeyBind("AIM", "Sonic Cannon", 1);
    hero.addKeyBind("HEAT_VISION", "Sonic Laser", 3);
 
    hero.supplyFunction("canAim", canAim);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setModifierEnabled(isModifierEnabled);

    hero.addSoundEvent("AIM_START", ["fiskheroes:mk50_cannon_aim", "fiskheroes:mk50_cannon_static"]);
    hero.addSoundEvent("AIM_STOP", "fiskheroes:mk50_cannon_retract");
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty();
}
function isModifierEnabled(entity, modifier) {
return entity.getData("fiskheroes:dyn/nanite_timer") >= 1 || modifier != "fiskheroes:heat_vision"&& modifier != "fiskheroes:energy_blast";

}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "HEAT_VISION":
        return entity.getHeldItem().isEmpty() && entity.getData("fiskheroes:aiming");
    default:
        return true;
    }
}