function init(hero) {
    hero.setName("Superman");
    hero.setVersion("DCEU");
    hero.setTier(8);
    
    hero.setChestplate("chestpiece");
    hero.setLeggings("pants");
    hero.setBoots("boots");
    
    hero.addPowers("cwheropack:kryptonian_physiology");
    hero.addAttribute("PUNCH_DAMAGE", 11.0, 0);
    hero.addAttribute("IMPACT_DAMAGE", 0.6, 1);
    hero.addAttribute("WEAPON_DAMAGE", -0.5, 1);
    hero.addAttribute("JUMP_HEIGHT", 1.0, 1);
    hero.addAttribute("SPRINT_SPEED", 0.40, 1);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("MAX_HEALTH", 4.0, 0);
    hero.addAttribute("BASE_SPEED_LEVELS", 2.0, 0);

    hero.addKeyBind("CHARGED_BEAM", "key.heatVision", 1);
    hero.addKeyBind("SLOW_MOTION", "key.slowMotion", 2);
    hero.addKeyBind("SUPER_SPEED", "key.superSpeed", 3);
    hero.addKeyBind("HEAT_VISION", "Freeze", 4);
    hero.addKeyBind("TELEPORT", "Space/Earth", 2)

    hero.setHasProperty(hasProperty);
    hero.setKeyBindEnabled(isKeyBindEnabled);
}

function hasProperty(entity, property) {
    return property == "BREATHE_SPACE";
}

function isKeyBindEnabled(entity, keyBind) {
    var height = entity.posY();
    switch (keyBind) {
    case "TELEPORT":
        return entity.posY() > 600;
    case "SLOW_MOTION":
        return entity.posY() <= 600;
    default:
        return true;
    }
}

