Package net.storm.api.game
Enum Class AttackStyle
- All Implemented Interfaces:
Serializable,Comparable<AttackStyle>,Constable
Represents the different attack style options in the combat interface.
Attack styles determine which combat skills gain experience and may affect accuracy or damage bonuses. The available styles depend on the weapon equipped.
Common attack style mappings:
- FIRST - Usually "Accurate" (Attack XP) or weapon-specific style
- SECOND - Usually "Aggressive" (Strength XP) or weapon-specific style
- THIRD - Usually "Defensive" (Defence XP) or weapon-specific style
- FOURTH - Usually "Controlled" (shared XP) or weapon-specific style
- SPELLS - Autocast spells (Magic XP)
- SPELLS_DEFENSIVE - Defensive autocast spells (Magic + Defence XP)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe first attack style option (index 0).The fourth attack style option (index 3).The second attack style option (index 1).Autocast spells attack style.Defensive autocast spells attack style.The third attack style option (index 2).Unknown or invalid attack style. -
Method Summary
Modifier and TypeMethodDescriptionstatic AttackStylefromIndex(int index) Gets an attack style by its varbit index value.Deprecated, for removal: This API element is subject to removal in a future version.This method is scheduled for removal.static AttackStyleReturns the enum constant of this class with the specified name.static AttackStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIRST
The first attack style option (index 0). Typically "Accurate" for melee weapons, granting Attack experience. -
SECOND
The second attack style option (index 1). Typically "Aggressive" for melee weapons, granting Strength experience. -
THIRD
The third attack style option (index 2). Typically "Defensive" for melee weapons, granting Defence experience. -
FOURTH
The fourth attack style option (index 3). Typically "Controlled" for melee weapons, granting shared experience. -
SPELLS
Autocast spells attack style. Used when autocasting offensive magic spells, granting Magic experience. -
SPELLS_DEFENSIVE
Defensive autocast spells attack style. Used when autocasting magic spells defensively, granting Magic and Defence experience. -
UNKNOWN
Unknown or invalid attack style. Returned when the current style cannot be determined.
-
-
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
-
fromIndex
Gets an attack style by its varbit index value.- Parameters:
index- the varbit index to look up- Returns:
- the matching attack style, or
UNKNOWNif not found
-
getInterfaceAddress
Deprecated, for removal: This API element is subject to removal in a future version.This method is scheduled for removal. Useinstead.invalid reference
#getComponent()Gets the interface address for this attack style's widget.- Returns:
- the interface address
-