Package dev.deepcore.challenge
Enum Class ChallengeMode
- All Implemented Interfaces:
Serializable,Comparable<ChallengeMode>,Constable
Preset challenge configurations that map to default component toggles.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHardcore mode with natural health refill enabled.Hardcore mode with no natural health refill.Hardcore mode with no refill and shared inventory.Hardcore mode with shared health and health refill.Hardcore mode with shared health and no refill.Hardcore shared health/no-refill plus degrading inventory.Hardcore shared health/no-refill with degrading inventory and half-heart start.Hardcore shared health/no-refill plus shared inventory.Keep inventory with non-hardcore deaths allowed.Lose inventory with non-hardcore deaths allowed.Lose inventory and share inventory in non-hardcore mode. -
Method Summary
Modifier and TypeMethodDescriptionReturns a defensive copy of default components enabled by this mode.Returns the display name for this challenge mode.static Optional<ChallengeMode> Resolves a challenge mode from a configuration key.key()Returns the stable key for this challenge mode.static ChallengeModeReturns the enum constant of this class with the specified name.static ChallengeMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
KEEP_INVENTORY_UNLIMITED_DEATHS
Keep inventory with non-hardcore deaths allowed. -
LOSE_INVENTORY_UNLIMITED_DEATHS
Lose inventory with non-hardcore deaths allowed. -
LOSE_INVENTORY_UNLIMITED_DEATHS_SHARED_INVENTORY
Lose inventory and share inventory in non-hardcore mode. -
HARDCORE_HEALTH_REFILL
Hardcore mode with natural health refill enabled. -
HARDCORE_NO_REFILL
Hardcore mode with no natural health refill. -
HARDCORE_NO_REFILL_SHARED_INVENTORY
Hardcore mode with no refill and shared inventory. -
HARDCORE_SHARED_HEALTH
Hardcore mode with shared health and health refill. -
HARDCORE_SHARED_HEALTH_NO_REFILL
Hardcore mode with shared health and no refill. -
HARDCORE_SHARED_HEALTH_NO_REFILL_SHARED_INVENTORY
Hardcore shared health/no-refill plus shared inventory. -
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_HEARTHardcore shared health/no-refill with degrading inventory and half-heart start.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
key
Returns the stable key for this challenge mode.- Returns:
- configuration key for this mode
-
displayName
Returns the display name for this challenge mode.- Returns:
- user-facing display label for this mode
-
defaultComponents
Returns a defensive copy of default components enabled by this mode.- Returns:
- copy of default components enabled for this challenge mode
-
fromKey
Resolves a challenge mode from a configuration key.- Parameters:
key- mode key to resolve- Returns:
- optional matching challenge mode
-