function init(hero) {
    hero.setName("Batwing");
    hero.setTier(7);
    
    hero.setHelmet("Helmet");
    hero.setChestplate("Chestplate");
    hero.setLeggings("Pants");
    hero.setBoots("Boots");
    hero.setPrimaryEquipment("fiskheroes:grappling_gun");
    
    hero.addPowers("jmctheroes:batwing_suit");
    hero.addAttribute("PUNCH_DAMAGE", 7.5, 0);
    hero.addAttribute("WEAPON_DAMAGE", 3.5, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 6.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.2, 1);
    hero.addAttribute("IMPACT_DAMAGE", 0.6, 1);
    
    hero.addKeyBind("UTILITY_BELT", "key.utilityBelt", 1);
    hero.addKeyBind("FLIGHT", "Toggle Flight", 2);
    
    hero.setHasPermission(hasPermission);
    hero.setHasProperty(hasProperty);
    hero.setModifierEnabled(isModifierEnabled);
    hero.addSoundEvent("MASK_OPEN", "fiskheroes:mk50_mask_open");
    hero.addSoundEvent("MASK_CLOSE", "fiskheroes:mk50_mask_close");
}

function hasProperty(entity, property) {
    switch (property) {
    case "MASK_TOGGLE":
        return true;
    case "BREATHE_SPACE":
        return !entity.getData("fiskheroes:mask_open");
    default:
        return false;
    }
}

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

function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:gliding") {
        return (entity.getData("jmctheroes:dyn/flight"));
    }
    else if (modifier.name() == "fiskheroes:potion_retention") {
        return (!entity.getData("fiskheroes:mask_open"));
    }
    return true;
}