Enum Class AttackStyle

java.lang.Object
java.lang.Enum<AttackStyle>
net.storm.api.game.AttackStyle
All Implemented Interfaces:
Serializable, Comparable<AttackStyle>, Constable

public enum AttackStyle extends Enum<AttackStyle>
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)

  • Enum Constant Details

    • FIRST

      public static final AttackStyle FIRST
      The first attack style option (index 0). Typically "Accurate" for melee weapons, granting Attack experience.
    • SECOND

      public static final AttackStyle SECOND
      The second attack style option (index 1). Typically "Aggressive" for melee weapons, granting Strength experience.
    • THIRD

      public static final AttackStyle THIRD
      The third attack style option (index 2). Typically "Defensive" for melee weapons, granting Defence experience.
    • FOURTH

      public static final AttackStyle FOURTH
      The fourth attack style option (index 3). Typically "Controlled" for melee weapons, granting shared experience.
    • SPELLS

      public static final AttackStyle SPELLS
      Autocast spells attack style. Used when autocasting offensive magic spells, granting Magic experience.
    • SPELLS_DEFENSIVE

      public static final AttackStyle SPELLS_DEFENSIVE
      Defensive autocast spells attack style. Used when autocasting magic spells defensively, granting Magic and Defence experience.
    • UNKNOWN

      public static final AttackStyle UNKNOWN
      Unknown or invalid attack style. Returned when the current style cannot be determined.
  • Method Details

    • values

      public static AttackStyle[] 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 AttackStyle 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
    • fromIndex

      public static AttackStyle fromIndex(int index)
      Gets an attack style by its varbit index value.
      Parameters:
      index - the varbit index to look up
      Returns:
      the matching attack style, or UNKNOWN if not found
    • getInterfaceAddress

      @Deprecated(forRemoval=true) public InterfaceAddress getInterfaceAddress()
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is scheduled for removal. Use
      invalid reference
      #getComponent()
      instead.
      Gets the interface address for this attack style's widget.
      Returns:
      the interface address