Class ItemChargeRequirement
java.lang.Object
net.storm.api.movement.pathfinder.model.requirement.charges.ItemChargeRequirement
- Direct Known Subclasses:
ChargeRequirement,UnlockRequirement
Abstract base class for item charge tracking requirements.
ItemChargeRequirement provides the foundation for tracking items that have
limited uses or charges. This base class stores common properties shared by
both ChargeRequirement (numeric charges) and UnlockRequirement
(boolean unlock states).
Common Properties
- id - Unique identifier for this charge requirement
- itemIds - Array of item IDs that this requirement applies to
- chatTriggers - Regex patterns to detect charge changes from chat messages
Subclasses
ChargeRequirement- For items with numeric charges (e.g., jewelry with 8 charges)UnlockRequirement- For items with unlock states (e.g., unlocked destinations)
Chat Triggers
Chat triggers allow the system to detect charge changes from game messages. For example, when a Ring of Dueling is used, the game displays remaining charges which can be captured via regex patterns.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionRegex patterns for detecting charge changes from game chat messages.protected final StringUnique identifier for this charge requirement (e.g., "ring_of_dueling").protected final int[]Array of item IDs that this charge tracking applies to. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedItemChargeRequirement(String id, int[] itemIds, List<Pattern> chatTriggers) Creates a new item charge requirement. -
Method Summary
-
Field Details
-
id
Unique identifier for this charge requirement (e.g., "ring_of_dueling"). -
itemIds
protected final int[] itemIdsArray of item IDs that this charge tracking applies to. -
chatTriggers
Regex patterns for detecting charge changes from game chat messages.
-
-
Constructor Details
-
ItemChargeRequirement
Creates a new item charge requirement.- Parameters:
id- unique identifier for this requirementitemIds- array of applicable item IDschatTriggers- regex patterns for detecting charge messages
-