function init(hero) {
    hero.setName("The Quark");
    hero.setTier(6);

    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("diminpack:smart_exosuit");
    hero.addPowers("diminpack:speed_force")
    hero.addAttribute("PUNCH_DAMAGE", 7.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.15, 1);
    hero.addAttribute("JUMP_HEIGHT", 0.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 7.0, 0);
    hero.addAttribute("BASE_SPEED_LEVELS", 4.0, 0);

    hero.addKeyBind("SIZE_MANIPULATION", "key.sizeManipulation", 1);
    hero.addKeyBind("MINIATURIZE_SUIT", "key.miniaturizeSuit", 3);
    hero.addKeyBind("GUN_RELOAD", "key.reload", 2);
    hero.addKeyBind("AIM", "key.aim", -1);
    hero.addKeyBind("SLOW_MOTION", "Dont Break Things", 5);
    hero.addKeyBind("SUPER_SPEED", "Move Fast", 4);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setHasProperty(hasProperty);
    hero.setHasPermission((entity, permission) => permission == "USE_GUN");
    hero.supplyFunction("canAim", canAim);

    
    hero.setTickHandler((entity, manager) => {
        manager.incrementData(entity, "fiskheroes:dyn/booster_timer", 2, entity.getData("fiskheroes:flying"));
    });
}



function isModifierEnabled(entity, modifier) {
    return modifier.name() != "fiskheroes:water_breathing" || entity.getData("fiskheroes:mask_open");
}

function hasProperty(entity, property) {
    return property == "MASK_TOGGLE" || property == "BREATHE_SPACE" && entity.getData("fiskheroes:mask_open");
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
        case "GUN_RELOAD":
            return entity.getHeldItem().isGun() && !(entity.isSprinting() && entity.getData("fiskheroes:flying"));
        default:
            return true;
    }
}

function canAim(entity) {
    return entity.getHeldItem().isGun() && !(entity.isSprinting() && entity.getData("fiskheroes:flying"));
}
