function init(hero) {
    hero.setName("Silver Surfer");
    hero.setVersion("item.superhero_armor.version.comics");
    hero.setAliases("ss", "ssc", "silver_surfer", "surfer");
    hero.setTier(9);

    hero.setHelmet("item.superhero_armor.piece.head");
    hero.setChestplate("item.superhero_armor.piece.torso");
    hero.setLeggings("item.superhero_armor.piece.legs");
    hero.setBoots("Feet");

    hero.addPowers("secretheroes:cosmic_surfboard", "secretheroes:the_power_cosmic");
    hero.addAttribute("BASE_SPEED_LEVELS", 7.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("PUNCH_DAMAGE", 10.5, 0);
    hero.addAttribute("WEAPON_DAMAGE", -2.0, 0);

    hero.addKeyBind("ENERGY_PROJECTION", "key.cosmicBeam", 1);
    hero.addKeyBind("SUPER_SPEED", "key.superSpeed", 2);
    hero.addKeyBind("INTANGIBILITY", "key.intangibility", 3);
    hero.addKeyBind("HOVER", "key.levitate", 4);
    hero.addKeyBind("SURFBOARD", "Summon Surfboard", 5);

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

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:flight":
        return entity.getData("secretheroes:dyn/surfboard");
    case "fiskheroes:intangibility":
        return entity.getData("secretheroes:dyn/surfboard");
    case "fiskheroes:super_speed":
        return entity.getData("secretheroes:dyn/surfboard") && !entity.isOnGround();
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "HOVER":
        return entity.getData("secretheroes:dyn/surfboard");
    case "INTANGIBILITY":
        return entity.getData("secretheroes:dyn/surfboard");
    case "SUPER_SPEED":
        return entity.getData("secretheroes:dyn/surfboard");
    default:
        return true;
    }
}

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