function init(hero) {
    hero.setName("Stark Nano-Tech Gauntlet");
    hero.setCosmic();
    hero.setTier(6);
    
    hero.setChestplate("Glove");
    
    hero.addPowers("legacyheroes:sis");
    hero.addAttribute("PUNCH_DAMAGE", 11, 0);
    hero.addAttribute("JUMP_HEIGHT", 2.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 1.0, 1);
    hero.addAttribute("MAX_HEALTH", 10.0, 0);
    hero.addAttribute("BASE_SPEED_LEVELS", 3.9, 0);

    hero.addKeyBind("TELEPORT", "Teleport", 1);
    hero.addKeyBind("CHARGED_BEAM", "Power Stone Beam", 2);
    hero.addKeyBind("ENERGY_PROJECTION", "Power Stone Beam", 2);
    hero.addKeyBind("SHIELD", "Your Soul Protector", 3);
    hero.addKeyBind("INVISIBILITY", "Reality’s Whim", 4);
    hero.addKeyBind("INTANGIBILITY", "Intangibility", 4);
    hero.addKeyBind("SUPER_SPEED", "Time-Speed", 5);
    hero.addKeyBind("SLOW_MOTION", "Slow Time", 5);

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

function ruleModifier(entity, rule) {
    if (rule.name() == "fiskheroes:dmg_chargedbeam") {
        return 45.0;
    }
    else if (rule.name() == "fiskheroes:range_chargedbeam") {
        return 150.0;
    }
    else if (rule.name() == "fiskheroes:dmg_lightningcast") {
        return 21.5;
    }
    else if (rule.name() == "fiskheroes:range_lightningcast") {
        return 28.5;
    }
    return null;
}

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

function isKeyBindEnabled(entity, keyBind) {
    
    switch (keyBind) {
    case "ENERGY_PROJECTION":
        return entity.isSneaking() || entity.isBookPlayer();
    case "CHARGED_BEAM":
        return !entity.isSneaking();
    case "INVISIBILITY":
        return entity.isSneaking() || entity.isBookPlayer();
    case "INTANGIBILITY":
        return !entity.isSneaking();
    case "SUPER_SPEED":
        return entity.isSneaking() || entity.isBookPlayer();
    case "SLOW_MOTION":
        return !entity.isSneaking();
    default:
        return true;
    }    
}