function init(hero) {

    hero.setName("Darkseid");

    hero.setVersion("\u00A76\u00A7lComics\u00A7r");

    hero.setTier(10);

    

    hero.setHelmet("Head");

    hero.setChestplate("Torso");

    hero.setLeggings("Legs");

    hero.setBoots("Boots");

    

    hero.addPowers("ahhp:omega_beam");

    hero.addAttribute("PUNCH_DAMAGE", 14.5, 0);

    hero.addAttribute("KNOCKBACK", 3.5, 0);

    hero.addAttribute("WEAPON_DAMAGE", -2.0, 0);

    hero.addAttribute("JUMP_HEIGHT", 2.0, 0);

    hero.addAttribute("SPRINT_SPEED", 5.0, 1);

    hero.addAttribute("FALL_RESISTANCE", 4.0, 1);

    

    hero.addKeyBind("CHARGED_BEAM", "Omega Beam", 1);

    hero.addKeyBind("EARTHQUAKE", "Omega Quake", 2);

    hero.addKeyBind("SHIELD", "Omega ForceField", 3);

    hero.addKeyBind("TELEPORT", "Boomtube", 4);

    hero.addKeyBindFunc("func_GIANT_MODE", giantModeKey, "Omega Form", 5);



    hero.setDefaultScale(1.1);

    hero.addAttributeProfile("SHIELD", shieldProfile);

    hero.setAttributeProfile(getAttributeProfile);

    hero.setModifierEnabled(isModifierEnabled);

    hero.setKeyBindEnabled(isKeyBindEnabled);

    hero.setHasProperty(hasProperty);

    hero.setTickHandler((entity, manager) => {

        if (entity.motionY() < -0.6 && !entity.isSneaking() && !entity.isOnGround() && !entity.world().blockAt(entity.pos().add(0, -3, 0)).isSolid()) {

            manager.setData(entity, "fiskheroes:flying", true);

        };

        var t = entity.getData("fiskheroes:dyn/superhero_landing_ticks");

    if (t == 0 && !entity.isSprinting() && !entity.isOnGround() && entity.motionY() < -1.25 && entity.getData("fiskheroes:flight_boost_timer") > 0 && entity.world().blockAt(entity.pos().add(0, -2, 0)).isSolid()) {
        manager.setDataWithNotify(entity, "fiskheroes:dyn/superhero_landing_ticks", t = 12);
        entity.playSound("ahhp:suit.groundsmash", 1, 1.15 - Math.random() * 0.3);
    }
    else if (t > 0) {
        manager.setData(entity, "fiskheroes:dyn/superhero_landing_ticks", --t);
    }

    manager.incrementData(entity, "fiskheroes:dyn/superhero_landing_timer", 2, 8, t > 0);
        
    });

    hero.addSoundEvent("LAND", "fiskheroes:anti_land");

    hero.addSoundEvent("PUNCH", "fiskheroes:anti_punch");

    hero.addSoundEvent("STEP", "fiskheroes:anti_walk");

}



function giantModeKey(player, manager) {

    var flag = player.getData("fiskheroes:dyn/giant_mode");

    manager.setData(player, "fiskheroes:dyn/giant_mode", !flag);

    manager.setData(player, "fiskheroes:size_state", flag ? -1 : 1);

    return true;

}



function shieldProfile(profile) {

    profile.inheritDefaults();

    profile.addAttribute("BASE_SPEED", -0.25, 1);

    profile.addAttribute("JUMP_HEIGHT", -1.0, 1);

}



function getAttributeProfile(entity) {

    return entity.getData("fiskheroes:shield_blocking") ? "SHIELD" : null;

}



function isModifierEnabled(entity, modifier) {

    switch (modifier.name()) {

    case "fiskheroes:arrow_catching":

        return entity.getData("fiskheroes:scale") <= 1.21 && !entity.getData("fiskheroes:shield_blocking") && entity.getData("fiskheroes:flight_boost_timer") == 0;

    case "fiskheroes:tremor":

        return entity.getData("fiskheroes:scale") <= 1.21 && entity.getData("fiskheroes:flight_boost_timer") == 0;

    case "fiskheroes:controlled_flight":

        return entity.getData("fiskheroes:scale") <= 1.21;

    default:

        return true;

    }

}



function isKeyBindEnabled(entity, keyBind) {

    switch (keyBind) {

    case "func_GIANT_MODE":

        var timer = entity.getData("fiskheroes:dyn/giant_mode_timer");

        return (timer == 0 || timer == 1) && entity.getData("fiskheroes:flight_timer") == 0;

    case "EARTHQUAKE":

        return entity.getData("fiskheroes:scale") <= 1.21 && entity.getData("fiskheroes:flight_boost_timer") == 0;

    case "CHARGED_BEAM":

        return entity.getData("fiskheroes:flight_boost_timer") == 0 && entity.getData("fiskheroes:shield_blocking_timer") == 0;

    case "TELEPORT":

        return entity.getData("fiskheroes:scale") <= 1.21 && entity.getData("fiskheroes:flight_boost_timer") == 0;

    case "SHIELD":

        return entity.getHeldItem().isEmpty() && entity.getData("fiskheroes:scale") <= 1.21 && entity.getData("fiskheroes:flight_boost_timer") == 0;

    default:

        return true;

    }

}



function hasProperty(entity, property) {

    return property == "BREATHE_SPACE";

}