Enum Class ChallengeMode

java.lang.Object
java.lang.Enum<ChallengeMode>
dev.deepcore.challenge.ChallengeMode
All Implemented Interfaces:
Serializable, Comparable<ChallengeMode>, Constable

public enum ChallengeMode extends Enum<ChallengeMode>
Preset challenge configurations that map to default component toggles.
  • Enum Constant Details

    • KEEP_INVENTORY_UNLIMITED_DEATHS

      public static final ChallengeMode KEEP_INVENTORY_UNLIMITED_DEATHS
      Keep inventory with non-hardcore deaths allowed.
    • LOSE_INVENTORY_UNLIMITED_DEATHS

      public static final ChallengeMode LOSE_INVENTORY_UNLIMITED_DEATHS
      Lose inventory with non-hardcore deaths allowed.
    • LOSE_INVENTORY_UNLIMITED_DEATHS_SHARED_INVENTORY

      public static final ChallengeMode LOSE_INVENTORY_UNLIMITED_DEATHS_SHARED_INVENTORY
      Lose inventory and share inventory in non-hardcore mode.
    • HARDCORE_HEALTH_REFILL

      public static final ChallengeMode HARDCORE_HEALTH_REFILL
      Hardcore mode with natural health refill enabled.
    • HARDCORE_NO_REFILL

      public static final ChallengeMode HARDCORE_NO_REFILL
      Hardcore mode with no natural health refill.
    • HARDCORE_NO_REFILL_SHARED_INVENTORY

      public static final ChallengeMode HARDCORE_NO_REFILL_SHARED_INVENTORY
      Hardcore mode with no refill and shared inventory.
    • HARDCORE_SHARED_HEALTH

      public static final ChallengeMode HARDCORE_SHARED_HEALTH
      Hardcore mode with shared health and health refill.
    • HARDCORE_SHARED_HEALTH_NO_REFILL

      public static final ChallengeMode HARDCORE_SHARED_HEALTH_NO_REFILL
      Hardcore mode with shared health and no refill.
    • HARDCORE_SHARED_HEALTH_NO_REFILL_SHARED_INVENTORY

      public static final ChallengeMode HARDCORE_SHARED_HEALTH_NO_REFILL_SHARED_INVENTORY
      Hardcore shared health/no-refill plus shared inventory.
    • HARDCORE_SHARED_HEALTH_NO_REFILL_DEGRADING_INVENTORY

      public static final ChallengeMode HARDCORE_SHARED_HEALTH_NO_REFILL_DEGRADING_INVENTORY
      Hardcore shared health/no-refill plus degrading inventory.
    • HARDCORE_SHARED_HEALTH_NO_REFILL_DEGRADING_INVENTORY_INITIAL_HALF_HEART

      public static final ChallengeMode HARDCORE_SHARED_HEALTH_NO_REFILL_DEGRADING_INVENTORY_INITIAL_HALF_HEART
      Hardcore shared health/no-refill with degrading inventory and half-heart start.
  • Method Details

    • values

      public static ChallengeMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ChallengeMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • key

      public String key()
      Returns the stable key for this challenge mode.
      Returns:
      configuration key for this mode
    • displayName

      public String displayName()
      Returns the display name for this challenge mode.
      Returns:
      user-facing display label for this mode
    • defaultComponents

      public Set<ChallengeComponent> defaultComponents()
      Returns a defensive copy of default components enabled by this mode.
      Returns:
      copy of default components enabled for this challenge mode
    • fromKey

      public static Optional<ChallengeMode> fromKey(String key)
      Resolves a challenge mode from a configuration key.
      Parameters:
      key - mode key to resolve
      Returns:
      optional matching challenge mode