function init(hero) {
    hero.setName("Nightwing/Comics");
    hero.setTier(6);
    
    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.setPrimaryEquipment("fiskheroes:black_canarys_tonfas");
    
    hero.addPowers("tmfp:nightwing_suit");
    hero.addAttribute("FALL_RESISTANCE", 5.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 0);
    hero.addAttribute("PUNCH_DAMAGE", 3.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.3, 1);
    hero.addAttribute("IMPACT_DAMAGE", 0.5, 1);
    
    hero.addKeyBind("UTILITY_BELT", "key.utilityBelt", 1);
    hero.addKeyBind("ELECTRICAL_SUIT", "Electrical Suit", 2);
    
    hero.addAttributeProfile("ELECTRICAL", electricalProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setHasPermission(hasPermission);
    hero.setModifierEnabled(isModifierEnabled);
}

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

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:flight":
        return entity.isInWater();
    default:
        return true;
    }
}
function getAttributeProfile(entity) {
    return entity.getData("tmfp:dyn/electrical") ? "ELECTRICAL" : null;
}
function electricalProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("FALL_RESISTANCE", 1.5, 1);
    profile.addAttribute("JUMP_HEIGHT", 3.0, 0);
    profile.addAttribute("PUNCH_DAMAGE", 11.5, 0);
    profile.addAttribute("SPRINT_SPEED", 0.6, 1);
}